PageRenderTime 126ms CodeModel.GetById 61ms app.highlight 19ms RepoModel.GetById 41ms app.codeStats 0ms

/Avc/avclib_common.h

http://github.com/mbebenita/Broadway
C Header | 557 lines | 68 code | 63 blank | 426 comment | 0 complexity | 2cdd69f1623e80f363aefdbfeb6de364 MD5 | raw file
  1/* ------------------------------------------------------------------
  2 * Copyright (C) 1998-2009 PacketVideo
  3 *
  4 * Licensed under the Apache License, Version 2.0 (the "License");
  5 * you may not use this file except in compliance with the License.
  6 * You may obtain a copy of the License at
  7 *
  8 *      http://www.apache.org/licenses/LICENSE-2.0
  9 *
 10 * Unless required by applicable law or agreed to in writing, software
 11 * distributed under the License is distributed on an "AS IS" BASIS,
 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 13 * express or implied.
 14 * See the License for the specific language governing permissions
 15 * and limitations under the License.
 16 * -------------------------------------------------------------------
 17 */
 18/**
 19This file contains declarations of internal functions for common encoder/decoder library.
 20@publishedAll
 21*/
 22#ifndef AVCCOMMON_LIB_H_INCLUDED
 23#define AVCCOMMON_LIB_H_INCLUDED
 24
 25#include <stdlib.h>
 26
 27#ifndef AVCINT_COMMON_H_INCLUDED
 28#include "avcint_common.h"
 29#endif
 30
 31/*----------- deblock.c --------------*/
 32/**
 33This function performs conditional deblocking on a complete picture.
 34\param "video"  "Pointer to AVCCommonObj."
 35\return "AVC_SUCCESS for success and AVC_FAIL otherwise."
 36*/
 37OSCL_IMPORT_REF AVCStatus DeblockPicture(AVCCommonObj *video);
 38
 39/**
 40This function performs MB-based deblocking when MB_BASED_DEBLOCK
 41is defined at compile time.
 42\param "video"  "Pointer to AVCCommonObj."
 43\return "AVC_SUCCESS for success and AVC_FAIL otherwise."
 44*/
 45void MBInLoopDeblock(AVCCommonObj *video);
 46
 47
 48/*---------- dpb.c --------------------*/
 49/**
 50This function is called everytime a new sequence is detected.
 51\param "avcHandle"  "Pointer to AVCHandle."
 52\param "video" "Pointer to AVCCommonObj."
 53\param "padding"    "Flag specifying whether padding in luma component is needed (used for encoding)."
 54\return "AVC_SUCCESS or AVC_FAIL."
 55*/
 56OSCL_IMPORT_REF AVCStatus AVCConfigureSequence(AVCHandle *avcHandle, AVCCommonObj *video, bool padding);
 57
 58/**
 59This function allocates and initializes the decoded picture buffer structure based on
 60the profile and level for the first sequence parameter set. Currently,
 61it does not allow changing in profile/level for subsequent SPS.
 62\param "avcHandle"  "Pointer to AVCHandle."
 63\param "video" "Pointer to AVCCommonObj."
 64\param "FrameHeightInMbs"   "Height of the frame in the unit of MBs."
 65\param "PicWidthInMbs"  "Width of the picture in the unit of MBs."
 66\param "padding"    "Flag specifying whether padding in luma component is needed (used for encoding)."
 67\return "AVC_SUCCESS or AVC_FAIL."
 68*/
 69AVCStatus InitDPB(AVCHandle *avcHandle, AVCCommonObj *video, int FrameHeightInMbs, int PicWidthInMbs, bool padding);
 70
 71/**
 72This function frees the DPB memory.
 73\param "avcHandle"  "Pointer to AVCHandle."
 74\param "video" "Pointer to AVCCommonObj."
 75\return "AVC_SUCCESS or AVC_FAIL."
 76*/
 77OSCL_IMPORT_REF AVCStatus CleanUpDPB(AVCHandle *avcHandle, AVCCommonObj *video);
 78
 79/**
 80This function finds empty frame in the decoded picture buffer to be used for the
 81current picture, initializes the corresponding picture structure with Sl, Scb, Scr,
 82width, height and pitch.
 83\param "avcHandle" "Pointer to the main handle object."
 84\param "video"  "Pointer to AVCCommonObj."
 85\return "AVC_SUCCESS or AVC_FAIL."
 86*/
 87OSCL_IMPORT_REF AVCStatus DPBInitBuffer(AVCHandle *avcHandle, AVCCommonObj *video);
 88/**
 89This function finds empty frame in the decoded picture buffer to be used for the
 90current picture, initializes the corresponding picture structure with Sl, Scb, Scr,
 91width, height and pitch.
 92\param "video"  "Pointer to AVCCommonObj."
 93\param "CurrPicNum" "Current picture number (only used in decoder)."
 94\return "AVC_SUCCESS or AVC_FAIL."
 95*/
 96
 97OSCL_IMPORT_REF void DPBInitPic(AVCCommonObj *video, int CurrPicNum);
 98
 99/**
100This function releases the current frame back to the available pool for skipped frame after encoding.
101\param "avcHandle" "Pointer to the main handle object."
102\param "video" "Pointer to the AVCCommonObj."
103\return "void."
104*/
105OSCL_IMPORT_REF void DPBReleaseCurrentFrame(AVCHandle *avcHandle, AVCCommonObj *video);
106
107/**
108This function performs decoded reference picture marking process and store the current picture to the
109corresponding frame storage in the decoded picture buffer.
110\param "avcHandle" "Pointer to the main handle object."
111\param "video" "Pointer to the AVCCommonObj."
112\return "AVC_SUCCESS or AVC_FAIL."
113*/
114OSCL_IMPORT_REF AVCStatus StorePictureInDPB(AVCHandle *avcHandle, AVCCommonObj *video);
115
116/**
117This function perform sliding window operation on the reference picture lists, see subclause 8.2.5.3.
118It removes short-term ref frames with smallest FrameNumWrap from the reference list.
119\param "avcHandle" "Pointer to the main handle object."
120\param "video" "Pointer to the AVCCommonObj."
121\param "dpb"  "Pointer to the AVCDecPicBuffer."
122\return "AVC_SUCCESS or AVC_FAIL (contradicting values or scenario as in the Note in the draft)."
123*/
124AVCStatus sliding_window_process(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb);
125
126
127/**
128This function perform adaptive memory marking operation on the reference picture lists,
129see subclause 8.2.5.4. It calls other functions for specific operations.
130\param "video" "Pointer to the AVCCommonObj."
131\param "dpb"  "Pointer to the AVCDecPicBuffer."
132\param "sliceHdr"   "Pointer to the AVCSliceHeader."
133\return "AVC_SUCCESS or AVC_FAIL (contradicting values or scenario as in the Note in the draft)."
134*/
135AVCStatus adaptive_memory_marking(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb, AVCSliceHeader *sliceHdr);
136
137/**
138This function performs memory management control operation 1, marking a short-term picture
139as unused for reference. See subclause 8.2.5.4.1.
140\param "video" "Pointer to the AVCCommonObj."
141\param "dpb"  "Pointer to the AVCDecPicBuffer."
142\param "difference_of_pic_nums_minus1"  "From the syntax in dec_ref_pic_marking()."
143*/
144void MemMgrCtrlOp1(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb, int difference_of_pic_nums_minus1);
145
146/**
147This function performs memory management control operation 2, marking a long-term picture
148as unused for reference. See subclause 8.2.5.4.2.
149\param "dpb"  "Pointer to the AVCDecPicBuffer."
150\param "field_pic_flag"  "Flag whether the current picture is field or not."
151\param "long_term_pic_num"  "From the syntax in dec_ref_pic_marking()."
152*/
153void MemMgrCtrlOp2(AVCHandle *avcHandle, AVCDecPicBuffer *dpb, int long_term_pic_num);
154
155/**
156This function performs memory management control operation 3, assigning a LongTermFrameIdx to
157a short-term reference picture. See subclause 8.2.5.4.3.
158\param "video" "Pointer to the AVCCommonObj."
159\param "dpb"  "Pointer to the AVCDecPicBuffer."
160\param "difference_of_pic_nums_minus1"  "From the syntax in dec_ref_pic_marking()."
161\param "long_term_pic_num"  "From the syntax in dec_ref_pic_marking()."
162*/
163void MemMgrCtrlOp3(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb, uint difference_of_pic_nums_minus1,
164                   uint long_term_frame_idx);
165
166/**
167This function performs memory management control operation 4, getting new MaxLongTermFrameIdx.
168 See subclause 8.2.5.4.4.
169\param "video" "Pointer to the AVCCommonObj."
170\param "dpb"  "Pointer to the AVCDecPicBuffer."
171\param "max_long_term_frame_idx_plus1"  "From the syntax in dec_ref_pic_marking()."
172*/
173void MemMgrCtrlOp4(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb, uint max_long_term_frame_idx_plus1);
174
175/**
176This function performs memory management control operation 5, marking all reference pictures
177as unused for reference and set MaxLongTermFrameIdx to no long-termframe indices.
178 See subclause 8.2.5.4.5.
179\param "video" "Pointer to the AVCCommonObj."
180\param "dpb"  "Pointer to the AVCDecPicBuffer."
181*/
182void MemMgrCtrlOp5(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb);
183
184/**
185This function performs memory management control operation 6, assigning a long-term frame index
186to the current picture. See subclause 8.2.5.4.6.
187\param "video" "Pointer to the AVCCommonObj."
188\param "dpb"  "Pointer to the AVCDecPicBuffer."
189\param "long_term_frame_idx"  "From the syntax in dec_ref_pic_marking()."
190*/
191void MemMgrCtrlOp6(AVCHandle *avcHandle, AVCCommonObj *video, AVCDecPicBuffer *dpb, uint long_term_frame_idx);
192
193/**
194This function mark a long-term ref frame with a specific frame index as unused for reference.
195\param "dpb"  "Pointer to the AVCDecPicBuffer."
196\param "long_term_frame_idx"  "To look for"
197*/
198void unmark_long_term_frame_for_reference_by_frame_idx(AVCHandle *avcHandle, AVCDecPicBuffer *dpb, uint long_term_frame_idx);
199
200/**
201This function mark a long-term ref field with a specific frame index as unused for reference except
202a frame that contains a picture with picNumX.
203\param "dpb"  "Pointer to the AVCDecPicBuffer."
204\param "long_term_frame_idx"  "To look for."
205\param "picNumX"    "To look for."
206*/
207void unmark_long_term_field_for_reference_by_frame_idx(AVCCommonObj *video, AVCDecPicBuffer *dpb, uint long_term_frame_indx, int picNumX);
208
209/**
210This function mark a frame to unused for reference.
211\param "fs" "Pointer to AVCFrameStore to be unmarked."
212*/
213void unmark_for_reference(AVCHandle *avcHandle, AVCDecPicBuffer *dpb, uint idx);
214
215void update_ref_list(AVCDecPicBuffer *dpb);
216
217
218/*---------- fmo.c --------------*/
219/**
220This function initializes flexible macroblock reordering.
221\param "video"  "Pointer to AVCCommonObj."
222\return "AVC_SUCCESS for success and AVC_FAIL otherwise."
223*/
224OSCL_IMPORT_REF AVCStatus FMOInit(AVCCommonObj *video);
225
226/**
227This function fills up an array that maps Map unit to the slice group
228following the interleaved slice group map type.
229\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
230\param "run_length_minus1"  "Array of the run-length."
231\param "num_slice_groups_minus_1"   "Number of slice group minus 1."
232\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
233\return "Void."
234*/
235void FmoGenerateType0MapUnitMap(int *mapUnitToSliceGroupMap, uint *run_length_minus1, uint num_slice_groups_minus1, uint PicSizeInMapUnits);
236
237/**
238This function fills up an array that maps Map unit to the slice group
239following the dispersed slice group map type.
240\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
241\param "PicWidthInMbs"  "Width of the luma picture in macroblock unit."
242\param "num_slice_groups_minus_1"   "Number of slice group minus 1."
243\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
244\return "Void."
245*/
246void FmoGenerateType1MapUnitMap(int *mapUnitToSliceGroupMap, int PicWidthInMbs, uint num_slice_groups_minus1, uint PicSizeInMapUnits);
247
248/**
249This function fills up an array that maps Map unit to the slice group
250following the foreground with left-over slice group map type.
251\param "pps"    "Pointer to AVCPicParamSets structure."
252\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
253\param "PicWidthInMbs"  "Width of the luma picture in macroblock unit."
254\param "num_slice_groups_minus_1"   "Number of slice group minus 1."
255\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
256\return "Void."
257*/
258void FmoGenerateType2MapUnitMap(AVCPicParamSet *pps, int *mapUnitToSliceGroupMap, int PicWidthInMbs,
259                                uint num_slice_groups_minus1, uint PicSizeInMapUnits);
260
261/**
262This function fills up an array that maps Map unit to the slice group
263following the box-out slice group map type.
264\param "pps"    "Pointer to AVCPicParamSets structure."
265\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
266\param "PicWidthInMbs"  "Width of the luma picture in macroblock unit."
267\return "Void."
268*/
269void FmoGenerateType3MapUnitMap(AVCCommonObj *video, AVCPicParamSet* pps, int *mapUnitToSliceGroupMap,
270                                int PicWidthInMbs);
271
272/**
273This function fills up an array that maps Map unit to the slice group
274following the raster scan slice group map type.
275\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
276\param "MapUnitsInSliceGroup0"  "Derived in subclause 7.4.3."
277\param "slice_group_change_direction_flag"  "A value from the slice header."
278\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
279\return "void"
280*/
281void FmoGenerateType4MapUnitMap(int *mapUnitToSliceGroupMap, int MapUnitsInSliceGroup0,
282                                int slice_group_change_direction_flag, uint PicSizeInMapUnits);
283
284/**
285This function fills up an array that maps Map unit to the slice group
286following wipe slice group map type.
287\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
288\param "video"  "Pointer to AVCCommonObj structure."
289\param "slice_group_change_direction_flag"  "A value from the slice header."
290\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
291\return "void"
292*/
293void FmoGenerateType5MapUnitMap(int *mapUnitsToSliceGroupMap, AVCCommonObj *video,
294                                int slice_group_change_direction_flag, uint PicSizeInMapUnits);
295
296/**
297This function fills up an array that maps Map unit to the slice group
298following wipe slice group map type.
299\param "mapUnitToSliceGroupMap" "Array of slice group mapping."
300\param "slice_group_id" "Array of slice_group_id from AVCPicParamSet structure."
301\param "PicSizeInMapUnit"   "Size of the picture in number Map units."
302\return "void"
303*/
304void FmoGenerateType6MapUnitMap(int *mapUnitsToSliceGroupMap, int *slice_group_id, uint PicSizeInMapUnits);
305
306/*------------- itrans.c --------------*/
307/**
308This function performs transformation of the Intra16x16DC value according to
309subclause 8.5.6.
310\param "block"  "Pointer to the video->block[0][0][0]."
311\param "QPy"    "Quantization parameter."
312\return "void."
313*/
314void Intra16DCTrans(int16 *block, int Qq, int Rq);
315
316/**
317This function performs transformation of a 4x4 block according to
318subclause 8.5.8.
319\param "block"  "Pointer to the origin of transform coefficient area."
320\param "pred"   "Pointer to the origin of predicted area."
321\param "cur"    "Pointer to the origin of the output area."
322\param "width"  "Pitch of cur."
323\return "void."
324*/
325void itrans(int16 *block, uint8 *pred, uint8 *cur, int width);
326
327/*
328This function is the same one as itrans except for chroma.
329\param "block"  "Pointer to the origin of transform coefficient area."
330\param "pred"   "Pointer to the origin of predicted area."
331\param "cur"    "Pointer to the origin of the output area."
332\param "width"  "Pitch of cur."
333\return "void."
334*/
335void ictrans(int16 *block, uint8 *pred, uint8 *cur, int width);
336
337/**
338This function performs transformation of the DCChroma value according to
339subclause 8.5.7.
340\param "block"  "Pointer to the video->block[0][0][0]."
341\param "QPc"    "Quantization parameter."
342\return "void."
343*/
344void ChromaDCTrans(int16 *block, int Qq, int Rq);
345
346/**
347This function copies a block from pred to cur.
348\param "pred"   "Pointer to prediction block."
349\param "cur"    "Pointer to the current YUV block."
350\param "width"  "Pitch of cur memory."
351\param "pred_pitch" "Pitch for pred memory.
352\return "void."
353*/
354void copy_block(uint8 *pred, uint8 *cur, int width, int pred_pitch);
355
356/*--------- mb_access.c ----------------*/
357/**
358This function initializes the neighboring information before start macroblock decoding.
359\param "video"  "Pointer to AVCCommonObj."
360\param "mbNum"  "The current macroblock index."
361\param "currMB" "Pointer to the current AVCMacroblock structure."
362\return "void"
363*/
364OSCL_IMPORT_REF void InitNeighborAvailability(AVCCommonObj *video, int mbNum);
365
366/**
367This function checks whether the requested neighboring macroblock is available.
368\param "MbToSliceGroupMap"  "Array containing the slice group ID mapping to MB index."
369\param "PicSizeInMbs"   "Size of the picture in number of MBs."
370\param "mbAddr"     "Neighboring macroblock index to check."
371\param "currMbAddr" "Current macroblock index."
372\return "TRUE if the neighboring MB is available, FALSE otherwise."
373*/
374bool mb_is_available(AVCMacroblock *mblock, uint PicSizeInMbs, int mbAddr, int currMbAddr);
375
376/**
377This function performs prediction of the nonzero coefficient for a luma block (i,j).
378\param "video"  "Pointer to AVCCommonObj."
379\param "i"  "Block index, horizontal."
380\param "j"  "Block index, vertical."
381\return "Predicted number of nonzero coefficient."
382*/
383OSCL_IMPORT_REF int predict_nnz(AVCCommonObj *video, int i, int j);
384
385/**
386This function performs prediction of the nonzero coefficient for a chroma block (i,j).
387\param "video"  "Pointer to AVCCommonObj."
388\param "i"  "Block index, horizontal."
389\param "j"  "Block index, vertical."
390\return "Predicted number of nonzero coefficient."
391*/
392OSCL_IMPORT_REF int predict_nnz_chroma(AVCCommonObj *video, int i, int j);
393
394/**
395This function calculates the predicted motion vectors for the current macroblock.
396\param "video" "Pointer to AVCCommonObj."
397\param "encFlag"    "Boolean whether this function is used by encoder or decoder."
398\return "void."
399*/
400OSCL_IMPORT_REF void GetMotionVectorPredictor(AVCCommonObj *video, int encFlag);
401
402/*---------- reflist.c -----------------*/
403/**
404This function initializes reference picture list used in INTER prediction
405at the beginning of each slice decoding. See subclause 8.2.4.
406\param "video"  "Pointer to AVCCommonObj."
407\return "void"
408Output is video->RefPicList0, video->RefPicList1, video->refList0Size and video->refList1Size.
409*/
410OSCL_IMPORT_REF void RefListInit(AVCCommonObj *video);
411
412/**
413This function generates picture list from frame list. Used when current picture is field.
414see subclause 8.2.4.2.5.
415\param "video"  "Pointer to AVCCommonObj."
416\param "IsL1"   "Is L1 list?"
417\param "long_term"  "Is long-term prediction?"
418\return "void"
419*/
420void    GenPicListFromFrameList(AVCCommonObj *video, int IsL1, int long_term);
421
422/**
423This function performs reference picture list reordering according to the
424ref_pic_list_reordering() syntax. See subclause 8.2.4.3.
425\param "video"  "Pointer to AVCCommonObj."
426\return "AVC_SUCCESS or AVC_FAIL"
427Output is video->RefPicList0, video->RefPicList1, video->refList0Size and video->refList1Size.
428*/
429OSCL_IMPORT_REF AVCStatus ReOrderList(AVCCommonObj *video);
430
431/**
432This function performs reference picture list reordering according to the
433ref_pic_list_reordering() syntax regardless of list 0 or list 1. See subclause 8.2.4.3.
434\param "video"  "Pointer to AVCCommonObj."
435\param "isL1"   "Is list 1 or not."
436\return "AVC_SUCCESS or AVC_FAIL"
437Output is video->RefPicList0 and video->refList0Size or video->RefPicList1 and video->refList1Size.
438*/
439AVCStatus ReorderRefPicList(AVCCommonObj *video, int isL1);
440
441/**
442This function performs reordering process of reference picture list for short-term pictures.
443See subclause 8.2.4.3.1.
444\param "video"  "Pointer to AVCCommonObj."
445\param "picNumLX"   "picNumLX of an entry in the reference list."
446\param "refIdxLX"   "Pointer to the current entry index in the reference."
447\param "isL1"       "Is list 1 or not."
448\return "AVC_SUCCESS or AVC_FAIL"
449*/
450AVCStatus ReorderShortTerm(AVCCommonObj *video, int picNumLX, int *refIdxLX, int isL1);
451
452/**
453This function performs reordering process of reference picture list for long-term pictures.
454See subclause 8.2.4.3.2.
455\param "video"  "Pointer to AVCCommonObj."
456\param "LongTermPicNum" "LongTermPicNum of an entry in the reference list."
457\param "refIdxLX"   "Pointer to the current entry index in the reference."
458\param "isL1"       "Is list 1 or not."
459\return "AVC_SUCCESS or AVC_FAIL"
460*/
461AVCStatus ReorderLongTerm(AVCCommonObj *video, int LongTermPicNum, int *refIdxLX, int isL1);
462
463/**
464This function gets the pictures in DPB according to the PicNum.
465\param "video"  "Pointer to AVCCommonObj."
466\param "picNum" "PicNum of the picture we are looking for."
467\return "Pointer to the AVCPictureData or NULL if not found"
468*/
469AVCPictureData*  GetShortTermPic(AVCCommonObj *video, int picNum);
470
471/**
472This function gets the pictures in DPB according to the LongtermPicNum.
473\param "video"  "Pointer to AVCCommonObj."
474\param "LongtermPicNum" "LongtermPicNum of the picture we are looking for."
475\return "Pointer to the AVCPictureData."
476*/
477AVCPictureData*  GetLongTermPic(AVCCommonObj *video, int LongtermPicNum);
478
479/**
480This function indicates whether the picture is used for short-term reference or not.
481\param "s"  "Pointer to AVCPictureData."
482\return "1 if it is used for short-term, 0 otherwise."
483*/
484int is_short_ref(AVCPictureData *s);
485
486/**
487This function indicates whether the picture is used for long-term reference or not.
488\param "s"  "Pointer to AVCPictureData."
489\return "1 if it is used for long-term, 0 otherwise."
490*/
491int is_long_ref(AVCPictureData *s);
492
493/**
494This function sorts array of pointers to AVCPictureData in descending order of
495the PicNum value.
496\param "data"   "Array of pointers to AVCPictureData."
497\param "num"    "Size of the array."
498\return "void"
499*/
500void SortPicByPicNum(AVCPictureData *data[], int num);
501
502/**
503This function sorts array of pointers to AVCPictureData in ascending order of
504the PicNum value.
505\param "data"   "Array of pointers to AVCPictureData."
506\param "num"    "Size of the array."
507\return "void"
508*/
509void SortPicByPicNumLongTerm(AVCPictureData *data[], int num);
510
511/**
512This function sorts array of pointers to AVCFrameStore in descending order of
513the FrameNumWrap value.
514\param "data"   "Array of pointers to AVCFrameStore."
515\param "num"    "Size of the array."
516\return "void"
517*/
518void SortFrameByFrameNumWrap(AVCFrameStore *data[], int num);
519
520/**
521This function sorts array of pointers to AVCFrameStore in ascending order of
522the LongTermFrameIdx value.
523\param "data"   "Array of pointers to AVCFrameStore."
524\param "num"    "Size of the array."
525\return "void"
526*/
527void SortFrameByLTFrameIdx(AVCFrameStore *data[], int num);
528
529/**
530This function sorts array of pointers to AVCPictureData in descending order of
531the PicOrderCnt value.
532\param "data"   "Array of pointers to AVCPictureData."
533\param "num"    "Size of the array."
534\return "void"
535*/
536void SortPicByPOC(AVCPictureData *data[], int num, int descending);
537
538/**
539This function sorts array of pointers to AVCPictureData in ascending order of
540the LongTermPicNum value.
541\param "data"   "Array of pointers to AVCPictureData."
542\param "num"    "Size of the array."
543\return "void"
544*/
545void SortPicByLTPicNum(AVCPictureData *data[], int num);
546
547/**
548This function sorts array of pointers to AVCFrameStore in descending order of
549the PicOrderCnt value.
550\param "data"   "Array of pointers to AVCFrameStore."
551\param "num"    "Size of the array."
552\return "void"
553*/
554void SortFrameByPOC(AVCFrameStore *data[], int num, int descending);
555
556
557#endif /* _AVCCOMMON_LIB_H_ */