Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Ronald S. Bultje authored on 2013/03/04 01:23:08... | ... |
@@ -691,7 +691,7 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void * |
691 | 691 |
dec = ist->st->codec; |
692 | 692 |
|
693 | 693 |
/* deinterlace : must be done before any resize */ |
694 |
- if (do_deinterlace) { |
|
694 |
+ if (FF_API_DEINTERLACE && do_deinterlace) { |
|
695 | 695 |
int size; |
696 | 696 |
|
697 | 697 |
/* create temporary picture */ |
... | ... |
@@ -1956,7 +1956,7 @@ static int init_input_stream(int ist_index, char *error, int error_len) |
1956 | 1956 |
return AVERROR(EINVAL); |
1957 | 1957 |
} |
1958 | 1958 |
|
1959 |
- ist->dr1 = (codec->capabilities & CODEC_CAP_DR1) && !do_deinterlace; |
|
1959 |
+ ist->dr1 = (codec->capabilities & CODEC_CAP_DR1) && !(FF_API_DEINTERLACE && do_deinterlace); |
|
1960 | 1960 |
if (codec->type == AVMEDIA_TYPE_VIDEO && ist->dr1) { |
1961 | 1961 |
ist->st->codec->get_buffer = codec_get_buffer; |
1962 | 1962 |
ist->st->codec->release_buffer = codec_release_buffer; |
... | ... |
@@ -2128,12 +2128,14 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg) |
2128 | 2128 |
return 0; |
2129 | 2129 |
} |
2130 | 2130 |
|
2131 |
+#if FF_API_DEINTERLACE |
|
2131 | 2132 |
static int opt_deinterlace(void *optctx, const char *opt, const char *arg) |
2132 | 2133 |
{ |
2133 | 2134 |
av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt); |
2134 | 2135 |
do_deinterlace = 1; |
2135 | 2136 |
return 0; |
2136 | 2137 |
} |
2138 |
+#endif |
|
2137 | 2139 |
|
2138 | 2140 |
static int opt_timecode(void *optctx, const char *opt, const char *arg) |
2139 | 2141 |
{ |
... | ... |
@@ -2521,8 +2523,10 @@ const OptionDef options[] = { |
2521 | 2521 |
"select the pass number (1 to 3)", "n" }, |
2522 | 2522 |
{ "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) }, |
2523 | 2523 |
"select two pass log file name prefix", "prefix" }, |
2524 |
+#if FF_API_DEINTERLACE |
|
2524 | 2525 |
{ "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace }, |
2525 | 2526 |
"this option is deprecated, use the yadif filter instead" }, |
2527 |
+#endif |
|
2526 | 2528 |
{ "psnr", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &do_psnr }, |
2527 | 2529 |
"calculate PSNR of compressed frames" }, |
2528 | 2530 |
{ "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats }, |
... | ... |
@@ -4618,7 +4618,10 @@ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); |
4618 | 4618 |
|
4619 | 4619 |
/** |
4620 | 4620 |
* deinterlace - if not supported return -1 |
4621 |
+ * |
|
4622 |
+ * @deprecated - use yadif (in lavfilter) instead |
|
4621 | 4623 |
*/ |
4624 |
+attribute_deprecated |
|
4622 | 4625 |
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
4623 | 4626 |
enum AVPixelFormat pix_fmt, int width, int height); |
4624 | 4627 |
/** |
... | ... |
@@ -492,6 +492,8 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, |
492 | 492 |
return 0; |
493 | 493 |
} |
494 | 494 |
|
495 |
+#if FF_API_DEINTERLACE |
|
496 |
+ |
|
495 | 497 |
#if !HAVE_MMX_EXTERNAL |
496 | 498 |
/* filter parameters: [-1 4 2 4 -1] // 8 */ |
497 | 499 |
static void deinterlace_line_c(uint8_t *dst, |
... | ... |
@@ -651,6 +653,8 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
651 | 651 |
return 0; |
652 | 652 |
} |
653 | 653 |
|
654 |
+#endif /* FF_API_DEINTERLACE */ |
|
655 |
+ |
|
654 | 656 |
#ifdef TEST |
655 | 657 |
|
656 | 658 |
int main(void){ |