[FFmpeg-devel] [PATCH 3/6] Add AV_PIX_FMT_NV12T.

Jean-Baptiste Kempf jb at videolan.org
Fri Nov 21 10:02:36 CET 2014


On 21 Nov, Alexis Ballier wrote :
> > > How do you put this in an AVFrame then ?
> > 
> > Preferably not at all. Is there a need to? Only the end result (nv12 I
> > suppose) needs to be in an AVFrame.
> 
> It can be done but is ugly IMHO:
> 
> - I was under the impression that lavc decoder convention was to
>   output non processed formats and let the application handle (or not)
>   the conversions

Sure, but this is when you can actually process them in applications,
like planar audio. No a hardware-specific format that noone can play
except with a special library.

> > So this is a
> > decoder. Why can't the decoder take care of this conversion too?
> 
> See above.

Sorry, but that's far from clear.

> > This
> > macroblock format isn't really useful for anything other than the m2m
> > filter, but breaks all AVFrame/pixfmt conventions. Additionally, it
> > breaks libavfilter conventions: conversions between pixfmts are
> > supposed to be handled by libswscale, not arbitrary filters.
> 
> I didn't take the time to write swscale support for this because the
> format is a bit insane, the code would be ugly and it would be
> useless in practice.

If it is insane, keep it internal.

> works like a charm here, no auto-inserted scaler, mpeg4_v4l2m2m
> produces nv12mt that is fed to the m2m filter that produces standard
> nv12 which is fed to the h264_v4l2m2m encoder

Then, merge them together, so it only output standard nv12.

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the ffmpeg-devel mailing list