[FFmpeg-devel] [PATCH 2/3] libswscale: add output support for AV_PIX_FMT_GBRAPF32

Mark Reid mindmark at gmail.com
Tue May 5 20:07:35 EEST 2020


On Sun, May 3, 2020 at 10:17 AM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> On Sun, May 03, 2020 at 02:01:21AM -0700, Mark Reid wrote:
> > On Thu., Apr. 30, 2020, 11:46 a.m. Mark Reid, <mindmark at gmail.com>
> wrote:
> >
> > >
> > >
> > > On Thu, Apr 30, 2020 at 7:59 AM Michael Niedermayer
> <michael at niedermayer.cc>
> > > wrote:
> > >
> > >> On Wed, Apr 29, 2020 at 02:49:35PM -0700, Mark Reid wrote:
> > >> > On Wed, Apr 29, 2020 at 2:22 PM Michael Niedermayer
> > >> <michael at niedermayer.cc>
> > >> > wrote:
> > >> >
> > >> > > On Wed, Apr 29, 2020 at 11:19:56PM +0200, Michael Niedermayer
> wrote:
> > >> > > > On Tue, Apr 28, 2020 at 08:02:34PM -0700, mindmark at gmail.com
> wrote:
> > >> > > > > From: Mark Reid <mindmark at gmail.com>
> > >> > > > >
> > >> > > > > ---
> > >> > > > >  libswscale/output.c                      | 82
> > >> ++++++++++++++++++++++++
> > >> > > > >  libswscale/slice.c                       | 28 ++++----
> > >> > > > >  libswscale/swscale_unscaled.c            | 33 ++++++++++
> > >> > > > >  libswscale/utils.c                       |  8 +--
> > >> > > > >  tests/ref/fate/filter-pixdesc-gbrapf32be |  1 +
> > >> > > > >  tests/ref/fate/filter-pixdesc-gbrapf32le |  1 +
> > >> > > > >  tests/ref/fate/filter-pixdesc-gbrpf32be  |  1 +
> > >> > > > >  tests/ref/fate/filter-pixdesc-gbrpf32le  |  1 +
> > >> > > > >  tests/ref/fate/filter-pixfmts-copy       |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-crop       |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-field      |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-fieldorder |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-hflip      |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-il         |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-null       |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-scale      |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-transpose  |  4 ++
> > >> > > > >  tests/ref/fate/filter-pixfmts-vflip      |  4 ++
> > >> > > > >  18 files changed, 180 insertions(+), 15 deletions(-)
> > >> > > > >  create mode 100644 tests/ref/fate/filter-pixdesc-gbrapf32be
> > >> > > > >  create mode 100644 tests/ref/fate/filter-pixdesc-gbrapf32le
> > >> > > > >  create mode 100644 tests/ref/fate/filter-pixdesc-gbrpf32be
> > >> > > > >  create mode 100644 tests/ref/fate/filter-pixdesc-gbrpf32le
> > >> > > >
> > >> > > > Fails on qemu MIPS
> > >> > > >
> > >> > > > --- src/tests/ref/fate/filter-pixfmts-scale     2020-04-29
> > >> > > 22:18:07.326122866 +0200
> > >> > > > +++ tests/data/fate/filter-pixfmts-scale        2020-04-29
> > >> > > 23:06:16.167950113 +0200
> > >> > > > @@ -25,8 +25,8 @@
> > >> > > >  gbrap12le           bb1ba1c157717db3dd612a76d38a018e
> > >> > > >  gbrap16be           c72b935a6e57a8e1c37bff08c2db55b1
> > >> > > >  gbrap16le           13eb0e62b1ac9c1c86c81521eaefab5f
> > >> > > > -gbrapf32be          e6abe67df7fdd5f5dc5db7d852e50954
> > >> > > > -gbrapf32le          4d3043b206f7053f7d8d5672f430d680
> > >> > > > +gbrapf32be          982d646dc5b2dc718c65fa2a439828f5
> > >> > > > +gbrapf32le          f1ffa56441e29aab5e1fd982337bb8ac
> > >> > > >  gbrp                dc3387f925f972c61aae7eb23cdc19f0
> > >> > > >  gbrp10be            0277d4c3a8498d75e2783fb81379e481
> > >> > > >  gbrp10le            f3d70f8ab845c3c9b8f7452e4a6e285a
> > >> > > > Test filter-pixfmts-scale failed. Look at
> > >> > > tests/data/fate/filter-pixfmts-scale.err for details.
> > >> > > > src/tests/Makefile:254: recipe for target
> > >> 'fate-filter-pixfmts-scale'
> > >> > > failed
> > >> > > > make: *** [fate-filter-pixfmts-scale] Error 1
> > >> > > > TEST    h264-conformance-frext-pph422i5_panasonic_a
> > >> > > > TEST    h264-conformance-frext-pph422i6_panasonic_a
> > >> > > > TEST    h264-conformance-frext-pph422i7_panasonic_a
> > >> > > > TEST    h264-conformance-hcbp2_hhi_a
> > >> > > > TEST    h264-conformance-hcmp1_hhi_a
> > >> > > >
> > >> > > > I also think for float, tests based on comparission instead of
> > >> checksums
> > >> > > > would allow more use of floats in the computations which would
> > >> > > > differ rounding wise between platforms
> > >> > >
> > >> > > and the 2 sws patches would otherwise be ok if they didnt break
> any
> > >> tests
> > >> > >
> > >> > >
> > >> > I was worried about the test with float, and tried to limiting the
> > >> number
> > >> > of float operations, but guess it's not enough.
> > >>
> > >> > I haven't looked yet, but is there anywhere you could point me to
> doing
> > >> > a comparison based test?
> > >>
> > >> anything float based needs a comparission or luck ...
> > >> audio tests using "oneoff/stddev" in fate for example
> > >> checkasm also checks some float code with comparissions
> > >>
> > >> not sure how to best integrate this here ...
> > >>
> > >> thx
> > >>
> > >
> > > Thanks! I'll check those out. I came up with some other ideas to try
> too
> > > that I think might work. Its a tricky problem for sure!
> > >
> >
> > lt appears the mips test where only failing on the alpha channel formats.
> > it seems to because of a planefill function I missed implementing.  I've
> > fixed it and the same test results work both on mips and x86, so I don't
> > think this is hardware floating point rounding error.
>
> well, if it works, we can try it,
> but what might happen is that once its used on real HW some platform might
> not be bitexact to the emulators (which use x86 FPU probably).
> If you are ok with looking into such a thing if it happens then i dont see
> a problem with trying this path if you prefer
>
>
I submitted a version 2 of the patch with the missing planefill function.
I'm not still not sure the best approach to dealing with hardware FPU
rounding errors, but I'm okay changing the tests if anyone reports
the issue happening. The way the format is implemented is pretty much the
same way AV_PIX_FMT_GRAYF32 was doing it and it has had input/output
support for a couple of years.


> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Nations do behave wisely once they have exhausted all other alternatives.
> -- Abba Eban
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list