Mercurial > mplayer.hg
comparison libswscale/yuv2rgb.c @ 27158:65b8334df960
spelling/grammar/wording overhaul
author | diego |
---|---|
date | Fri, 04 Jul 2008 13:49:45 +0000 |
parents | e82c55f04149 |
children | c550b2157eaa |
comparison
equal
deleted
inserted
replaced
27157:e2797c291ba9 | 27158:65b8334df960 |
---|---|
37 #include "config.h" | 37 #include "config.h" |
38 #include "rgb2rgb.h" | 38 #include "rgb2rgb.h" |
39 #include "swscale.h" | 39 #include "swscale.h" |
40 #include "swscale_internal.h" | 40 #include "swscale_internal.h" |
41 | 41 |
42 #define DITHER1XBPP // only for mmx | 42 #define DITHER1XBPP // only for MMX |
43 | 43 |
44 const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ | 44 const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ |
45 { 1, 3, 1, 3, 1, 3, 1, 3, }, | 45 { 1, 3, 1, 3, 1, 3, 1, 3, }, |
46 { 2, 0, 2, 0, 2, 0, 2, 0, }, | 46 { 2, 0, 2, 0, 2, 0, 2, 0, }, |
47 }; | 47 }; |
153 /* hope these constant values are cache line aligned */ | 153 /* hope these constant values are cache line aligned */ |
154 DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL; | 154 DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL; |
155 DECLARE_ASM_CONST(8, uint64_t, mmx_redmask) = 0xf8f8f8f8f8f8f8f8ULL; | 155 DECLARE_ASM_CONST(8, uint64_t, mmx_redmask) = 0xf8f8f8f8f8f8f8f8ULL; |
156 DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL; | 156 DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL; |
157 | 157 |
158 // the volatile is required because gcc otherwise optimizes some writes away not knowing that these | 158 // The volatile is required because gcc otherwise optimizes some writes away |
159 // are read in the asm block | 159 // not knowing that these are read in the ASM block. |
160 static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; | 160 static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; |
161 static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; | 161 static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; |
162 static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; | 162 static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; |
163 static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; | 163 static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; |
164 | 164 |
639 SwsFunc t = ff_bfin_yuv2rgb_get_func_ptr (c); | 639 SwsFunc t = ff_bfin_yuv2rgb_get_func_ptr (c); |
640 if (t) return t; | 640 if (t) return t; |
641 } | 641 } |
642 #endif | 642 #endif |
643 | 643 |
644 av_log(c, AV_LOG_WARNING, "No accelerated colorspace conversion found\n"); | 644 av_log(c, AV_LOG_WARNING, "No accelerated colorspace conversion found.\n"); |
645 | 645 |
646 switch(c->dstFormat){ | 646 switch(c->dstFormat){ |
647 case PIX_FMT_BGR32: | 647 case PIX_FMT_BGR32: |
648 case PIX_FMT_RGB32: return yuv2rgb_c_32; | 648 case PIX_FMT_RGB32: return yuv2rgb_c_32; |
649 case PIX_FMT_RGB24: return yuv2rgb_c_24_rgb; | 649 case PIX_FMT_RGB24: return yuv2rgb_c_24_rgb; |