FFmpeg
Macros | Functions
bgmc.c File Reference

Block Gilbert-Moore decoder as used by MPEG-4 ALS. More...

#include "libavutil/attributes.h"
#include "bgmc.h"

Macros

#define FREQ_BITS   14
 
#define VALUE_BITS   18
 
#define TOP_VALUE   ((1 << VALUE_BITS) - 1)
 
#define FIRST_QTR   (TOP_VALUE / 4 + 1)
 
#define HALF   (2 * FIRST_QTR)
 
#define THIRD_QTR   (3 * FIRST_QTR)
 
#define LUT_BITS   (FREQ_BITS - 8)
 
#define LUT_SIZE   (1 << LUT_BITS)
 
#define LUT_BUFF   4
 

Functions

av_cold int ff_bgmc_init (AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status)
 Initialize the lookup table arrays.
 
av_cold void ff_bgmc_end (uint8_t **cf_lut, int **cf_lut_status)
 Release the lookup table arrays.
 
void ff_bgmc_decode_init (GetBitContext *gb, unsigned int *h, unsigned int *l, unsigned int *v)
 Initialize decoding and reads the first value.
 
void ff_bgmc_decode_end (GetBitContext *gb)
 Finish decoding.
 
void ff_bgmc_decode (GetBitContext *gb, unsigned int num, int32_t *dst, int delta, unsigned int sx, unsigned int *h, unsigned int *l, unsigned int *v, uint8_t *cf_lut, int *cf_lut_status)
 Read and decode a block Gilbert-Moore coded symbol.
 

Detailed Description

Block Gilbert-Moore decoder as used by MPEG-4 ALS.

Author
Thilo Borgmann <thilo.borgmann at mail.de>