changeset 11154:c11bcf7e3e6b libavcodec

Move CODEC_FLAG_GRAY check to outer loop
author conrad
date Sat, 13 Feb 2010 18:59:25 +0000
parents 3827267cc207
children dad947e53c52
files vp3.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vp3.c	Sat Feb 13 18:59:21 2010 +0000
+++ b/vp3.c	Sat Feb 13 18:59:25 2010 +0000
@@ -1406,6 +1406,8 @@
         int i = s->fragment_start[plane] + (y>>3)*(s->fragment_width>>!!plane);
 
         if (!s->flipped_image) stride = -stride;
+        if (CONFIG_GRAY && plane && (s->avctx->flags & CODEC_FLAG_GRAY))
+            continue;
 
 
         if(FFABS(stride) > 2048)
@@ -1424,8 +1426,7 @@
                 }
 
                 /* transform if this block was coded */
-                if ((s->all_fragments[i].coding_method != MODE_COPY) &&
-                    !((s->avctx->flags & CODEC_FLAG_GRAY) && plane)) {
+                if (s->all_fragments[i].coding_method != MODE_COPY) {
 
                     if ((s->all_fragments[i].coding_method == MODE_USING_GOLDEN) ||
                         (s->all_fragments[i].coding_method == MODE_GOLDEN_MV))