/third_party/ffmpeg/libavfilter/ |
H A D | vf_elbg.c | 45 int *codebook; member 57 { "codebook_length", "set codebook length", OFFSET(codebook_length), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, INT_MAX, FLAGS }, 58 { "l", "set codebook length", OFFSET(codebook_length), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, INT_MAX, FLAGS }, 75 av_log(ctx, AV_LOG_ERROR, "pal8 output allows max 256 codebook length.\n"); in init() 130 elbg->codebook = av_realloc_f(elbg->codebook, elbg->codebook_length, in config_input() 131 NB_COMPONENTS * sizeof(*elbg->codebook)); in config_input() 132 if (!elbg->codebook) in config_input() 171 /* compute the codebook */ in filter_frame() 173 elbg->codeword_length, elbg->codebook, in filter_frame() [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | vorbisdec.c | 345 av_log(vc->avctx, AV_LOG_ERROR, " More codelengths than codes in codebook. \n"); in vorbis_parse_setup_hdr_codebooks() 356 // If the codebook is used for (inverse) VQ, calculate codevectors. in vorbis_parse_setup_hdr_codebooks() 656 /* codebook dim is for padding if codebook dim doesn't * in vorbis_parse_setup_hdr_floors() 1118 vorbis_codebook codebook; in vorbis_floor0_decode() local 1126 codebook = vc->codebooks[vf->book_list[book_idx]]; in vorbis_floor0_decode() 1127 /* Invalid codebook! */ in vorbis_floor0_decode() 1128 if (!codebook.codevectors) in vorbis_floor0_decode() 1134 ff_dlog(NULL, "floor0 dec: book dimension: %d\n", codebook.dimensions); in vorbis_floor0_decode() 1135 ff_dlog(NULL, "floor0 dec: maximum depth: %d\n", codebook in vorbis_floor0_decode() 1351 vorbis_codebook *codebook = vc->codebooks + vr->classbook; setup_classifs() local 1455 vorbis_codebook codebook = vc->codebooks[vqbook]; vorbis_residue_decode_internal() local [all...] |
H A D | elbg.c | 37 * codebook entry. Not to be confused with a RoQ Video cell. */ 50 int *codebook; member 112 diff = distance_limited(elbg->codebook + i*elbg->dim, elbg->codebook + index*elbg->dim, elbg->dim, diff_min); in get_closest_codebook() 373 elbg->codebook + best_idx * elbg->dim, in do_elbg() 377 elbg->codebook + k * elbg->dim, in do_elbg() 397 memset(elbg->codebook, 0, elbg->num_cb * elbg->dim * sizeof(*elbg->codebook)); in do_elbg() 402 elbg->codebook[elbg->nearest_cb[i]*elbg->dim + j] += in do_elbg() 407 vect_division(elbg->codebook in do_elbg() 446 avpriv_elbg_do(ELBGContext **elbgp, int *points, int dim, int numpoints, int *codebook, int num_cb, int max_steps, int *closest_cb, AVLFG *rand_state, uintptr_t flags) avpriv_elbg_do() argument [all...] |
H A D | msvideo1enc.c | 45 int codebook[8*3]; member 143 ret = avpriv_elbg_do(&c->elbg, c->block, 3, 16, c->codebook, in encode_frame() 150 FFSWAP(uint8_t, c->codebook[i], c->codebook[i+3]); in encode_frame() 157 int t = c->codebook[c->output[i+j*4]*3 + k] - c->block[i*3+k+j*4*3]; in encode_frame() 221 prevptr[x*3 + i*3 + k - j*3*avctx->width] = c->codebook[c->output[i + j*4]*3 + k]; in encode_frame() 225 bytestream_put_le16(&dst, MKRGB555(c->codebook, 0)); in encode_frame() 226 bytestream_put_le16(&dst, MKRGB555(c->codebook, 3)); in encode_frame()
|
H A D | vqavideo.c | 50 * (usually, n = 8) relies on a different vector codebook. Rather than 51 * transporting an entire codebook every 8th frame, the new codebook is 54 * codebook. A full codebook is also sent on the very first frame of a 58 * V1,2 VQA uses 12-bit codebook indexes. If the 12-bit indexes were 66 * VQA3 introduces a 15-bit high color codebook, delta coding, replaces 69 * codebook is always updated as a whole without splitting it into pieces. 87 * (0xFF00 codebook vectors + 0x100 solid pixel vectors) * (4x4 pixels/block) */ 116 unsigned char *codebook; /* th member [all...] |
H A D | mlpenc.c | 334 if (prev_cp->codebook != cp->codebook || in compare_decoding_params() 421 cp->codebook = 0; in clear_channel_params() 935 if (cp->codebook > 0 && cp->huff_lsbs > 24) { in write_decoding_params() 939 put_bits(pb, 2, cp->codebook ); in write_decoding_params() 964 codebook_index [ch] = cp->codebook - 1; in write_block_data() 967 sign_shift = lsb_bits[ch] + (cp->codebook ? 2 - cp->codebook : -1); in write_block_data() 969 if (cp->codebook > 0) in write_block_data() 1462 /** Min and max values that can be encoded with each codebook 1543 codebook_bits_offset(MLPEncodeContext *ctx, unsigned int channel, int codebook, int32_t sample_min, int32_t sample_max, int16_t offset, BestOffset *bo) codebook_bits_offset() argument 1606 codebook_bits(MLPEncodeContext *ctx, unsigned int channel, int codebook, int offset, int32_t min, int32_t max, BestOffset *bo, int direction) codebook_bits() argument [all...] |
H A D | proresenc_kostya.c | 376 static inline void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val) in encode_vlc_codeword() argument 382 switch_bits = (codebook & 3) + 1; in encode_vlc_codeword() 383 rice_order = codebook >> 5; /* rice code order */ in encode_vlc_codeword() 384 exp_order = (codebook >> 2) & 7; /* exp golomb code order */ in encode_vlc_codeword() 412 int codebook = 3, code, dc, prev_dc, delta, sign, new_sign; in encode_dcs() local 417 codebook = 3; in encode_dcs() 426 encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code); in encode_dcs() 427 codebook = (code + (code & 1)) >> 1; in encode_dcs() 428 codebook = FFMIN(codebook, in encode_dcs() 627 estimate_vlc(unsigned codebook, int val) estimate_vlc() argument 653 int codebook = 3, code, dc, prev_dc, delta, sign, new_sign; estimate_dcs() local [all...] |
H A D | mlpdec.c | 240 int sign_shift = lsb_bits + (cp->codebook ? 2 - cp->codebook : -1); in calculate_sign_huff() 243 if (cp->codebook > 0) in calculate_sign_huff() 267 int codebook = cp->codebook; in read_huff_channels() local 272 if (codebook > 0) in read_huff_channels() 273 result = get_vlc2(gbp, huff_vlc[codebook-1].table, in read_huff_channels() 642 cp->codebook = 0; in read_restart_header() 859 cp->codebook = get_bits(gbp, 2); in read_channel_params() 862 if (cp->codebook > in read_channel_params() [all...] |
H A D | elbg.h | 40 * @param codebook Pointer to the output codebook. Must be allocated. 41 * @param num_cb Number of points in the codebook. 43 * @param closest_cb Return the closest codebook to each point. Must be allocated. 49 int numpoints, int *codebook, int num_cb, int num_steps,
|
H A D | svq1dec.c | 130 /* add codebook entries to vector */ \ 132 n3 = codebook[entries[j]] ^ 0x80808080; \ 153 codebook = (const uint32_t *)cbook[level]; \ 156 /* calculate codebook entries for this vector */ \ 170 const uint32_t *codebook; in svq1_decode_block_intra() local 216 for (x = 0; x < width / 4; x++, codebook++) { in svq1_decode_block_intra() 237 const uint32_t *codebook; in svq1_decode_block_non_intra() local 276 for (x = 0; x < width / 4; x++, codebook++) { in svq1_decode_block_non_intra()
|
H A D | sanm.c | 290 uint16_t codebook[256]; member 1077 dst[0] = ctx->codebook[indices & 0xFF]; in opcode_0xf7() 1079 dst[1] = ctx->codebook[indices & 0xFF]; in opcode_0xf7() 1081 dst[pitch] = ctx->codebook[indices & 0xFF]; in opcode_0xf7() 1083 dst[pitch + 1] = ctx->codebook[indices & 0xFF]; in opcode_0xf7() 1092 bgcolor = ctx->codebook[bytestream2_get_byteu(&ctx->gb)]; in opcode_0xf7() 1093 fgcolor = ctx->codebook[bytestream2_get_byteu(&ctx->gb)]; in opcode_0xf7() 1202 ctx->codebook[bytestream2_get_byteu(&ctx->gb)], blk_size, ctx->pitch); in codec2subblock() 1286 *frm++ = ctx->codebook[bytestream2_get_byteu(&ctx->gb)]; in decode_6() 1308 *pdest++ = ctx->codebook[*rsr in decode_8() [all...] |
H A D | svq1enc.c | 104 const int8_t *codebook_sum, *codebook; in encode_block() local 114 codebook = ff_svq1_intra_codebooks[level]; in encode_block() 128 codebook = ff_svq1_inter_codebooks[level]; in encode_block() 156 vector = codebook + stage * size * 16 + i * size; in encode_block() 171 vector = codebook + stage * size * 16 + best_vector[stage] * size; in encode_block()
|
H A D | cfhd.c | 100 s->codebook = 0; in init_frame_defaults() 110 static inline int dequant_and_decompand(CFHDContext *s, int level, int quantisation, int codebook) in dequant_and_decompand() argument 112 if (codebook == 0 || codebook == 1) { in dequant_and_decompand() 113 return s->lut[codebook][abs(level)] * FFSIGN(level) * quantisation; in dequant_and_decompand() 586 s->codebook = data & 0xf; in cfhd_decode() 588 av_log(avctx, AV_LOG_DEBUG, "Other codebook? %i\n", s->codebook); in cfhd_decode() 803 av_log(avctx, AV_LOG_DEBUG, "Start subband coeffs plane %i level %i codebook %i expected %i\n", s->channel_num, s->level, s->codebook, expecte in cfhd_decode() [all...] |
H A D | mlp.h | 94 uint8_t codebook; ///< Which VLC codebook to use to read residuals. member
|
H A D | proresdec2.c | 431 #define DECODE_CODEWORD(val, codebook, SKIP) \ 440 switch_bits = codebook & 3; \ 441 rice_order = codebook >> 5; \ 442 exp_order = (codebook >> 2) & 7; \ 496 // adaptive codebook switching lut according to previous run/level values
|
H A D | cfhd.h | 177 int codebook; member
|
H A D | cfhdenc.c | 42 static const unsigned codebook[256][2] = { variable 325 s->cb[i].bits = (codebook[mag][1] << 1) | (value > 0 ? 0 : 1); in cfhd_encode_init() 326 s->cb[i].size = codebook[mag][0] + 1; in cfhd_encode_init() 328 s->cb[i].bits = codebook[mag][1]; in cfhd_encode_init() 329 s->cb[i].size = codebook[mag][0]; in cfhd_encode_init()
|
H A D | cinepakenc.c | 32 * using a separate codebook pair for each area and approximating 59 #define CODEBOOK_MAX 256 // size of a codebook 89 int v1_vector; // index into v1 codebook 91 int v4_vector[4]; // indices into v4 codebook 136 { "max_extra_cb_iterations", "Max extra codebook recalculation passes, more is better and slower", 326 // but not to any codebook encoding! in calculate_mode_score() 383 static int encode_codebook(CinepakEncContext *s, int *codebook, int size, in encode_codebook() argument 398 // we do codebook encoding according to the "intra" mode in encode_codebook() 400 // to use incremental codebook updates (which actually would give us in encode_codebook() 414 buf[ret++] = codebook[ in encode_codebook() 705 int *codebook = v1mode ? info->v1_codebook : info->v4_codebook; quantize() local [all...] |
H A D | evrcdec.c | 61 uint16_t lsp[4]; ///< index into LSP codebook 64 uint8_t acb_gain[3]; ///< adaptive codebook gain 65 uint16_t fcb_shape[3][4]; ///< fixed codebook shape 66 uint8_t fcb_gain[3]; ///< fixed codebook gain index 89 float avg_acb_gain; ///< average adaptive codebook gain 90 float avg_fcb_gain; ///< average fixed codebook gain 291 const float *codebook = codebooks[i]; in decode_lspf() local 294 e->lspf[k++] = codebook[e->frame.lsp[i] * row_size + j]; in decode_lspf() 402 * Adaptive codebook excitation. 474 * Reconstruction of ACELP fixed codebook excitatio 478 fcb_excitation(EVRCContext *e, const uint16_t *codebook, float *excitation, float pitch_gain, int pitch_lag, int subframe_size) fcb_excitation() argument [all...] |
H A D | cinepak.c | 78 static void cinepak_decode_codebook (cvid_codebook *codebook, in cinepak_decode_codebook() argument 91 p = codebook[0]; in cinepak_decode_codebook()
|
H A D | opus_silk.c | 312 int8_t lsf_i1, lsf_i2[16]; // stage-1 and stage-2 codebook indices in silk_decode_lpc() 348 const uint8_t * codebook = s->wb ? ff_silk_lsf_codebook_wb [lsf_i1] : in silk_decode_lpc() local 354 cur = codebook[i]; in silk_decode_lpc() 355 prev = i ? codebook[i - 1] : 0; in silk_decode_lpc() 356 next = i + 1 < order ? codebook[i + 1] : 256; in silk_decode_lpc()
|
H A D | proresenc_anatoliy.c | 202 static void encode_codeword(PutBitContext *pb, int val, int codebook) in encode_codeword() argument 207 switch_bits = codebook & 3; in encode_codeword() 208 rice_order = codebook >> 5; in encode_codeword() 209 exp_order = (codebook >> 2) & 7; in encode_codeword()
|
H A D | roqvideoenc.c | 309 * Find the codebook with the lowest distortion from an image 578 /* Make remaps for the final codebook usage */ in remap_codebooks() 604 * Write codebook chunk 824 int *codebook = enc->tmp_codebook_buf; in generate_codebook() local 827 ret = avpriv_elbg_do(&enc->elbg, points, 6 * c_size, inputCount, codebook, in generate_codebook() 832 buf = codebook; in generate_codebook() 871 /* Unpack 2x2 codebook clusters */ in generate_new_codebooks() 1015 /* 4x4 codebook needs 6 * 4 * 4 / 4 * width * height / 16 * sizeof(int); in roq_encode_init()
|