Skip to content
Snippets Groups Projects
Commit b5337a0b authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by chrome-bot
Browse files

Rockchip: Fix frame crop offset in H264 encoder.

According to H.264 spec, when frame_mbs_only_flag is set to 1,
frame_crop_bottom_offset should be
(pic_height_in_map_units * 16 - height) / 2.

Take 1920x1080 video for example, the value is:
- height = 1080
- pic_height_in_map_units = ((1080 + 15) >> 4) = 68
- frame_crop_bottom_offset = (68 * 16 - 1080) / 2 = 4

This CL fixed the value by adding the missing "divided by 2".

BUG=b:74214155
TEST=Run VideoEncoderDecoderTest#testAvcOther0Qual1920x1080 at device

Change-Id: I7c70564553c9e9d62b11100e214a02bba7cbb740
Reviewed-on: https://chromium-review.googlesource.com/952584


Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: default avatarChih-Yu Huang <akahuang@chromium.org>
Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
parent 7762c815
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment