History

lavc: Deprecate the deinterlace functions in libavcodec

Ronald S. Bultje committed 13 years ago

Commit 54b298f1 parent 64e43865 files · +20 −0Browse files

Unified · Split

5 files
  1. avconv.c +4 −0
  2. avconv_opt.c +4 −0
  3. libavcodec/avcodec.h +5 −0
  4. libavcodec/imgconvert.c +4 −0
  5. libavcodec/version.h +3 −0
avconv.c+4−0
@@ -404,6 +404,7 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost, · 403 unmodified lines
404404 }
405405 }
406406
407+#if FF_API_DEINTERLACE
407408 static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp)
408409 {
409410 AVCodecContext *dec;
@@ -442,6 +443,7 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void * · 32 unmodified lines
442443 *picture = *picture2;
443444 *bufp = buf;
444445 }
446+#endif
445447
446448 static void do_subtitle_out(AVFormatContext *s,
447449 OutputStream *ost,
@@ -1181,7 +1183,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) · 733 unmodified lines
11811183 decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
11821184 decoded_frame->pkt_dts);
11831185 pkt->size = 0;
1186+#if FF_API_DEINTERLACE
11841187 pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);
1188+#endif
11851189
11861190 rate_emu_sleep(ist);
11871191
avconv_opt.c+4−0
@@ -1715,12 +1715,14 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg) · 1714 unmodified lines
17151715 return 0;
17161716 }
17171717
1718+#if FF_API_DEINTERLACE
17181719 static int opt_deinterlace(void *optctx, const char *opt, const char *arg)
17191720 {
17201721 av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt);
17211722 do_deinterlace = 1;
17221723 return 0;
17231724 }
1725+#endif
17241726
17251727 int opt_cpuflags(void *optctx, const char *opt, const char *arg)
17261728 {
@@ -2057,8 +2059,10 @@ const OptionDef options[] = { · 330 unmodified lines
20572059 "select the pass number (1 or 2)", "n" },
20582060 { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) },
20592061 "select two pass log file name prefix", "prefix" },
2062+#if FF_API_DEINTERLACE
20602063 { "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace },
20612064 "this option is deprecated, use the yadif filter instead" },
2065+#endif
20622066 { "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats },
20632067 "dump video coding statistics to file" },
20642068 { "vstats_file", OPT_VIDEO | HAS_ARG | OPT_EXPERT , { opt_vstats_file },
libavcodec/avcodec.h+5−0
@@ -4267,11 +4267,16 @@ int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, · 4266 unmodified lines
42674267 */
42684268 int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
42694269
4270+#if FF_API_DEINTERLACE
42704271 /**
42714272 * deinterlace - if not supported return -1
4273+ *
4274+ * @deprecated - use yadif (in libavfilter) instead
42724275 */
4276+attribute_deprecated
42734277 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
42744278 enum AVPixelFormat pix_fmt, int width, int height);
4279+#endif
42754280 /**
42764281 * Copy image src to dst. Wraps av_picture_data_copy() above.
42774282 */
libavcodec/imgconvert.c+4−0
@@ -366,6 +366,8 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, · 365 unmodified lines
366366 return 0;
367367 }
368368
369+#if FF_API_DEINTERLACE
370+
369371 #if !HAVE_MMX_EXTERNAL
370372 /* filter parameters: [-1 4 2 4 -1] // 8 */
371373 static void deinterlace_line_c(uint8_t *dst,
@@ -524,3 +526,5 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, · 152 unmodified lines
524526 emms_c();
525527 return 0;
526528 }
529+
530+#endif /* FF_API_DEINTERLACE */
libavcodec/version.h+3−0
@@ -97,5 +97,8 @@ · 96 unmodified lines
9797 #ifndef FF_API_IDCT
9898 #define FF_API_IDCT (LIBAVCODEC_VERSION_MAJOR < 55)
9999 #endif
100+#ifndef FF_API_DEINTERLACE
101+#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 56)
102+#endif
100103
101104 #endif /* AVCODEC_VERSION_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t