summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-07 16:32:54 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-07 16:32:54 +0000
commit2563ac95f0642cde33c1dc911027d31a5a117802 (patch)
tree9b1a468037c3e78069dbc5e9aeeeb4a9da5c5089
parente3ae844c0ee4751b74268b9aba0b585fc364f2eb (diff)
downloadmpv-2563ac95f0642cde33c1dc911027d31a5a117802.tar.bz2
mpv-2563ac95f0642cde33c1dc911027d31a5a117802.tar.xz
quant_store moved to frame struct
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5516 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpcodecs/vd_libmpeg2.c7
-rw-r--r--libmpeg2/Makefile2
-rw-r--r--libmpeg2/mpeg2_internal.h10
-rw-r--r--libmpeg2/slice.c12
4 files changed, 15 insertions, 16 deletions
diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c
index 2f7d5260ab..13e7449b80 100644
--- a/libmpcodecs/vd_libmpeg2.c
+++ b/libmpcodecs/vd_libmpeg2.c
@@ -40,11 +40,6 @@ static picture_t *picture=NULL; // exported from libmpeg2/decode.c
static int table_init_state=0;
-#ifdef MPEG12_POSTPROC
-#include "../postproc/postprocess.h"
-int quant_store[MPEG2_MBR+1][MPEG2_MBC+1]; // [Review]
-#endif
-
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
return CONTROL_UNKNOWN;
@@ -184,6 +179,8 @@ static mp_image_t* parse_chunk (sh_video_t* sh, int code, uint8_t * buffer, int
picture->current_frame->base[1]=mpi->planes[1];
picture->current_frame->base[2]=mpi->planes[2];
picture->current_frame->mpi=mpi; // tricky!
+ mpi->qscale=&picture->current_frame->quant_store[1][1];
+ mpi->qstride=(MPEG2_MBC+1);
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"mpeg2: [%c] %p %s \n",
(picture->picture_coding_type == B_TYPE) ? 'B':'P',
mpi, (mpi->flags&MP_IMGFLAG_DIRECT)?"DR!":"");
diff --git a/libmpeg2/Makefile b/libmpeg2/Makefile
index 476e09b95e..914b41844d 100644
--- a/libmpeg2/Makefile
+++ b/libmpeg2/Makefile
@@ -5,7 +5,7 @@ include ../config.mak
SRCS = header.c idct.c idct_mmx.c idct_mlib.c \
motion_comp.c motion_comp_mmx.c motion_comp_mlib.c \
- slice.c stats.c decode.c
+ slice.c stats.c # decode.c
OBJS = $(SRCS:.c=.o)
INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC) $(MLIB_INC)
CFLAGS = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
diff --git a/libmpeg2/mpeg2_internal.h b/libmpeg2/mpeg2_internal.h
index ce33778545..be883bd613 100644
--- a/libmpeg2/mpeg2_internal.h
+++ b/libmpeg2/mpeg2_internal.h
@@ -56,6 +56,12 @@ typedef struct vo_frame_s {
void (* copy) (struct vo_frame_s * frame, uint8_t ** src);
void* vo;
void* mpi;
+#ifdef MPEG12_POSTPROC
+#define MPEG2_MBC 120
+#define MPEG2_MBR 72
+ int quant_store[MPEG2_MBR+1][MPEG2_MBC+1];
+#endif
+
// int slice;
// void (* field) (struct vo_frame_s * frame, int flags);
// void (* draw) (struct vo_frame_s * frame);
@@ -219,7 +225,3 @@ void mpeg2_allocate_image_buffers(picture_t * picture);
void mpeg2_free_image_buffers (picture_t * picture);
-#ifdef MPEG12_POSTPROC
-#define MPEG2_MBC 120
-#define MPEG2_MBR 72
-#endif
diff --git a/libmpeg2/slice.c b/libmpeg2/slice.c
index 0c072aeb2b..2fdeb48375 100644
--- a/libmpeg2/slice.c
+++ b/libmpeg2/slice.c
@@ -32,9 +32,9 @@ extern mc_functions_t mc_functions;
extern void (* idct_block_copy) (int16_t * block, uint8_t * dest, int stride);
extern void (* idct_block_add) (int16_t * block, uint8_t * dest, int stride);
-#ifdef MPEG12_POSTPROC
-extern int quant_store[MPEG2_MBR+1][MPEG2_MBC+1]; // [Review]
-#endif
+//#ifdef MPEG12_POSTPROC
+//extern int quant_store[MPEG2_MBR+1][MPEG2_MBC+1]; // [Review]
+//#endif
#include "vlc.h"
@@ -1753,7 +1753,7 @@ int slice_process (picture_t * picture, uint8_t code, uint8_t * buffer)
}
#ifdef MPEG12_POSTPROC
- quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
+ picture->current_frame->quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
#endif
offset += 16;
CHECK_DISPLAY;
@@ -1785,7 +1785,7 @@ int slice_process (picture_t * picture, uint8_t code, uint8_t * buffer)
MOTION (motion_fi_zero, MACROBLOCK_MOTION_FORWARD);
#ifdef MPEG12_POSTPROC
- quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
+ picture->current_frame->quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
#endif
offset += 16;
@@ -1801,7 +1801,7 @@ int slice_process (picture_t * picture, uint8_t code, uint8_t * buffer)
MOTION (motion_fi_reuse, macroblock_modes);
#ifdef MPEG12_POSTPROC
- quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
+ picture->current_frame->quant_store[code][(offset>>4)+1] = picture->quantizer_scale;
#endif
offset += 16;