Revision 6cb35b45 libavcodec/vp3.c

View differences:

libavcodec/vp3.c
555 555
                return 1;
556 556
            }
557 557
            if (current_fragment != -1) {
558
                if (s->superblock_coding[i] == SB_NOT_CODED) {
558
                int coded = s->superblock_coding[i];
559 559

  
560
                    /* copy all the fragments from the prior frame */
561
                    s->all_fragments[current_fragment].coding_method =
562
                        MODE_COPY;
563

  
564
                } else if (s->superblock_coding[i] == SB_PARTIALLY_CODED) {
560
                if (s->superblock_coding[i] == SB_PARTIALLY_CODED) {
565 561

  
566 562
                    /* fragment may or may not be coded; this is the case
567 563
                     * that cares about the fragment coding runs */
......
570 566
                        current_run = get_vlc2(gb,
571 567
                            s->fragment_run_length_vlc.table, 5, 2);
572 568
                    }
569
                    coded = bit;
570
                }
573 571

  
574
                    if (bit) {
572
                    if (coded) {
575 573
                        /* default mode; actual mode will be decoded in
576 574
                         * the next phase */
577 575
                        s->all_fragments[current_fragment].coding_method =
......
592 590
                        s->all_fragments[current_fragment].coding_method =
593 591
                            MODE_COPY;
594 592
                    }
595

  
596
                } else {
597

  
598
                    /* fragments are fully coded in this superblock; actual
599
                     * coding will be determined in next step */
600
                    s->all_fragments[current_fragment].coding_method =
601
                        MODE_INTER_NO_MV;
602
                    s->all_fragments[current_fragment].next_coeff= s->coeffs + current_fragment;
603
                    s->coded_fragment_list[s->coded_fragment_list_index] =
604
                        current_fragment;
605
                    if ((current_fragment >= s->fragment_start[1]) &&
606
                        (s->last_coded_y_fragment == -1) &&
607
                        (!first_c_fragment_seen)) {
608
                        s->first_coded_c_fragment = s->coded_fragment_list_index;
609
                        s->last_coded_y_fragment = s->first_coded_c_fragment - 1;
610
                        first_c_fragment_seen = 1;
611
                    }
612
                    s->coded_fragment_list_index++;
613
                }
614 593
            }
615 594
        }
616 595
    }

Also available in: Unified diff