PageRenderTime 101ms CodeModel.GetById 60ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/Avc/yuv2rgb.h

http://github.com/mbebenita/Broadway
C Header | 51 lines | 28 code | 9 blank | 14 comment | 0 complexity | 4c7def4d95875efeab9aa1c94b1761a0 MD5 | raw file
 1/* YUV-> RGB conversion code.
 2 *
 3 * Copyright (C) 2011 Robin Watts (robin@wss.co.uk) for Pinknoise
 4 * Productions Ltd.
 5 *
 6 * Licensed under the BSD license. See 'COPYING' for details of
 7 * (non-)warranty.
 8 *
 9 */
10
11#include <stdint.h>
12
13#ifndef YUV2RGB_H
14
15#define YUV2RGB_H
16
17/* Define these to something appropriate in your build */
18
19//typedef unsigned int   uint32_t;
20//typedef signed   int   int32_t;
21//typedef unsigned short uint16_t;
22//typedef unsigned char  uint8_t;
23
24extern const uint32_t yuv2rgb565_table[];
25extern const uint32_t yuv2bgr565_table[];
26
27void yuv420_2_rgb888(uint8_t  *dst_ptr,
28               const uint8_t  *y_ptr,
29               const uint8_t  *u_ptr,
30               const uint8_t  *v_ptr,
31                     int32_t   width,
32                     int32_t   height,
33                     int32_t   y_span,
34                     int32_t   uv_span,
35                     int32_t   dst_span,
36               const uint32_t *tables,
37                     int32_t   dither);
38
39void yuv420_2_rgb8888(uint8_t  *dst_ptr,
40                const uint8_t  *y_ptr,
41                const uint8_t  *u_ptr,
42                const uint8_t  *v_ptr,
43                      int32_t   width,
44                      int32_t   height,
45                      int32_t   y_span,
46                      int32_t   uv_span,
47                      int32_t   dst_span,
48                const uint32_t *tables,
49                      int32_t   dither);
50
51#endif /* YUV2RGB_H */