mbox series

[FFmpeg-devel,0/4] swscale rgbaf32 input/output support

Message ID 20220929180841.614-1-mindmark@gmail.com
Headers show
Series swscale rgbaf32 input/output support | expand

Message

Mark Reid Sept. 29, 2022, 6:08 p.m. UTC
From: Mark Reid <mindmark@gmail.com>

This patch series adds swscale input/output support for the packed rgb float formats.
A few of the filters also needed support the larger 96/128 bit packed pixel sizes.

I also plan to eventually add lossless unscaled conversions between the planer and packed formats.

Mark Reid (4):
  swscale/input: add rgbaf32 input support
  avfilter/vf_hflip: add support for packed rgb float formats
  avfilter/vf_transpose: add support for packed rgb float formats
  swscale/output: add rgbaf32 output support

 libavfilter/vf_hflip_init.h              |  25 ++++
 libavfilter/vf_transpose.c               |  44 ++++++
 libswscale/input.c                       | 172 +++++++++++++++++++++++
 libswscale/output.c                      |  89 ++++++++++++
 libswscale/swscale_unscaled.c            |   4 +-
 libswscale/tests/floatimg_cmp.c          |   4 +-
 libswscale/utils.c                       |  12 +-
 libswscale/yuv2rgb.c                     |   2 +
 tests/ref/fate/filter-pixdesc-rgbaf32be  |   1 +
 tests/ref/fate/filter-pixdesc-rgbaf32le  |   1 +
 tests/ref/fate/filter-pixdesc-rgbf32be   |   1 +
 tests/ref/fate/filter-pixdesc-rgbf32le   |   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 +
 tests/ref/fate/sws-floatimg-cmp          |  16 +++
 23 files changed, 408 insertions(+), 4 deletions(-)
 create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32be
 create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32le
 create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32be
 create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32le

--
2.31.1.windows.1

Comments

Mark Reid Oct. 12, 2022, 10:06 p.m. UTC | #1
On Thu, Sep 29, 2022 at 11:08 AM <mindmark@gmail.com> wrote:

> From: Mark Reid <mindmark@gmail.com>
>
> This patch series adds swscale input/output support for the packed rgb
> float formats.
> A few of the filters also needed support the larger 96/128 bit packed
> pixel sizes.
>
> I also plan to eventually add lossless unscaled conversions between the
> planer and packed formats.
>
> Mark Reid (4):
>   swscale/input: add rgbaf32 input support
>   avfilter/vf_hflip: add support for packed rgb float formats
>   avfilter/vf_transpose: add support for packed rgb float formats
>   swscale/output: add rgbaf32 output support
>
>  libavfilter/vf_hflip_init.h              |  25 ++++
>  libavfilter/vf_transpose.c               |  44 ++++++
>  libswscale/input.c                       | 172 +++++++++++++++++++++++
>  libswscale/output.c                      |  89 ++++++++++++
>  libswscale/swscale_unscaled.c            |   4 +-
>  libswscale/tests/floatimg_cmp.c          |   4 +-
>  libswscale/utils.c                       |  12 +-
>  libswscale/yuv2rgb.c                     |   2 +
>  tests/ref/fate/filter-pixdesc-rgbaf32be  |   1 +
>  tests/ref/fate/filter-pixdesc-rgbaf32le  |   1 +
>  tests/ref/fate/filter-pixdesc-rgbf32be   |   1 +
>  tests/ref/fate/filter-pixdesc-rgbf32le   |   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 +
>  tests/ref/fate/sws-floatimg-cmp          |  16 +++
>  23 files changed, 408 insertions(+), 4 deletions(-)
>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32be
>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32le
>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32be
>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32le
>
> --
> 2.31.1.windows.1
>
>
ping
Mark Reid Oct. 30, 2022, 8:48 p.m. UTC | #2
On Wed, Oct 12, 2022 at 3:06 PM Mark Reid <mindmark@gmail.com> wrote:

>
>
> On Thu, Sep 29, 2022 at 11:08 AM <mindmark@gmail.com> wrote:
>
>> From: Mark Reid <mindmark@gmail.com>
>>
>> This patch series adds swscale input/output support for the packed rgb
>> float formats.
>> A few of the filters also needed support the larger 96/128 bit packed
>> pixel sizes.
>>
>> I also plan to eventually add lossless unscaled conversions between the
>> planer and packed formats.
>>
>> Mark Reid (4):
>>   swscale/input: add rgbaf32 input support
>>   avfilter/vf_hflip: add support for packed rgb float formats
>>   avfilter/vf_transpose: add support for packed rgb float formats
>>   swscale/output: add rgbaf32 output support
>>
>>  libavfilter/vf_hflip_init.h              |  25 ++++
>>  libavfilter/vf_transpose.c               |  44 ++++++
>>  libswscale/input.c                       | 172 +++++++++++++++++++++++
>>  libswscale/output.c                      |  89 ++++++++++++
>>  libswscale/swscale_unscaled.c            |   4 +-
>>  libswscale/tests/floatimg_cmp.c          |   4 +-
>>  libswscale/utils.c                       |  12 +-
>>  libswscale/yuv2rgb.c                     |   2 +
>>  tests/ref/fate/filter-pixdesc-rgbaf32be  |   1 +
>>  tests/ref/fate/filter-pixdesc-rgbaf32le  |   1 +
>>  tests/ref/fate/filter-pixdesc-rgbf32be   |   1 +
>>  tests/ref/fate/filter-pixdesc-rgbf32le   |   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 +
>>  tests/ref/fate/sws-floatimg-cmp          |  16 +++
>>  23 files changed, 408 insertions(+), 4 deletions(-)
>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32be
>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32le
>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32be
>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32le
>>
>> --
>> 2.31.1.windows.1
>>
>>
> ping
>

ping
Mark Reid Oct. 30, 2022, 11:14 p.m. UTC | #3
On Sun, Oct 30, 2022 at 1:48 PM Mark Reid <mindmark@gmail.com> wrote:

>
>
> On Wed, Oct 12, 2022 at 3:06 PM Mark Reid <mindmark@gmail.com> wrote:
>
>>
>>
>> On Thu, Sep 29, 2022 at 11:08 AM <mindmark@gmail.com> wrote:
>>
>>> From: Mark Reid <mindmark@gmail.com>
>>>
>>> This patch series adds swscale input/output support for the packed rgb
>>> float formats.
>>> A few of the filters also needed support the larger 96/128 bit packed
>>> pixel sizes.
>>>
>>> I also plan to eventually add lossless unscaled conversions between the
>>> planer and packed formats.
>>>
>>> Mark Reid (4):
>>>   swscale/input: add rgbaf32 input support
>>>   avfilter/vf_hflip: add support for packed rgb float formats
>>>   avfilter/vf_transpose: add support for packed rgb float formats
>>>   swscale/output: add rgbaf32 output support
>>>
>>>  libavfilter/vf_hflip_init.h              |  25 ++++
>>>  libavfilter/vf_transpose.c               |  44 ++++++
>>>  libswscale/input.c                       | 172 +++++++++++++++++++++++
>>>  libswscale/output.c                      |  89 ++++++++++++
>>>  libswscale/swscale_unscaled.c            |   4 +-
>>>  libswscale/tests/floatimg_cmp.c          |   4 +-
>>>  libswscale/utils.c                       |  12 +-
>>>  libswscale/yuv2rgb.c                     |   2 +
>>>  tests/ref/fate/filter-pixdesc-rgbaf32be  |   1 +
>>>  tests/ref/fate/filter-pixdesc-rgbaf32le  |   1 +
>>>  tests/ref/fate/filter-pixdesc-rgbf32be   |   1 +
>>>  tests/ref/fate/filter-pixdesc-rgbf32le   |   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 +
>>>  tests/ref/fate/sws-floatimg-cmp          |  16 +++
>>>  23 files changed, 408 insertions(+), 4 deletions(-)
>>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32be
>>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32le
>>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32be
>>>  create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32le
>>>
>>> --
>>> 2.31.1.windows.1
>>>
>>>
>> ping
>>
>
> ping
>

I noticed I'm not outputting an alpha value of 1.0f if src format doesn't
have alpha but the dst format needs one.
I'll submit a new version of this patch