Mercurial > mplayer.hg
comparison libswscale/swscale.c @ 30892:e052716dcb5b
Extend the generic path of the yuv2rgb converter with support for rgb444
output format.
Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl
author | cehoyos |
---|---|
date | Thu, 18 Mar 2010 23:02:32 +0000 |
parents | 5b013ed452fb |
children | f08d81b195fa |
comparison
equal
deleted
inserted
replaced
30891:fdcf76890a16 | 30892:e052716dcb5b |
---|---|
37 BGR15 -> BGR16 | 37 BGR15 -> BGR16 |
38 */ | 38 */ |
39 | 39 |
40 /* | 40 /* |
41 tested special converters (most are tested actually, but I did not write it down ...) | 41 tested special converters (most are tested actually, but I did not write it down ...) |
42 YV12 -> BGR16 | 42 YV12 -> BGR12/BGR16 |
43 YV12 -> YV12 | 43 YV12 -> YV12 |
44 BGR15 -> BGR16 | 44 BGR15 -> BGR16 |
45 BGR16 -> BGR16 | 45 BGR16 -> BGR16 |
46 YVU9 -> YV12 | 46 YVU9 -> YV12 |
47 | 47 |
803 ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ | 803 ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ |
804 ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ | 804 ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ |
805 }\ | 805 }\ |
806 }\ | 806 }\ |
807 break;\ | 807 break;\ |
808 case PIX_FMT_RGB444BE:\ | |
809 case PIX_FMT_RGB444LE:\ | |
810 case PIX_FMT_BGR444BE:\ | |
811 case PIX_FMT_BGR444LE:\ | |
812 {\ | |
813 const int dr1= dither_4x4_16[y&3 ][0];\ | |
814 const int dg1= dither_4x4_16[y&3 ][1];\ | |
815 const int db1= dither_4x4_16[(y&3)^3][0];\ | |
816 const int dr2= dither_4x4_16[y&3 ][1];\ | |
817 const int dg2= dither_4x4_16[y&3 ][0];\ | |
818 const int db2= dither_4x4_16[(y&3)^3][1];\ | |
819 func(uint16_t,0)\ | |
820 ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ | |
821 ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ | |
822 }\ | |
823 }\ | |
824 break;\ | |
808 case PIX_FMT_RGB8:\ | 825 case PIX_FMT_RGB8:\ |
809 case PIX_FMT_BGR8:\ | 826 case PIX_FMT_BGR8:\ |
810 {\ | 827 {\ |
811 const uint8_t * const d64= dither_8x8_73[y&7];\ | 828 const uint8_t * const d64= dither_8x8_73[y&7];\ |
812 const uint8_t * const d32= dither_8x8_32[y&7];\ | 829 const uint8_t * const d32= dither_8x8_32[y&7];\ |