From 79e7b305577acb4af65ab8f80e71fb0f744e92f6 Mon Sep 17 00:00:00 2001 From: Arpi Date: Tue, 16 Oct 2001 23:10:38 +0000 Subject: [PATCH] exporting qscale data for postprocessing (for MPlayer) Originally committed as revision 164 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/avcodec.h | 8 ++++++++ libavcodec/mpegvideo.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b423b889b4..832afdd0e4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -237,4 +237,12 @@ int avcodec_close(AVCodecContext *avctx); void avcodec_register_all(void); +#ifdef FF_POSTPROCESS +#ifndef MBC +#define MBC 48 +#define MBR 36 +#endif +extern int quant_store[MBR+1][MBC+1]; // [Review] +#endif + #endif /* AVCODEC_H */ diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 40dbcf1e1e..148d7e142c 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -675,6 +675,11 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) mb_x = s->mb_x; mb_y = s->mb_y; +#ifdef FF_POSTPROCESS + quant_store[mb_y][mb_x]=s->qscale; + //printf("[%02d][%02d] %d\n",mb_x,mb_y,s->qscale); +#endif + /* update DC predictors for P macroblocks */ if (!s->mb_intra) { if (s->h263_pred) {