1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef _DPB_H_ |
|
21 #define _DPB_H_ |
|
22 |
|
23 |
|
24 #include "globals.h" |
|
25 #include "nrctyp32.h" |
|
26 #include "framebuffer.h" |
|
27 |
|
28 |
|
29 #define DPB_ERR_MEM_ALLOC -3 |
|
30 #define DPB_ERR_PICTURE_NOT_FOUND -2 |
|
31 #define DPB_ERROR -1 |
|
32 #define DPB_OK 0 |
|
33 |
|
34 |
|
35 #define DPB_MAX_SIZE 16 |
|
36 |
|
37 |
|
38 typedef struct _dpb_s { |
|
39 int size; |
|
40 frmBuf_s *buffers[DPB_MAX_SIZE]; |
|
41 |
|
42 int fullness; |
|
43 int maxNumRefFrames; |
|
44 int numShortTermPics; |
|
45 int numLongTermPics; |
|
46 |
|
47 int maxLongTermFrameIdx; |
|
48 |
|
49 } dpb_s; |
|
50 |
|
51 |
|
52 |
|
53 dpb_s *dpbOpen(); |
|
54 |
|
55 void dpbClose(dpb_s *dpb); |
|
56 |
|
57 void dpbSetSize(dpb_s *dpb, int dpbSize); |
|
58 |
|
59 frmBuf_s *dpbGetNextOutputPic(dpb_s *dpb, int *dpbHasIDRorMMCO5); |
|
60 |
|
61 int dpbStorePicture(dpb_s *dpb, frmBuf_s *currPic, frmBuf_s *outputQueue[]); |
|
62 |
|
63 void dpbUpdatePicNums(dpb_s *dpb, int32 frameNum, int32 maxFrameNum); |
|
64 |
|
65 void dpbMarkAllPicsAsNonRef(dpb_s *dpb); |
|
66 |
|
67 void dpbMarkLowestShortTermPicAsNonRef(dpb_s *dpb); |
|
68 |
|
69 int dpbMarkShortTermPicAsNonRef(dpb_s *dpb, int32 picNum); |
|
70 |
|
71 int dpbMarkLongTermPicAsNonRef(dpb_s *dpb, int longTermPicNum); |
|
72 |
|
73 void dpbVerifyLongTermFrmIdx(dpb_s *dpb, int longTermFrmIdx); |
|
74 |
|
75 int dpbMarkShortTermPicAsLongTerm(dpb_s *dpb, int32 picNum, int longTermFrmIdx); |
|
76 |
|
77 void dpbSetMaxLongTermFrameIdx(dpb_s *dpb, int maxLongTermFrmIdxPlus1); |
|
78 |
|
79 |
|
80 #endif |
|