summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinjie Fu <linjie.fu@intel.com>2023-02-16 13:46:37 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-02-27 13:42:06 +0800
commit6489e0679d0b073dabf0e5b5c8ed5418cdeeea44 (patch)
tree8f7bcd6f9007705d114b4f32d3bfcff03a3a2b91
parentb7104243ff134f243c1916e7cfea702a6cf5bc54 (diff)
lavc/vaapi_hevc: Loose the restricts for SCC decoding
Allow current picture as the reference picture. Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
-rw-r--r--libavcodec/vaapi_hevc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c
index a06785f7a6..0e5da15e53 100644
--- a/libavcodec/vaapi_hevc.c
+++ b/libavcodec/vaapi_hevc.c
@@ -104,7 +104,8 @@ static void fill_vaapi_reference_frames(const HEVCContext *h, VAPictureParameter
const HEVCFrame *frame = NULL;
while (!frame && j < FF_ARRAY_ELEMS(h->DPB)) {
- if (&h->DPB[j] != current_picture && (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF)))
+ if ((&h->DPB[j] != current_picture || h->ps.pps->pps_curr_pic_ref_enabled_flag) &&
+ (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF)))
frame = &h->DPB[j];
j++;
}