[FFmpeg-devel] [PATCH 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon Dec 2 11:48:50 EET 2019
Am Mo., 2. Dez. 2019 um 04:17 Uhr schrieb Fu, Ting <ting.fu at intel.com>:
>
>
>
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > Michael Niedermayer
> > Sent: Friday, November 29, 2019 05:33 AM
> > To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH 1/2] libswscale/x86/yuv2rgb: Change inline
> > assembly into nasm code
> >
> > On Thu, Nov 28, 2019 at 02:07:07PM +0800, Ting Fu wrote:
> > > Signed-off-by: Ting Fu <ting.fu at intel.com>
> > > ---
> > > libswscale/x86/Makefile | 1 +
> > > libswscale/x86/swscale.c | 16 +-
> > > libswscale/x86/yuv2rgb.c | 81 ++----
> > > libswscale/x86/yuv2rgb_template.c | 441 ++++++------------------------
> > > libswscale/x86/yuv_2_rgb.asm | 270 ++++++++++++++++++
> > > 5 files changed, 394 insertions(+), 415 deletions(-) create mode
> > > 100644 libswscale/x86/yuv_2_rgb.asm
> >
> > This changes the output, i presume that is unintentional
> >
> > ./ffmpeg -cpuflags 0 -i matrixbench_mpeg2.mpg -t 1 -vf
> > format=yuv420p,format=rgb565le -an -f framecrc -
> >
> > 0, 0, 0, 1, 829440, 0x1bd78b86
> > 0, 1, 1, 1, 829440, 0x85910b33
> > ...
> > vs.
> > 0, 0, 0, 1, 829440, 0x31f4a2bd
> > 0, 1, 1, 1, 829440, 0xf0c66218
> > ...
> >
> >
>
> Hi Michael,
>
> This unexpected change is because of the missing verify of current SIMD support.
> So, when cpuflag=0, ffmpeg used mmx code to compute as default.
> I added if (EXTERNAL_XXX(cpu_flags)) to verify the SIMD in libswscale/x86/yuv2rgb.c.
Could the patch be split to make this change easier to understand?
Carl Eugen
More information about the ffmpeg-devel
mailing list