Go to the documentation of this file.
35 10, 20, 34, 10, 20, 34,
64 #define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION, NB_BITS, MAX_DEPTH) \
77 static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSCommonContext *ps, \
78 int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
80 int b, num = ps->nr_ ## PAR ## _par; \
81 const VLCElem *vlc_table = vlc_ps[table_idx].table; \
83 int e_prev = e ? e - 1 : ps->num_env_old - 1; \
84 e_prev = FFMAX(e_prev, 0); \
85 for (b = 0; b < num; b++) { \
86 int val = PAR[e_prev][b] + get_vlc2(gb, vlc_table, NB_BITS, MAX_DEPTH) - OFFSET; \
87 if (MASK) val &= MASK; \
94 for (b = 0; b < num; b++) { \
95 val += get_vlc2(gb, vlc_table, NB_BITS, MAX_DEPTH) - OFFSET; \
96 if (MASK) val &= MASK; \
104 av_log(avctx, AV_LOG_ERROR, "illegal "#PAR"\n"); \
105 return AVERROR_INVALIDDATA; \
122 if (ps->enable_ipdopd) {
123 for (e = 0; e < ps->num_env; e++) {
176 for (e = 1; e <= ps->
num_env; e++) {
184 for (e = 1; e <= ps->
num_env; e++)
188 for (e = 0; e < ps->
num_env; e++) {
197 for (e = 0; e < ps->
num_env; e++) {
212 int ps_extension_id =
get_bits(gb, 2);
279 return bits_consumed;
292 #define PS_INIT_VLC_STATIC(num, nb_bits, size) \
293 VLC_INIT_STATIC(&vlc_ps[num], nb_bits, ps_tmp[num].table_size / ps_tmp[num].elem_size, \
294 ps_tmp[num].ps_bits, 1, 1, \
295 ps_tmp[num].ps_codes, ps_tmp[num].elem_size, ps_tmp[num].elem_size, \
298 #define PS_VLC_ROW(name) \
299 { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) }
304 static const struct {
305 const void *ps_codes, *ps_bits;
306 const unsigned int table_size, elem_size;
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static int get_bits_count(const GetBitContext *s)
static int ps_read_extension_data(GetBitContext *gb, PSCommonContext *ps, int ps_extension_id)
static int read_ipdopd_data(AVCodecContext *avctx, GetBitContext *gb, PSCommonContext *ps, int8_t(*ipdopd)[34], int table_idx, int e, int dt)
static int read_iid_data(AVCodecContext *avctx, GetBitContext *gb, PSCommonContext *ps, int8_t(*iid)[34], int table_idx, int e, int dt)
#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION, NB_BITS, MAX_DEPTH)
av_cold void ff_ps_init_common(void)
int border_position[PS_MAX_NUM_ENV+1]
int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]
Overall Phase Difference Parameters.
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define PS_INIT_VLC_STATIC(num, nb_bits, size)
static int ff_thread_once(char *control, void(*routine)(void))
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
static const int8_t huff_offset[]
static unsigned int get_bits1(GetBitContext *s)
static int read_icc_data(AVCodecContext *avctx, GetBitContext *gb, PSCommonContext *ps, int8_t(*icc)[34], int table_idx, int e, int dt)
const uint8_t ff_log2_tab[256]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a source
static const int8_t nr_iidopd_par_tab[]
static av_cold void ps_init_common(void)
static const uint8_t header[24]
static const int huff_iid[]
static void skip_bits1(GetBitContext *s)
int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSCommonContext *ps, int bits_left)
int8_t ipd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]
Inter-channel Phase Difference Parameters.
main external API structure.
int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]
Inter-channel Intensity Difference Parameters.
static const int8_t num_env_tab[2][4]
#define PS_BASELINE
Operate in Baseline PS mode.
int8_t icc_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]
Inter-Channel Coherence Parameters.
static const int8_t nr_iidicc_par_tab[]