annotate libswscale/bfin/yuv2rgb_bfin.c @ 30252:cb4e9c35fa0c

Use ARCH_X86_32 instead of the compiler-specific __i386__
author reimar
date Tue, 12 Jan 2010 20:26:15 +0000
parents f8db50af4035
children cdb6693dd949
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29028
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
1 /*
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
2 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
3 *
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
4 * Blackfin video color space converter operations
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
5 * convert I420 YV12 to RGB in various formats
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
6 *
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
7 * This file is part of FFmpeg.
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
8 *
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
13 *
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
17 * Lesser General Public License for more details.
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
18 *
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
22 */
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
23
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
24 #include <stdio.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
25 #include <stdlib.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
26 #include <string.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
27 #include <inttypes.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
28 #include <assert.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
29 #include "config.h"
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
30 #include <unistd.h>
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
31 #include "libswscale/rgb2rgb.h"
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
32 #include "libswscale/swscale.h"
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
33 #include "libswscale/swscale_internal.h"
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
34
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
35 #ifdef __FDPIC__
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
36 #define L1CODE __attribute__ ((l1_text))
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
37 #else
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
38 #define L1CODE
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
39 #endif
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
40
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
41 void ff_bfin_yuv2rgb555_line(uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
42 int w, uint32_t *coeffs) L1CODE;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
43
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
44 void ff_bfin_yuv2rgb565_line(uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
45 int w, uint32_t *coeffs) L1CODE;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
46
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
47 void ff_bfin_yuv2rgb24_line(uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
48 int w, uint32_t *coeffs) L1CODE;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
49
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
50 typedef void (* ltransform)(uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
51 int w, uint32_t *coeffs);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
52
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
53
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
54 static void bfin_prepare_coefficients(SwsContext *c, int rgb, int masks)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
55 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
56 int oy;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
57 oy = c->yOffset&0xffff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
58 oy = oy >> 3; // keep everything U8.0 for offset calculation
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
59
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
60 c->oc = 128*0x01010101U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
61 c->oy = oy*0x01010101U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
62
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
63 /* copy 64bit vector coeffs down to 32bit vector coeffs */
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
64 c->cy = c->yCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
65 c->zero = 0;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
66
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
67 if (rgb) {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
68 c->crv = c->vrCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
69 c->cbu = c->ubCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
70 c->cgu = c->ugCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
71 c->cgv = c->vgCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
72 } else {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
73 c->crv = c->ubCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
74 c->cbu = c->vrCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
75 c->cgu = c->vgCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
76 c->cgv = c->ugCoeff;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
77 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
78
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
79
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
80 if (masks == 555) {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
81 c->rmask = 0x001f * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
82 c->gmask = 0x03e0 * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
83 c->bmask = 0x7c00 * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
84 } else if (masks == 565) {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
85 c->rmask = 0x001f * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
86 c->gmask = 0x07e0 * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
87 c->bmask = 0xf800 * 0x00010001U;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
88 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
89 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
90
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
91 static int core_yuv420_rgb(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
92 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
93 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
94 uint8_t **oplanes, int *outstrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
95 ltransform lcscf, int rgb, int masks)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
96 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
97 uint8_t *py,*pu,*pv,*op;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
98 int w = instrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
99 int h2 = srcSliceH>>1;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
100 int i;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
101
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
102 bfin_prepare_coefficients(c, rgb, masks);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
103
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
104 py = in[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
105 pu = in[1+(1^rgb)];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
106 pv = in[1+(0^rgb)];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
107
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
108 op = oplanes[0] + srcSliceY*outstrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
109
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
110 for (i=0;i<h2;i++) {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
111
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
112 lcscf(py, pu, pv, op, w, &c->oy);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
113
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
114 py += instrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
115 op += outstrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
116
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
117 lcscf(py, pu, pv, op, w, &c->oy);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
118
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
119 py += instrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
120 pu += instrides[1];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
121 pv += instrides[2];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
122 op += outstrides[0];
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
123 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
124
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
125 return srcSliceH;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
126 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
127
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
128
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
129 static int bfin_yuv420_rgb555(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
130 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
131 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
132 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
133 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
134 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
135 outstrides, ff_bfin_yuv2rgb555_line, 1, 555);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
136 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
137
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
138 static int bfin_yuv420_bgr555(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
139 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
140 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
141 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
142 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
143 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
144 outstrides, ff_bfin_yuv2rgb555_line, 0, 555);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
145 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
146
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
147 static int bfin_yuv420_rgb24(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
148 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
149 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
150 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
151 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
152 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
153 outstrides, ff_bfin_yuv2rgb24_line, 1, 888);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
154 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
155
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
156 static int bfin_yuv420_bgr24(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
157 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
158 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
159 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
160 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
161 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
162 outstrides, ff_bfin_yuv2rgb24_line, 0, 888);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
163 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
164
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
165 static int bfin_yuv420_rgb565(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
166 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
167 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
168 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
169 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
170 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
171 outstrides, ff_bfin_yuv2rgb565_line, 1, 565);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
172 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
173
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
174 static int bfin_yuv420_bgr565(SwsContext *c,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
175 uint8_t **in, int *instrides,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
176 int srcSliceY, int srcSliceH,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
177 uint8_t **oplanes, int *outstrides)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
178 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
179 return core_yuv420_rgb(c, in, instrides, srcSliceY, srcSliceH, oplanes,
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
180 outstrides, ff_bfin_yuv2rgb565_line, 0, 565);
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
181 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
182
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
183
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
184 SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c)
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
185 {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
186 SwsFunc f;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
187
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
188 switch(c->dstFormat) {
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
189 case PIX_FMT_RGB555: f = bfin_yuv420_rgb555; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
190 case PIX_FMT_BGR555: f = bfin_yuv420_bgr555; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
191 case PIX_FMT_RGB565: f = bfin_yuv420_rgb565; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
192 case PIX_FMT_BGR565: f = bfin_yuv420_bgr565; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
193 case PIX_FMT_RGB24: f = bfin_yuv420_rgb24; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
194 case PIX_FMT_BGR24: f = bfin_yuv420_bgr24; break;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
195 default:
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
196 return 0;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
197 }
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
198
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
199 av_log(c, AV_LOG_INFO, "BlackFin accelerated color space converter %s\n",
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
200 sws_format_name (c->dstFormat));
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
201
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
202 return f;
f8db50af4035 Move yuv2rgb code to subdirs.
ramiro
parents:
diff changeset
203 }