[FFmpeg-devel] [PATCH 1/7] Thin rgb2rgb a little part 1 of many
Luca Barbato
lu_zero
Wed Jan 19 10:59:17 CET 2011
On 01/19/2011 01:49 AM, M?ns Rullg?rd wrote:
> Luca Barbato <lu_zero at gentoo.org> writes:
>
>> ---
>> libswscale/Makefile | 2 +-
>> libswscale/rgb2rgb.c | 66 ---------------------------------------
>> libswscale/swscale_functions.c | 67 ++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 68 insertions(+), 67 deletions(-)
>> create mode 100644 libswscale/swscale_functions.c
>>
>> diff --git a/libswscale/Makefile b/libswscale/Makefile
>> index 8c5c4b9..7a3e95c 100644
>> --- a/libswscale/Makefile
>> +++ b/libswscale/Makefile
>> @@ -5,7 +5,7 @@ FFLIBS = avutil
>>
>> HEADERS = swscale.h
>>
>> -OBJS = options.o rgb2rgb.o swscale.o utils.o yuv2rgb.o
>> +OBJS = options.o rgb2rgb.o swscale.o utils.o yuv2rgb.o swscale_functions.o
>>
>> OBJS-$(ARCH_BFIN) += bfin/internal_bfin.o \
>> bfin/swscale_bfin.o \
>> diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
>> index 7226853..059bdab 100644
>> --- a/libswscale/rgb2rgb.c
>> +++ b/libswscale/rgb2rgb.c
>> @@ -32,72 +32,6 @@
>>
>> #define FAST_BGR2YV12 // use 7-bit instead of 15-bit coefficients
>>
>> -void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
>> -void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
>> -void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
>> -void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
>
> [...]
>
>> diff --git a/libswscale/swscale_functions.c b/libswscale/swscale_functions.c
>> new file mode 100644
>> index 0000000..0ebfa7c
>> --- /dev/null
>> +++ b/libswscale/swscale_functions.c
>> @@ -0,0 +1,67 @@
>> +#include <inttypes.h>
>
> stdint.h is enough here.
ok
>
>> +void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
>> +void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
>> +void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
>> +void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
>
> Are you planning to get rid of these entirely later on? Any given
> scaler context should only at most two functions (when an intermediate
> format is used), and these it seems natural to put pointers to those
> in the context struct rather than globally.
>
That's the idea.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list