Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-25 22:49:52 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-05-25 22:58:59 +0400
commit4a056160bef8578dc1e370e2445f61f2459e3863 (patch)
treebbf4a3b2e94904afc28eb756076efa51cf18a23f
parent364889cf9c1f3c5e816a30d30d714a84765cfc29 (diff)
swscale: remove duplicatiopn of rgb24toyv12_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/rgb2rgb.h7
-rw-r--r--libswscale/rgb2rgb_template.c2
-rw-r--r--libswscale/x86/rgb2rgb_template.c47
3 files changed, 9 insertions, 47 deletions
diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h
index 6688c5967e..e31d9cc9e9 100644
--- a/libswscale/rgb2rgb.h
+++ b/libswscale/rgb2rgb.h
@@ -68,6 +68,13 @@ void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, long src_size);
void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, long src_size);
void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, long src_size);
+void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst,
+ uint8_t *udst, uint8_t *vdst,
+ long width, long height,
+ long lumStride, long chromStride,
+ long srcStride);
+
+
#if LIBSWSCALE_VERSION_MAJOR < 1
/* deprecated, use the public versions in swscale.h */
attribute_deprecated void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index eeb9c12795..c71417d7e1 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -633,7 +633,7 @@ static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst,
* others are ignored in the C version.
* FIXME: Write HQ version.
*/
-static inline void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst,
+void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst,
uint8_t *udst, uint8_t *vdst,
long width, long height,
long lumStride, long chromStride,
diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c
index c675f24aa0..8e6ce8586a 100644
--- a/libswscale/x86/rgb2rgb_template.c
+++ b/libswscale/x86/rgb2rgb_template.c
@@ -1976,52 +1976,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
SFENCE" \n\t"
:::"memory");
- for (; y<height; y+=2) {
- long i;
- for (i=0; i<chromWidth; i++) {
- unsigned int b = src[6*i+0];
- unsigned int g = src[6*i+1];
- unsigned int r = src[6*i+2];
-
- unsigned int Y = ((RY*r + GY*g + BY*b)>>RGB2YUV_SHIFT) + 16;
- unsigned int V = ((RV*r + GV*g + BV*b)>>RGB2YUV_SHIFT) + 128;
- unsigned int U = ((RU*r + GU*g + BU*b)>>RGB2YUV_SHIFT) + 128;
-
- udst[i] = U;
- vdst[i] = V;
- ydst[2*i] = Y;
-
- b = src[6*i+3];
- g = src[6*i+4];
- r = src[6*i+5];
-
- Y = ((RY*r + GY*g + BY*b)>>RGB2YUV_SHIFT) + 16;
- ydst[2*i+1] = Y;
- }
- ydst += lumStride;
- src += srcStride;
-
- for (i=0; i<chromWidth; i++) {
- unsigned int b = src[6*i+0];
- unsigned int g = src[6*i+1];
- unsigned int r = src[6*i+2];
-
- unsigned int Y = ((RY*r + GY*g + BY*b)>>RGB2YUV_SHIFT) + 16;
-
- ydst[2*i] = Y;
-
- b = src[6*i+3];
- g = src[6*i+4];
- r = src[6*i+5];
-
- Y = ((RY*r + GY*g + BY*b)>>RGB2YUV_SHIFT) + 16;
- ydst[2*i+1] = Y;
- }
- udst += chromStride;
- vdst += chromStride;
- ydst += lumStride;
- src += srcStride;
- }
+ rgb24toyv12_c(src, ydst, udst, vdst, width, height-y, lumStride, chromStride, srcStride);
}
static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest,