Wrong size computation in H.264

Wrong size computation in H.264

shyaki's picture

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.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
vladimir-dudnik (Intel)'s picture

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


Regards,
Vladimir

shyaki's picture

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;

Login to leave a comment.