> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Carl Eugen Hoyos > Sent: Friday, June 28, 2019 2:56 AM > To: FFmpeg development discussions and patches > <ffmpeg-devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 1/3] lavc/mjpegdec: add function > ff_mjpeg_decode_header > > Am Do., 27. Juni 2019 um 14:59 Uhr schrieb Zhong Li <zhong...@intel.com>: > > > - if (s->avctx->pix_fmt == s->hwaccel_sw_pix_fmt > && !size_change) { > > + if (!(s->got_picture && s->interlaced && (s->bottom_field > == !s->interlace_polarity))) { > > + if (s->avctx->pix_fmt == s->hwaccel_sw_pix_fmt && > > + !s->size_change) { > > Is this an (unrelated) bug fix or only vaapi-related? > I wonder if it should be in this patch for both cases.
Hi Carl: This is not to fix any issue, just a tailing after refact with ff_mjpeg_decode_header(): Original code: if (s->got_picture && s->interlaced && (s->bottom_field == !s->interlace_polarity)) { if (s->progressive) { avpriv_request_sample(s->avctx, "progressively coded interlaced picture"); return AVERROR_INVALIDDATA; } } else { ... if (s->avctx->pix_fmt == s->hwaccel_sw_pix_fmt && !size_change) { s->avctx->pix_fmt = s->hwaccel_pix_fmt; } else { enum AVPixelFormat pix_fmts[] = { #if CONFIG_MJPEG_NVDEC_HWACCEL AV_PIX_FMT_CUDA, #endif #if CONFIG_MJPEG_VAAPI_HWACCEL AV_PIX_FMT_VAAPI, #endif s->avctx->pix_fmt, AV_PIX_FMT_NONE, }; s->hwaccel_pix_fmt = ff_get_format(s->avctx, pix_fmts); ... } Thanks Zhong _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".