[MPlayer-cvslog] r20654 - trunk/libmpeg2/slice.c

henry subversion at mplayerhq.hu
Sat Nov 4 08:05:22 CET 2006


Author: henry
Date: Sat Nov  4 08:05:21 2006
New Revision: 20654

Modified:
   trunk/libmpeg2/slice.c

Log:
fix quantizer export for interlaced video

Modified: trunk/libmpeg2/slice.c
==============================================================================
--- trunk/libmpeg2/slice.c	(original)
+++ trunk/libmpeg2/slice.c	Sat Nov  4 08:05:21 2006
@@ -1569,9 +1569,18 @@
 
 #define NEXT_MACROBLOCK							\
 do {									\
-    if(decoder->quant_store)                                            \
+    if(decoder->quant_store) {                                          \
+       if (decoder->picture_structure == TOP_FIELD)                     \
+        decoder->quant_store[2*decoder->quant_stride*(decoder->v_offset>>4) \
+                    +(decoder->offset>>4)] = decoder->quantizer_scale;  \
+       else if (decoder->picture_structure == BOTTOM_FIELD)             \
+        decoder->quant_store[2*decoder->quant_stride*(decoder->v_offset>>4) \
+	            + decoder->quant_stride                             \
+                    +(decoder->offset>>4)] = decoder->quantizer_scale;  \
+       else                                                             \
         decoder->quant_store[decoder->quant_stride*(decoder->v_offset>>4) \
                     +(decoder->offset>>4)] = decoder->quantizer_scale;  \
+    }                                                                   \
     decoder->offset += 16;						\
     if (decoder->offset == decoder->width) {				\
 	do { /* just so we can use the break statement */		\



More information about the MPlayer-cvslog mailing list