Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Wrong size computation in H.264

shyaki
Beginner
220 Views

the size of the image is computed by Intel like this

lpInfo

->info.clip_info.height = sps->frame_height_in_mbs * 16-

(4>>

sps->frame_mbs_only_flag)*(sps->frame_cropping_rect_top_offset +

sps->frame_cropping_rect_bottom_offset);

for 1920*1088i,

sps->frame_height_in_mbs = 68

sps->frame_mbs_only_flag =0

sps->frame_cropping_rect_top_offset =0

sps->frame_cropping_rect_bottom_offset =4

The above computation g ives the height of 1072 instead of 1080.

4>>sps->frame_mbs_only_flag seems to be

2>>sps->frame_mbs_only_flag

since there are two fileds in a frame.

0 Kudos
2 Replies
Vladimir_Dudnik
Employee
220 Views

thanks for catching this, we will fix that in the next version.

Regards,
Vladimir

0 Kudos
shyaki
Beginner
220 Views

Correct computation should be like this:

crop_left = SubWidthC[p->chroma_format_idc] * p->frame_cropping_rect_left_offset;

crop_right = SubWidthC[p->chroma_format_idc] * p->frame_cropping_rect_right_offset;

crop_top = SubHeightC[p->chroma_format_idc]*( 2 - p->frame_mbs_only_flag ) * p->frame_cropping_rect_top_offset;

crop_bottom = SubHeightC[p->chroma_format_idc]*( 2 - p->frame_mbs_only_flag ) * p->frame_cropping_rect_bottom_offset;

0 Kudos
Reply