Mercurial > mplayer.hg
changeset 5515:0cdc1388f02f
quant_store moved to frame struct
author | arpi |
---|---|
date | Sun, 07 Apr 2002 16:32:54 +0000 |
parents | 127f2a84e933 |
children | 113ed5725b47 |
files | libmpcodecs/vd_libmpeg2.c libmpeg2/Makefile libmpeg2/mpeg2_internal.h libmpeg2/slice.c |
diffstat | 4 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_libmpeg2.c Sun Apr 07 03:32:36 2002 +0000 +++ b/libmpcodecs/vd_libmpeg2.c Sun Apr 07 16:32:54 2002 +0000 @@ -40,11 +40,6 @@ 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 @@ 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!":"");
--- a/libmpeg2/Makefile Sun Apr 07 03:32:36 2002 +0000 +++ b/libmpeg2/Makefile Sun Apr 07 16:32:54 2002 +0000 @@ -5,7 +5,7 @@ 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
--- a/libmpeg2/mpeg2_internal.h Sun Apr 07 03:32:36 2002 +0000 +++ b/libmpeg2/mpeg2_internal.h Sun Apr 07 16:32:54 2002 +0000 @@ -56,6 +56,12 @@ 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_free_image_buffers (picture_t * picture); -#ifdef MPEG12_POSTPROC -#define MPEG2_MBC 120 -#define MPEG2_MBR 72 -#endif
--- a/libmpeg2/slice.c Sun Apr 07 03:32:36 2002 +0000 +++ b/libmpeg2/slice.c Sun Apr 07 16:32:54 2002 +0000 @@ -32,9 +32,9 @@ 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 @@ } #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 @@ 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 @@ 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;