d3d11av1dec: Fix for Cdef param

av1parser will increase the sec_strength values by 1 if parsed
values were equal to 3 as defined in spec. But DXVA wants unmodified
ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1455>
This commit is contained in:
Seungha Yang 2021-12-17 22:24:57 +09:00
parent 146815bbb6
commit 1564567c3e

View file

@ -999,15 +999,21 @@ gst_d3d11_av1_dec_start_picture (GstAV1Decoder * decoder,
pic_params->cdef.bits = frame_hdr->cdef_params.cdef_bits;
for (i = 0; i < GST_AV1_CDEF_MAX; i++) {
guint8 secondary;
pic_params->cdef.y_strengths[i].primary =
frame_hdr->cdef_params.cdef_y_pri_strength[i];
pic_params->cdef.y_strengths[i].secondary =
frame_hdr->cdef_params.cdef_y_sec_strength[i];
secondary = frame_hdr->cdef_params.cdef_y_sec_strength[i];
if (secondary == 4)
secondary--;
pic_params->cdef.y_strengths[i].secondary = secondary;
pic_params->cdef.uv_strengths[i].primary =
frame_hdr->cdef_params.cdef_uv_pri_strength[i];
pic_params->cdef.uv_strengths[i].secondary =
frame_hdr->cdef_params.cdef_uv_sec_strength[i];
secondary = frame_hdr->cdef_params.cdef_uv_sec_strength[i];
if (secondary == 4)
secondary--;
pic_params->cdef.uv_strengths[i].secondary = secondary;
}
pic_params->interp_filter = frame_hdr->interpolation_filter;