14a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/* ------------------------------------------------------------------
24a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * Copyright (C) 1998-2009 PacketVideo
34a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber *
44a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * Licensed under the Apache License, Version 2.0 (the "License");
54a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * you may not use this file except in compliance with the License.
64a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * You may obtain a copy of the License at
74a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber *
84a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber *      http://www.apache.org/licenses/LICENSE-2.0
94a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber *
104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * Unless required by applicable law or agreed to in writing, software
114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * distributed under the License is distributed on an "AS IS" BASIS,
124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * express or implied.
144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * See the License for the specific language governing permissions
154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * and limitations under the License.
164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber * -------------------------------------------------------------------
174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber */
184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis file contains declarations of internal functions for AVC decoder library.
204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber@publishedAll
214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber#ifndef _AVCDEC_LIB_H_
234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber#define _AVCDEC_LIB_H_
244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber#include "avclib_common.h"
264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber#include "avcdec_int.h"
274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*----------- avcdec_api.c -------------*/
294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function takes out the emulation prevention bytes from the input to creat RBSP.
314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThe result is written over the input bitstream.
324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "nal_unit"   "(I/O) Pointer to the input buffer."
334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "size"       "(I/O) Pointer to the size of the input/output buffer."
344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status EBSPtoRBSP(uint8 *nal_unit, int *size);
374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*------------- pred_intra.c ---------------*/
394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function is the main entry point to intra prediction operation on a
414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubermacroblock.
424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCCommonObj."
434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCStatus  IntraMBPrediction(AVCCommonObj *video);
454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid SaveNeighborForIntraPred(AVCCommonObj *video, int offset);
474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCStatus Intra_4x4(AVCCommonObj *video, int component, int SubBlock_indx, uint8 *comp);
494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Vertical(AVCCommonObj *video, int block_offset);
504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Horizontal(AVCCommonObj *video, int pitch, int block_offset);
514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_DC(AVCCommonObj *video, int pitch, int block_offset, AVCNeighborAvailability *availability);
524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Down_Left(AVCCommonObj *video, int block_offset, AVCNeighborAvailability *availability);
534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Diagonal_Down_Right(AVCCommonObj *video, int pitch, int block_offset);
544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Diagonal_Vertical_Right(AVCCommonObj *video, int pitch, int block_offset);
554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Diagonal_Horizontal_Down(AVCCommonObj *video, int pitch, int block_offset);
564a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Vertical_Left(AVCCommonObj *video,  int block_offset, AVCNeighborAvailability *availability);
574a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_4x4_Horizontal_Up(AVCCommonObj *video, int pitch, int block_offset);
584a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid  Intra_16x16_Vertical(AVCCommonObj *video);
594a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_16x16_Horizontal(AVCCommonObj *video, int pitch);
604a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_16x16_DC(AVCCommonObj *video, int pitch);
614a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_16x16_Plane(AVCCommonObj *video, int pitch);
624a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid Intra_Chroma_DC(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
634a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid  Intra_Chroma_Horizontal(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
644a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid  Intra_Chroma_Vertical(AVCCommonObj *video, uint8 *predCb, uint8 *predCr);
654a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid  Intra_Chroma_Plane(AVCCommonObj *video, int pitch, uint8 *predCb, uint8 *predCr);
664a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
674a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*------------ pred_inter.c ---------------*/
684a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
694a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function is the main entrance to inter prediction operation for
704a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubera macroblock. For decoding, this function also calls inverse transform and
714a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubercompensation.
724a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCCommonObj."
734a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
744a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
754a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterMBPrediction(AVCCommonObj *video);
764a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
774a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
784a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function is called for luma motion compensation.
794a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "ref"    "Pointer to the origin of a reference luma."
804a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "picwidth"   "Width of the picture."
814a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "picheight"  "Height of the picture."
824a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "x_pos"  "X-coordinate of the predicted block in quarter pel resolution."
834a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "y_pos"  "Y-coordinate of the predicted block in quarter pel resolution."
844a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "pred"   "Pointer to the output predicted block."
854a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "pred_pitch" "Width of pred."
864a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "blkwidth"   "Width of the current partition."
874a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "blkheight"  "Height of the current partition."
884a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
894a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
904a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid LumaMotionComp(uint8 *ref, int picwidth, int picheight,
914a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    int x_pos, int y_pos,
924a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    uint8 *pred, int pred_pitch,
934a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    int blkwidth, int blkheight);
944a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
954a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
964a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberFunctions below are special cases for luma motion compensation.
974a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberLumaFullPelMC is for full pixel motion compensation.
984a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberLumaBorderMC is for interpolation in only one dimension.
994a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberLumaCrossMC is for interpolation in one dimension and half point in the other dimension.
1004a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberLumaDiagonalMC is for interpolation in diagonal direction.
1014a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1024a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "ref"    "Pointer to the origin of a reference luma."
1034a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "picwidth"   "Width of the picture."
1044a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "picheight"  "Height of the picture."
1054a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "x_pos"  "X-coordinate of the predicted block in full pel resolution."
1064a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "y_pos"  "Y-coordinate of the predicted block in full pel resolution."
1074a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "dx"     "Fraction of x_pos in quarter pel."
1084a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "dy"     "Fraction of y_pos in quarter pel."
1094a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "curr"   "Pointer to the current partition in the current picture."
1104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "residue"    "Pointer to the current partition for the residue block."
1114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "blkwidth"   "Width of the current partition."
1124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "blkheight"  "Height of the current partition."
1134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
1144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
1154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid CreatePad(uint8 *ref, int picwidth, int picheight, int x_pos, int y_pos,
1164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber               uint8 *out, int blkwidth, int blkheight);
1174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid FullPelMC(uint8 *in, int inwidth, uint8 *out, int outpitch,
1194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber               int blkwidth, int blkheight);
1204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid HorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
1224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight, int dx);
1234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid HorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch,
1254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight, int dx);
1264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid HorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch,
1284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight);
1294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid VertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
1314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight, int dy);
1324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid VertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch,
1344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight);
1354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid VertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch,
1374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                   int blkwidth, int blkheight, int dy);
1384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid DiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch,
1404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                      uint8 *out, int outpitch,
1414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                      int blkwidth, int blkheight);
1424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaMotionComp(uint8 *ref, int picwidth, int picheight,
1454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                      int x_pos, int y_pos, uint8 *pred, int pred_pitch,
1464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                      int blkwidth, int blkheight);
1474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaFullPelMC(uint8 *in, int inpitch, uint8 *out, int outpitch,
1494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                     int blkwidth, int blkheight) ;
1504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaBorderMC(uint8 *ref, int picwidth, int dx, int dy,
1514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    uint8 *pred, int pred_pitch, int blkwidth, int blkheight);
1524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaDiagonalMC(uint8 *ref, int picwidth, int dx, int dy,
1534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                      uint8 *pred, int pred_pitch, int blkwidth, int blkheight);
1544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaFullPelMCOutside(uint8 *ref, uint8 *pred, int pred_pitch,
1564a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                            int blkwidth, int blkheight, int x_inc,
1574a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                            int y_inc0, int y_inc1, int x_mid, int y_mid);
1584a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaBorderMCOutside(uint8 *ref, int picwidth, int dx, int dy,
1594a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                           uint8 *pred, int pred_pitch, int blkwidth, int blkheight,
1604a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                           int x_inc, int z_inc, int y_inc0, int y_inc1, int x_mid, int y_mid);
1614a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaDiagonalMCOutside(uint8 *ref, int picwidth,
1624a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                             int dx, int dy, uint8 *pred, int pred_pitch,
1634a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                             int blkwidth, int blkheight, int x_inc, int z_inc,
1644a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                             int y_inc0, int y_inc1, int x_mid, int y_mid);
1654a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1664a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaDiagonalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1674a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                           uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1684a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1694a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaHorizontalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1704a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                             uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1714a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1724a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaVerticalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1734a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                           uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1744a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1754a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1764a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                       uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1774a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1784a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaVerticalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1794a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                            uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1804a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1814a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaHorizontalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1824a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                              uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1834a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1844a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid ChromaDiagonalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
1854a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                            uint8 *pOut, int predPitch, int blkwidth, int blkheight);
1864a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1874a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
1884a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*----------- slice.c ---------------*/
1894a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
1904a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs the main decoding loop for slice data including
1914a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberINTRA/INTER prediction, transform and quantization and compensation.
1924a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberSee decode_frame_slice() in JM.
1934a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCDecObject."
1944a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success, AVCDEC_PICTURE_READY for end-of-picture and AVCDEC_FAIL otherwise."
1954a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
1964a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeSlice(AVCDecObject *video);
1974a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ConcealSlice(AVCDecObject *decvid, int mbnum_start, int mbnum_end);
1984a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
1994a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs the decoding of one macroblock.
2004a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCDecObject."
2014a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "prevMbSkipped"  "A value derived in 7.3.4."
2024a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
2034a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2044a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeMB(AVCDecObject *video);
2054a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2064a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2074a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs macroblock prediction type decoding as in subclause 7.3.5.1.
2084a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
2094a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "currMB" "Pointer to the current macroblock."
2104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
2114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
2124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
2144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs sub-macroblock prediction type decoding as in subclause 7.3.5.2.
2174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
2184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "currMB" "Pointer to the current macroblock."
2194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
2204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success or AVCDEC_FAIL otherwise."
2214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status sub_mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
2234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the mb_type and sets necessary information
2264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_I_SLICE.
2274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mb_type" "From the syntax bitstream."
2304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretMBModeI(AVCMacroblock *mblock, uint mb_type);
2334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the mb_type and sets necessary information
2364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_P_SLICE.
2374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mb_type" "From the syntax bitstream."
2404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretMBModeP(AVCMacroblock *mblock, uint mb_type);
2434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the mb_type and sets necessary information
2464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_B_SLICE.
2474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mb_type" "From the syntax bitstream."
2504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretMBModeB(AVCMacroblock *mblock, uint mb_type);
2534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the mb_type and sets necessary information
2564a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_SI_SLICE.
2574a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2584a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2594a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mb_type" "From the syntax bitstream."
2604a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2614a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2624a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretMBModeSI(AVCMacroblock *mblock, uint mb_type);
2634a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2644a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2654a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the sub_mb_type and sets necessary information
2664a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_P_SLICE.
2674a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2684a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2694a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "sub_mb_type" "From the syntax bitstream."
2704a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2714a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2724a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretSubMBModeP(AVCMacroblock *mblock, uint *sub_mb_type);
2734a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2744a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2754a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function interprets the sub_mb_type and sets necessary information
2764a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberwhen the slice type is AVC_B_SLICE.
2774a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberin the macroblock structure.
2784a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "mblock" "Pointer to current AVCMacroblock."
2794a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "sub_mb_type" "From the syntax bitstream."
2804a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
2814a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2824a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Hubervoid InterpretSubMBModeB(AVCMacroblock *mblock, uint *sub_mb_type);
2834a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2844a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2854a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the Intra4x4 prediction mode from neighboring information
2864a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberand from the decoded syntax.
2874a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCCommonObj."
2884a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "currMB" "Pointer to current macroblock."
2894a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
2904a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
2914a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
2924a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeIntra4x4Mode(AVCCommonObj *video, AVCMacroblock *currMB, AVCDecBitstream *stream);
2934a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
2944a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*----------- vlc.c -------------------*/
2954a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
2964a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function reads and decodes Exp-Golomb codes.
2974a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
2984a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "codeNum" "Pointer to the value of the codeNum."
2994a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3004a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3014a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ue_v(AVCDecBitstream *bitstream, uint *codeNum);
3024a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3034a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3044a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function reads and decodes signed Exp-Golomb codes.
3054a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
3064a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "value"  "Pointer to syntax element value."
3074a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3084a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3094a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status  se_v(AVCDecBitstream *bitstream, int *value);
3104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function reads and decodes signed Exp-Golomb codes for
3134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber32 bit codeword.
3144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
3154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "value"  "Pointer to syntax element value."
3164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status  se_v32bit(AVCDecBitstream *bitstream, int32 *value);
3194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function reads and decodes truncated Exp-Golomb codes.
3224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
3234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "value"  "Pointer to syntax element value."
3244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "range"  "Range of the value as input to determine the algorithm."
3254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status te_v(AVCDecBitstream *bitstream, uint *value, uint range);
3284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function parse Exp-Golomb code from the bitstream.
3314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
3324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "leadingZeros" "Pointer to the number of leading zeros."
3334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "infobits"   "Pointer to the value after leading zeros and the first one.
3344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    The total number of bits read is 2*leadingZeros + 1."
3354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status GetEGBitstring(AVCDecBitstream *bitstream, int *leadingZeros, int *infobits);
3384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function parse Exp-Golomb code from the bitstream for 32 bit codewords.
3414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bitstream" "Pointer to AVCDecBitstream."
3424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "leadingZeros" "Pointer to the number of leading zeros."
3434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "infobits"   "Pointer to the value after leading zeros and the first one.
3444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                    The total number of bits read is 2*leadingZeros + 1."
3454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
3464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status GetEGBitstring32bit(AVCDecBitstream *bitstream, int *leadingZeros, uint32 *infobits);
3484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs CAVLC decoding of the CBP (coded block pattern) of a macroblock
3514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberby calling ue_v() and then mapping the codeNum to the corresponding CBP value.
3524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "currMB"  "Pointer to the current AVCMacroblock structure."
3534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream"  "Pointer to the AVCDecBitstream."
3544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "void"
3554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3564a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeCBP(AVCMacroblock *currMB, AVCDecBitstream *stream);
3574a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3584a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3594a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the syntax for trailing ones and total coefficient.
3604a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberSubject to optimization.
3614a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
3624a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TrailingOnes"   "Pointer to the trailing one variable output."
3634a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TotalCoeff" "Pointer to the total coefficient variable output."
3644a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "nC" "Context for number of nonzero coefficient (prediction context)."
3654a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
3664a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3674a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_TotalCoeffTrailingOnes(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff, int nC);
3684a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3694a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3704a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the syntax for trailing ones and total coefficient for
3714a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberchroma DC block. Subject to optimization.
3724a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
3734a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TrailingOnes"   "Pointer to the trailing one variable output."
3744a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TotalCoeff" "Pointer to the total coefficient variable output."
3754a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
3764a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3774a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_TotalCoeffTrailingOnesChromaDC(AVCDecBitstream *stream, int *TrailingOnes, int *TotalCoeff);
3784a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3794a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3804a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decode a VLC table with 2 output.
3814a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
3824a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "lentab" "Table for code length."
3834a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "codtab" "Table for code value."
3844a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "tabwidth" "Width of the table or alphabet size of the first output."
3854a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "tabheight"  "Height of the table or alphabet size of the second output."
3864a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code1"  "Pointer to the first output."
3874a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code2"  "Pointer to the second output."
3884a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
3894a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3904a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status code_from_bitstream_2d(AVCDecBitstream *stream, int *lentab, int *codtab, int tabwidth,
3914a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                                     int tabheight, int *code1, int *code2);
3924a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
3934a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
3944a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the level_prefix VLC value as in Table 9-6.
3954a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
3964a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code"   "Pointer to the output."
3974a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
3984a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
3994a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_LevelPrefix(AVCDecBitstream *stream, uint *code);
4004a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4014a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4024a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes total_zeros VLC syntax as in Table 9-7 and 9-8.
4034a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
4044a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code"   "Pointer to the output."
4054a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TotalCoeff" "Context parameter."
4064a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
4074a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4084a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_TotalZeros(AVCDecBitstream *stream, int *code, int TotalCoeff);
4094a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes total_zeros VLC syntax for chroma DC as in Table 9-9.
4124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
4134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code"   "Pointer to the output."
4144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "TotalCoeff" "Context parameter."
4154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
4164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_TotalZerosChromaDC(AVCDecBitstream *stream, int *code, int TotalCoeff);
4184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes run_before VLC syntax as in Table 9-10.
4214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to the AVCDecBitstream."
4224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "code"   "Pointer to the output."
4234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "zeroLeft"   "Context parameter."
4244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
4254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ce_RunBefore(AVCDecBitstream *stream, int *code, int zeroLeft);
4274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*----------- header.c -------------------*/
4294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function parses vui_parameters.
4314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "decvid" "Pointer to AVCDecObject."
4324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
4344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status vui_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCSeqParamSet *currSPS);
4364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status sei_payload(AVCDecObject *decvid, AVCDecBitstream *stream, uint payloadType, uint payloadSize);
4374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status buffering_period(AVCDecObject *decvid, AVCDecBitstream *stream);
4394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status pic_timing(AVCDecObject *decvid, AVCDecBitstream *stream);
4404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status recovery_point(AVCDecObject *decvid, AVCDecBitstream *stream);
4414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status dec_ref_pic_marking_repetition(AVCDecObject *decvid, AVCDecBitstream *stream);
4424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status motion_constrained_slice_group_set(AVCDecObject *decvid, AVCDecBitstream *stream);
4434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function parses hrd_parameters.
4474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "decvid" "Pointer to AVCDecObject."
4484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
4504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status hrd_parameters(AVCDecObject *decvid, AVCDecBitstream *stream, AVCHRDParams *HRDParam);
4524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the syntax in sequence parameter set slice and fill up the AVCSeqParamSet
4554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberstructure.
4564a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "decvid" "Pointer to AVCDecObject."
4574a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
4584a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4594a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
4604a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4614a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeSPS(AVCDecObject *decvid, AVCDecBitstream *stream);
4624a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4634a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4644a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the syntax in picture parameter set and fill up the AVCPicParamSet
4654a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberstructure.
4664a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "decvid" "Pointer to AVCDecObject."
4674a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
4684a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4694a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS or AVCDEC_FAIL."
4704a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4714a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodePPS(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream);
4724a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeSEI(AVCDecObject *decvid, AVCDecBitstream *stream);
4734a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4744a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4754a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes slice header, calls related functions such as
4764a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberreference picture list reordering, prediction weight table, decode ref marking.
4774a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberSee FirstPartOfSliceHeader() and RestOfSliceHeader() in JM.
4784a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "decvid" "Pointer to AVCDecObject."
4794a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
4804a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4814a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
4824a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4834a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeSliceHeader(AVCDecObject *decvid, AVCCommonObj *video, AVCDecBitstream *stream);
4844a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4854a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4864a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performes necessary operations to create dummy frames when
4874a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberthere is a gap in frame_num.
4884a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCCommonObj."
4894a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
4904a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
4914a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status fill_frame_num_gap(AVCHandle *avcHandle, AVCCommonObj *video);
4924a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
4934a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
4944a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes ref_pic_list_reordering related syntax and fill up the AVCSliceHeader
4954a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberstructure.
4964a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
4974a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
4984a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "sliceHdr" "Pointer to AVCSliceHdr."
4994a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "slice_type" "Value of slice_type - 5 if greater than 5."
5004a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
5014a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5024a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status ref_pic_list_reordering(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr, int slice_type);
5034a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5044a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
5054a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes dec_ref_pic_marking related syntax  and fill up the AVCSliceHeader
5064a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberstructure.
5074a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
5084a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
5094a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "sliceHdr" "Pointer to AVCSliceHdr."
5104a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
5114a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5124a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status dec_ref_pic_marking(AVCCommonObj *video, AVCDecBitstream *stream, AVCSliceHeader *sliceHdr);
5134a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5144a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
5154a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs POC related operation prior to decoding a picture
5164a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video" "Pointer to AVCCommonObj."
5174a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success and AVCDEC_FAIL otherwise."
5184a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberSee also PostPOC() for initialization of some variables.
5194a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5204a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodePOC(AVCCommonObj *video);
5214a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5224a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5234a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5244a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/*------------ residual.c ------------------*/
5254a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
5264a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function decodes the intra pcm data and fill it in the corresponding location
5274a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberon the current picture.
5284a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCCommonObj."
5294a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "stream" "Pointer to AVCDecBitstream."
5304a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5314a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status DecodeIntraPCM(AVCCommonObj *video, AVCDecBitstream *stream);
5324a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5334a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
5344a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs residual syntax decoding as well as quantization and transformation of
5354a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huberthe decoded coefficients. See subclause 7.3.5.3.
5364a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCDecObject."
5374a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "currMB" "Pointer to current macroblock."
5384a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5394a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status residual(AVCDecObject *video, AVCMacroblock *currMB);
5404a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5414a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber/**
5424a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberThis function performs CAVLC syntax decoding to get the run and level information of the coefficients.
5434a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "video"  "Pointer to AVCDecObject."
5444a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "type"   "One of AVCResidualType for a particular 4x4 block."
5454a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "bx"     "Horizontal block index."
5464a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "by"     "Vertical block index."
5474a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "level"  "Pointer to array of level for output."
5484a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "run"    "Pointer to array of run for output."
5494a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\param "numcoeff"   "Pointer to the total number of nonzero coefficients."
5504a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber\return "AVCDEC_SUCCESS for success."
5514a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber*/
5524a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas HuberAVCDec_Status residual_block_cavlc(AVCDecObject *video, int nC, int maxNumCoeff,
5534a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber                                   int *level, int *run, int *numcoeff);
5544a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber
5554a0ec3fda9c0e8e74b36e4e201b65ced80263b1fAndreas Huber#endif /* _AVCDEC_LIB_H_ */
556