Unified · Split
| @@ -404,6 +404,7 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost, · 403 unmodified lines | |||
| 404 | } | 404 | } |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | #if FF_API_DEINTERLACE | ||
| 407 | static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp) | 408 | static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp) |
| 408 | { | 409 | { |
| 409 | AVCodecContext *dec; | 410 | AVCodecContext *dec; |
| @@ -442,6 +443,7 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void * · 32 unmodified lines | |||
| 442 | *picture = *picture2; | 443 | *picture = *picture2; |
| 443 | *bufp = buf; | 444 | *bufp = buf; |
| 444 | } | 445 | } |
| 446 | #endif | ||
| 445 | 447 | ||
| 446 | static void do_subtitle_out(AVFormatContext *s, | 448 | static void do_subtitle_out(AVFormatContext *s, |
| 447 | OutputStream *ost, | 449 | OutputStream *ost, |
| @@ -1181,7 +1183,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) · 733 unmodified lines | |||
| 1181 | decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts, | 1183 | decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts, |
| 1182 | decoded_frame->pkt_dts); | 1184 | decoded_frame->pkt_dts); |
| 1183 | pkt->size = 0; | 1185 | pkt->size = 0; |
| 1186 | #if FF_API_DEINTERLACE | ||
| 1184 | pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free); | 1187 | pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free); |
| 1188 | #endif | ||
| 1185 | 1189 | ||
| 1186 | rate_emu_sleep(ist); | 1190 | rate_emu_sleep(ist); |
| 1187 | 1191 | ||
| @@ -1715,12 +1715,14 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg) · 1714 unmodified lines | |||
| 1715 | return 0; | 1715 | return 0; |
| 1716 | } | 1716 | } |
| 1717 | 1717 | ||
| 1718 | #if FF_API_DEINTERLACE | ||
| 1718 | static int opt_deinterlace(void *optctx, const char *opt, const char *arg) | 1719 | static int opt_deinterlace(void *optctx, const char *opt, const char *arg) |
| 1719 | { | 1720 | { |
| 1720 | av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt); | 1721 | av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt); |
| 1721 | do_deinterlace = 1; | 1722 | do_deinterlace = 1; |
| 1722 | return 0; | 1723 | return 0; |
| 1723 | } | 1724 | } |
| 1725 | #endif | ||
| 1724 | 1726 | ||
| 1725 | int opt_cpuflags(void *optctx, const char *opt, const char *arg) | 1727 | int opt_cpuflags(void *optctx, const char *opt, const char *arg) |
| 1726 | { | 1728 | { |
| @@ -2057,8 +2059,10 @@ const OptionDef options[] = { · 330 unmodified lines | |||
| 2057 | "select the pass number (1 or 2)", "n" }, | 2059 | "select the pass number (1 or 2)", "n" }, |
| 2058 | { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) }, | 2060 | { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(passlogfiles) }, |
| 2059 | "select two pass log file name prefix", "prefix" }, | 2061 | "select two pass log file name prefix", "prefix" }, |
| 2062 | #if FF_API_DEINTERLACE | ||
| 2060 | { "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace }, | 2063 | { "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace }, |
| 2061 | "this option is deprecated, use the yadif filter instead" }, | 2064 | "this option is deprecated, use the yadif filter instead" }, |
| 2065 | #endif | ||
| 2062 | { "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats }, | 2066 | { "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats }, |
| 2063 | "dump video coding statistics to file" }, | 2067 | "dump video coding statistics to file" }, |
| 2064 | { "vstats_file", OPT_VIDEO | HAS_ARG | OPT_EXPERT , { opt_vstats_file }, | 2068 | { "vstats_file", OPT_VIDEO | HAS_ARG | OPT_EXPERT , { opt_vstats_file }, |
| @@ -4267,11 +4267,16 @@ int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, · 4266 unmodified lines | |||
| 4267 | */ | 4267 | */ |
| 4268 | int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); | 4268 | int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); |
| 4269 | 4269 | ||
| 4270 | #if FF_API_DEINTERLACE | ||
| 4270 | /** | 4271 | /** |
| 4271 | * deinterlace - if not supported return -1 | 4272 | * deinterlace - if not supported return -1 |
| 4273 | * | ||
| 4274 | * @deprecated - use yadif (in libavfilter) instead | ||
| 4272 | */ | 4275 | */ |
| 4276 | attribute_deprecated | ||
| 4273 | int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, | 4277 | int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
| 4274 | enum AVPixelFormat pix_fmt, int width, int height); | 4278 | enum AVPixelFormat pix_fmt, int width, int height); |
| 4279 | #endif | ||
| 4275 | /** | 4280 | /** |
| 4276 | * Copy image src to dst. Wraps av_picture_data_copy() above. | 4281 | * Copy image src to dst. Wraps av_picture_data_copy() above. |
| 4277 | */ | 4282 | */ |
| @@ -366,6 +366,8 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, · 365 unmodified lines | |||
| 366 | return 0; | 366 | return 0; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | #if FF_API_DEINTERLACE | ||
| 370 | |||
| 369 | #if !HAVE_MMX_EXTERNAL | 371 | #if !HAVE_MMX_EXTERNAL |
| 370 | /* filter parameters: [-1 4 2 4 -1] // 8 */ | 372 | /* filter parameters: [-1 4 2 4 -1] // 8 */ |
| 371 | static void deinterlace_line_c(uint8_t *dst, | 373 | static void deinterlace_line_c(uint8_t *dst, |
| @@ -524,3 +526,5 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, · 152 unmodified lines | |||
| 524 | emms_c(); | 526 | emms_c(); |
| 525 | return 0; | 527 | return 0; |
| 526 | } | 528 | } |
| 529 | |||
| 530 | #endif /* FF_API_DEINTERLACE */ | ||
| @@ -97,5 +97,8 @@ · 96 unmodified lines | |||
| 97 | #ifndef FF_API_IDCT | 97 | #ifndef FF_API_IDCT |
| 98 | #define FF_API_IDCT (LIBAVCODEC_VERSION_MAJOR < 55) | 98 | #define FF_API_IDCT (LIBAVCODEC_VERSION_MAJOR < 55) |
| 99 | #endif | 99 | #endif |
| 100 | #ifndef FF_API_DEINTERLACE | ||
| 101 | #define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 56) | ||
| 102 | #endif | ||
| 100 | 103 | ||
| 101 | #endif /* AVCODEC_VERSION_H */ | 104 | #endif /* AVCODEC_VERSION_H */ |