On Fri, 03 Jan 2014 17:57:26 +0100 Luca Barbato <[email protected]> wrote:
> On 03/01/14 17:38, wm4 wrote: > > On Thu, 2 Jan 2014 01:07:45 +0000 (UTC) > > Timothy Gu <[email protected]> wrote: > > > >> I just cam across AV_PIX_FMT_YUVJ* and I'm surprised that they are > >> "deprecated": > >> > >> AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), > >> deprecated in favor of PIX_FMT_YUV420P and setting color_range > >> > >> git blame shows that they were deprecated in 2010, and no FF_API guards > >> were > >> added in the deprecation commit. Is it really true that these enum values > >> are > >> deprecated? If so, why are they still here? If not so, I'll probably send a > >> patch that really deprecates them. > >> > >> Timothy > >> > >> P.S. I wanted to send this email to libav-api, but now I think that this is > >> more of a devel problem, so yeah. > > > > They're deprecated yes, but apparently still needed. FFmpeg even added > > new J formats (which were deprecated immediately). One problem is that > > not everything handles color_range correctly. Some FFmpeg devs are > > arguing that some libavfilter filters can handle only full range YUV, > > so the J are supposedly still needed. > > > > It's one of these cases where something has been deprecated for years > > with no clear migration path and without actually removing the > > requirement from application code to deal with the deprecated features. > > Sad. > > Now there is a volunteer and you seem to have strong opinion about this, > what about trying to figure out a good migration path? The problem is mostly that application code would possibly have to change (checking color_range instead of whether a pixel format is J). There's not much Libav itself can do about this, and the pixel formats have been deprecated for years. So maybe it's time to simply change decoders to output the non-J pixel formats in all places. This should be considered an API change. Cherry picking the ffmpeg commit that added color_range to AVFrame might help too (ffmpeg commit a80e622924c89df69). _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
