[soc]: r4010 - in libavfilter: allfilters.c checkout.sh diffs/01_ffplay_filters.diff diffs/02_ffmpeg_filters.diff
Author: stefano Date: Mon Jan 26 22:28:54 2009 New Revision: 4010 Log: Update to FFmpeg r16809. Modified: libavfilter/allfilters.c libavfilter/checkout.sh libavfilter/diffs/01_ffplay_filters.diff libavfilter/diffs/02_ffmpeg_filters.diff Modified: libavfilter/allfilters.c ============================================================================== --- libavfilter/allfilters.c Mon Jan 26 20:20:40 2009 (r4009) +++ libavfilter/allfilters.c Mon Jan 26 22:28:54 2009 (r4010) @@ -24,7 +24,7 @@ #define REGISTER_FILTER(X,x,y) { \ extern AVFilter avfilter_##y##_##x ; \ - if(ENABLE_##X##_FILTER ) avfilter_register(&avfilter_##y##_##x ); } + if(CONFIG_##X##_FILTER ) avfilter_register(&avfilter_##y##_##x ); } void avfilter_register_all(void) { Modified: libavfilter/checkout.sh ============================================================================== --- libavfilter/checkout.sh Mon Jan 26 20:20:40 2009 (r4009) +++ libavfilter/checkout.sh Mon Jan 26 22:28:54 2009 (r4010) @@ -1,7 +1,7 @@ #! /bin/sh echo "checking out pristine ffmpeg" -svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r16562 +svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r16809 echo "patching ffmpeg" for diff in $(ls $(pwd)/diffs/*.diff); do patch -d ffmpeg -p0 -i $diff; done Modified: libavfilter/diffs/01_ffplay_filters.diff ============================================================================== --- libavfilter/diffs/01_ffplay_filters.diff Mon Jan 26 20:20:40 2009 (r4009) +++ libavfilter/diffs/01_ffplay_filters.diff Mon Jan 26 22:28:54 2009 (r4010) @@ -1,12 +1,12 @@ Index: ffplay.c =================================================================== ---- ffplay.c (revision 16562) +--- ffplay.c (revision 16809) +++ ffplay.c (working copy) @@ -29,6 +29,12 @@ #include "libavcodec/audioconvert.h" #include "libavcodec/opt.h" -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +# include "libavfilter/avfilter.h" +# include "libavfilter/avfiltergraph.h" +# include "libavfilter/graphparser.h" @@ -19,7 +19,7 @@ Index: ffplay.c /* NOTE: the size must be big enough to compensate the hardware audio buffersize size */ #define SAMPLE_ARRAY_SIZE (2*65536) -+#if !ENABLE_AVFILTER ++#if !CONFIG_AVFILTER static int sws_flags = SWS_BICUBIC; +#endif @@ -32,7 +32,7 @@ Index: ffplay.c + enum PixelFormat pix_fmt; int allocated; + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + AVFilterPicRef *picref; +#endif } VideoPicture; @@ -43,7 +43,7 @@ Index: ffplay.c char filename[1024]; int width, height, xleft, ytop; + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + AVFilterContext *out_video_filter; ///<the last filter in the video chain +#endif } VideoState; @@ -53,7 +53,7 @@ Index: ffplay.c static int error_recognition = FF_ER_CAREFUL; static int error_concealment = 3; static int decoder_reorder_pts= 0; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +static char *vfilters = NULL; +#endif @@ -63,7 +63,7 @@ Index: ffplay.c vp = &is->pictq[is->pictq_rindex]; if (vp->bmp) { -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if (vp->picref->pixel_aspect.num == 0) + aspect_ratio = 0; + else @@ -89,7 +89,7 @@ Index: ffplay.c } else if(!is_full_screen && screen_width){ w = screen_width; h = screen_height; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + }else if (is->out_video_filter && is->out_video_filter->inputs[0]){ + w = is->out_video_filter->inputs[0]->w; + h = is->out_video_filter->inputs[0]->h; @@ -105,7 +105,7 @@ Index: ffplay.c if (vp->bmp) SDL_FreeYUVOverlay(vp->bmp); -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if (vp->picref) + avfilter_unref_pic(vp->picref); + vp->picref = NULL; @@ -140,7 +140,7 @@ Index: ffplay.c VideoPicture *vp; int dst_pix_fmt; AVPicture pict; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + AVPicture pict_src; +#else static struct SwsContext *img_convert_ctx; @@ -153,7 +153,7 @@ Index: ffplay.c /* alloc or resize hardware picture buffer */ if (!vp->bmp || -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + vp->width != is->out_video_filter->inputs[0]->w || + vp->height != is->out_video_filter->inputs[0]->h) { +#else @@ -167,7 +167,7 @@ Index: ffplay.c /* if the frame is not skipped, then display it */ if (vp->bmp) { -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if(vp->picref) + avfilter_unref_pic(vp->picref); + vp->picref = src_frame->opaque; @@ -181,7 +181,7 @@ Index: ffplay.c pict.linesize[1] = vp->bmp->pitches[2]; pict.linesize[2] = vp->bmp->pitches[1]; + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + pict_src.data[0] = src_frame->data[0]; + pict_src.data[1] = src_frame->data[1]; + pict_src.data[2] = src_frame->data[2]; @@ -253,7 +253,7 @@ Index: ffplay.c + return 0; +} + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +typedef struct { + VideoState *is; + AVFrame *frame; @@ -388,7 +388,7 @@ Index: ffplay.c + { .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = NULL }}, +}; -+#endif /* ENABLE_AVFILTER */ ++#endif /* CONFIG_AVFILTER */ + static int video_thread(void *arg) { @@ -401,7 +401,7 @@ Index: ffplay.c + int ret; + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + AVFilterContext *filt_src = NULL, *filt_out = NULL; + AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph)); + @@ -443,7 +443,7 @@ Index: ffplay.c + for(;;) { - while (is->paused && !is->videoq.abort_request) { -+#if !ENABLE_AVFILTER ++#if !CONFIG_AVFILTER + AVPacket pkt; +#endif + while (is->paused && !is->videoq.abort_request) @@ -451,7 +451,7 @@ Index: ffplay.c - } - if (packet_queue_get(&is->videoq, pkt, 1) < 0) - break; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + ret = get_filtered_video_frame(filt_out, frame, &pts_int); +#else + ret = get_video_frame(is, frame, &pts_int, &pkt); @@ -474,7 +474,7 @@ Index: ffplay.c + pts = pts_int; + pts /= AV_TIME_BASE; + ret = output_picture2(is, frame, pts); -+#if !ENABLE_AVFILTER ++#if !CONFIG_AVFILTER + av_free_packet(&pkt); +#endif + if (ret < 0) @@ -501,17 +501,17 @@ Index: ffplay.c stream_pause(cur_stream); } the_end: -+ #if ENABLE_AVFILTER ++ #if CONFIG_AVFILTER + avfilter_destroy_graph(graph); + #endif av_free(frame); return 0; } -@@ -2170,6 +2451,12 @@ +@@ -2168,6 +2449,12 @@ /* free all pictures */ for(i=0;i<VIDEO_PICTURE_QUEUE_SIZE; i++) { vp = &is->pictq[i]; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if (vp->picref) { + avfilter_unref_pic(vp->picref); + vp->picref = NULL; @@ -520,21 +520,21 @@ Index: ffplay.c if (vp->bmp) { SDL_FreeYUVOverlay(vp->bmp); vp->bmp = NULL; -@@ -2507,6 +2794,9 @@ +@@ -2505,6 +2792,9 @@ { "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options", "bit_mask" }, { "sync", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" }, { "threads", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" }, -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + { "vfilters", OPT_STRING | HAS_ARG, {(void*)&vfilters}, "video filters", "filter list" }, +#endif { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, { NULL, }, }; -@@ -2555,7 +2845,9 @@ +@@ -2553,7 +2843,9 @@ avctx_opts[i]= avcodec_alloc_context2(i); } avformat_opts = av_alloc_format_context(); -+#if !ENABLE_AVFILTER ++#if !CONFIG_AVFILTER sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL); +#endif Modified: libavfilter/diffs/02_ffmpeg_filters.diff ============================================================================== --- libavfilter/diffs/02_ffmpeg_filters.diff Mon Jan 26 20:20:40 2009 (r4009) +++ libavfilter/diffs/02_ffmpeg_filters.diff Mon Jan 26 22:28:54 2009 (r4010) @@ -1,26 +1,26 @@ Index: ffmpeg.c =================================================================== ---- ffmpeg.c (revision 16562) +--- ffmpeg.c (revision 16809) +++ ffmpeg.c (working copy) @@ -41,6 +41,13 @@ #include "libavutil/avstring.h" #include "libavformat/os_support.h" -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +# include "libavfilter/avfilter.h" +# include "libavfilter/avfiltergraph.h" +# include "libavfilter/graphparser.h" +# include "libavfilter/vsrc_buffer.h" +#endif + - #ifdef HAVE_SYS_RESOURCE_H + #if HAVE_SYS_RESOURCE_H #include <sys/types.h> #include <sys/resource.h> @@ -148,6 +155,9 @@ static int loop_input = 0; static int loop_output = AVFMT_NOOUTPUTLOOP; static int qp_hist = 0; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +static char *vfilters = NULL; +#endif @@ -30,7 +30,7 @@ Index: ffmpeg.c is not defined */ int64_t pts; /* current pts */ int is_start; /* is 1 at the start and after a discontinuity */ -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + AVFilterContext *out_video_filter; + AVFilterContext *input_video_filter; + AVFrame *filter_frame; @@ -44,7 +44,7 @@ Index: ffmpeg.c static struct termios oldtty; #endif -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER +typedef struct { + int pix_fmt; +} FilterOutPriv; @@ -210,16 +210,16 @@ Index: ffmpeg.c + + return 0; +} -+#endif /* ENABLE_AVFILTER */ ++#endif /* CONFIG_AVFILTER */ + static void term_exit(void) { - #ifdef HAVE_TERMIOS_H + #if HAVE_TERMIOS_H @@ -886,6 +1071,9 @@ if (nb_frames <= 0) return; -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + formatted_picture = in_picture; +#else if (ost->video_crop) { @@ -237,7 +237,7 @@ Index: ffmpeg.c } } -+#if !ENABLE_AVFILTER ++#if !CONFIG_AVFILTER if (ost->video_resample) { padding_src = NULL; final_picture = &ost->pict_tmp; @@ -260,7 +260,7 @@ Index: ffmpeg.c &buffer_to_free); } -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO && ist->input_video_filter) { + // add it to be filtered + av_vsrc_buffer_add_frame(ist->input_video_filter, &picture, @@ -282,7 +282,7 @@ Index: ffmpeg.c /* if output time reached then transcode raw format, encode packets and output them */ if (start_time == 0 || ist->pts >= start_time) -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + while(loop) { + if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO && ist->out_video_filter) + get_filtered_video_pic(ist->out_video_filter, &ist->picref, &picture, &ist->pts); @@ -294,7 +294,7 @@ Index: ffmpeg.c do_audio_out(os, ost, ist, data_buf, data_size); break; case CODEC_TYPE_VIDEO: -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + ost->st->codec->sample_aspect_ratio = ist->picref->pixel_aspect; +#endif do_video_out(os, ost, ist, &picture, &frame_size); @@ -308,7 +308,7 @@ Index: ffmpeg.c + ist->out_video_filter && avfilter_poll_frame(ist->out_video_filter->inputs[0]); } + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if(ist->picref) + avfilter_unref_pic(ist->picref); + } @@ -316,11 +316,11 @@ Index: ffmpeg.c av_free(buffer_to_free); /* XXX: allocate the subtitles in the codec ? */ if (subtitle_to_free) { -@@ -1840,10 +2058,21 @@ +@@ -1842,10 +2060,21 @@ fprintf(stderr, "Cannot get resampling context\n"); av_exit(1); } -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + ost->resample_height = icodec->height; +#else ost->resample_height = icodec->height - (frame_topBand + frame_bottomBand); @@ -329,7 +329,7 @@ Index: ffmpeg.c ost->encoding_needed = 1; ist->decoding_needed = 1; + -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + if (configure_filters(ist, ost)) { + fprintf(stderr, "Error opening filters!\n"); + exit(1); @@ -338,11 +338,11 @@ Index: ffmpeg.c break; case CODEC_TYPE_SUBTITLE: ost->encoding_needed = 1; -@@ -3831,6 +4060,9 @@ - #ifdef CONFIG_VHOOK +@@ -3835,6 +4064,9 @@ + #if CONFIG_VHOOK { "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" }, #endif -+#if ENABLE_AVFILTER ++#if CONFIG_AVFILTER + { "vfilters", OPT_STRING | HAS_ARG, {(void*)&vfilters}, "video filters", "filter list" }, +#endif { "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
participants (1)
-
stefano