Re: [FFmpeg-devel] [PATCH v4 1/4] swscale/input: add rgbaf32 input support

2022-11-22 Thread Mark Reid
On Tue, Nov 22, 2022 at 2:43 PM Michael Niedermayer 
wrote:

> On Tue, Nov 22, 2022 at 01:17:09PM -0800, Mark Reid wrote:
> > On Tue, Nov 22, 2022 at 11:43 AM Michael Niedermayer <
> mich...@niedermayer.cc>
> > wrote:
> >
> > > On Mon, Nov 21, 2022 at 02:11:43PM -0800, mindm...@gmail.com wrote:
> > > > From: Mark Reid 
> > > >
> > > > ---
> > > >  libswscale/input.c | 120
> +
> > > >  libswscale/utils.c |   6 +++
> > > >  2 files changed, 126 insertions(+)
> > > >
> > > > diff --git a/libswscale/input.c b/libswscale/input.c
> > > > index d5676062a2..a305be5ac2 100644
> > > > --- a/libswscale/input.c
> > > > +++ b/libswscale/input.c
> > > > @@ -1284,6 +1284,96 @@ static void
> rgbaf16##endian_name##ToA_c(uint8_t
> > > *_dst, const uint8_t *_src, cons
> > > >  rgbaf16_funcs_endian(le, 0)
> > > >  rgbaf16_funcs_endian(be, 1)
> > > >
> > > > +#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)):
> > > av_int2float(AV_RL32(&src)))
> > > > +
> > > > +static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU,
> > > uint16_t *dstV, int is_be,
> > > > +const float *src,
> int
> > > width,
> > > > +int32_t *rgb2yuv,
> int
> > > comp)
> > > > +{
> > > > +int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu =
> > > rgb2yuv[BU_IDX];
> > > > +int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv =
> > > rgb2yuv[BV_IDX];
> > > > +int i;
> > > > +for (i = 0; i < width; i++) {
> > > > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]),
> 0.0f,
> > > 65535.0f));
> > > > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]),
> 0.0f,
> > > 65535.0f));
> > > > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]),
> 0.0f,
> > > 65535.0f));
> > > > +
> > > > +dstU[i] = (ru*r + gu*g + bu*b +
> (0x10001<<(RGB2YUV_SHIFT-1)))
> > > >> RGB2YUV_SHIFT;
> > > > +dstV[i] = (rv*r + gv*g + bv*b +
> (0x10001<<(RGB2YUV_SHIFT-1)))
> > > >> RGB2YUV_SHIFT;
> > > > +}
> > > > +}
> > >
> > >
> > >
> > >
> > >
> > > > +
> > > > +static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const
> > > float *src, int is_be,
> > > > +   int width, int32_t
> > > *rgb2yuv, int comp)
> > > > +{
> > > > +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by =
> > > rgb2yuv[BY_IDX];
> > > > +int i;
> > > > +for (i = 0; i < width; i++) {
> > > > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]),
> 0.0f,
> > > 65535.0f));
> > > > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]),
> 0.0f,
> > > 65535.0f));
> > > > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]),
> 0.0f,
> > > 65535.0f));
> > > > +
> > > > +dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1)))
> >>
> > > RGB2YUV_SHIFT;
> > > > +}
> > > > +}
> > >
> > > I thought you would post a patchset that in the end has 1
> lrintf/av_clipf
> > > for a function like this not 3
> > > Just asking as you arent saying this is temporary in this set nor why
> its
> > > left liek this nor does it include the factorization of these
> operations
> > >
> > >
> > Sorry I must have misunderstood. I was hoping I could leave it like this
> > temporarily as it matches the planar f32 version and address the
> > factorization separate patchset.
>
> you can, i just want to make sure its not forgotten. Maybe you can add
> some note to the commit message that this will be addressed in a future
> pachset
>
>
Okay, I'll add a note to the commit message and I'll add a comment to the
code too.


> thx
>
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> If the United States is serious about tackling the national security
> threats
> related to an insecure 5G network, it needs to rethink the extent to which
> it
> values corporate profits and government espionage over security.-Bruce
> Schneier
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v4 1/4] swscale/input: add rgbaf32 input support

2022-11-22 Thread Michael Niedermayer
On Tue, Nov 22, 2022 at 01:17:09PM -0800, Mark Reid wrote:
> On Tue, Nov 22, 2022 at 11:43 AM Michael Niedermayer 
> wrote:
> 
> > On Mon, Nov 21, 2022 at 02:11:43PM -0800, mindm...@gmail.com wrote:
> > > From: Mark Reid 
> > >
> > > ---
> > >  libswscale/input.c | 120 +
> > >  libswscale/utils.c |   6 +++
> > >  2 files changed, 126 insertions(+)
> > >
> > > diff --git a/libswscale/input.c b/libswscale/input.c
> > > index d5676062a2..a305be5ac2 100644
> > > --- a/libswscale/input.c
> > > +++ b/libswscale/input.c
> > > @@ -1284,6 +1284,96 @@ static void rgbaf16##endian_name##ToA_c(uint8_t
> > *_dst, const uint8_t *_src, cons
> > >  rgbaf16_funcs_endian(le, 0)
> > >  rgbaf16_funcs_endian(be, 1)
> > >
> > > +#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)):
> > av_int2float(AV_RL32(&src)))
> > > +
> > > +static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU,
> > uint16_t *dstV, int is_be,
> > > +const float *src, int
> > width,
> > > +int32_t *rgb2yuv, int
> > comp)
> > > +{
> > > +int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu =
> > rgb2yuv[BU_IDX];
> > > +int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv =
> > rgb2yuv[BV_IDX];
> > > +int i;
> > > +for (i = 0; i < width; i++) {
> > > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f,
> > 65535.0f));
> > > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f,
> > 65535.0f));
> > > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f,
> > 65535.0f));
> > > +
> > > +dstU[i] = (ru*r + gu*g + bu*b + (0x10001<<(RGB2YUV_SHIFT-1)))
> > >> RGB2YUV_SHIFT;
> > > +dstV[i] = (rv*r + gv*g + bv*b + (0x10001<<(RGB2YUV_SHIFT-1)))
> > >> RGB2YUV_SHIFT;
> > > +}
> > > +}
> >
> >
> >
> >
> >
> > > +
> > > +static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const
> > float *src, int is_be,
> > > +   int width, int32_t
> > *rgb2yuv, int comp)
> > > +{
> > > +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by =
> > rgb2yuv[BY_IDX];
> > > +int i;
> > > +for (i = 0; i < width; i++) {
> > > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f,
> > 65535.0f));
> > > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f,
> > 65535.0f));
> > > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f,
> > 65535.0f));
> > > +
> > > +dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1))) >>
> > RGB2YUV_SHIFT;
> > > +}
> > > +}
> >
> > I thought you would post a patchset that in the end has 1 lrintf/av_clipf
> > for a function like this not 3
> > Just asking as you arent saying this is temporary in this set nor why its
> > left liek this nor does it include the factorization of these operations
> >
> >
> Sorry I must have misunderstood. I was hoping I could leave it like this
> temporarily as it matches the planar f32 version and address the
> factorization separate patchset.

you can, i just want to make sure its not forgotten. Maybe you can add
some note to the commit message that this will be addressed in a future
pachset

thx


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v4 1/4] swscale/input: add rgbaf32 input support

2022-11-22 Thread Mark Reid
On Tue, Nov 22, 2022 at 11:43 AM Michael Niedermayer 
wrote:

> On Mon, Nov 21, 2022 at 02:11:43PM -0800, mindm...@gmail.com wrote:
> > From: Mark Reid 
> >
> > ---
> >  libswscale/input.c | 120 +
> >  libswscale/utils.c |   6 +++
> >  2 files changed, 126 insertions(+)
> >
> > diff --git a/libswscale/input.c b/libswscale/input.c
> > index d5676062a2..a305be5ac2 100644
> > --- a/libswscale/input.c
> > +++ b/libswscale/input.c
> > @@ -1284,6 +1284,96 @@ static void rgbaf16##endian_name##ToA_c(uint8_t
> *_dst, const uint8_t *_src, cons
> >  rgbaf16_funcs_endian(le, 0)
> >  rgbaf16_funcs_endian(be, 1)
> >
> > +#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)):
> av_int2float(AV_RL32(&src)))
> > +
> > +static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU,
> uint16_t *dstV, int is_be,
> > +const float *src, int
> width,
> > +int32_t *rgb2yuv, int
> comp)
> > +{
> > +int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu =
> rgb2yuv[BU_IDX];
> > +int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv =
> rgb2yuv[BV_IDX];
> > +int i;
> > +for (i = 0; i < width; i++) {
> > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f,
> 65535.0f));
> > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f,
> 65535.0f));
> > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f,
> 65535.0f));
> > +
> > +dstU[i] = (ru*r + gu*g + bu*b + (0x10001<<(RGB2YUV_SHIFT-1)))
> >> RGB2YUV_SHIFT;
> > +dstV[i] = (rv*r + gv*g + bv*b + (0x10001<<(RGB2YUV_SHIFT-1)))
> >> RGB2YUV_SHIFT;
> > +}
> > +}
>
>
>
>
>
> > +
> > +static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const
> float *src, int is_be,
> > +   int width, int32_t
> *rgb2yuv, int comp)
> > +{
> > +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by =
> rgb2yuv[BY_IDX];
> > +int i;
> > +for (i = 0; i < width; i++) {
> > +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f,
> 65535.0f));
> > +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f,
> 65535.0f));
> > +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f,
> 65535.0f));
> > +
> > +dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1))) >>
> RGB2YUV_SHIFT;
> > +}
> > +}
>
> I thought you would post a patchset that in the end has 1 lrintf/av_clipf
> for a function like this not 3
> Just asking as you arent saying this is temporary in this set nor why its
> left liek this nor does it include the factorization of these operations
>
>
Sorry I must have misunderstood. I was hoping I could leave it like this
temporarily as it matches the planar f32 version and address the
factorization separate patchset.


> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> I have never wished to cater to the crowd; for what I know they do not
> approve, and what they approve I do not know. -- Epicurus
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v4 1/4] swscale/input: add rgbaf32 input support

2022-11-22 Thread Michael Niedermayer
On Mon, Nov 21, 2022 at 02:11:43PM -0800, mindm...@gmail.com wrote:
> From: Mark Reid 
> 
> ---
>  libswscale/input.c | 120 +
>  libswscale/utils.c |   6 +++
>  2 files changed, 126 insertions(+)
> 
> diff --git a/libswscale/input.c b/libswscale/input.c
> index d5676062a2..a305be5ac2 100644
> --- a/libswscale/input.c
> +++ b/libswscale/input.c
> @@ -1284,6 +1284,96 @@ static void rgbaf16##endian_name##ToA_c(uint8_t *_dst, 
> const uint8_t *_src, cons
>  rgbaf16_funcs_endian(le, 0)
>  rgbaf16_funcs_endian(be, 1)
>  
> +#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)): 
> av_int2float(AV_RL32(&src)))
> +
> +static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU, uint16_t 
> *dstV, int is_be,
> +const float *src, int width,
> +int32_t *rgb2yuv, int comp)
> +{
> +int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX];
> +int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv = rgb2yuv[BV_IDX];
> +int i;
> +for (i = 0; i < width; i++) {
> +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 
> 65535.0f));
> +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 
> 65535.0f));
> +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 
> 65535.0f));
> +
> +dstU[i] = (ru*r + gu*g + bu*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> 
> RGB2YUV_SHIFT;
> +dstV[i] = (rv*r + gv*g + bv*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> 
> RGB2YUV_SHIFT;
> +}
> +}





> +
> +static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const float 
> *src, int is_be,
> +   int width, int32_t *rgb2yuv, 
> int comp)
> +{
> +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX];
> +int i;
> +for (i = 0; i < width; i++) {
> +int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 
> 65535.0f));
> +int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 
> 65535.0f));
> +int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 
> 65535.0f));
> +
> +dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1))) >> 
> RGB2YUV_SHIFT;
> +}
> +}

I thought you would post a patchset that in the end has 1 lrintf/av_clipf
for a function like this not 3
Just asking as you arent saying this is temporary in this set nor why its
left liek this nor does it include the factorization of these operations

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v4 1/4] swscale/input: add rgbaf32 input support

2022-11-21 Thread mindmark
From: Mark Reid 

---
 libswscale/input.c | 120 +
 libswscale/utils.c |   6 +++
 2 files changed, 126 insertions(+)

diff --git a/libswscale/input.c b/libswscale/input.c
index d5676062a2..a305be5ac2 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -1284,6 +1284,96 @@ static void rgbaf16##endian_name##ToA_c(uint8_t *_dst, 
const uint8_t *_src, cons
 rgbaf16_funcs_endian(le, 0)
 rgbaf16_funcs_endian(be, 1)
 
+#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)): 
av_int2float(AV_RL32(&src)))
+
+static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU, uint16_t 
*dstV, int is_be,
+const float *src, int width,
+int32_t *rgb2yuv, int comp)
+{
+int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX];
+int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv = rgb2yuv[BV_IDX];
+int i;
+for (i = 0; i < width; i++) {
+int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 
65535.0f));
+int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 
65535.0f));
+int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 
65535.0f));
+
+dstU[i] = (ru*r + gu*g + bu*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> 
RGB2YUV_SHIFT;
+dstV[i] = (rv*r + gv*g + bv*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> 
RGB2YUV_SHIFT;
+}
+}
+
+static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const float 
*src, int is_be,
+   int width, int32_t *rgb2yuv, 
int comp)
+{
+int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX];
+int i;
+for (i = 0; i < width; i++) {
+int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 
65535.0f));
+int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 
65535.0f));
+int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 
65535.0f));
+
+dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1))) >> 
RGB2YUV_SHIFT;
+}
+}
+
+static av_always_inline void rgbaf32ToA_endian(uint16_t *dst, const float 
*src, int is_be,
+   int width, void *opq)
+{
+int i;
+for (i=0; isrcFormat;
@@ -1663,6 +1753,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
 case AV_PIX_FMT_RGBAF16LE:
 c->chrToYV12 = rgbaf16leToUV_c;
 break;
+case AV_PIX_FMT_RGBF32BE:
+c->chrToYV12 = rgbf32beToUV_c;
+break;
+case AV_PIX_FMT_RGBAF32BE:
+c->chrToYV12 = rgbaf32beToUV_c;
+break;
+case AV_PIX_FMT_RGBF32LE:
+c->chrToYV12 = rgbf32leToUV_c;
+break;
+case AV_PIX_FMT_RGBAF32LE:
+c->chrToYV12 = rgbaf32leToUV_c;
+break;
 }
 }
 
@@ -1973,6 +2075,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
 case AV_PIX_FMT_RGBAF16LE:
 c->lumToYV12 = rgbaf16leToY_c;
 break;
+case AV_PIX_FMT_RGBF32BE:
+c->lumToYV12 = rgbf32beToY_c;
+break;
+case AV_PIX_FMT_RGBAF32BE:
+c->lumToYV12 = rgbaf32beToY_c;
+break;
+case AV_PIX_FMT_RGBF32LE:
+c->lumToYV12 = rgbf32leToY_c;
+break;
+case AV_PIX_FMT_RGBAF32LE:
+c->lumToYV12 = rgbaf32leToY_c;
+break;
 }
 if (c->needAlpha) {
 if (is16BPS(srcFormat) || isNBPS(srcFormat)) {
@@ -1998,6 +2112,12 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
 case AV_PIX_FMT_RGBAF16LE:
 c->alpToYV12 = rgbaf16leToA_c;
 break;
+case AV_PIX_FMT_RGBAF32BE:
+c->alpToYV12 = rgbaf32beToA_c;
+break;
+case AV_PIX_FMT_RGBAF32LE:
+c->alpToYV12 = rgbaf32leToA_c;
+break;
 case AV_PIX_FMT_YA8:
 c->alpToYV12 = uyvyToY_c;
 break;
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 85640a143f..2c520f68d1 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -266,6 +266,10 @@ static const FormatEntry format_entries[] = {
 [AV_PIX_FMT_VUYX]= { 1, 1 },
 [AV_PIX_FMT_RGBAF16BE]   = { 1, 0 },
 [AV_PIX_FMT_RGBAF16LE]   = { 1, 0 },
+[AV_PIX_FMT_RGBF32BE]= { 1, 0 },
+[AV_PIX_FMT_RGBF32LE]= { 1, 0 },
+[AV_PIX_FMT_RGBAF32BE]   = { 1, 0 },
+[AV_PIX_FMT_RGBAF32LE]   = { 1, 0 },
 [AV_PIX_FMT_XV30LE]  = { 1, 1 },
 [AV_PIX_FMT_XV36LE]  = { 1, 1 },
 };
@@ -1572,6 +1576,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter 
*srcFilter,
 srcFormat != AV_PIX_FMT_GBRAP16BE  && srcFormat != 
AV_PIX_FMT_GBRAP16LE &&
 srcFormat != AV_PIX_FMT_GBRPF32BE  && srcFormat != 
AV_PIX_FMT_GBRPF32LE &&
 srcFormat != AV_PIX_FMT_GBRAPF32BE && srcFormat != 
AV_PIX_FMT_GBRAPF32LE &&
+srcFormat != AV_PIX_FMT_RGBF32BE   && srcFormat != AV_PIX_FMT_RGBF32LE