[MPlayer-cvslog] r36732 - in trunk/vidix: fourcc.h radeon_vid.c
reimar
subversion at mplayerhq.hu
Sat Jan 25 17:55:04 CET 2014
Author: reimar
Date: Sat Jan 25 17:55:04 2014
New Revision: 36732
Log:
radeon_vid: small simplification.
Modified:
trunk/vidix/fourcc.h
trunk/vidix/radeon_vid.c
Modified: trunk/vidix/fourcc.h
==============================================================================
--- trunk/vidix/fourcc.h Sat Jan 25 17:55:03 2014 (r36731)
+++ trunk/vidix/fourcc.h Sat Jan 25 17:55:04 2014 (r36732)
@@ -30,6 +30,8 @@
#define vid_fourcc(a,b,c,d)\
(((unsigned)(a)<<0)|((unsigned)(b)<<8)|((unsigned)(c)<<16)|((unsigned)(d)<<24))
+#define IMGFMT_IS_RGB(f) ((f & vid_fourcc(0xff,0xff,0xff, 0)) == vid_fourcc('R','G','B', 0))
+
/* RGB fourcc */
#define IMGFMT_RGB332 vid_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */
#define IMGFMT_RGB555 vid_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */
Modified: trunk/vidix/radeon_vid.c
==============================================================================
--- trunk/vidix/radeon_vid.c Sat Jan 25 17:55:03 2014 (r36731)
+++ trunk/vidix/radeon_vid.c Sat Jan 25 17:55:04 2014 (r36732)
@@ -2651,21 +2651,18 @@ static int radeon_vid_init_video( vidix_
break;
}
besr.load_prg_start=0;
- besr.swap_uv=0;
+ besr.swap_uv=IMGFMT_IS_RGB(config->fourcc);
switch(config->fourcc)
{
case IMGFMT_RGB15:
- besr.swap_uv=1;
case IMGFMT_BGR15: besr.surf_id = SCALER_SOURCE_15BPP>>8;
besr.load_prg_start = 1;
break;
case IMGFMT_RGB16:
- besr.swap_uv=1;
case IMGFMT_BGR16: besr.surf_id = SCALER_SOURCE_16BPP>>8;
besr.load_prg_start = 1;
break;
case IMGFMT_RGB32:
- besr.swap_uv=1;
case IMGFMT_BGR32: besr.surf_id = SCALER_SOURCE_32BPP>>8;
besr.load_prg_start = 1;
break;
More information about the MPlayer-cvslog
mailing list