gallium: Parse packed HEVC SPS encode header for crop parameters
authorThong Thai <thong.thai@amd.com>
Thu, 12 Mar 2020 14:06:52 +0000 (10:06 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 21 Sep 2020 18:45:35 +0000 (18:45 +0000)
commit245f619411b5f9b10a11f0c68645f5eae0586d85
treee68e88ee16a683f894c0bac1f9c6c3e0374f4d2f
parent0a3f92bcc663e94afc7e69e8c7d2395c5643ca6d
gallium: Parse packed HEVC SPS encode header for crop parameters

The crop / conformance window parameters are set by ffmpeg but they only
seem to be made available in packed headers. This commit copies the H265
header parsing code from st/omx (planning in the future to move this
code to a common place to be shared by the different state trackers) in
order to grab the crop parameters

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4184>
src/gallium/frontends/va/config.c
src/gallium/frontends/va/picture.c
src/gallium/frontends/va/picture_hevc_enc.c
src/gallium/frontends/va/va_private.h
src/gallium/include/pipe/p_video_state.h