FFmpeg
Macros | Functions | Variables
dcahuff.c File Reference
#include <stddef.h>
#include "libavutil/macros.h"
#include "dcadata.h"
#include "dcahuff.h"

Go to the source code of this file.

Macros

#define SCALES_VLC_BITS   9
 
#define DCA_INIT_VLC(vlc, nb_bits, nb_codes, entry_offset)
 
#define LBR_INIT_VLC(vlc, nb_bits, nb_codes, entry_offset)
 

Functions

av_cold void ff_dca_init_vlcs (void)
 

Variables

static const uint8_t bitalloc_12_vlc_bits [DCA_BITALLOC_12_COUNT]
 
static const uint8_t tnl_grp_sizes [] = { 37, 34, 31, 28, 23 }
 
const uint8_t ff_dca_bitalloc_sizes [DCA_CODE_BOOKS]
 
const int8_t ff_dca_bitalloc_offsets [DCA_CODE_BOOKS]
 
static const uint8_t bitalloc_maxbits [DCA_CODE_BOOKS][7]
 
const uint8_t ff_dca_vlc_src_tables [][2]
 
VLC ff_dca_vlc_bit_allocation [5]
 
VLC ff_dca_vlc_transition_mode [4]
 
VLC ff_dca_vlc_scale_factor [5]
 
VLC ff_dca_vlc_quant_index [DCA_CODE_BOOKS][7]
 
VLC ff_dca_vlc_tnl_grp [5]
 
VLC ff_dca_vlc_tnl_scf
 
VLC ff_dca_vlc_damp
 
VLC ff_dca_vlc_dph
 
VLC ff_dca_vlc_fst_rsd_amp
 
VLC ff_dca_vlc_rsd_apprx
 
VLC ff_dca_vlc_rsd_amp
 
VLC ff_dca_vlc_avg_g3
 
VLC ff_dca_vlc_st_grid
 
VLC ff_dca_vlc_grid_2
 
VLC ff_dca_vlc_grid_3
 
VLC ff_dca_vlc_rsd
 

Macro Definition Documentation

◆ SCALES_VLC_BITS

#define SCALES_VLC_BITS   9

Definition at line 34 of file dcahuff.c.

◆ DCA_INIT_VLC

#define DCA_INIT_VLC (   vlc,
  nb_bits,
  nb_codes,
  entry_offset 
)
Value:
do { \
vlc.table = &dca_table[offset]; \
vlc.table_allocated = FF_ARRAY_ELEMS(dca_table) - offset; \
ff_init_vlc_from_lengths(&vlc, nb_bits, nb_codes, &src_table[0][1], 2, \
&src_table[0][0], 2, 1, entry_offset, \
offset += vlc.table_size; \
src_table += nb_codes; \
} while (0)

◆ LBR_INIT_VLC

#define LBR_INIT_VLC (   vlc,
  nb_bits,
  nb_codes,
  entry_offset 
)
Value:
do { \
vlc.table = &dca_table[offset]; \
vlc.table_allocated = FF_ARRAY_ELEMS(dca_table) - offset; \
ff_init_vlc_from_lengths(&vlc, nb_bits, nb_codes, &src_table[0][1], 2, \
&src_table[0][0], 2, 1, entry_offset, \
NULL); \
offset += vlc.table_size; \
src_table += nb_codes; \
} while (0)

Function Documentation

◆ ff_dca_init_vlcs()

av_cold void ff_dca_init_vlcs ( void  )

Definition at line 789 of file dcahuff.c.

Referenced by dcadec_init_static().

Variable Documentation

◆ bitalloc_12_vlc_bits

const uint8_t bitalloc_12_vlc_bits[DCA_BITALLOC_12_COUNT]
static
Initial value:
= {
9, 7, 7, 9, 9
}

Definition at line 30 of file dcahuff.c.

Referenced by ff_dca_init_vlcs().

◆ tnl_grp_sizes

const uint8_t tnl_grp_sizes[] = { 37, 34, 31, 28, 23 }
static

Definition at line 35 of file dcahuff.c.

Referenced by ff_dca_init_vlcs().

◆ ff_dca_bitalloc_sizes

const uint8_t ff_dca_bitalloc_sizes[DCA_CODE_BOOKS]
Initial value:
= {
3, 5, 7, 9, 13, 17, 25, 33, 65, 129
}

Definition at line 37 of file dcahuff.c.

Referenced by dcaenc_init_static_tables(), and ff_dca_init_vlcs().

◆ ff_dca_bitalloc_offsets

const int8_t ff_dca_bitalloc_offsets[DCA_CODE_BOOKS]
Initial value:
= {
-1, -2, -3, -4, -6, -8, -12, -16, -32, -64
}

Definition at line 41 of file dcahuff.c.

Referenced by dcaenc_init_static_tables(), and ff_dca_init_vlcs().

◆ bitalloc_maxbits

const uint8_t bitalloc_maxbits[DCA_CODE_BOOKS][7]
static
Initial value:
= {
{ 2 },
{ 4, 3, 3 },
{ 5, 5, 4 },
{ 6, 5, 6 },
{ 7, 6, 5 },
{ 9, 8, 7, 9, 8, 8, 8 },
{ 9, 9, 8, 9, 8, 9, 9 },
{ 9, 9, 9, 9, 9, 9, 9 },
{ 9, 9, 9, 9, 9, 9, 9 },
{ 9, 9, 9, 9, 9, 9, 9 }
}

Definition at line 45 of file dcahuff.c.

Referenced by ff_dca_init_vlcs().

◆ ff_dca_vlc_src_tables

const uint8_t ff_dca_vlc_src_tables[][2]

Definition at line 58 of file dcahuff.c.

Referenced by dcaenc_init_static_tables(), and ff_dca_init_vlcs().

◆ ff_dca_vlc_bit_allocation

VLC ff_dca_vlc_bit_allocation[5]

Definition at line 771 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_subframe_header().

◆ ff_dca_vlc_transition_mode

VLC ff_dca_vlc_transition_mode[4]

Definition at line 772 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_subframe_header().

◆ ff_dca_vlc_scale_factor

VLC ff_dca_vlc_scale_factor[5]

Definition at line 773 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), parse_joint_scale(), and parse_scale().

◆ ff_dca_vlc_quant_index

VLC ff_dca_vlc_quant_index[DCA_CODE_BOOKS][7]

Definition at line 774 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), parse_huffman_codes(), and parse_x96_subframe_header().

◆ ff_dca_vlc_tnl_grp

VLC ff_dca_vlc_tnl_grp[5]

Definition at line 776 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_tonal().

◆ ff_dca_vlc_tnl_scf

VLC ff_dca_vlc_tnl_scf

Definition at line 777 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_tonal().

◆ ff_dca_vlc_damp

VLC ff_dca_vlc_damp

Definition at line 778 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_tonal().

◆ ff_dca_vlc_dph

VLC ff_dca_vlc_dph

Definition at line 779 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_tonal().

◆ ff_dca_vlc_fst_rsd_amp

VLC ff_dca_vlc_fst_rsd_amp

Definition at line 780 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_scale_factors().

◆ ff_dca_vlc_rsd_apprx

VLC ff_dca_vlc_rsd_apprx

Definition at line 781 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_scale_factors().

◆ ff_dca_vlc_rsd_amp

VLC ff_dca_vlc_rsd_amp

Definition at line 782 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_scale_factors().

◆ ff_dca_vlc_avg_g3

VLC ff_dca_vlc_avg_g3

Definition at line 783 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), parse_grid_1_chunk(), and parse_grid_1_sec_ch().

◆ ff_dca_vlc_st_grid

VLC ff_dca_vlc_st_grid

Definition at line 784 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_st_code().

◆ ff_dca_vlc_grid_2

VLC ff_dca_vlc_grid_2

Definition at line 785 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_grid_2().

◆ ff_dca_vlc_grid_3

VLC ff_dca_vlc_grid_3

Definition at line 786 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_grid_3().

◆ ff_dca_vlc_rsd

VLC ff_dca_vlc_rsd

Definition at line 787 of file dcahuff.c.

Referenced by ff_dca_init_vlcs(), and parse_ch().

INIT_VLC_LE
#define INIT_VLC_LE
Definition: vlc.h:99
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
NULL
#define NULL
Definition: coverity.c:32
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
INIT_VLC_STATIC_OVERLONG
#define INIT_VLC_STATIC_OVERLONG
Definition: vlc.h:101