[FFmpeg-devel] [PATCH 2/7] Factorize FAST_BGR2YV12

Måns Rullgård mans
Wed Jan 19 01:57:22 CET 2011


Luca Barbato <lu_zero at gentoo.org> writes:

> It is used only for x86 so it will be moved once the code is moved in
> the arch dir
>
> Question: should we build an accurate BGR2YV12 variant?
> ---
>  libswscale/Makefile  |    2 ++
>  libswscale/rgb2rgb.c |    2 --
>  libswscale/swscale.c |    2 --
>  3 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/libswscale/Makefile b/libswscale/Makefile
> index 7a3e95c..6046abc 100644
> --- a/libswscale/Makefile
> +++ b/libswscale/Makefile
> @@ -5,6 +5,8 @@ FFLIBS = avutil
>
>  HEADERS = swscale.h
>
> +CFLAGS += -DFAST_BGR2YV12 #use 7-bit instead of 15-bit coefficients

You must not mess with CFLAGS like this.  This variable holds the
global flags used all objects.  If necessary, we can introduce a new
per-lib variable instead.

>  OBJS = options.o rgb2rgb.o swscale.o utils.o yuv2rgb.o swscale_functions.o
>
>  OBJS-$(ARCH_BFIN)          +=  bfin/internal_bfin.o     \
> diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
> index 059bdab..21ccbd3 100644
> --- a/libswscale/rgb2rgb.c
> +++ b/libswscale/rgb2rgb.c
> @@ -30,8 +30,6 @@
>  #include "swscale.h"
>  #include "swscale_internal.h"
>
> -#define FAST_BGR2YV12 // use 7-bit instead of 15-bit coefficients
> -
>  #if ARCH_X86
>  DECLARE_ASM_CONST(8, uint64_t, mmx_ff)       = 0x00000000000000FFULL;
>  DECLARE_ASM_CONST(8, uint64_t, mmx_null)     = 0x0000000000000000ULL;

This should either be a proper configure setting, or the inactive code
should be removed.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list