summaryrefslogtreecommitdiffstats
path: root/libmpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'libmpeg2')
-rw-r--r--libmpeg2/slice.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libmpeg2/slice.c b/libmpeg2/slice.c
index 308ff5d456..0cba9f3144 100644
--- a/libmpeg2/slice.c
+++ b/libmpeg2/slice.c
@@ -1569,9 +1569,18 @@ do { \
#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 */ \