blob: 88e334d54b28344fd3958b7abd855ced93f8340f [file] [log] [blame]
Hamsalekha S8d3d3032015-03-13 21:24:58 +05301/******************************************************************************
2 *
3 * Copyright (C) 2015 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*/
20
21#ifndef _IH264D_MEM_REQUEST_H_
22#define _IH264D_MEM_REQUEST_H_
23/*!
24 ***************************************************************************
25 * \file ih264d_mem_request.h
26 *
27 * \brief
28 * This file contains declarations and data structures of the API's which
29 * required to interact with Picture Buffer.
30 *
31 *
32 * \date
33 * 11/12/2002
34 *
35 * \author NS
36 ***************************************************************************/
37#include "ih264_typedefs.h"
38#include "ih264_macros.h"
39#include "ih264_platform_macros.h"
40#include "ih264d_defs.h"
41#include "ih264d_structs.h"
42
43#define MAX_MEM_BLOCKS 64 + 8
44
45struct MemBlock
46{
47 void ** v_memLocation; /** memory location where address of allocated memory should be stored*/
48 UWORD32 u4_mem_size; /** Size of the memory block */
49};
50
51struct MemReq
52{
53 UWORD32 u4_num_memBlocks; /** Number of memory blocks */
54 struct MemBlock s_memBlock[MAX_MEM_BLOCKS]; /** Pointer to the first memory block */
55};
56
57struct PicMemBlock
58{
59 void * buf1; /** memory location for buf1 */
60 void * buf2; /** memory location for buf2 */
61 void * buf3; /** memory location for buf3 */
62};
63
64struct PicMemReq
65{
66 WORD32 i4_num_pic_memBlocks; /** Number of memory blocks */
67 UWORD32 u4_size1; /** Size of the buf1 in PicMemBlock */
68 UWORD32 u4_size2; /** Size of the buf2 in PicMemBlock */
69 UWORD32 u4_size3; /** Size of the buf3 in PicMemBlock */
70 struct PicMemBlock s_PicMemBlock[MAX_DISP_BUFS_NEW];
71};
72
73WORD32 ih264d_create_pic_buffers(UWORD8 u1_num_of_buf,
74 dec_struct_t *ps_dec);
75
76WORD32 ih264d_create_mv_bank(void * pv_codec_handle,
77 UWORD32 u4_wd,
78 UWORD32 u4_ht);
Harish Mahendrakar34b3e472015-08-04 09:55:15 +053079WORD16 ih264d_allocate_dynamic_bufs(dec_struct_t * ps_dec);
Hamsalekha S8d3d3032015-03-13 21:24:58 +053080
81
82#endif /* _IH264D_MEM_REQUEST_H_ */