blob: afbf5d2286abb9bfb7bb3d55930746079fdc79e0 [file] [log] [blame]
Chih-Wei Huang0d92eda2012-02-07 16:55:49 +08001/*
2 libcamera: An implementation of the library required by Android OS 3.2 so
3 it can access V4L2 devices as cameras.
4
Chih-Wei Huangd5590eb2019-02-26 17:48:45 +08005 (C) 2011 Eduardo José Tagle <ejtagle@tutopia.com>
Chih-Wei Huang0d92eda2012-02-07 16:55:49 +08006
7 Based on several packages:
8 - luvcview: Sdl video Usb Video Class grabber
9 (C) 2005,2006,2007 Laurent Pinchart && Michel Xhaard
10
11 - spcaview
12 (C) 2003,2004,2005,2006 Michel Xhaard
13
14 - JPEG decoder from http://www.bootsplash.org/
15 (C) August 2001 by Michael Schroeder, <mls@suse.de>
16
17 - libcamera V4L for Android 2.2
18 (C) 2009 0xlab.org - http://0xlab.org/
19 (C) 2010 SpectraCore Technologies
20 Author: Venkat Raju <codredruids@spectracoretech.com>
21 Based on a code from http://code.google.com/p/android-m912/downloads/detail?name=v4l2_camera_v2.patch
22
23 - guvcview: http://guvcview.berlios.de
24 Paulo Assis <pj.assis@gmail.com>
25 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
26
27 This program is free software: you can redistribute it and/or modify
28 it under the terms of the GNU General Public License as published by
29 the Free Software Foundation, either version 3 of the License, or
30 (at your option) any later version.
31
32 This program is distributed in the hope that it will be useful,
33 but WITHOUT ANY WARRANTY; without even the implied warranty of
34 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 GNU General Public License for more details.
36
37 You should have received a copy of the GNU General Public License
38 along with this program. If not, see <http://www.gnu.org/licenses/>.
39
40 */
41
42
43#ifndef UTILS_H
44#define UTILS_H
45
46#include <stdint.h>
47
48int jpeg_decode(uint8_t *pic,int stride, uint8_t *buf, int width, int height);
49
50/*******Error codes *******/
51#define ERR_NO_SOI 1
52#define ERR_NOT_8BIT 2
53#define ERR_HEIGHT_MISMATCH 3
54#define ERR_WIDTH_MISMATCH 4
55#define ERR_BAD_WIDTH_OR_HEIGHT 5
56#define ERR_TOO_MANY_COMPPS 6
57#define ERR_ILLEGAL_HV 7
58#define ERR_QUANT_TABLE_SELECTOR 8
59#define ERR_NOT_YCBCR_221111 9
60#define ERR_UNKNOWN_CID_IN_SCAN 10
61#define ERR_NOT_SEQUENTIAL_DCT 11
62#define ERR_WRONG_MARKER 12
63#define ERR_NO_EOI 13
64#define ERR_BAD_TABLES 14
65#define ERR_DEPTH_MISMATCH 15
66
67
68
69#endif