[SCM] libav/experimental: Directly check whether a fragment is coded for 4MV mode instead of iterating through the entire coded fragment list.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:59:58 UTC 2013


The following commit has been merged in the experimental branch:
commit eb691ef219860fa6432d460cdd8edc9dff4886db
Author: David Conrad <lessen42 at gmail.com>
Date:   Sat Feb 13 18:55:27 2010 +0000

    Directly check whether a fragment is coded for 4MV mode instead of iterating
    through the entire coded fragment list.
    
    Originally committed as revision 21803 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 8b7ff42..b63b126 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -735,7 +735,7 @@ static int unpack_modes(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 motion_x[6];
     int motion_y[6];
@@ -802,10 +802,7 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
                 motion_x[4] = motion_y[4] = 0;
                 for (k = 0; k < 4; k++) {
                     current_fragment = BLOCK_Y*s->fragment_width + BLOCK_X;
-                    for (l = 0; l < s->coded_fragment_list_index; l++)
-                        if (s->coded_fragment_list[l] == current_fragment)
-                            break;
-                    if (l < s->coded_fragment_list_index) {
+                    if (s->all_fragments[current_fragment].coding_method != MODE_COPY) {
                         if (coding_mode == 0) {
                             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)];

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list