Revision e6e32bdc

View differences:

libavcodec/vp3.c
891 891
                    motion_y[0] = fixed_motion_vector_table[get_bits(gb, 6)];
892 892
                }
893 893

  
894
                for (k = 1; k < 6; k++) {
895
                    motion_x[k] = motion_x[0];
896
                    motion_y[k] = motion_y[0];
897
                }
898

  
899 894
                /* vector maintenance, only on MODE_INTER_PLUS_MV */
900 895
                if (s->macroblock_coding[current_macroblock] ==
901 896
                    MODE_INTER_PLUS_MV) {
......
946 941
                /* all 6 fragments use the last motion vector */
947 942
                motion_x[0] = last_motion_x;
948 943
                motion_y[0] = last_motion_y;
949
                for (k = 1; k < 6; k++) {
950
                    motion_x[k] = motion_x[0];
951
                    motion_y[k] = motion_y[0];
952
                }
953 944

  
954 945
                /* no vector maintenance (last vector remains the
955 946
                 * last vector) */
......
960 951
                 * last motion vector */
961 952
                motion_x[0] = prior_last_motion_x;
962 953
                motion_y[0] = prior_last_motion_y;
963
                for (k = 1; k < 6; k++) {
964
                    motion_x[k] = motion_x[0];
965
                    motion_y[k] = motion_y[0];
966
                }
967 954

  
968 955
                /* vector maintenance */
969 956
                prior_last_motion_x = last_motion_x;
......
974 961

  
975 962
            default:
976 963
                /* covers intra, inter without MV, golden without MV */
977
                memset(motion_x, 0, 6 * sizeof(int));
978
                memset(motion_y, 0, 6 * sizeof(int));
964
                motion_x[0] = 0;
965
                motion_y[0] = 0;
979 966

  
980 967
                /* no vector maintenance */
981 968
                break;
......
992 979
                        current_fragment, s->fragment_count);
993 980
                    return 1;
994 981
                }
982
                if (s->macroblock_coding[current_macroblock] == MODE_INTER_FOURMV) {
995 983
                s->all_fragments[current_fragment].motion_x = motion_x[k];
996 984
                s->all_fragments[current_fragment].motion_y = motion_y[k];
985
                } else {
986
                    s->all_fragments[current_fragment].motion_x = motion_x[0];
987
                    s->all_fragments[current_fragment].motion_y = motion_y[0];
988
                }
997 989
            }
998 990
        }
999 991
    }

Also available in: Unified diff