FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rgb2rgb.c
Go to the documentation of this file.
1 /*
2  * software RGB to RGB converter
3  * pluralize by software PAL8 to RGB converter
4  * software YUV to YUV converter
5  * software YUV to RGB converter
6  * Written by Nick Kurshev.
7  * palette & YUV & runtime CPU stuff by Michael (michaelni@gmx.at)
8  *
9  * This file is part of FFmpeg.
10  *
11  * FFmpeg is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * FFmpeg is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with FFmpeg; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24  */
25 
26 #include <inttypes.h>
27 
28 #include "libavutil/attributes.h"
29 #include "libavutil/bswap.h"
30 #include "config.h"
31 #include "rgb2rgb.h"
32 #include "swscale.h"
33 #include "swscale_internal.h"
34 
35 void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
36 void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
37 void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
38 void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size);
39 void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
40 void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
41 void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
42 void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
43 void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
44 
45 void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size);
46 void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size);
47 void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size);
48 void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size);
49 void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size);
50 void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size);
51 void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size);
52 void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size);
53 
54 void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size);
55 void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
56 
57 void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc,
58  const uint8_t *vsrc, uint8_t *dst,
59  int width, int height,
60  int lumStride, int chromStride, int dstStride);
61 void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc,
62  const uint8_t *vsrc, uint8_t *dst,
63  int width, int height,
64  int lumStride, int chromStride, int dstStride);
65 void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc,
66  const uint8_t *vsrc, uint8_t *dst,
67  int width, int height,
68  int lumStride, int chromStride, int dstStride);
69 void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc,
70  const uint8_t *vsrc, uint8_t *dst,
71  int width, int height,
72  int lumStride, int chromStride, int dstStride);
73 void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst,
74  uint8_t *udst, uint8_t *vdst,
75  int width, int height,
76  int lumStride, int chromStride, int srcStride);
78  uint8_t *udst, uint8_t *vdst,
79  int width, int height,
80  int lumStride, int chromStride, int srcStride,
81  int32_t *rgb2yuv);
82 void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,
83  int srcStride, int dstStride);
84 void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
85  int width, int height, int src1Stride,
86  int src2Stride, int dstStride);
87 void (*deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2,
88  int width, int height, int srcStride,
89  int dst1Stride, int dst2Stride);
90 void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
91  uint8_t *dst1, uint8_t *dst2,
92  int width, int height,
93  int srcStride1, int srcStride2,
94  int dstStride1, int dstStride2);
95 void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2,
96  const uint8_t *src3, uint8_t *dst,
97  int width, int height,
98  int srcStride1, int srcStride2,
99  int srcStride3, int dstStride);
100 void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
101  const uint8_t *src, int width, int height,
102  int lumStride, int chromStride, int srcStride);
103 void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
104  const uint8_t *src, int width, int height,
105  int lumStride, int chromStride, int srcStride);
106 void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
107  const uint8_t *src, int width, int height,
108  int lumStride, int chromStride, int srcStride);
109 void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
110  const uint8_t *src, int width, int height,
111  int lumStride, int chromStride, int srcStride);
112 
113 #define BY ((int)( 0.098 * (1 << RGB2YUV_SHIFT) + 0.5))
114 #define BV ((int)(-0.071 * (1 << RGB2YUV_SHIFT) + 0.5))
115 #define BU ((int)( 0.439 * (1 << RGB2YUV_SHIFT) + 0.5))
116 #define GY ((int)( 0.504 * (1 << RGB2YUV_SHIFT) + 0.5))
117 #define GV ((int)(-0.368 * (1 << RGB2YUV_SHIFT) + 0.5))
118 #define GU ((int)(-0.291 * (1 << RGB2YUV_SHIFT) + 0.5))
119 #define RY ((int)( 0.257 * (1 << RGB2YUV_SHIFT) + 0.5))
120 #define RV ((int)( 0.439 * (1 << RGB2YUV_SHIFT) + 0.5))
121 #define RU ((int)(-0.148 * (1 << RGB2YUV_SHIFT) + 0.5))
122 
123 //plain C versions
124 #include "rgb2rgb_template.c"
125 
126 /*
127  * RGB15->RGB16 original by Strepto/Astral
128  * ported to gcc & bugfixed : A'rpi
129  * MMXEXT, 3DNOW optimization by Nick Kurshev
130  * 32-bit C version, and and&add trick by Michael Niedermayer
131  */
132 
134 {
135  rgb2rgb_init_c();
136  if (ARCH_X86)
138 }
139 
140 void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size)
141 {
142  int i, num_pixels = src_size >> 2;
143 
144  for (i = 0; i < num_pixels; i++) {
145 #if HAVE_BIGENDIAN
146  /* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */
147  dst[3 * i + 0] = src[4 * i + 1];
148  dst[3 * i + 1] = src[4 * i + 2];
149  dst[3 * i + 2] = src[4 * i + 3];
150 #else
151  dst[3 * i + 0] = src[4 * i + 2];
152  dst[3 * i + 1] = src[4 * i + 1];
153  dst[3 * i + 2] = src[4 * i + 0];
154 #endif
155  }
156 }
157 
158 void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size)
159 {
160  int i;
161 
162  for (i = 0; 3 * i < src_size; i++) {
163 #if HAVE_BIGENDIAN
164  /* RGB24 (= R, G, B) -> BGR32 (= A, R, G, B) */
165  dst[4 * i + 0] = 255;
166  dst[4 * i + 1] = src[3 * i + 0];
167  dst[4 * i + 2] = src[3 * i + 1];
168  dst[4 * i + 3] = src[3 * i + 2];
169 #else
170  dst[4 * i + 0] = src[3 * i + 2];
171  dst[4 * i + 1] = src[3 * i + 1];
172  dst[4 * i + 2] = src[3 * i + 0];
173  dst[4 * i + 3] = 255;
174 #endif
175  }
176 }
177 
178 void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
179 {
180  uint8_t *d = dst;
181  const uint16_t *s = (const uint16_t *)src;
182  const uint16_t *end = s + src_size / 2;
183 
184  while (s < end) {
185  register uint16_t bgr = *s++;
186 #if HAVE_BIGENDIAN
187  *d++ = 255;
188  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
189  *d++ = ((bgr&0x07E0)>>3) | ((bgr&0x07E0)>> 9);
190  *d++ = ((bgr&0xF800)>>8) | ((bgr&0xF800)>>13);
191 #else
192  *d++ = ((bgr&0xF800)>>8) | ((bgr&0xF800)>>13);
193  *d++ = ((bgr&0x07E0)>>3) | ((bgr&0x07E0)>> 9);
194  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
195  *d++ = 255;
196 #endif
197  }
198 }
199 
200 void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size)
201 {
202  uint16_t rgb, r, g, b;
203  uint16_t *d = (uint16_t *)dst;
204  const uint16_t *s = (const uint16_t *)src;
205  const uint16_t *end = s + src_size / 2;
206 
207  while (s < end) {
208  rgb = *s++;
209  r = rgb & 0xF00;
210  g = rgb & 0x0F0;
211  b = rgb & 0x00F;
212  r = (r << 3) | ((r & 0x800) >> 1);
213  g = (g << 2) | ((g & 0x080) >> 2);
214  b = (b << 1) | ( b >> 3);
215  *d++ = r | g | b;
216  }
217 }
218 
219 void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size)
220 {
221  uint8_t *d = dst;
222  const uint16_t *s = (const uint16_t *)src;
223  const uint16_t *end = s + src_size / 2;
224 
225  while (s < end) {
226  register uint16_t bgr = *s++;
227  *d++ = ((bgr&0xF800)>>8) | ((bgr&0xF800)>>13);
228  *d++ = ((bgr&0x07E0)>>3) | ((bgr&0x07E0)>> 9);
229  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
230  }
231 }
232 
233 void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
234 {
235  int i, num_pixels = src_size >> 1;
236 
237  for (i = 0; i < num_pixels; i++) {
238  unsigned rgb = ((const uint16_t *)src)[i];
239  ((uint16_t *)dst)[i] = (rgb >> 11) | (rgb & 0x7E0) | (rgb << 11);
240  }
241 }
242 
243 void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
244 {
245  int i, num_pixels = src_size >> 1;
246 
247  for (i = 0; i < num_pixels; i++) {
248  unsigned rgb = ((const uint16_t *)src)[i];
249  ((uint16_t *)dst)[i] = (rgb >> 11) | ((rgb & 0x7C0) >> 1) | ((rgb & 0x1F) << 10);
250  }
251 }
252 
253 void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
254 {
255  uint8_t *d = dst;
256  const uint16_t *s = (const uint16_t *)src;
257  const uint16_t *end = s + src_size / 2;
258 
259  while (s < end) {
260  register uint16_t bgr = *s++;
261 #if HAVE_BIGENDIAN
262  *d++ = 255;
263  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
264  *d++ = ((bgr&0x03E0)>>2) | ((bgr&0x03E0)>> 7);
265  *d++ = ((bgr&0x7C00)>>7) | ((bgr&0x7C00)>>12);
266 #else
267  *d++ = ((bgr&0x7C00)>>7) | ((bgr&0x7C00)>>12);
268  *d++ = ((bgr&0x03E0)>>2) | ((bgr&0x03E0)>> 7);
269  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
270  *d++ = 255;
271 #endif
272  }
273 }
274 
275 void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size)
276 {
277  uint8_t *d = dst;
278  const uint16_t *s = (const uint16_t *)src;
279  const uint16_t *end = s + src_size / 2;
280 
281  while (s < end) {
282  register uint16_t bgr = *s++;
283  *d++ = ((bgr&0x7C00)>>7) | ((bgr&0x7C00)>>12);
284  *d++ = ((bgr&0x03E0)>>2) | ((bgr&0x03E0)>> 7);
285  *d++ = ((bgr&0x001F)<<3) | ((bgr&0x001F)>> 2);
286  }
287 }
288 
289 void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
290 {
291  int i, num_pixels = src_size >> 1;
292 
293  for (i = 0; i < num_pixels; i++) {
294  unsigned rgb = ((const uint16_t *)src)[i];
295  ((uint16_t *)dst)[i] = ((rgb & 0x7C00) >> 10) | ((rgb & 0x3E0) << 1) | (rgb << 11);
296  }
297 }
298 
299 void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
300 {
301  int i, num_pixels = src_size >> 1;
302 
303  for (i = 0; i < num_pixels; i++) {
304  unsigned rgb = ((const uint16_t *)src)[i];
305  unsigned br = rgb & 0x7C1F;
306  ((uint16_t *)dst)[i] = (br >> 10) | (rgb & 0x3E0) | (br << 10);
307  }
308 }
309 
310 void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size)
311 {
312  uint16_t *d = (uint16_t *)dst;
313  uint16_t *s = (uint16_t *)src;
314  int i, num_pixels = src_size >> 1;
315 
316  for (i = 0; i < num_pixels; i++) {
317  unsigned rgb = s[i];
318  d[i] = (rgb << 8 | rgb & 0xF0 | rgb >> 8) & 0xFFF;
319  }
320 }
321 
322 
323 #define DEFINE_SHUFFLE_BYTES(a, b, c, d) \
324 void shuffle_bytes_ ## a ## b ## c ## d(const uint8_t *src, \
325  uint8_t *dst, int src_size) \
326 { \
327  int i; \
328  \
329  for (i = 0; i < src_size; i += 4) { \
330  dst[i + 0] = src[i + a]; \
331  dst[i + 1] = src[i + b]; \
332  dst[i + 2] = src[i + c]; \
333  dst[i + 3] = src[i + d]; \
334  } \
335 }
336 
337 DEFINE_SHUFFLE_BYTES(1, 2, 3, 0)
338 DEFINE_SHUFFLE_BYTES(3, 0, 1, 2)
339 DEFINE_SHUFFLE_BYTES(3, 2, 1, 0)
340 
341 #define DEFINE_RGB48TOBGR48(need_bswap, swap) \
342 void rgb48tobgr48_ ## need_bswap(const uint8_t *src, \
343  uint8_t *dst, int src_size) \
344 { \
345  uint16_t *d = (uint16_t *)dst; \
346  uint16_t *s = (uint16_t *)src; \
347  int i, num_pixels = src_size >> 1; \
348  \
349  for (i = 0; i < num_pixels; i += 3) { \
350  d[i ] = swap ? av_bswap16(s[i + 2]) : s[i + 2]; \
351  d[i + 1] = swap ? av_bswap16(s[i + 1]) : s[i + 1]; \
352  d[i + 2] = swap ? av_bswap16(s[i ]) : s[i ]; \
353  } \
354 }
355 
356 DEFINE_RGB48TOBGR48(nobswap, 0)
357 DEFINE_RGB48TOBGR48(bswap, 1)
358 
359 #define DEFINE_RGB64TOBGR48(need_bswap, swap) \
360 void rgb64tobgr48_ ## need_bswap(const uint8_t *src, \
361  uint8_t *dst, int src_size) \
362 { \
363  uint16_t *d = (uint16_t *)dst; \
364  uint16_t *s = (uint16_t *)src; \
365  int i, num_pixels = src_size >> 3; \
366  \
367  for (i = 0; i < num_pixels; i++) { \
368  d[3 * i ] = swap ? av_bswap16(s[4 * i + 2]) : s[4 * i + 2]; \
369  d[3 * i + 1] = swap ? av_bswap16(s[4 * i + 1]) : s[4 * i + 1]; \
370  d[3 * i + 2] = swap ? av_bswap16(s[4 * i ]) : s[4 * i ]; \
371  } \
372 }
373 
374 DEFINE_RGB64TOBGR48(nobswap, 0)
375 DEFINE_RGB64TOBGR48(bswap, 1)
376 
377 #define DEFINE_RGB64TO48(need_bswap, swap) \
378 void rgb64to48_ ## need_bswap(const uint8_t *src, \
379  uint8_t *dst, int src_size) \
380 { \
381  uint16_t *d = (uint16_t *)dst; \
382  uint16_t *s = (uint16_t *)src; \
383  int i, num_pixels = src_size >> 3; \
384  \
385  for (i = 0; i < num_pixels; i++) { \
386  d[3 * i ] = swap ? av_bswap16(s[4 * i ]) : s[4 * i ]; \
387  d[3 * i + 1] = swap ? av_bswap16(s[4 * i + 1]) : s[4 * i + 1]; \
388  d[3 * i + 2] = swap ? av_bswap16(s[4 * i + 2]) : s[4 * i + 2]; \
389  } \
390 }
391 
392 DEFINE_RGB64TO48(nobswap, 0)
393 DEFINE_RGB64TO48(bswap, 1)
const char * s
Definition: avisynth_c.h:768
#define DEFINE_RGB48TOBGR48(need_bswap, swap)
Definition: rgb2rgb.c:341
static void fn() rgb2yuv(uint8_t *_yuv[3], const ptrdiff_t yuv_stride[3], int16_t *rgb[3], ptrdiff_t s, int w, int h, const int16_t rgb2yuv_coeffs[3][3][8], const int16_t yuv_offset[8])
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:178
void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:310
void(* ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv)
Height should be a multiple of 2 and width should be a multiple of 2.
Definition: rgb2rgb.c:77
void(* planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride)
Definition: rgb2rgb.c:82
const char * g
Definition: vf_curves.c:112
const char * b
Definition: vf_curves.c:113
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:233
void(* yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride)
Definition: rgb2rgb.c:109
void(* yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride)
Width should be a multiple of 16.
Definition: rgb2rgb.c:69
av_cold void rgb2rgb_init_x86(void)
Definition: rgb2rgb.c:147
void(* rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:45
#define src
Definition: vp8dsp.c:254
Macro definitions for various function/variable attributes.
void(* rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:50
void(* uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride)
Definition: rgb2rgb.c:100
void(* uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride)
Definition: rgb2rgb.c:103
uint8_t
#define av_cold
Definition: attributes.h:82
void(* yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride)
Width should be a multiple of 16.
Definition: rgb2rgb.c:65
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:219
void(* rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:43
#define height
external API header
void(* yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride)
Height should be a multiple of 2 and width should be a multiple of 16.
Definition: rgb2rgb.c:61
#define DEFINE_SHUFFLE_BYTES(a, b, c, d)
Definition: rgb2rgb.c:323
void(* interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, int width, int height, int src1Stride, int src2Stride, int dstStride)
Definition: rgb2rgb.c:84
static av_cold void rgb2rgb_init_c(void)
void(* rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:49
#define DEFINE_RGB64TOBGR48(need_bswap, swap)
Definition: rgb2rgb.c:359
const char * r
Definition: vf_curves.c:111
void(* rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:38
void(* rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:48
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:289
#define width
void(* rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:37
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
av_cold void ff_sws_rgb2rgb_init(void)
Definition: rgb2rgb.c:133
int32_t
void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:200
void(* yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride)
Height should be a multiple of 2 and width should be a multiple of 16.
Definition: rgb2rgb.c:73
void(* rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:52
#define src1
Definition: h264pred.c:139
void(* rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:51
void(* vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst1, uint8_t *dst2, int width, int height, int srcStride1, int srcStride2, int dstStride1, int dstStride2)
Definition: rgb2rgb.c:90
void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:140
void(* rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:46
void(* shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:55
byte swapping routines
void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:158
void(* shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:54
void(* rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:41
void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:299
void(* yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride)
Height should be a multiple of 2 and width should be a multiple of 16.
Definition: rgb2rgb.c:57
void(* yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride)
Definition: rgb2rgb.c:106
void(* rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:40
void(* yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, int width, int height, int srcStride1, int srcStride2, int srcStride3, int dstStride)
Definition: rgb2rgb.c:95
void(* rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:35
void(* rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:47
void(* rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:42
void(* rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:36
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:253
void(* deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, int width, int height, int srcStride, int dst1Stride, int dst2Stride)
Definition: rgb2rgb.c:87
#define DEFINE_RGB64TO48(need_bswap, swap)
Definition: rgb2rgb.c:377
void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:243
void(* rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:39
void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size)
Definition: rgb2rgb.c:275