The patch to support AviSynth+'s new pixfmts has been
updated to include GBR(A)P12 and provide correct output
for Planar RGB.

As previously noted, this patchset assumes the presence
of these two patches:
[1] https://patches.libav.org/patch/61310/
[2] https://patches.libav.org/patch/61309/

The commit message for [1] hasn't been changed, but it
has long since been tested in builds and does fix the
issue it was meant to resolve (extreme A/V lag and desync
on playback).

A build of AviSynth+ which supports these features is
available from:
https://github.com/pinterf/AviSynthPlus/releases/tag/r2290-MT

All the pix_fmt constants already exist in upstream AviSynth+,
but some of the conversion filters (and exposing the YUVA and
Planar RGB formats via the C interface, which is how Libav
talks to AviSynth) to make testing it easier are still in pinterf's
dev branch awaiting merge*.

*https://github.com/AviSynth/AviSynthPlus/pull/101

(Wine 1.9.x is required for testing on non-Windows; the MSVC 2015
redist is probably also needed; if necessary, I can provide
a VS2013 build which should just work, although Wine 1.8 or 1.9
is still necessary)

Actually testing the new pix_fmts.  These aren't the
only ways to accomplish this in-script, but they're
ostensibly the easiest to check.

GRAY16       Version().ConvertToY8().ConvertBits(16)

YUV420P10    Version().ConvertToYUV420().ConvertBits(10)
YUV422P10    Version().ConvertToYUV422().ConvertBits(10)
YUV444P10    Version().ConvertToYUV444().ConvertBits(10)
YUVA420P10   Version().ConvertToYUV420().ConvertBits(10).AddAlphaPlane()
YUVA422P10   Version().ConvertToYUV422().ConvertBits(10).AddAlphaPlane()
YUVA444P10   Version().ConvertToYUV444().ConvertBits(10).AddAlphaPlane()

YUV420P12    Version().ConvertToYUV420().ConvertBits(12)
YUV422P12    Version().ConvertToYUV422().ConvertBits(12)
YUV444P12    Version().ConvertToYUV444().ConvertBits(12)

YUV420P16    Version().ConvertToYUV420().ConvertBits(16)
YUV422P16    Version().ConvertToYUV422().ConvertBits(16)
YUV444P16    Version().ConvertToYUV444().ConvertBits(16)
YUVA420P16   Version().ConvertToYUV420().ConvertBits(16).AddAlphaPlane()
YUVA422P16   Version().ConvertToYUV422().ConvertBits(16).AddAlphaPlane()
YUVA444P16   Version().ConvertToYUV444().ConvertBits(16).AddAlphaPlane()

GBRP         Version().ConvertToPlanarRGB()
GBRP10       Version().ConvertToPlanarRGB().ConvertBits(10)
GBRP12       Version().ConvertToPlanarRGB().ConvertBits(12)
GBRP16       Version().ConvertToPlanarRGB().ConvertBits(16)

GBRAP        Version().ConvertToPlanarRGBA()
GBRAP12      Version().ConvertToPlanarRGBA().ConvertBits(12)
GBRAP16      Version().ConvertToPlanarRGBA().ConvertBits(16)

RGB48        Version().ConvertBits(16)
RGBA64       Version().ConvertBits(16).AddAlphaPlane()

Is BGRA64 still just a stub or something?  The pix_fmt constant
is there in libavutil/pixfmt.h, but it doesn't seem to produce
anything, whether I'm trying to output to FFV1 (swscaler complains
about it not being a supported input format), outputting to raw (it
writes a 92MB file, but won't read it as input), and avplay doesn't
output anything when given an AviSynth script that uses it.

pixfmts supported by AviSynth+ but not (yet) available in Libav:
YUVA420P12
YUVA422P12
YUVA444P12

YUV420P14
YUV422P14
YUV444P14

YUVA420P14
YUVA422P14
YUVA444P14

GBRP14

GBRAP10
GBRAP14

GRAY10
GRAY12
GRAY14

32-bit floating-point:
GRAY32

YUV420PS
YUV422PS
YUV444PS

YUVA420PS
YUVA422PS
YUVA444PS

RGBPS

RGBAPS


The doc change to note the regression in avs/capi.h should
hopefully only be temporary; building AviSynth+ with MinGW
and GCC is still very experimental, and the only thing that
really works is the core (so it can build, and Version()
actually paints its expected output, but it's not been
really deeply tested, and external filter plugins don't
work with it either).  The 'regressed' header makes it to
where a GCC-built Libav won't work with an MSVC-built
AviSynth.dll, only the GCC-built ones. Useful in a way
for testing MinGW support in AviSynth, but not for actual
production use.

Stephen Hutchinson (3):
  avisynth: support pix_fmts added to AviSynth+
  avisynth: cosmetics
  doc/general.text: add note about grabbing correct AviSynth+ header

 doc/general.texi       |  12 ++++
 libavformat/avisynth.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 176 insertions(+), 2 deletions(-)

-- 
2.9.3

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to