4
* Copyright (c) 2009 Hans de Goede <hdegoede@redhat.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; either version 2.1 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "libv4lconvert-priv.h"
23
/* The stv0640 first sends all the red/green pixels for a line (so 1/2 width)
24
and then all the green/blue pixels in that line, shuffle this to a regular
25
RGGB bayer pattern. */
26
void v4lconvert_decode_stv0680(const unsigned char *src, unsigned char *dst,
27
int width, int height)
30
const unsigned char *src1 = src;
31
const unsigned char *src2 = src + width / 2;
33
for (y = 0; y < height; y++) {
34
for (x = 0; x < width / 2; x++) {