[FFmpeg-devel] [PATCH v2] swscale/ppc: VSX-optimize yuv2rgb_full

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Mar 20 18:27:28 EET 2019


2019-03-20 17:24 GMT+01:00, Lauri Kasanen <cand at gmx.com>:
> On Wed, 20 Mar 2019 16:31:57 +0100
> Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
>> 2019-03-20 16:06 GMT+01:00, Lauri Kasanen <cand at gmx.com>:
>> > On Wed, 20 Mar 2019 15:51:20 +0100
>> > Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> >
>> >> 2019-03-20 15:06 GMT+01:00, Lauri Kasanen <cand at gmx.com>:
>> >>
>> >> > +            case AV_PIX_FMT_BGRA:
>> >> > +                if (HAVE_POWER8 && cpu_flags & AV_CPU_FLAG_POWER8) {
>> >> > +                    if (!c->needAlpha) {
>> >> > +                        c->yuv2packed1 = yuv2bgrx32_full_1_vsx;
>> >>
>> >> If only non-alpha is supported, I would have expected the
>> >> exact same function to also work for AV_PIX_FMT_BGR0.
>> >
>> > I'll check that, and RGB0 as well.
>
> No need for changes it seems. swcale internals never see those zero
> pixfmts:
>
> libswscale/utils.c:    case AV_PIX_FMT_RGB0    : *format =
> AV_PIX_FMT_RGBA   ; return 4;

I wonder if this is correct in all cases but it should not make
a difference for your patch. (The formats are not identical
if the output has a transparency layer.)

Carl Eugen


More information about the ffmpeg-devel mailing list