blob: d6e2292c85370c62b41825ba1e5f06d20dcc471b [file] [log] [blame]
Song Zhao1b237602020-02-13 10:58:57 -08001/*
2 * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
3 *
4 * This source code is subject to the terms and conditions defined in the
5 * file 'LICENSE' which is part of this source code package.
6 *
7 * Description:
8 */
9#ifndef _V4L2_DEC_H_
10#define _V4L2_DEC_H_
11
12#include <stdint.h>
13#include "demux.h"
14
15enum vdec_dw_mode {
16 VDEC_DW_AFBC_ONLY = 0,
17 VDEC_DW_AFBC_1_1_DW = 1,
18 VDEC_DW_AFBC_1_4_DW = 2,
19 VDEC_DW_AFBC_x2_1_4_DW = 3,
20 VDEC_DW_AFBC_1_2_DW = 4,
21 VDEC_DW_NO_AFBC = 16,
22};
23
24typedef void (*decode_finish_fn)();
25
Song Zhao6c7d1f82020-04-06 23:22:49 -070026int v4l2_dec_init(enum vtype type, int secure, decode_finish_fn);
Song Zhao1b237602020-02-13 10:58:57 -080027int v4l2_dec_destroy();
28
29int v4l2_dec_write_es(const uint8_t *data, int size);
30int v4l2_dec_frame_done();
31int capture_buffer_recycle(void* handle);
32int v4l2_dec_eos();
33void dump_v4l2_decode_state();
34
35#endif