hi_venc_attr
Description
Defines the VENC attributes.
Prototype
typedef struct {
hi_payload_type type;
hi_u32 max_pic_width;
hi_u32 max_pic_height;
hi_u32 buf_size;
hi_u32 profile;
hi_bool is_by_frame;
hi_u32 pic_width;
hi_u32 pic_height;
union {
hi_venc_h264_attr h264_attr;
hi_venc_h265_attr h265_attr;
hi_venc_jpeg_attr jpeg_attr;
hi_venc_prores_attr prores_attr;
};
}hi_venc_attr;
Members
Member |
Description |
|---|---|
type |
Encode protocol. |
max_pic_width |
Maximum width of the source image. Must be an integral multiple of 2. This is a static attribute. Value range: [MIN_WIDTH, MAX_WIDTH], in pixels. MIN_WIDTH and MAX_WIDTH indicate the minimum width and maximum width supported by an encoding channel, respectively. For details, see Table 1. |
max_pic_height |
Maximum height of the source image. Must be an integral multiple of 2. This is a static attribute and does not apply to JPEG encoding. Value range: [MIN_HEIGHT, MAX_HEIGHT], in pixels. MIN_HEIGHT and MAX_HEIGHT indicate the minimum height and maximum height supported by an encoding channel, respectively. For details, see Table 1. |
buf_size |
Size of the stream buffer, in bytes. This is a static attribute.
|
profile |
Encoding profile. A larger value indicates better encoding quality. This is a static attribute.
|
is_by_frame |
Stream fetching mode select. This is a static attribute.
|
pic_width |
Encoding channel width, which must be an integral multiple of MIN_ALIGN. After a channel is created, the channel width can be changed for VENC. However, the channel width cannot be changed for JPEGE. Value range: [MIN_WIDTH, max_pic_width], in pixels. MIN_WIDTH, max_pic_width, and MIN_ALIGN indicate the minimum width of an encoding channel, and the maximum width and minimum alignment (in pixels) of the image to be encoded, receptively. For details, see Table 1. For JPEG encoding, the channel width and height must meet the following condition: pic_width x pic_height ≤ max_pic_width x max_pic_height. |
pic_height |
Encoding channel height, which must be an integral multiple of MIN_ALIGN. Not applicable to JPEG encoding. After a channel is created, the channel height can be changed for VENC. However, the channel height cannot be changed for JPEGE. Value range: [MIN_HEIGHT, max_pic_height], in pixels. MIN_HEIGHT, max_pic_height, and MIN_ALIGN indicate the minimum height of an encoding channel, and the maximum height and minimum alignment (in pixels) of the image to be encoded, receptively. For details, see Table 1. For JPEG encoding, the channel width and height must meet the following condition: pic_width x pic_height ≤ max_pic_width x max_pic_height. |
h264_attr |
Attributes of the encode protocol. |
h265_attr |
Attributes of the encode protocol. |
jpeg_attr |
Attributes of the encode protocol. Reserved. |
prores_attr |
Attributes of the encode protocol. Reserved. |
References
MIN_WIDTH, MAX_WIDTH, MIN_HEIGHT, MAX_HEIGHT, and MIN_ALIGN indicate the minimum width, maximum width, minimum height, maximum height, and minimum alignment (in pixels) of an encoding channel, receptively.