mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 04:12:14 +00:00
export DCT coefficients patch by (Wolfgang Hesseler <wolfgang.hesseler at imk dot fraunhofer dot de>)
Originally committed as revision 2816 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5a815088d3
commit
8289c6faa8
@ -17,7 +17,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define FFMPEG_VERSION_INT 0x000408
|
#define FFMPEG_VERSION_INT 0x000408
|
||||||
#define FFMPEG_VERSION "0.4.8"
|
#define FFMPEG_VERSION "0.4.8"
|
||||||
#define LIBAVCODEC_BUILD 4704
|
#define LIBAVCODEC_BUILD 4705
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
|
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
|
||||||
#define LIBAVCODEC_VERSION FFMPEG_VERSION
|
#define LIBAVCODEC_VERSION FFMPEG_VERSION
|
||||||
@ -529,6 +529,13 @@ typedef struct AVPanScan{
|
|||||||
* - decoding: set by lavc (before get_buffer() call))\
|
* - decoding: set by lavc (before get_buffer() call))\
|
||||||
*/\
|
*/\
|
||||||
int buffer_hints;\
|
int buffer_hints;\
|
||||||
|
\
|
||||||
|
/**\
|
||||||
|
* DCT coeffitients\
|
||||||
|
* - encoding: unused\
|
||||||
|
* - decoding: set by lavc\
|
||||||
|
*/\
|
||||||
|
short *dct_coeff;\
|
||||||
|
|
||||||
#define FF_QSCALE_TYPE_MPEG1 0
|
#define FF_QSCALE_TYPE_MPEG1 0
|
||||||
#define FF_QSCALE_TYPE_MPEG2 1
|
#define FF_QSCALE_TYPE_MPEG2 1
|
||||||
@ -1138,7 +1145,7 @@ typedef struct AVCodecContext {
|
|||||||
#define FF_DEBUG_MB_TYPE 8
|
#define FF_DEBUG_MB_TYPE 8
|
||||||
#define FF_DEBUG_QP 16
|
#define FF_DEBUG_QP 16
|
||||||
#define FF_DEBUG_MV 32
|
#define FF_DEBUG_MV 32
|
||||||
//#define FF_DEBUG_VIS_MV 0x00000040
|
#define FF_DEBUG_DCT_COEFF 0x00000040
|
||||||
#define FF_DEBUG_SKIP 0x00000080
|
#define FF_DEBUG_SKIP 0x00000080
|
||||||
#define FF_DEBUG_STARTCODE 0x00000100
|
#define FF_DEBUG_STARTCODE 0x00000100
|
||||||
#define FF_DEBUG_PTS 0x00000200
|
#define FF_DEBUG_PTS 0x00000200
|
||||||
|
@ -354,6 +354,9 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){
|
|||||||
}
|
}
|
||||||
pic->motion_subsample_log2= 3;
|
pic->motion_subsample_log2= 3;
|
||||||
}
|
}
|
||||||
|
if(s->avctx->debug&FF_DEBUG_DCT_COEFF) {
|
||||||
|
CHECKED_ALLOCZ(pic->dct_coeff, 64 * mb_array_size * sizeof(DCTELEM)*6)
|
||||||
|
}
|
||||||
pic->qstride= s->mb_stride;
|
pic->qstride= s->mb_stride;
|
||||||
CHECKED_ALLOCZ(pic->pan_scan , 1 * sizeof(AVPanScan))
|
CHECKED_ALLOCZ(pic->pan_scan , 1 * sizeof(AVPanScan))
|
||||||
}
|
}
|
||||||
@ -385,6 +388,7 @@ static void free_picture(MpegEncContext *s, Picture *pic){
|
|||||||
av_freep(&pic->mbskip_table);
|
av_freep(&pic->mbskip_table);
|
||||||
av_freep(&pic->qscale_table);
|
av_freep(&pic->qscale_table);
|
||||||
av_freep(&pic->mb_type_base);
|
av_freep(&pic->mb_type_base);
|
||||||
|
av_freep(&pic->dct_coeff);
|
||||||
av_freep(&pic->pan_scan);
|
av_freep(&pic->pan_scan);
|
||||||
pic->mb_type= NULL;
|
pic->mb_type= NULL;
|
||||||
for(i=0; i<2; i++){
|
for(i=0; i<2; i++){
|
||||||
@ -3080,6 +3084,15 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
|
|||||||
mb_x = s->mb_x;
|
mb_x = s->mb_x;
|
||||||
mb_y = s->mb_y;
|
mb_y = s->mb_y;
|
||||||
|
|
||||||
|
if(s->avctx->debug&FF_DEBUG_DCT_COEFF) {
|
||||||
|
/* save DCT coefficients */
|
||||||
|
int i,j;
|
||||||
|
DCTELEM *dct = &s->current_picture.dct_coeff[mb_xy*64*6];
|
||||||
|
for(i=0; i<6; i++)
|
||||||
|
for(j=0; j<64; j++)
|
||||||
|
*dct++ = block[i][s->dsp.idct_permutation[j]];
|
||||||
|
}
|
||||||
|
|
||||||
s->current_picture.qscale_table[mb_xy]= s->qscale;
|
s->current_picture.qscale_table[mb_xy]= s->qscale;
|
||||||
|
|
||||||
/* update DC predictors for P macroblocks */
|
/* update DC predictors for P macroblocks */
|
||||||
|
Loading…
Reference in New Issue
Block a user