Lines Matching refs:code
209 int code;
212 code = get_rl_index(rl, last, run, level);
213 size+= rl->table_vlc[code][1];
214 if (code == rl->n) {
220 code = get_rl_index(rl, last, run, level1);
221 if (code == rl->n) {
229 code = get_rl_index(rl, last, run1, level);
230 if (code == rl->n) {
236 size+= 1+1+ rl->table_vlc[code][1];
240 size+= 1+1+ rl->table_vlc[code][1];
455 int code;
479 code = mv->table_mv_index[(mx << 6) | my];
481 mv->table_mv_bits[code],
482 mv->table_mv_code[code]);
483 if (code == mv->n) {
484 /* escape : code literally */
505 int range, bit_size, sign, code, bits;
509 code = 0;
510 put_bits(&s->pb, ff_mvtab[code][1], ff_mvtab[code][0]);
526 code = (val >> bit_size) + 1;
529 put_bits(&s->pb, ff_mvtab[code][1] + 1, (ff_mvtab[code][0] << 1) | sign);
841 int sign, code;
874 code = level;
875 if (code > DC_MAX)
876 code = DC_MAX;
880 code = ((level+3)>>2);
883 code = ((level+1)>>1);
889 put_bits(&s->pb, ff_table0_dc_lum[code][1], ff_table0_dc_lum[code][0]);
891 put_bits(&s->pb, ff_table0_dc_chroma[code][1], ff_table0_dc_chroma[code][0]);
895 put_bits(&s->pb, ff_table1_dc_lum[code][1], ff_table1_dc_lum[code][0]);
897 put_bits(&s->pb, ff_table1_dc_chroma[code][1], ff_table1_dc_chroma[code][0]);
904 if (code == DC_MAX)
922 int code, run_diff, dc_pred_dir;
975 code = get_rl_index(rl, last, run, level);
976 put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
977 if (code == rl->n) {
983 code = get_rl_index(rl, last, run, level1);
984 if (code == rl->n) {
992 code = get_rl_index(rl, last, run1+1, level);
993 if (s->msmpeg4_version == 4 && code == rl->n)
995 code = get_rl_index(rl, last, run1, level);
996 if (code == rl->n) {
1021 put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
1027 put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
1052 int code, val, sign, shift;
1054 code = get_vlc2(&s->gb, v2_mv_vlc.table, V2_MV_VLC_BITS, 2);
1055 // printf("MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred);
1056 if (code < 0)
1059 if (code == 0)
1063 val = code;
1083 int cbp, code, i;
1102 code = get_vlc2(&s->gb, v2_mb_type_vlc.table, V2_MB_TYPE_VLC_BITS, 1);
1104 code = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
1105 if(code<0 || code>7){
1106 av_log(s->avctx, AV_LOG_ERROR, "cbpc %d invalid at %d %d\n", code, s->mb_x, s->mb_y);
1110 s->mb_intra = code >>2;
1112 cbp = code & 0x3;
1169 int cbp, code, i;
1191 code = get_vlc2(&s->gb, ff_mb_non_intra_vlc[DEFAULT_INTER_INDEX].table, MB_NON_INTRA_VLC_BITS, 3);
1192 if (code < 0)
1194 //s->mb_intra = (code & 0x40) ? 0 : 1;
1195 s->mb_intra = (~code & 0x40) >> 6;
1197 cbp = code & 0x3f;
1200 code = get_vlc2(&s->gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2);
1201 if (code < 0)
1206 int val = ((code >> (5 - i)) & 1);
1368 int code;
1400 code = get_bits(&s->gb, 5);
1402 if(code==0 || code>s->mb_height){
1403 av_log(s->avctx, AV_LOG_ERROR, "invalid slice height %d\n", code);
1407 s->slice_height = code;
1410 if (code < 0x17){
1411 av_log(s->avctx, AV_LOG_ERROR, "error, slice code was %X\n", code);
1415 s->slice_height = s->mb_height / (code - 0x16);
1765 av_log(s->avctx, AV_LOG_ERROR, "illegal vlc code in ESC3 level=%d\n", level);
1778 av_log(s->avctx, AV_LOG_ERROR, "illegal vlc code in ESC2 level=%d\n", level);
1793 av_log(s->avctx, AV_LOG_ERROR, "illegal vlc code in ESC1 level=%d\n", level);
1804 av_log(s->avctx, AV_LOG_ERROR, "illegal vlc code level=%d\n", level);
1847 int code, mx, my;
1851 code = get_vlc2(&s->gb, mv->vlc.table, MV_VLC_BITS, 2);
1852 if (code < 0){
1853 av_log(s->avctx, AV_LOG_ERROR, "illegal MV code at %d %d\n", s->mb_x, s->mb_y);
1856 if (code == mv->n) {
1861 mx = mv->table_mvx[code];
1862 my = mv->table_mvy[code];