comparison h263.c @ 475:6ccc48e4c41b libavcodec

run1 can be <0 bugfix (found by fabrice)
author michaelni
date Tue, 04 Jun 2002 18:35:31 +0000
parents a5dd4eae1f0c
children 1a4d5101a224
comparison
equal deleted inserted replaced
474:11dbd00682fc 475:6ccc48e4c41b
2702 val |= get_bits(&s->gb, shift); 2702 val |= get_bits(&s->gb, shift);
2703 val++; 2703 val++;
2704 if (sign) 2704 if (sign)
2705 val = -val; 2705 val = -val;
2706 val += pred; 2706 val += pred;
2707 2707
2708 /* modulo decoding */ 2708 /* modulo decoding */
2709 if (!s->h263_long_vectors) { 2709 if (!s->h263_long_vectors) {
2710 l = (1 << (f_code - 1)) * 32; 2710 l = (1 << (f_code - 1)) * 32;
2711 m = 2 * l; 2711 m = 2 * l;
2712 if (val < -l) { 2712 if (val < -l) {
2964 } 2964 }
2965 if(abs_level <= rl->max_level[last][run]*2){ 2965 if(abs_level <= rl->max_level[last][run]*2){
2966 fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n"); 2966 fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n");
2967 return DECODING_AC_LOST; 2967 return DECODING_AC_LOST;
2968 } 2968 }
2969 if(abs_level <= rl->max_level[last][run1]){ 2969 if(run1 >= 0 && abs_level <= rl->max_level[last][run1]){
2970 fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n"); 2970 fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n");
2971 return DECODING_AC_LOST; 2971 return DECODING_AC_LOST;
2972 } 2972 }
2973 } 2973 }
2974 } 2974 }