mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 12:36:41 +08:00 
			
		
		
		
	vo_vesa: rgb2rgb support
Originally committed as revision 2505 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
This commit is contained in:
		| @@ -3,7 +3,7 @@ include ../config.mak | |||||||
|  |  | ||||||
| LIBNAME = libpostproc.a | LIBNAME = libpostproc.a | ||||||
|  |  | ||||||
| SRCS=postprocess.c swscale.c | SRCS=postprocess.c swscale.c rgb2rgb.c | ||||||
| OBJS=$(SRCS:.c=.o) | OBJS=$(SRCS:.c=.o) | ||||||
|  |  | ||||||
| CFLAGS  = $(OPTFLAGS) -I. -I.. -Wall | CFLAGS  = $(OPTFLAGS) -I. -I.. -Wall | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								postproc/rgb2rgb.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								postproc/rgb2rgb.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | #include <inttypes.h> | ||||||
|  | #include "../config.h" | ||||||
|  | #include "rgb2rgb.h" | ||||||
|  |  | ||||||
|  | void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) | ||||||
|  | { | ||||||
|  |   uint32_t *dest = (uint32_t *)dst; | ||||||
|  |   uint8_t *s = src; | ||||||
|  |   uint8_t *end; | ||||||
|  |   end = s + src_size; | ||||||
|  |   while(s < end) | ||||||
|  |   { | ||||||
|  |     uint32_t rgb0; | ||||||
|  |     rgb0 = *(uint32_t *)s; | ||||||
|  |     *dest++ = rgb0 & 0xFFFFFFUL; | ||||||
|  |     s += 3; | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										12
									
								
								postproc/rgb2rgb.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								postproc/rgb2rgb.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | /*  | ||||||
|  |  * | ||||||
|  |  *  rgb2rgb.h, Software RGB to RGB coverter | ||||||
|  |  * | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #ifndef RGB2RGB_INCLUDED | ||||||
|  | #define RGB2RGB_INCLUDED | ||||||
|  |  | ||||||
|  | extern void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size); | ||||||
|  |  | ||||||
|  | #endif | ||||||
							
								
								
									
										18
									
								
								postproc/rgb2rgb_template.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								postproc/rgb2rgb_template.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | #include <inttypes.h> | ||||||
|  | #include "../config.h" | ||||||
|  | #include "rgb2rgb.h" | ||||||
|  |  | ||||||
|  | void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) | ||||||
|  | { | ||||||
|  |   uint32_t *dest = (uint32_t *)dst; | ||||||
|  |   uint8_t *s = src; | ||||||
|  |   uint8_t *end; | ||||||
|  |   end = s + src_size; | ||||||
|  |   while(s < end) | ||||||
|  |   { | ||||||
|  |     uint32_t rgb0; | ||||||
|  |     rgb0 = *(uint32_t *)s; | ||||||
|  |     *dest++ = rgb0 & 0xFFFFFFUL; | ||||||
|  |     s += 3; | ||||||
|  |   } | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user
	 Nick Kurshev
					Nick Kurshev