On 24/11/17 11:17, Carl Eugen Hoyos wrote: > 2017-11-24 1:51 GMT+01:00 Mark Thompson <s...@jkqxz.net>: >> Also adds some extra fields to the main context structure >> that may be needed by a hwaccel decoder. >> --- >> The YUVJ formats really mess with this. This patch hacks >> them out so that the hwaccel works, suggestions welcome >> on what to actually do about them. > >> + if (s->avctx->pix_fmt == AV_PIX_FMT_YUVJ420P) >> + s->avctx->pix_fmt = AV_PIX_FMT_YUV420P; >> + if (s->avctx->pix_fmt == AV_PIX_FMT_YUVJ422P) >> + s->avctx->pix_fmt = AV_PIX_FMT_YUV422P; > > The hardware decoders output mpeg-scaled frames?
I think some do, though I haven't seen it myself. Those that don't (like VAAPI) will use the color_range metadata - I think don't it is sensible to add lots of extra paths to support YUVJ formats in AVHWFramesContext.sw_format. Thanks, - Mark _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel