radeon/vcn: fix poc for hevc encode
authorBoyuan Zhang <boyuan.zhang@amd.com>
Wed, 29 May 2019 18:25:38 +0000 (14:25 -0400)
committerLeo Liu <leo.liu@amd.com>
Fri, 26 Jul 2019 18:33:09 +0000 (14:33 -0400)
commit9aaf3aaf5d8a88e05cf2d2dd4a455a64789bcced
treeb25855cdb227ac32bf257a5e94fca91e0f0acf44
parent77cf700fa3920899d17ff769669263eb875ceb60
radeon/vcn: fix poc for hevc encode

MaxPicOrderCntLsb should be at least 16 according to the spec,
therefore add minimum value check.

Also use poc value passed from st instead of calculation
in slice header encoding.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110673
Cc: mesa-stable@lists.freedesktop.org
V2: Fix typo

V3: Use MAX2 macro instead of coding. Also MaxPicOrderCntLsb
should be power of 2 according to spec.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
src/gallium/drivers/radeon/radeon_vcn_enc.c
src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c