Commit 91cc48d7 authored by conrad's avatar conrad

Directly check whether a fragment is coded for 4MV mode instead of iterating

through the entire coded fragment list.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21803 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d516b7b3
...@@ -735,7 +735,7 @@ static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb) ...@@ -735,7 +735,7 @@ static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb)
*/ */
static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
{ {
int j, k, l, sb_x, sb_y; int j, k, sb_x, sb_y;
int coding_mode; int coding_mode;
int motion_x[6]; int motion_x[6];
int motion_y[6]; int motion_y[6];
...@@ -802,10 +802,7 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) ...@@ -802,10 +802,7 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
motion_x[4] = motion_y[4] = 0; motion_x[4] = motion_y[4] = 0;
for (k = 0; k < 4; k++) { for (k = 0; k < 4; k++) {
current_fragment = BLOCK_Y*s->fragment_width + BLOCK_X; current_fragment = BLOCK_Y*s->fragment_width + BLOCK_X;
for (l = 0; l < s->coded_fragment_list_index; l++) if (s->all_fragments[current_fragment].coding_method != MODE_COPY) {
if (s->coded_fragment_list[l] == current_fragment)
break;
if (l < s->coded_fragment_list_index) {
if (coding_mode == 0) { if (coding_mode == 0) {
motion_x[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; motion_x[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
motion_y[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; motion_y[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment