comparison msmpeg4.c @ 5496:f966fc154841 libavcodec

make wmv1 and wmv2 playable with M$ DMO decoder
author michael
date Sun, 05 Aug 2007 20:03:37 +0000
parents 470601203f44
children 56bc8fbd9aee
comparison
equal deleted inserted replaced
5495:15c6ea63cb62 5496:f966fc154841
881 if (n < 4) { 881 if (n < 4) {
882 rl = &rl_table[s->rl_table_index]; 882 rl = &rl_table[s->rl_table_index];
883 } else { 883 } else {
884 rl = &rl_table[3 + s->rl_chroma_table_index]; 884 rl = &rl_table[3 + s->rl_chroma_table_index];
885 } 885 }
886 run_diff = s->msmpeg4_version>=6; 886 run_diff = s->msmpeg4_version>=4;
887 scantable= s->intra_scantable.permutated; 887 scantable= s->intra_scantable.permutated;
888 } else { 888 } else {
889 i = 0; 889 i = 0;
890 rl = &rl_table[3 + s->rl_table_index]; 890 rl = &rl_table[3 + s->rl_table_index];
891 if(s->msmpeg4_version<=2) 891 if(s->msmpeg4_version<=2)
939 put_bits(&s->pb, 1, 0); 939 put_bits(&s->pb, 1, 0);
940 if (level > MAX_LEVEL) 940 if (level > MAX_LEVEL)
941 goto esc3; 941 goto esc3;
942 run1 = run - rl->max_run[last][level] - run_diff; 942 run1 = run - rl->max_run[last][level] - run_diff;
943 if (run1 < 0) 943 if (run1 < 0)
944 goto esc3;
945 code = get_rl_index(rl, last, run1+1, level);
946 if (s->msmpeg4_version == 4 && code == rl->n)
944 goto esc3; 947 goto esc3;
945 code = get_rl_index(rl, last, run1, level); 948 code = get_rl_index(rl, last, run1, level);
946 if (code == rl->n) { 949 if (code == rl->n) {
947 esc3: 950 esc3:
948 /* third escape */ 951 /* third escape */
1639 if(!s->inter_intra_pred) return -1; 1642 if(!s->inter_intra_pred) return -1;
1640 } 1643 }
1641 } 1644 }
1642 block[0] = level; 1645 block[0] = level;
1643 1646
1644 run_diff = 0; 1647 run_diff = s->msmpeg4_version >= 4;
1645 i = 0; 1648 i = 0;
1646 if (!coded) { 1649 if (!coded) {
1647 goto not_coded; 1650 goto not_coded;
1648 } 1651 }
1649 if (s->ac_pred) { 1652 if (s->ac_pred) {