mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 12:20:35 +01:00
radeon/uvd: fix MPEG2/4 ref frame index limit
Otherwise the first few frames have an incorrect reference index. Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
57684d52e9
commit
aebd065a64
1 changed files with 2 additions and 2 deletions
|
|
@ -493,8 +493,8 @@ uint8_t pquant
|
|||
/* extract the frame number from a referenced video buffer */
|
||||
static uint32_t get_ref_pic_idx(struct ruvd_decoder *dec, struct pipe_video_buffer *ref)
|
||||
{
|
||||
uint32_t min = dec->frame_number - NUM_MPEG2_REFS;
|
||||
uint32_t max = dec->frame_number - 1;
|
||||
uint32_t min = MAX2(dec->frame_number, NUM_MPEG2_REFS) - NUM_MPEG2_REFS;
|
||||
uint32_t max = MAX2(dec->frame_number, 1) - 1;
|
||||
uintptr_t frame;
|
||||
|
||||
/* seems to be the most sane fallback */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue