v4l2codecs: vp9: Fix reset_frame_context parameter

It was assumed that the kernel parameters would match with the bitstream value
but instead the author when with another set of value. Surprisingly, this
makes no difference with the resulting fluster score.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1754>
This commit is contained in:
Nicolas Dufresne 2022-02-18 16:23:09 -05:00 committed by GStreamer Marge Bot
parent 6389465b31
commit 21b2d9cea2

View file

@ -308,7 +308,6 @@ gst_v4l2_codec_vp9_dec_fill_dec_params (GstV4l2CodecVp9Dec * self,
.compressed_header_size = h->header_size_in_bytes,
.uncompressed_header_size = h->frame_header_length_in_bytes,
.profile = h->profile,
.reset_frame_context = h->reset_frame_context,
.frame_context_idx = h->frame_context_idx,
.bit_depth = self->bit_depth,
.interpolation_filter = h->interpolation_filter,
@ -350,12 +349,26 @@ gst_v4l2_codec_vp9_dec_fill_dec_params (GstV4l2CodecVp9Dec * self,
};
/* *INDENT-ON* */
switch (h->reset_frame_context) {
case 0:
case 1:
self->v4l2_vp9_frame.reset_frame_context = V4L2_VP9_RESET_FRAME_CTX_NONE;
break;
case 2:
self->v4l2_vp9_frame.reset_frame_context = V4L2_VP9_RESET_FRAME_CTX_SPEC;
break;
case 3:
self->v4l2_vp9_frame.reset_frame_context = V4L2_VP9_RESET_FRAME_CTX_ALL;
break;
default:
break;
}
gst_v4l2_codecs_vp9_dec_fill_refs (self, h, reference_frames);
gst_v4l2_codec_vp9_dec_fill_lf_params (self, &h->loop_filter_params);
gst_v4l2_codec_vp9_dec_fill_seg_params (self, &h->segmentation_params);
}
static gboolean
gst_v4l2_codec_vp9_dec_open (GstVideoDecoder * decoder)
{