You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Deprecate deinterlaced in libavcodec.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
9af8179cdb
commit
2cffe38df3
4
ffmpeg.c
4
ffmpeg.c
@@ -691,7 +691,7 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void *
|
|||||||
dec = ist->st->codec;
|
dec = ist->st->codec;
|
||||||
|
|
||||||
/* deinterlace : must be done before any resize */
|
/* deinterlace : must be done before any resize */
|
||||||
if (do_deinterlace) {
|
if (FF_API_DEINTERLACE && do_deinterlace) {
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
/* create temporary picture */
|
/* create temporary picture */
|
||||||
@@ -1956,7 +1956,7 @@ static int init_input_stream(int ist_index, char *error, int error_len)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ist->dr1 = (codec->capabilities & CODEC_CAP_DR1) && !do_deinterlace;
|
ist->dr1 = (codec->capabilities & CODEC_CAP_DR1) && !(FF_API_DEINTERLACE && do_deinterlace);
|
||||||
if (codec->type == AVMEDIA_TYPE_VIDEO && ist->dr1) {
|
if (codec->type == AVMEDIA_TYPE_VIDEO && ist->dr1) {
|
||||||
ist->st->codec->get_buffer = codec_get_buffer;
|
ist->st->codec->get_buffer = codec_get_buffer;
|
||||||
ist->st->codec->release_buffer = codec_release_buffer;
|
ist->st->codec->release_buffer = codec_release_buffer;
|
||||||
|
@@ -2128,12 +2128,14 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FF_API_DEINTERLACE
|
||||||
static int opt_deinterlace(void *optctx, const char *opt, const char *arg)
|
static int opt_deinterlace(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt);
|
av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt);
|
||||||
do_deinterlace = 1;
|
do_deinterlace = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int opt_timecode(void *optctx, const char *opt, const char *arg)
|
static int opt_timecode(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
@@ -2521,8 +2523,10 @@ const OptionDef options[] = {
|
|||||||
"select the pass number (1 to 3)", "n" },
|
"select the pass number (1 to 3)", "n" },
|
||||||
{ "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) },
|
{ "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) },
|
||||||
"select two pass log file name prefix", "prefix" },
|
"select two pass log file name prefix", "prefix" },
|
||||||
|
#if FF_API_DEINTERLACE
|
||||||
{ "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace },
|
{ "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace },
|
||||||
"this option is deprecated, use the yadif filter instead" },
|
"this option is deprecated, use the yadif filter instead" },
|
||||||
|
#endif
|
||||||
{ "psnr", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &do_psnr },
|
{ "psnr", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &do_psnr },
|
||||||
"calculate PSNR of compressed frames" },
|
"calculate PSNR of compressed frames" },
|
||||||
{ "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats },
|
{ "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats },
|
||||||
|
@@ -4618,7 +4618,10 @@ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* deinterlace - if not supported return -1
|
* deinterlace - if not supported return -1
|
||||||
|
*
|
||||||
|
* @deprecated - use yadif (in lavfilter) instead
|
||||||
*/
|
*/
|
||||||
|
attribute_deprecated
|
||||||
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
|
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
|
||||||
enum AVPixelFormat pix_fmt, int width, int height);
|
enum AVPixelFormat pix_fmt, int width, int height);
|
||||||
/**
|
/**
|
||||||
|
@@ -492,6 +492,8 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FF_API_DEINTERLACE
|
||||||
|
|
||||||
#if !HAVE_MMX_EXTERNAL
|
#if !HAVE_MMX_EXTERNAL
|
||||||
/* filter parameters: [-1 4 2 4 -1] // 8 */
|
/* filter parameters: [-1 4 2 4 -1] // 8 */
|
||||||
static void deinterlace_line_c(uint8_t *dst,
|
static void deinterlace_line_c(uint8_t *dst,
|
||||||
@@ -651,6 +653,8 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* FF_API_DEINTERLACE */
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|
||||||
int main(void){
|
int main(void){
|
||||||
|
@@ -106,5 +106,8 @@
|
|||||||
#ifndef FF_API_IDCT
|
#ifndef FF_API_IDCT
|
||||||
#define FF_API_IDCT (LIBAVCODEC_VERSION_MAJOR < 55)
|
#define FF_API_IDCT (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_DEINTERLACE
|
||||||
|
#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AVCODEC_VERSION_H */
|
#endif /* AVCODEC_VERSION_H */
|
||||||
|
Reference in New Issue
Block a user