[FFmpeg-cvslog] avcodec/wma: remove unneeded #includes, there are no assert() only av_assert*
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 30 02:26:17 2015 +0100| [305cbe76d327cdd9642f383cbbee52430703e3b5] | committer: Michael Niedermayer avcodec/wma: remove unneeded #includes, there are no assert() only av_assert* Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=305cbe76d327cdd9642f383cbbee52430703e3b5 --- libavcodec/wma.c|3 --- libavcodec/wmadec.c |3 --- 2 files changed, 6 deletions(-) diff --git a/libavcodec/wma.c b/libavcodec/wma.c index fa5c887..3bc6099 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -28,9 +28,6 @@ #include "wma_freqs.h" #include "wmadata.h" -#undef NDEBUG -#include - /* XXX: use same run/length optimization as mpeg decoders */ // FIXME maybe split decode / encode or pass flag static av_cold int init_coef_vlc(VLC *vlc, uint16_t **prun_table, diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 79e7b0c..d80bd2b 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -39,9 +39,6 @@ #include "internal.h" #include "wma.h" -#undef NDEBUG -#include - #define EXPVLCBITS 8 #define EXPMAX ((19 + EXPVLCBITS - 1) / EXPVLCBITS) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/aacdec: remove unneeded #include, theres no assert() in aacdec
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 30 02:29:38 2015 +0100| [a73c4118092d24eef11c87c281f651d3e7b394e7] | committer: Michael Niedermayer avcodec/aacdec: remove unneeded #include, theres no assert() in aacdec Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a73c4118092d24eef11c87c281f651d3e7b394e7 --- libavcodec/aacdec.c |1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index d00b3d0..1c69634 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -102,7 +102,6 @@ #include "aacadtsdec.h" #include "libavutil/intfloat.h" -#include #include #include #include ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc: Check for av_malloc failure
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 30 00:42:48 2015 +0100| [2b215b7f5af0ef9be79c697d8990e6958a134f98] | committer: Michael Niedermayer avcodec/hevc: Check for av_malloc failure Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b215b7f5af0ef9be79c697d8990e6958a134f98 --- libavcodec/hevc.c |8 1 file changed, 8 insertions(+) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 036425e..7db32f7 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2398,6 +2398,12 @@ static int hls_slice_data_wpp(HEVCContext *s, const uint8_t *nal, int length) int startheader, cmpt = 0; int i, j, res = 0; +if (!ret || !arg) { +av_free(ret); +av_free(arg); +return AVERROR(ENOMEM); +} + if (!s->sList[1]) { ff_alloc_entries(s->avctx, s->sh.num_entry_point_offsets + 1); @@ -2933,6 +2939,8 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) s->skipped_bytes_pos_size_nal[s->nals_allocated] = 1024; // initial buffer size s->skipped_bytes_pos_nal[s->nals_allocated] = av_malloc_array(s->skipped_bytes_pos_size_nal[s->nals_allocated], sizeof(*s->skipped_bytes_pos)); +if (!s->skipped_bytes_pos_nal[s->nals_allocated]) +goto fail; s->nals_allocated = new_size; } s->skipped_bytes_pos_size = s->skipped_bytes_pos_size_nal[s->nb_nals]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc: Replace more mallocs by av_malloc_array()
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 30 00:42:03 2015 +0100| [5008605bf25c78f13a4d6c422e8c35d88254d996] | committer: Michael Niedermayer avcodec/hevc: Replace more mallocs by av_malloc_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5008605bf25c78f13a4d6c422e8c35d88254d996 --- libavcodec/hevc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 641f4c1..036425e 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -97,14 +97,14 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) if (!s->sao || !s->deblock) goto fail; -s->skip_flag= av_malloc(sps->min_cb_height * sps->min_cb_width); +s->skip_flag= av_malloc_array(sps->min_cb_height, sps->min_cb_width); s->tab_ct_depth = av_malloc_array(sps->min_cb_height, sps->min_cb_width); if (!s->skip_flag || !s->tab_ct_depth) goto fail; s->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height); s->tab_ipm = av_mallocz(min_pu_size); -s->is_pcm = av_malloc((sps->min_pu_width + 1) * (sps->min_pu_height + 1)); +s->is_pcm = av_malloc_array(sps->min_pu_width + 1, sps->min_pu_height + 1); if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm) goto fail; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ccaption_dec: Adding color and fonts for future use in screen
ffmpeg | branch: master | Anshul Maheshwari | Tue Jan 20 16:20:29 2015 +0530| [93fac23b80e4cb92291ebd61c86d6c57cad41848] | committer: Michael Niedermayer avcodec/ccaption_dec: Adding color and fonts for future use in screen Signed-off-by: Anshul Maheshwari Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93fac23b80e4cb92291ebd61c86d6c57cad41848 --- libavcodec/ccaption_dec.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index 1666797..9e78ee5 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -137,6 +137,8 @@ static const uint8_t parity_table[256] = { 0, 1, 1, 0, 1, 0, 0, 1, struct Screen { /* +1 is used to compensate null character of string */ uint8_t characters[SCREEN_ROWS][SCREEN_COLUMNS+1]; +uint8_t colors[SCREEN_ROWS][SCREEN_COLUMNS+1]; +uint8_t fonts[SCREEN_ROWS][SCREEN_COLUMNS+1]; /* * Bitmask of used rows; if a bit is not set, the * corresponding row is not used. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/indevs: add some XCB info to x11grab
ffmpeg | branch: master | Lou Logan | Wed Jan 28 09:35:31 2015 -0900| [961f2e3aace04411c6f5f95fe9c24d8d6deb8911] | committer: Lou Logan doc/indevs: add some XCB info to x11grab Signed-off-by: Lou Logan > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=961f2e3aace04411c6f5f95fe9c24d8d6deb8911 --- doc/indevs.texi | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index ae61331..bd09f3f 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -975,8 +975,12 @@ other filename will be interpreted as device number 0. X11 video input device. -Depends on X11, Xext, and Xfixes. Requires the configure option -@code{--enable-x11grab}. +To enable this input device during configuration you need libxcb +installed on your system. It will be automatically detected during +configuration. + +Alternatively, the configure option @option{--enable-x11grab} exists +for legacy Xlib users. This device allows one to capture a region of an X11 display. @@ -994,10 +998,12 @@ omitted, and defaults to "localhost". The environment variable area with respect to the top-left border of the X11 screen. They default to 0. -Check the X11 documentation (e.g. man X) for more detailed information. +Check the X11 documentation (e.g. @command{man X}) for more detailed +information. -Use the @command{dpyinfo} program for getting basic information about the -properties of your X11 display (e.g. grep for "name" or "dimensions"). +Use the @command{xdpyinfo} program for getting basic information about +the properties of your X11 display (e.g. grep for "name" or +"dimensions"). For example to grab from @file{:0.0} using @command{ffmpeg}: @example @@ -1046,6 +1052,10 @@ If @var{show_region} is specified with @code{1}, then the grabbing region will be indicated on screen. With this option, it is easy to know what is being grabbed if only a portion of the screen is grabbed. +@item region_border +Set the region border thickness if @option{-show_region 1} is used. +Range is 1 to 128 and default is 3 (XCB-based x11grab only). + For example: @example ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg @@ -1061,7 +1071,8 @@ Set the video frame size. Default value is @code{vga}. @item use_shm Use the MIT-SHM extension for shared memory. Default value is @code{1}. -It may be necessary to disable it for remote displays. +It may be necessary to disable it for remote displays (legacy x11grab +only). @end table @section decklink ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] hqdn3d: check memory allocations and propagate errors
ffmpeg | branch: master | Vittorio Giovara | Thu Jan 29 15:55:19 2015 +| [22b985d59c007c4422aefe3ef3fca0aa0daafa9f] | committer: Vittorio Giovara hqdn3d: check memory allocations and propagate errors > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22b985d59c007c4422aefe3ef3fca0aa0daafa9f --- libavfilter/vf_hqdn3d.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index be6b761..7f47a56 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -121,11 +121,11 @@ static void denoise_spatial(HQDN3DContext *s, } av_always_inline -static void denoise_depth(HQDN3DContext *s, - uint8_t *src, uint8_t *dst, - uint16_t *line_ant, uint16_t **frame_ant_ptr, - int w, int h, int sstride, int dstride, - int16_t *spatial, int16_t *temporal, int depth) +static int denoise_depth(HQDN3DContext *s, + uint8_t *src, uint8_t *dst, + uint16_t *line_ant, uint16_t **frame_ant_ptr, + int w, int h, int sstride, int dstride, + int16_t *spatial, int16_t *temporal, int depth) { // FIXME: For 16bit depth, frame_ant could be a pointer to the previous // filtered frame rather than a separate buffer. @@ -134,6 +134,8 @@ static void denoise_depth(HQDN3DContext *s, if (!frame_ant) { uint8_t *frame_src = src; *frame_ant_ptr = frame_ant = av_malloc(w*h*sizeof(uint16_t)); +if (!frame_ant) +return AVERROR(ENOMEM); for (y = 0; y < h; y++, src += sstride, frame_ant += w) for (x = 0; x < w; x++) frame_ant[x] = LOAD(x); @@ -148,15 +150,25 @@ static void denoise_depth(HQDN3DContext *s, denoise_temporal(src, dst, frame_ant, w, h, sstride, dstride, temporal, depth); emms_c(); +return 0; } -#define denoise(...) \ -switch (s->depth) {\ -case 8: denoise_depth(__VA_ARGS__, 8); break;\ -case 9: denoise_depth(__VA_ARGS__, 9); break;\ -case 10: denoise_depth(__VA_ARGS__, 10); break;\ -case 16: denoise_depth(__VA_ARGS__, 16); break;\ -} +#define denoise(...) \ +do { \ +int ret = AVERROR_INVALIDDATA;\ +switch (s->depth) { \ +case 8: ret = denoise_depth(__VA_ARGS__, 8); break; \ +case 9: ret = denoise_depth(__VA_ARGS__, 9); break; \ +case 10: ret = denoise_depth(__VA_ARGS__, 10); break; \ +case 16: ret = denoise_depth(__VA_ARGS__, 16); break; \ +} \ +if (ret < 0) {\ +av_frame_free(&out); \ +if (!direct) \ +av_frame_free(&in); \ +return ret; \ +} \ +} while (0) static int16_t *precalc_coefs(double dist25, int depth) { @@ -280,13 +292,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) HQDN3DContext *s = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *out; -int direct, c; +int c, direct = av_frame_is_writable(in); -if (av_frame_is_writable(in)) { -direct = 1; +if (direct) { out = in; } else { -direct = 0; out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '22b985d59c007c4422aefe3ef3fca0aa0daafa9f'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 22:43:36 2015 +0100| [fb59b14ffbc2a6c1d402c8cae3cdf30f1a6e] | committer: Michael Niedermayer Merge commit '22b985d59c007c4422aefe3ef3fca0aa0daafa9f' * commit '22b985d59c007c4422aefe3ef3fca0aa0daafa9f': hqdn3d: check memory allocations and propagate errors Conflicts: libavfilter/vf_hqdn3d.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb59b14ffbc2a6c1d402c8cae3cdf30f1a6e --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '70d246d5cc3d214da11f711d997d8cbd8c3a23d1'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 22:34:54 2015 +0100| [89c35b113060a00bc57ee67c5ebc29ea500d5160] | committer: Michael Niedermayer Merge commit '70d246d5cc3d214da11f711d997d8cbd8c3a23d1' * commit '70d246d5cc3d214da11f711d997d8cbd8c3a23d1': flacenc: initialize sums matrix Conflicts: libavcodec/flacenc.c No change, the table does not exist in FFmpeg in this form anymore Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89c35b113060a00bc57ee67c5ebc29ea500d5160 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] flacenc: initialize sums matrix
ffmpeg | branch: master | Vittorio Giovara | Wed Jan 28 14:41:02 2015 +| [70d246d5cc3d214da11f711d997d8cbd8c3a23d1] | committer: Vittorio Giovara flacenc: initialize sums matrix CC: libav-sta...@libav.org Bug-Id: CID 703821 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70d246d5cc3d214da11f711d997d8cbd8c3a23d1 --- libavcodec/flacenc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 1160da2..2277cf3 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -617,7 +617,7 @@ static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax, int opt_porder; RiceContext tmp_rc; uint32_t *udata; -uint64_t sums[MAX_PARTITION_ORDER+1][MAX_PARTITIONS]; +uint64_t sums[MAX_PARTITION_ORDER + 1][MAX_PARTITIONS] = { { 0 } }; assert(pmin >= 0 && pmin <= MAX_PARTITION_ORDER); assert(pmax >= 0 && pmax <= MAX_PARTITION_ORDER); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ituh263dec: use macro instead of #if
ffmpeg | branch: master | Vittorio Giovara | Wed Jan 28 15:42:50 2015 +| [c01bb13f464e74bb8498a8c573a66c430ca0] | committer: Vittorio Giovara ituh263dec: use macro instead of #if > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c01bb13f464e74bb8498a8c573a66c430ca0 --- libavcodec/ituh263dec.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index da78e5d..e198f65 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -456,8 +456,7 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block, } } else if (s->mb_intra) { /* DC coef */ -if(s->codec_id == AV_CODEC_ID_RV10){ -#if CONFIG_RV10_DECODER +if (CONFIG_RV10_DECODER && s->codec_id == AV_CODEC_ID_RV10) { if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) { int component, diff; component = (n <= 3 ? 0 : n - 4 + 1); @@ -477,7 +476,6 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block, if (level == 255) level = 128; } -#endif }else{ level = get_bits(&s->gb, 8); if((level&0x7F) == 0){ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'c01ccccbb13f464e74bb8498a8c573a66c430ca0'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 22:02:03 2015 +0100| [c16896f52551116aa3dda7b60854f0b044913105] | committer: Michael Niedermayer Merge commit 'c01bb13f464e74bb8498a8c573a66c430ca0' * commit 'c01bb13f464e74bb8498a8c573a66c430ca0': ituh263dec: use macro instead of #if Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c16896f52551116aa3dda7b60854f0b044913105 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] yuv4mpegdec: initialize field_order in yuv4_read_header()
ffmpeg | branch: master | Vittorio Giovara | Wed Jan 28 14:41:00 2015 +| [08fa34bf75942f66796d770ff42a3721b2e3d2d4] | committer: Vittorio Giovara yuv4mpegdec: initialize field_order in yuv4_read_header() CC: libav-sta...@libav.org Bug-Id: CID 1265721 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08fa34bf75942f66796d770ff42a3721b2e3d2d4 --- libavformat/yuv4mpegdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index e5c4456..dd81358 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -38,8 +38,8 @@ static int yuv4_read_header(AVFormatContext *s) rated = 0, aspectn = 0, aspectd = 0; enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE, alt_pix_fmt = AV_PIX_FMT_NONE; enum AVChromaLocation chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; +enum AVFieldOrder field_order = AV_FIELD_UNKNOWN; AVStream *st; -enum AVFieldOrder field_order; for (i = 0; i < MAX_YUV4_HEADER; i++) { header[i] = avio_r8(pb); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '08fa34bf75942f66796d770ff42a3721b2e3d2d4'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 21:55:02 2015 +0100| [c2ad22ff9934eb9324ad8be98f0f5790e4947859] | committer: Michael Niedermayer Merge commit '08fa34bf75942f66796d770ff42a3721b2e3d2d4' * commit '08fa34bf75942f66796d770ff42a3721b2e3d2d4': yuv4mpegdec: initialize field_order in yuv4_read_header() Conflicts: libavformat/yuv4mpegdec.c See: 52a17972defa118705a4020a6d0bb3ad277df819 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2ad22ff9934eb9324ad8be98f0f5790e4947859 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpegvideo_enc: initialize the encoding context
ffmpeg | branch: master | Vittorio Giovara | Wed Jan 28 14:41:01 2015 +| [302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a] | committer: Vittorio Giovara mpegvideo_enc: initialize the encoding context This prevents several uninitialized variable uses that take place towards the end of encoding. CC: libav-sta...@libav.org Bug-Id: CID 700760 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a --- libavcodec/mpegvideo_enc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index be6fb08..9e155b0 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2538,7 +2538,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ int mb_x, mb_y, pdif = 0; int chr_h= 16>>s->chroma_y_shift; int i, j; -MpegEncContext best_s, backup_s; +MpegEncContext best_s = { 0 }, backup_s; uint8_t bit_buf[2][MAX_MB_BYTES]; uint8_t bit_buf2[2][MAX_MB_BYTES]; uint8_t bit_buf_tex[2][MAX_MB_BYTES]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 21:35:21 2015 +0100| [e18e5ae62ce29c51a80441369d6d036d171a8d13] | committer: Michael Niedermayer Merge commit '302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a' * commit '302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a': mpegvideo_enc: initialize the encoding context Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e18e5ae62ce29c51a80441369d6d036d171a8d13 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '1a07df31128da3a0020b66502399989b91770d44'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 21:11:27 2015 +0100| [56252a5e097946be03ba67664d5efc20703a17a1] | committer: Michael Niedermayer Merge commit '1a07df31128da3a0020b66502399989b91770d44' * commit '1a07df31128da3a0020b66502399989b91770d44': DNxHD: Add support for id 1258 (DNx100 960x720@8) Conflicts: Changelog libavcodec/dnxhddata.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56252a5e097946be03ba67664d5efc20703a17a1 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] DNxHD: Add support for id 1258 (DNx100 960x720@8)
ffmpeg | branch: master | Vittorio Giovara | Tue Jan 27 20:56:20 2015 +| [1a07df31128da3a0020b66502399989b91770d44] | committer: Vittorio Giovara DNxHD: Add support for id 1258 (DNx100 960x720@8) Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a07df31128da3a0020b66502399989b91770d44 --- Changelog |1 + libavcodec/dnxhddata.c | 37 + libavcodec/dnxhddec.c |9 + 3 files changed, 47 insertions(+) diff --git a/Changelog b/Changelog index 32f5ec4..f9be9ed 100644 --- a/Changelog +++ b/Changelog @@ -11,6 +11,7 @@ version : - RTP/mpegts muxer - VP8 in Ogg demuxing - OpenH264 encoder wrapper +- Support DNx100 (960x720@8) version 11: diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index 0edaeec..b23e337 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -231,6 +231,28 @@ static const uint8_t dnxhd_1256_chroma_weight[] = { 34, 37, 39, 44, 51, 56, 61, 70, }; +static const uint8_t dnxhd_1258_luma_weight[] = { + 0, 32, 36, 36, 40, 40, 55, 60, +34, 36, 37, 40, 41, 48, 57, 82, +35, 36, 41, 41, 46, 52, 73, 82, +37, 40, 42, 45, 50, 65, 80, 87, +39, 41, 44, 49, 62, 78, 88, 90, +41, 44, 49, 58, 73, 90, 95, 95, +43, 52, 55, 68, 90, 100, 97, 93, +52, 53, 71, 82, 107, 103, 99, 99, +}; + +static const uint8_t dnxhd_1258_chroma_weight[] = { + 0, 32, 37, 38, 49, 53, 65, 66, +35, 37, 40, 49, 56, 64, 65, 82, +36, 42, 50, 56, 64, 67, 73, 85, +46, 50, 57, 63, 71, 72, 89, 87, +49, 58, 65, 72, 78, 88, 88, 90, +60, 64, 74, 81, 84, 90, 95, 134, +62, 74, 77, 80, 90, 114, 129, 125, +74, 74, 90, 100, 128, 125, 116, 116, +}; + static const uint8_t dnxhd_1237_dc_codes[12] = { 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, }; @@ -1073,6 +1095,14 @@ static const uint8_t dnxhd_1252_ac_index_flag[257] = { 1, }; +static const uint8_t dnxhd_1258_dc_codes[14] = { +0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, 0, 0, +}; + +static const uint8_t dnxhd_1258_dc_bits[14] = { +3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, 0, 0, +}; + const CIDEntry ff_dnxhd_cid_table[] = { { 1235, 1920, 1080, 0, 917504, 917504, 6, 10, dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight, @@ -1151,6 +1181,13 @@ const CIDEntry ff_dnxhd_cid_table[] = { dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag, dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run, { 350, 390, 440, 730, 880 } }, +{ 1258, 960, 720, 0, 212992, 212992, 4, 8, + dnxhd_1258_luma_weight, dnxhd_1258_chroma_weight, + dnxhd_1258_dc_codes, dnxhd_1258_dc_bits, + dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level, + dnxhd_1252_ac_run_flag, dnxhd_1252_ac_index_flag, + dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run, + { 42, 60, 75, 115 } }, }; int ff_dnxhd_get_cid_table(int cid) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 9b1e481..eb00e86 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -165,6 +165,15 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, if ((ret = dnxhd_init_vlc(ctx, cid)) < 0) return ret; +// make sure profile size constraints are respected +// DNx100 allows 1920->1440 and 1280->960 subsampling +if (ctx->width != ctx->cid_table->width) { +av_reduce(&ctx->avctx->sample_aspect_ratio.num, + &ctx->avctx->sample_aspect_ratio.den, + ctx->width, ctx->cid_table->width, 255); +ctx->width = ctx->cid_table->width; +} + if (buf_size < ctx->cid_table->coding_unit_size) { av_log(ctx->avctx, AV_LOG_ERROR, "incorrect frame size (%d < %d).\n", buf_size, ctx->cid_table->coding_unit_size); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '598f7d046cbf306706623210c5baafa3b7cd1df3'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 20:54:25 2015 +0100| [64e7cf12532ecca43535db7a10303b99538a41dc] | committer: Michael Niedermayer Merge commit '598f7d046cbf306706623210c5baafa3b7cd1df3' * commit '598f7d046cbf306706623210c5baafa3b7cd1df3': DNxHD: Simplify pixel format detection Conflicts: libavcodec/dnxhddec.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64e7cf12532ecca43535db7a10303b99538a41dc --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] DNxHD: Simplify pixel format detection
ffmpeg | branch: master | Vittorio Giovara | Tue Jan 27 20:56:19 2015 +| [598f7d046cbf306706623210c5baafa3b7cd1df3] | committer: Vittorio Giovara DNxHD: Simplify pixel format detection Error out in case of unknown values. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=598f7d046cbf306706623210c5baafa3b7cd1df3 --- libavcodec/dnxhddec.c | 45 - 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 4f714d8..9b1e481 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -133,35 +133,30 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, av_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height); -ctx->is_444 = 0; -if (buf[0x4] == 0x2) { -ctx->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; -ctx->avctx->bits_per_raw_sample = 10; -if (ctx->bit_depth != 10) { -ff_blockdsp_init(&ctx->bdsp, ctx->avctx); -ff_idctdsp_init(&ctx->idsp, ctx->avctx); -ctx->bit_depth = 10; +if (!ctx->bit_depth) { +ff_blockdsp_init(&ctx->bdsp, ctx->avctx); +ff_idctdsp_init(&ctx->idsp, ctx->avctx); +} +if (buf[0x21] == 0x58) { /* 10 bit */ +ctx->bit_depth = ctx->avctx->bits_per_raw_sample = 10; + +if (buf[0x4] == 0x2) { ctx->decode_dct_block = dnxhd_decode_dct_block_10_444; -} -ctx->is_444 = 1; -} else if (buf[0x21] & 0x40) { -ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; -ctx->avctx->bits_per_raw_sample = 10; -if (ctx->bit_depth != 10) { -ff_blockdsp_init(&ctx->bdsp, ctx->avctx); -ff_idctdsp_init(&ctx->idsp, ctx->avctx); -ctx->bit_depth = 10; +ctx->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; +ctx->is_444 = 1; +} else { ctx->decode_dct_block = dnxhd_decode_dct_block_10; +ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; } -} else { +} else if (buf[0x21] == 0x38) { /* 8 bit */ +ctx->bit_depth = ctx->avctx->bits_per_raw_sample = 8; + ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P; -ctx->avctx->bits_per_raw_sample = 8; -if (ctx->bit_depth != 8) { -ff_blockdsp_init(&ctx->bdsp, ctx->avctx); -ff_idctdsp_init(&ctx->idsp, ctx->avctx); -ctx->bit_depth = 8; -ctx->decode_dct_block = dnxhd_decode_dct_block_8; -} +ctx->decode_dct_block = dnxhd_decode_dct_block_8; +} else { +av_log(ctx->avctx, AV_LOG_ERROR, "invalid bit depth value (%d).\n", + buf[0x21]); +return AVERROR_INVALIDDATA; } cid = AV_RB32(buf + 0x28); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '41e03e284ee7b0d4caa3a5d28681ad46e3105d65'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 20:38:35 2015 +0100| [e5b7e2224f62e9cb6697e664b7d1245302cca9e7] | committer: Michael Niedermayer Merge commit '41e03e284ee7b0d4caa3a5d28681ad46e3105d65' * commit '41e03e284ee7b0d4caa3a5d28681ad46e3105d65': DNxHD: More verbose error messages Conflicts: libavcodec/dnxhddec.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e5b7e2224f62e9cb6697e664b7d1245302cca9e7 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] DNxHD: More verbose error messages
ffmpeg | branch: master | Vittorio Giovara | Tue Jan 27 20:56:18 2015 +| [41e03e284ee7b0d4caa3a5d28681ad46e3105d65] | committer: Vittorio Giovara DNxHD: More verbose error messages > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41e03e284ee7b0d4caa3a5d28681ad46e3105d65 --- libavcodec/dnxhddec.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index ca67990..4f714d8 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -110,8 +110,11 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, static const uint8_t header_prefix444[] = { 0x00, 0x00, 0x02, 0x80, 0x02 }; int i, cid, ret; -if (buf_size < 0x280) +if (buf_size < 0x280) { +av_log(ctx->avctx, AV_LOG_ERROR, "buffer too small (%d < 640).\n", + buf_size); return AVERROR_INVALIDDATA; +} if (memcmp(buf, header_prefix, 5) && memcmp(buf, header_prefix444, 5)) { av_log(ctx->avctx, AV_LOG_ERROR, "error in header\n"); @@ -168,7 +171,8 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, return ret; if (buf_size < ctx->cid_table->coding_unit_size) { -av_log(ctx->avctx, AV_LOG_ERROR, "incorrect frame size\n"); +av_log(ctx->avctx, AV_LOG_ERROR, "incorrect frame size (%d < %d).\n", + buf_size, ctx->cid_table->coding_unit_size); return AVERROR_INVALIDDATA; } @@ -192,7 +196,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i << 2)); av_dlog(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]); if (buf_size < ctx->mb_scan_index[i] + 0x280) { -av_log(ctx->avctx, AV_LOG_ERROR, "invalid mb scan index\n"); +av_log(ctx->avctx, AV_LOG_ERROR, + "invalid mb scan index (%d < %d).\n", + buf_size, ctx->mb_scan_index[i] + 0x280); return AVERROR_INVALIDDATA; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavu: Check av_dict_set allocations
ffmpeg | branch: master | Luca Barbato | Tue Dec 16 14:21:20 2014 +0100| [1279221cc4d63bc4449df86ae7a98e633f8be425] | committer: Vittorio Giovara lavu: Check av_dict_set allocations Bug-Id: CID 1257772 Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1279221cc4d63bc4449df86ae7a98e633f8be425 --- libavutil/dict.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libavutil/dict.c b/libavutil/dict.c index e4ea776..7f48320 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -71,9 +71,12 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, AVDictionary *m = *pm; AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags); char *oldval = NULL; +int allocated = !!m; if (!m) m = *pm = av_mallocz(sizeof(*m)); +if (!m) +return AVERROR(ENOMEM); if (tag) { if (flags & AV_DICT_DONT_OVERWRITE) { @@ -88,12 +91,14 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, av_free(tag->key); *tag = m->elems[--m->count]; } else { -AVDictionaryEntry *tmp = av_realloc(m->elems, -(m->count + 1) * sizeof(*m->elems)); -if (tmp) -m->elems = tmp; -else -return AVERROR(ENOMEM); +int ret = av_reallocp_array(&m->elems, +m->count + 1, sizeof(*m->elems)); +if (ret < 0) { +if (allocated) +av_freep(pm); + +return ret; +} } if (value) { if (flags & AV_DICT_DONT_STRDUP_KEY) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '1279221cc4d63bc4449df86ae7a98e633f8be425'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 20:28:24 2015 +0100| [bcadf5d940e72fbd5f9c6a72dfdef7edcf551a33] | committer: Michael Niedermayer Merge commit '1279221cc4d63bc4449df86ae7a98e633f8be425' * commit '1279221cc4d63bc4449df86ae7a98e633f8be425': lavu: Check av_dict_set allocations Conflicts: libavutil/dict.c See: a963fdb0ea3fa6772ff8464838cd217a6369abfe Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bcadf5d940e72fbd5f9c6a72dfdef7edcf551a33 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/concatdec: avoid NULL dereference when failed to open file.
ffmpeg | branch: master | Zhang Rui | Thu Jan 29 17:55:32 2015 +0800| [038f3a173f59c9fc3396aa38e7972661da7ca504] | committer: Michael Niedermayer avformat/concatdec: avoid NULL dereference when failed to open file. Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=038f3a173f59c9fc3396aa38e7972661da7ca504 --- libavformat/concatdec.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index e109524..f07cfd7 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -482,6 +482,9 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt) ConcatStream *cs; AVStream *st; +if (!cat->avf) +return AVERROR(EIO); + while (1) { ret = av_read_frame(cat->avf, pkt); if (ret == AVERROR_EOF) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libopenh264: Log debug messages to a non-null context
ffmpeg | branch: master | Martin Storsjö | Wed Jan 28 22:17:29 2015 +0200| [6996fd204a7f28b46a8c3c97bcf223998218c743] | committer: Martin Storsjö libopenh264: Log debug messages to a non-null context Signed-off-by: Martin Storsjö > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6996fd204a7f28b46a8c3c97bcf223998218c743 --- libavcodec/libopenh264enc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 57343ce..459a0ef 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -192,7 +192,7 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, layer_size[layer] += fbi.sLayerInfo[layer].pNalLengthInByte[i]; size += layer_size[layer]; } -av_log(NULL, AV_LOG_DEBUG, "%d slices\n", fbi.sLayerInfo[fbi.iLayerNum - 1].iNalCount); +av_log(avctx, AV_LOG_DEBUG, "%d slices\n", fbi.sLayerInfo[fbi.iLayerNum - 1].iNalCount); if ((ret = ff_alloc_packet(avpkt, size))) { av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '6996fd204a7f28b46a8c3c97bcf223998218c743'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 14:13:16 2015 +0100| [d39fa69dfc64d96562d2d2707bf250493d53d34c] | committer: Michael Niedermayer Merge commit '6996fd204a7f28b46a8c3c97bcf223998218c743' * commit '6996fd204a7f28b46a8c3c97bcf223998218c743': libopenh264: Log debug messages to a non-null context Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d39fa69dfc64d96562d2d2707bf250493d53d34c --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: apply some updates to the Filtergraph syntax section
ffmpeg | branch: master | Stefano Sabatini | Tue Jan 27 12:47:29 2015 +0100| [d11fcf735f4ae916789d45b85a5da783f207f7ec] | committer: Stefano Sabatini doc/filters: apply some updates to the Filtergraph syntax section > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d11fcf735f4ae916789d45b85a5da783f207f7ec --- doc/filters.texi |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 009cab3..6fd192c 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -114,10 +114,11 @@ output pads is called a "sink". @anchor{Filtergraph syntax} @section Filtergraph syntax -A filtergraph has a textual representation, which is -recognized by the @option{-filter}/@option{-vf} and @option{-filter_complex} -options in @command{ffmpeg} and @option{-vf} in @command{ffplay}, and by the -@code{avfilter_graph_parse()}/@code{avfilter_graph_parse2()} functions defined in +A filtergraph has a textual representation, which is recognized by the +@option{-filter}/@option{-vf}/@option{-af} and +@option{-filter_complex} options in @command{ffmpeg} and +@option{-vf}/@option{-af} in @command{ffplay}, and by the +@code{avfilter_graph_parse_ptr()} function defined in @file{libavfilter/avfilter.h}. A filterchain consists of a sequence of connected filters, each one ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi: document assumptions about the input and output labels of a filter graph description
ffmpeg | branch: master | Stefano Sabatini | Tue Jan 27 13:21:56 2015 +0100| [af7b89e08be8c4b39fd70ef59f50c5940f0dd187] | committer: Stefano Sabatini lavfi: document assumptions about the input and output labels of a filter graph description > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af7b89e08be8c4b39fd70ef59f50c5940f0dd187 --- doc/filters.texi |4 libavfilter/avfilter.h |4 2 files changed, 8 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 6fd192c..cba2697 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -195,6 +195,10 @@ instance two input pads. The first output pad of split is labelled output pad of split is linked to the second input pad of overlay, which are both unlabelled. +In a filter description, if the input label of the first filter is not +specified, "in" is assumed; if the output label of the last filter is not +specified, "out" is assumed. + In a complete filterchain all the unlabelled filter input and output pads must be connected. A filtergraph is considered valid if all the filter input and output pads of all the filterchains are connected. diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b5220b9..d296536 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -1419,6 +1419,10 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, /** * Add a graph described by a string to a graph. * + * In the graph filters description, if the input label of the first + * filter is not specified, "in" is assumed; if the output label of + * the last filter is not specified, "out" is assumed. + * * @param graph the filter graph where to link the parsed graph context * @param filters string to be parsed * @param inputs pointer to a linked list to the inputs of the graph, may be NULL. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] examples/filtering: extend comments about setting the filter graph endpoints
ffmpeg | branch: master | Stefano Sabatini | Tue Jan 27 13:22:48 2015 +0100| [d43c1ec684ced58e2d4288c850ea774f06df9d23] | committer: Stefano Sabatini examples/filtering: extend comments about setting the filter graph endpoints That part is a constant source of confusions for readers, this should help clarify the apparently inverted logic. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d43c1ec684ced58e2d4288c850ea774f06df9d23 --- doc/examples/filtering_audio.c | 18 +- doc/examples/filtering_video.c | 18 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index 46595fb..f5cb8eb 100644 --- a/doc/examples/filtering_audio.c +++ b/doc/examples/filtering_audio.c @@ -145,12 +145,28 @@ static int init_filters(const char *filters_descr) goto end; } -/* Endpoints for the filter graph. */ +/* + * Set the endpoints for the filter graph. The filter_graph will + * be linked to the graph described by filters_descr. + */ + +/* + * The buffer source output must be connected to the input pad of + * the first filter described by filters_descr; since the first + * filter input label is not specified, it is set to "in" by + * default. + */ outputs->name = av_strdup("in"); outputs->filter_ctx = buffersrc_ctx; outputs->pad_idx= 0; outputs->next = NULL; +/* + * The buffer sink input must be connected to the output pad of + * the last filter described by filters_descr; since the last + * filter output label is not specified, it is set to "out" by + * default. + */ inputs->name = av_strdup("out"); inputs->filter_ctx = buffersink_ctx; inputs->pad_idx= 0; diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 601c3d8..c02040a 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -128,12 +128,28 @@ static int init_filters(const char *filters_descr) goto end; } -/* Endpoints for the filter graph. */ +/* + * Set the endpoints for the filter graph. The filter_graph will + * be linked to the graph described by filters_descr. + */ + +/* + * The buffer source output must be connected to the input pad of + * the first filter described by filters_descr; since the first + * filter input label is not specified, it is set to "in" by + * default. + */ outputs->name = av_strdup("in"); outputs->filter_ctx = buffersrc_ctx; outputs->pad_idx= 0; outputs->next = NULL; +/* + * The buffer sink input must be connected to the output pad of + * the last filter described by filters_descr; since the last + * filter output label is not specified, it is set to "out" by + * default. + */ inputs->name = av_strdup("out"); inputs->filter_ctx = buffersink_ctx; inputs->pad_idx= 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog