va: basedec: Fix some artifact when do the crop copy.

The default video converter setting will add some artifact into
the picture for 10/12 bits conversion. This make the MD5 checksum
change from the original picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2379>
This commit is contained in:
He Junyan 2021-07-05 15:44:34 +08:00 committed by Víctor Manuel Jáquez Leal
parent 0d2664c668
commit 77a2ad5b1a

View file

@ -856,6 +856,12 @@ _copy_buffer_and_apply_video_crop (GstVaBaseDec * base,
if (!base->convert) { if (!base->convert) {
base->convert = gst_video_converter_new (&src_frame->info, &dst_info, base->convert = gst_video_converter_new (&src_frame->info, &dst_info,
gst_structure_new ("options", gst_structure_new ("options",
GST_VIDEO_CONVERTER_OPT_DITHER_METHOD,
GST_TYPE_VIDEO_DITHER_METHOD, GST_VIDEO_DITHER_NONE,
GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION,
G_TYPE_UINT, 0,
GST_VIDEO_CONVERTER_OPT_CHROMA_MODE,
GST_TYPE_VIDEO_CHROMA_MODE, GST_VIDEO_CHROMA_MODE_NONE,
GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, GST_VIDEO_CONVERTER_OPT_MATRIX_MODE,
GST_TYPE_VIDEO_MATRIX_MODE, GST_VIDEO_MATRIX_MODE_NONE, GST_TYPE_VIDEO_MATRIX_MODE, GST_VIDEO_MATRIX_MODE_NONE,
GST_VIDEO_CONVERTER_OPT_SRC_X, G_TYPE_INT, video_crop->x, GST_VIDEO_CONVERTER_OPT_SRC_X, G_TYPE_INT, video_crop->x,