H.264 / AVC / MPEG-4 part10 cabac decoding.
More...
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/timer.h"
#include "config.h"
#include "cabac.h"
#include "cabac_functions.h"
#include "internal.h"
#include "avcodec.h"
#include "h264dec.h"
#include "h264data.h"
#include "h264_mvpred.h"
#include "mpegutils.h"
|
|
#define | CABAC(h) 1 |
| |
|
#define | UNCHECKED_BITSTREAM_READER 1 |
| |
|
#define | INT_BIT (CHAR_BIT * sizeof(int)) |
| |
| #define | DECODE_CABAC_MB_MVD(sl, list, n) |
| |
|
#define | CABAC_ON_STACK |
| |
|
#define | CC &cc |
| |
| #define | DECODE_SIGNIFICANCE(coefs, sig_off, last_off) |
| |
|
#define | STORE_BLOCK(type) |
| |
H.264 / AVC / MPEG-4 part10 cabac decoding.
- Author
- Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at
§ DECODE_CABAC_MB_MVD
| #define DECODE_CABAC_MB_MVD |
( |
|
sl, |
|
|
|
list, |
|
|
|
n |
|
) |
| |
Value:{\
int amvd0 = sl->mvd_cache[list][scan8[n] - 1][0] +\
sl->mvd_cache[list][scan8[n] - 8][0];\
int amvd1 = sl->mvd_cache[list][scan8[n] - 1][1] +\
sl->mvd_cache[list][scan8[n] - 8][1];\
\
int mxd = decode_cabac_mb_mvd(sl, 40, amvd0, &mpx);\
int myd = decode_cabac_mb_mvd(sl, 47, amvd1, &mpy);\
if (mxd == INT_MIN || myd == INT_MIN) \
mx += mxd;\
my += myd;\
}
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
§ DECODE_SIGNIFICANCE
| #define DECODE_SIGNIFICANCE |
( |
|
coefs, |
|
|
|
sig_off, |
|
|
|
last_off |
|
) |
| |
Value:for(last= 0; last < coefs; last++) { \
uint8_t *sig_ctx = significant_coeff_ctx_base + sig_off; \
if( get_cabac( CC, sig_ctx )) { \
uint8_t *last_ctx = last_coeff_ctx_base + last_off; \
index[coeff_count++] = last; \
if( get_cabac( CC, last_ctx ) ) { \
last= max_coeff; \
break; \
} \
} \
}\
if( last == max_coeff -1 ) {\
index[coeff_count++] = last;\
}
§ ff_h264_decode_mb_cabac()
Decode a macroblock.
Decode a CABAC coded macroblock.
- Returns
- 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR if an error is noticed