mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
radeonsi/vcn: correct cropping for hevc case
reason:
corect cropping calculation error.
If no cropping from the external, then it will
need to calculate cropping size internally, the
padding size on left and top should be zero.
Cc: mesa-stable
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7171
Reviewed-by: Thong Thai <thong.thai@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22758>
(cherry picked from commit b07f575a91)
This commit is contained in:
parent
0d879e5bbd
commit
865ff2c5ba
3 changed files with 6 additions and 6 deletions
|
|
@ -247,7 +247,7 @@
|
|||
"description": "radeonsi/vcn: correct cropping for hevc case",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -399,9 +399,9 @@ static void radeon_enc_nalu_sps_hevc(struct radeon_encoder *enc)
|
|||
} else if (pic->session_init.padding_width != 0 ||
|
||||
pic->session_init.padding_height != 0) {
|
||||
radeon_enc_code_fixed_bits(enc, 0x1, 1);
|
||||
radeon_enc_code_ue(enc, 0);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_width / 2);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_width / 2);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_height / 2);
|
||||
radeon_enc_code_ue(enc, 0);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_height / 2);
|
||||
} else
|
||||
radeon_enc_code_fixed_bits(enc, 0x0, 1);
|
||||
|
|
|
|||
|
|
@ -285,12 +285,12 @@ static void radeon_enc_nalu_sps_hevc(struct radeon_encoder *enc)
|
|||
} else if (pic->session_init.padding_width != 0 ||
|
||||
pic->session_init.padding_height != 0) {
|
||||
radeon_enc_code_fixed_bits(enc, 0x1, 1);
|
||||
radeon_enc_code_ue(enc, 0);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_width / 2);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_width / 2);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_height / 2);
|
||||
radeon_enc_code_ue(enc, 0);
|
||||
radeon_enc_code_ue(enc, pic->session_init.padding_height / 2);
|
||||
} else
|
||||
radeon_enc_code_fixed_bits(enc, 0x0, 1);
|
||||
radeon_enc_code_fixed_bits(enc, 0x0, 1);
|
||||
|
||||
radeon_enc_code_ue(enc, pic->bit_depth_luma_minus8);
|
||||
radeon_enc_code_ue(enc, pic->bit_depth_chroma_minus8);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue