TI MM H.264 Decoder User Guide
mm_common.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * RTOS Codec User API definitions
4  *
5  * Copyright (c) Imagination Technologies Ltd.
6  * Copyright (c) 2019 Texas Instruments Incorporated - https://www.ti.com/
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation version 2.
11  *
12  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13  * kind, whether express or implied; without even the implied warranty
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  */
17 
18 #ifndef MM_COMMON_H_
19 #define MM_COMMON_H_
20 
21 #define CODEC_CFG_PRINT_BUF_LEN ((uint32_t) 1024U)
22 
23 extern struct MM_COMMON_Inst g_MM_COMMON_Inst;
24 
25 #define MAX_PLANES 3
26 
84  MM_PIX_FMT_FORCE32BITS = 0x7FFFFFFFU
85 };
86 
101 typedef enum {
105 } mm_buffertype;
106 
112 typedef struct {
114  uint32_t width;
116  uint32_t height;
118  uint32_t in_pixelformat;
120  uint32_t out_pixelformat;
122 
127 struct mm_buffer {
129  uint32_t chId;
133  uint32_t size[MAX_PLANES];
135  void *buf_addr[MAX_PLANES];
136  uint32_t num_planes;
137 };
138 
144 struct mm_osa_cfg {
146  void* (*memAlloc)(uint32_t size);
148  void (*memFree)(void *ptr, uint32_t size);
150  void (*printFxn)(const char *format, ...);
151 };
152 
156 };
157 
164 void MM_COMMON_OsaInit(struct mm_osa_cfg *params);
165 
167 #endif /* MM_COMMON_H_ */
Definition: mm_common.h:103
Definition: mm_common.h:74
uint32_t height
Definition: mm_common.h:116
Definition: mm_common.h:79
Definition: mm_common.h:80
mm_buffertype
MM Buffer types.
Definition: mm_common.h:101
uint32_t num_planes
Definition: mm_common.h:136
Definition: mm_common.h:83
struct MM_COMMON_Inst g_MM_COMMON_Inst
char printBuf[CODEC_CFG_PRINT_BUF_LEN]
Definition: mm_common.h:155
#define CODEC_CFG_PRINT_BUF_LEN
Definition: mm_common.h:21
Definition: mm_common.h:81
Definition: mm_common.h:82
struct mm_osa_cfg osa_params
Definition: mm_common.h:154
Definition: mm_common.h:73
Definition: mm_common.h:112
#define MAX_PLANES
Definition: mm_common.h:25
uint32_t in_pixelformat
Definition: mm_common.h:118
uint32_t width
Definition: mm_common.h:114
void MM_COMMON_OsaInit(struct mm_osa_cfg *params)
MM_DEC_OsaInit - To set callback for mem & logging feature This function should called only once befo...
mm_buffertype type
Definition: mm_common.h:131
Definition: mm_common.h:78
uint32_t out_pixelformat
Definition: mm_common.h:120
Definition: mm_common.h:84
Definition: mm_common.h:153
Definition: mm_common.h:127
Definition: mm_common.h:75
mm_pixelformat
MM Pixel Format.
Definition: mm_common.h:72
uint32_t chId
Definition: mm_common.h:129
Definition: mm_common.h:77
Definition: mm_common.h:144
Definition: mm_common.h:104
Definition: mm_common.h:102
Definition: mm_common.h:76