# HG changeset patch # User pulento # Date 1021172148 0 # Node ID 0d73175fbdedd9da0d72e4f06f6f210fd6323f80 # Parent ba9c3b8088c032355ca3c527aa898d6a25f3da20 - repeat_pict added to AVCodecContext to signal if the decoder must repeat frames from 3:2 pulldown sources. - repeat_pict honoured by MPEG-1/2 decoder. diff -r ba9c3b8088c0 -r 0d73175fbded avcodec.h --- a/avcodec.h Sat May 11 23:42:16 2002 +0000 +++ b/avcodec.h Sun May 12 02:55:48 2002 +0000 @@ -5,8 +5,8 @@ #define LIBAVCODEC_VERSION_INT 0x000406 #define LIBAVCODEC_VERSION "0.4.6" -#define LIBAVCODEC_BUILD 4606 -#define LIBAVCODEC_BUILD_STR "4606" +#define LIBAVCODEC_BUILD 4607 +#define LIBAVCODEC_BUILD_STR "4607" enum CodecID { CODEC_ID_NONE, @@ -130,7 +130,8 @@ #define FF_ASPECT_16_9_525 5 int gop_size; /* 0 = intra only */ enum PixelFormat pix_fmt; /* pixel format, see PIX_FMT_xxx */ - + int repeat_pict; /* set this to 1 if you want the decoder + to repeat frames for 3:2 pulldown (MPEG-2) */ /* if non NULL, 'draw_horiz_band' is called by the libavcodec decoder to draw an horizontal band. It improve cache usage. Not all codecs can do that. You must check the codec capabilities diff -r ba9c3b8088c0 -r 0d73175fbded mpeg12.c --- a/mpeg12.c Sat May 11 23:42:16 2002 +0000 +++ b/mpeg12.c Sun May 12 02:55:48 2002 +0000 @@ -1588,7 +1588,7 @@ buf_ptr = buf; buf_end = buf + buf_size; - if (s->repeat_field % 2 == 1) { + if (s->repeat_field % 2 == 1 && avctx->repeat_pict) { s->repeat_field++; //fprintf(stderr,"\nRepeating last frame: %d -> %d! pict: %d %d", avctx->frame_number-1, avctx->frame_number, // s2->picture_number, s->repeat_field);