summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-26 01:28:57 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-26 01:28:57 +0000
commit9b5303d1f12803d82facf7019dc9c3b85903e229 (patch)
tree5e852a72371225c1938f63cf273bc5b62868f1ca /libmpcodecs
parentfe68e2d692c03d5cd62f682aefdc6fdf59c07f63 (diff)
downloadmpv-9b5303d1f12803d82facf7019dc9c3b85903e229.tar.bz2
mpv-9b5303d1f12803d82facf7019dc9c3b85903e229.tar.xz
change to match current bgr/rgb definition
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13146 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_rgbtest.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/libmpcodecs/vf_rgbtest.c b/libmpcodecs/vf_rgbtest.c
index 67e79b4515..d918397076 100644
--- a/libmpcodecs/vf_rgbtest.c
+++ b/libmpcodecs/vf_rgbtest.c
@@ -23,11 +23,13 @@ static unsigned int getfmt(unsigned int outfmt){
case IMGFMT_RGB15:
case IMGFMT_RGB16:
case IMGFMT_RGB24:
- case IMGFMT_RGB32:
+ case IMGFMT_RGBA:
+ case IMGFMT_ARGB:
case IMGFMT_BGR15:
case IMGFMT_BGR16:
case IMGFMT_BGR24:
- case IMGFMT_BGR32:
+ case IMGFMT_BGRA:
+ case IMGFMT_ABGR:
return outfmt;
}
return 0;
@@ -35,18 +37,14 @@ static unsigned int getfmt(unsigned int outfmt){
static void put_pixel(uint8_t *buf, int x, int y, int stride, int r, int g, int b, int fmt){
switch(fmt){
- case IMGFMT_RGB15: ((uint16_t*)(buf + y*stride))[x]= ((r>>3)<<10) | ((g>>3)<<5) | (b>>3);
+ case IMGFMT_BGR15: ((uint16_t*)(buf + y*stride))[x]= ((r>>3)<<10) | ((g>>3)<<5) | (b>>3);
break;
- case IMGFMT_BGR15: ((uint16_t*)(buf + y*stride))[x]= ((b>>3)<<10) | ((g>>3)<<5) | (r>>3);
+ case IMGFMT_RGB15: ((uint16_t*)(buf + y*stride))[x]= ((b>>3)<<10) | ((g>>3)<<5) | (r>>3);
break;
- case IMGFMT_RGB16: ((uint16_t*)(buf + y*stride))[x]= ((r>>3)<<11) | ((g>>2)<<5) | (b>>3);
+ case IMGFMT_BGR16: ((uint16_t*)(buf + y*stride))[x]= ((r>>3)<<11) | ((g>>2)<<5) | (b>>3);
break;
- case IMGFMT_BGR16: ((uint16_t*)(buf + y*stride))[x]= ((b>>3)<<11) | ((g>>2)<<5) | (r>>3);
+ case IMGFMT_RGB16: ((uint16_t*)(buf + y*stride))[x]= ((b>>3)<<11) | ((g>>2)<<5) | (r>>3);
break;
-/* case IMGFMT_RGB32_ME: ((uint32_t*)(buf + y*stride))[x]= (r<<16) | (g<<8) | b;
- break;
- case IMGFMT_BGR32_ME: ((uint32_t*)(buf + y*stride))[x]= (b<<16) | (g<<8) | r;
- break;*/
case IMGFMT_RGB24:
buf[3*x + y*stride + 0]= r;
buf[3*x + y*stride + 1]= g;
@@ -57,26 +55,26 @@ static void put_pixel(uint8_t *buf, int x, int y, int stride, int r, int g, int
buf[3*x + y*stride + 1]= g;
buf[3*x + y*stride + 2]= r;
break;
- case IMGFMT_RGB32:
+ case IMGFMT_RGBA:
buf[4*x + y*stride + 0]= r;
buf[4*x + y*stride + 1]= g;
buf[4*x + y*stride + 2]= b;
break;
- case IMGFMT_BGR32:
+ case IMGFMT_BGRA:
buf[4*x + y*stride + 0]= b;
buf[4*x + y*stride + 1]= g;
buf[4*x + y*stride + 2]= r;
break;
-/* case IMGFMT_ARGB32:
+ case IMGFMT_ARGB:
buf[4*x + y*stride + 1]= r;
buf[4*x + y*stride + 2]= g;
buf[4*x + y*stride + 3]= b;
break;
- case IMGFMT_ABGR32:
+ case IMGFMT_ABGR:
buf[4*x + y*stride + 1]= b;
buf[4*x + y*stride + 2]= g;
buf[4*x + y*stride + 3]= r;
- break;*/
+ break;
}
}