1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef AVCODEC_CABAC_H
- #define AVCODEC_CABAC_H
- #include <stdint.h>
- #include "put_bits.h"
- extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
- #define H264_NORM_SHIFT_OFFSET 0
- #define H264_LPS_RANGE_OFFSET 512
- #define H264_MLPS_STATE_OFFSET 1024
- #define H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET 1280
- #define CABAC_BITS 16
- #define CABAC_MASK ((1<<CABAC_BITS)-1)
- typedef struct CABACContext{
- int low;
- int range;
- int outstanding_count;
- const uint8_t *bytestream_start;
- const uint8_t *bytestream;
- const uint8_t *bytestream_end;
- PutBitContext pb;
- }CABACContext;
- void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
- int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);
- #endif
|