forked from milosladni/jepoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vepoc.h
62 lines (52 loc) · 2.08 KB
/
vepoc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (c) 2014 Manuel Braga <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _VEPOC_H_
#define _VEPOC_H_
#include <stdint.h>
#include "ve.h"
typedef enum {
VEISP_COLOR_FORMAT_NV12 = 0,
VEISP_COLOR_FORMAT_NV16 = 2,
VEISP_COLOR_FORMAT_TILE = 4,
} veisp_color_format;
typedef enum {
VEAVC_ENCODER_MODE_H264 = 0,
VEAVC_ENCODER_MODE_JPEG = 1,
} veavc_encoder_mode;
void picture_generate(uint32_t w, uint32_t h, uint8_t *Y, uint8_t *C);
void vejpeg_header_create(int w, int h, int quality);
void vejpeg_header_destroy(void);
void vejpeg_write_SOF0(void);
void vejpeg_write_SOS(void);
void vejpeg_write_quantization(void);
void vejpeg_write_file(const char *filename, uint8_t *buffer, uint32_t length);
void veisp_set_buffers(uint8_t *Y, uint8_t *C);
void veisp_set_picture_size(uint32_t w, uint32_t h);
void veisp_init_picture(uint32_t w, uint32_t h, veisp_color_format f);
void veavc_select_subengine(void);
void veavc_init_vle(uint8_t *J, uint32_t size);
void veavc_init_ctrl(veavc_encoder_mode mode);
void veavc_jpeg_parameters(uint8_t fill1, uint8_t stuff, uint32_t biasY, uint32_t biasC);
void veavc_put_bits(uint8_t nbits, uint32_t data);
void veavc_sdram_index(uint32_t index);
void veavc_jpeg_quantization(uint16_t *tableY, uint16_t *tableC, uint32_t length);
void veavc_launch_encoding(void);
void veavc_check_status(void);
uint32_t veavc_get_written(void);
#endif