summaryrefslogtreecommitdiffstats
path: root/libmpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'libmpeg2')
-rw-r--r--libmpeg2/mpeg2_internal.h4
-rw-r--r--libmpeg2/slice.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/libmpeg2/mpeg2_internal.h b/libmpeg2/mpeg2_internal.h
index 0e364cbf43..90ae5702da 100644
--- a/libmpeg2/mpeg2_internal.h
+++ b/libmpeg2/mpeg2_internal.h
@@ -135,6 +135,10 @@ struct decoder_s {
int second_field;
int mpeg1;
+
+ /* for MPlayer: */
+ char* quant_store;
+ int quant_stride;
};
typedef struct {
diff --git a/libmpeg2/slice.c b/libmpeg2/slice.c
index 7f6a2ed052..327612e0e4 100644
--- a/libmpeg2/slice.c
+++ b/libmpeg2/slice.c
@@ -1420,6 +1420,9 @@ do { \
#define NEXT_MACROBLOCK \
do { \
+ if(decoder->quant_store) \
+ 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 */ \