aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | vsrc_buffer: make the source accept sws_param in initStefano Sabatini2011-05-191-1/+1
| | | | | | | | | | Avoid the need of two distinct av_vsrc_add_video_buffer_ref* functions. Simplify the interface.
* | lavfi: add avfilter_get_video_buffer_ref_from_frame to avcodec.hStefano Sabatini2011-05-191-5/+3
| | | | | | | | Simplify passing AVFrame data to av_vsrc_buffer_add_video_buffer_ref().
* | vsrc_buffer: remove dependency on AVFrameStefano Sabatini2011-05-191-2/+9
| | | | | | | | | | | | | | | | | | Rename av_vsrc_buffer_add_frame to av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make it accept in input an AVFilterBufferRef rather than an AVFrame. This way the interface can be used without requiring the inclusion/installation of libavcodec headers.
* | ffmpeg: dont show_banner() on verbose<0Michael Niedermayer2011-05-181-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: reset top_field_first in opt_input_file().Michael Niedermayer2011-05-171-0/+1
| | | | | | | | | | This allows seting tff for inputs without also setting it for the output Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-171-6/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12 files changed, 36 insertions(+), 81 deletions(-) yes thats 36 new lines in 14 commits * qatar/master: ffmpeg: fix -aspect cli option Restructure video filter implementation in ffmpeg.c. ffplay: remove audio_write_get_buf_size() forward declaration lavfi: print key-frame and picture type information in ff_dlog_ref() mathops: remove ancient confusing comment cws2fws: Improve error message wording. tools: Check the return value of write(). mpegaudio: move OUT_FMT macro to mpegaudiodec.c mpegaudio: remove OUT_MIN/MAX macros Add missing #includes to mp3_header_(de)compress bsf dct: fix indentation dct: bypass table allocation for DCT_II of size 32 h264dsp_mmx: Add #ifdefs around some mmxext functions on x86_64. Remove unused header mpegaudio3.h. Conflicts: ffmpeg.c libavcodec/mpegaudio.h libavcodec/mpegaudio3.h libavfilter/avfilter.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg: fix -aspect cli optionBaptiste Coudurier2011-05-161-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redesign the way -aspect option is handled. This is done by making ffmpeg read the sample aspect ratio set in the corresponding input stream by default, and overriding it using the value specified by -aspect. If the output display aspect ratio is specified with -aspect, it is set at the end of the filterchain, thus overriding the value set by filters in the filterchain. This implementation is more robust, since does not modify the filterchain description (which was creating potential syntax errors). (Cherry-pick abf8342aa94bdf06bb324f6723a6743dd628d5c6) Another aspect ratio fix try. This leaves the setdar addition at the end (preferred by people). (Cherry-pick e7c7b0d000e81d24327602e04d8fed400dbb7193)
| * Restructure video filter implementation in ffmpeg.c.Michael Niedermayer2011-05-161-59/+80
| | | | | | | | | | | | | | | | This fixes several bugs like multiple outputs and -aspect mixed with -vf (cherry picked from commit 1762d9ced70ccc46c5d3e5d64e56a48d0fbbd4f7) (cherry picked from commit 5c20c81bfa526b3a269db9c88b0c9007861f0917) (cherry picked from commit a7844c580d83d8466c161a0e3979b3902d0d9100)
| * ffmpeg: use parse_number_and_die() when it makes senseStefano Sabatini2011-05-131-21/+18
| | | | | | | | | | | | | | | | | | | | Prefer parse_number_or_die() over atoi()/atol() parsing for the options: -pass, -top, -vc, and -qscale. Improve input validation. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: get rid of the 'q' key schizofreniaAnton Khirnov2011-05-131-36/+3
| | | | | | | | SIGINT for quitting should be enough for everybody.
* | rawdec: Allow overriding top field first.Michael Niedermayer2011-05-161-0/+1
| | | | | | | | | | | | | | Iam not sure this is the best way to implement it, but its the simplest and keeps the code seperate from the application. Keeping ffmpeg.c simple and not requireing user apps to duplicate this code. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: initialize input_codec array earlier.Michael Niedermayer2011-05-161-0/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: Allow seting and cycling through debug modes.Michael Niedermayer2011-05-151-0/+22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: Help for interactive keys.Michael Niedermayer2011-05-141-1/+11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: Interactivity support. Try pressing +-hs.Michael Niedermayer2011-05-141-0/+12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-131-7/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (33 commits) rtpdec_qdm2: Don't try to parse data packet if no configuration is received ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand. ac3enc: clean up count_frame_bits() and count_frame_bits_fixed() mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame. srtdec: make sure we don't write past the end of buffer wmaenc: improve channel count and bitrate error handling in encode_init() matroskaenc: make sure we don't produce invalid file with no codec ID matroskadec: check that pointers were initialized before accessing them lavf: fix function name in compute_pkt_fields2 av_dlog message lavf: fix av_find_best_stream when providing a wanted stream. lavf: fix av_find_best_stream when decoder_ret is given and using a related stream. ffmpeg: factorize quality calculation tiff: add support for SamplesPerPixel tag in tiff_decode_tag() tiff: Prefer enum TiffCompr over int for TiffContext.compr. mov: Support edit list atom version 1. configure: Enable libpostproc automatically if GPL code is enabled. Cosmetics: fix prototypes in oggdec oggdec: fix memleak with continuous streams. matroskaenc: add missing new line in av_log() call dnxhdenc: add AVClass in private context. ... swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code. Above code is also just in case its not obvios to a large extended duplicates that where cherry picked from ffmpeg. Conflicts: configure ffmpeg.c libavformat/matroskaenc.c libavutil/pixfmt.h libswscale/ppc/swscale_template.c libswscale/swscale.c libswscale/swscale_template.c libswscale/utils.c libswscale/x86/swscale_template.c tests/fate/h264.mak tests/ref/lavfi/pixdesc_le tests/ref/lavfi/pixfmts_copy_le tests/ref/lavfi/pixfmts_null_le tests/ref/lavfi/pixfmts_scale_le tests/ref/lavfi/pixfmts_vflip_le Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg: factorize quality calculationMichael Niedermayer2011-05-121-7/+6
| | | | | | | | | | | | | | Calculate quality value once per stream in print_report(). Also fix segfault, as coded_frame can be NULL. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-121-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (32 commits) 10-bit H.264 x86 chroma v loopfilter asm Port SMPTE S302M audio decoder from FFmbc 0.3. [Copyright headers corrected] Fix crash of interlaced MPEG2 decoding h264pred: fix one more aliasing violation. doc/APIchanges: fill in missing hashes and dates. flacenc: use proper initializers for AVOption default values. lavc: deprecate named constants for deprecated antialias_algo. aac: workaround for compilation on cygwin swscale: extend YUV422p support to 10bits depth tiff: add support for inverted FillOrder for uncompressed data Remove unused softfloat implementation. h264pred: fix aliasing violations. rotozoom: Eliminate French variable name. rotozoom: Check return value of fread(). rotozoom: Return an error value instead of calling exit(). rotozoom: Make init_demo() return int and check for errors on invocation. rotozoom: Drop silly UINT8 typedef. rotozoom: Drop some unnecessary parentheses. rotozoom: K&R coding style cosmetics rtsp: Only do keepalive using GET_PARAMETER if the server supports it ... Conflicts: Changelog cmdutils.c doc/APIchanges doc/general.texi ffmpeg.c ffplay.c libavcodec/h264pred_template.c libavcodec/resample.c libavutil/pixfmt.h libavutil/softfloat.c libavutil/softfloat.h tests/rotozoom.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg: call pre_process_video_frame() only if decoding is neededStefano Sabatini2011-05-111-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | In output_packet(), move the pre_process_video_frame() call inside the if (ist->decoding_needed) { } block. This way pre_process_video_frame() is not called when stream-copy has been selected. Also simplify. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: reformat resample condition code in transcode()Stefano Sabatini2011-05-111-3/+3
| | | | | | | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: factorize resampling condition check in do_video_out()Stefano Sabatini2011-05-111-8/+7
| | | | | | | | | | | | | | Simplify and improve readability. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippetStefano Sabatini2011-05-111-2/+2
| | | | | | | | | | | | | | Simplify, ease readability. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: improve reporting if size/pixel format changesStefano Sabatini2011-05-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | Use av_log() rather than fprintf(stderr, ...), and show information related to the previous size/pixel format configuration. Consistent with the corresponding message issued in case of audio configuration change. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: warns the user when the selected pixel format is ignoredStefano Sabatini2011-05-111-1/+8
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-111-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (30 commits) AVOptions: make default_val a union, as proposed in AVOption2. arm/h264pred: add missing argument type. h264dsp_mmx: place bracket outside #if/#endif block. lavf/utils: fix ff_interleave_compare_dts corner case. fate: add 10-bit H264 tests. h264: do not print "too many references" warning for intra-only. Enable decoding of high bit depth h264. Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder. Add support for higher QP values in h264. Add the notion of pixel size in h264 related functions. Make the h264 loop filter bit depth aware. Template dsputil_template.c with respect to pixel size, etc. Template h264idct_template.c with respect to pixel size, etc. Preparatory patch for high bit depth h264 decoding support. Move some functions in dsputil.c into a new file dsputil_template.c. Move the functions in h264idct into a new file h264idct_template.c. Move the functions in h264pred.c into a new file h264pred_template.c. Preparatory patch for high bit depth h264 decoding support. Add pixel formats for 9- and 10-bit yuv420p. Choose h264 chroma dc dequant function dynamically. ... Conflicts: doc/APIchanges ffmpeg.c ffplay.c libavcodec/alpha/dsputil_alpha.c libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/arm/dsputil_init_neon.c libavcodec/arm/dsputil_iwmmxt.c libavcodec/arm/h264pred_init_arm.c libavcodec/bfin/dsputil_bfin.c libavcodec/dsputil.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264dsp.c libavcodec/h264idct.c libavcodec/h264pred.c libavcodec/mlib/dsputil_mlib.c libavcodec/options.c libavcodec/ppc/dsputil_altivec.c libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/h264_altivec.c libavcodec/ps2/dsputil_mmi.c libavcodec/sh4/dsputil_align.c libavcodec/sh4/dsputil_sh4.c libavcodec/sparc/dsputil_vis.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/options.c libavformat/utils.c libavutil/pixfmt.h libswscale/swscale.c libswscale/swscale_internal.h libswscale/swscale_template.c tests/ref/seek/lavf_avi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg: Simplify decode loop condition to not use next_ptsAlexander Strange2011-05-101-7/+8
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * ffmpeg: remove unused fields AVOutputStream.original_width/heightStefano Sabatini2011-05-101-7/+0
| | | | | | | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: remove unused variable padding_src in do_video_out()Stefano Sabatini2011-05-101-3/+1
| | | | | | | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: fix negative verbosity.Michael Niedermayer2011-05-101-2/+2
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * ffmpeg: rename configure_filters() to configure_video_filters()Stefano Sabatini2011-05-101-2/+2
| | | | | | | | | | | | | | | | | | Mostly useful for the audio-filters branch, to make more apparent the distinction between configure_audio_filters() and configure_video_filters(). Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * cmdutils: remove list_fmts(), simplifyStefano Sabatini2011-05-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The function was only used in opt_sample_fmt() for listing the sample formats. Move list_fmts() functionality directly into opt_sample_fmt(). Also fix the warning: ffmpeg.c: In function ‘opt_audio_sample_fmt’: ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’ Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Add missing CONFIG_AVFILTER check.Takashi Mochizuki2011-05-101-0/+2
| | | | | | | | | | | | Fix configure --disable-avfilter issue. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | "Initialize" copy_tb like the other global variables.Robert Leatherwood2011-05-111-1/+1
| |
* | ffmpeg: Fix -t with files that do not have any timestamps.Michael Niedermayer2011-05-101-1/+5
| | | | | | | | | | This for example fixes -t with some frext h264 reference streams. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-101-4/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: group #includes more sanely mpegaudio: remove #if 0 blocks ffmpeg.c: reset avoptions after each input/output file. ffmpeg.c: store per-output stream sws flags. mpegaudio: remove CONFIG_MPEGAUDIO_HP option mpegtsenc: Clear st->priv_data when freeing it udp: Fix receiving RTP data over multicast rtpproto: Remove an unused variable regtest: fix wma tests NOT pulled: mpegaudio: remove CONFIG_AUDIO_NONSHORT regtest: separate flags for encoding and decoding Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg.c: reset avoptions after each input/output file.Anton Khirnov2011-05-091-0/+4
| | | | | | | | This is consistent with how all the other options work.
| * ffmpeg.c: store per-output stream sws flags.Anton Khirnov2011-05-091-8/+8
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-091-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: log: Fix an oob array read. cosmetics: trim trailing whitespace in postproc Ban strncpy() it's too easy to misuse. psymodel: Remove wrapper functions. aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'. regtest: remove redundant flags in jpg test regtest: use run_ffmpeg in do_image_formats regtest: simplify encoding functions ffmpeg.c: check for interlaced flag in the correct place. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg.c: check for interlaced flag in the correct place.Anton Khirnov2011-05-081-1/+1
| | | | | | | | In the corresponding codec context, not global options storage.
* | vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interfaceStefano Sabatini2011-05-071-4/+2
| | | | | | | | | | Now that pix_fmt, width, and height are directly embedded in the AVFrame, there is no need to pass these values as separate arguments.
* | ffmpeg: rename ost->pict_tmp to ost->resample_frameStefano Sabatini2011-05-071-7/+7
| | | | | | | | | | The new name is more consistent with the employed naming scheme, and more meaningful.
* | ffmpeg: prefer dec/enc over ost/ist->st->codec in do_video_out()Stefano Sabatini2011-05-071-8/+3
| | | | | | | | Compact code, improve readability.
* | ffmpeg: move resample_changed check within the #if !CONFIG_AVFILTERStefano Sabatini2011-05-071-2/+2
| | | | | | | | | | | | The check and the corresponding message in do_video_out() are unnecessary in the libavfilter path, as a similar check and message are performed within the buffer source.
* | ffmpeg: remove useless intermediary variable resample_dst in do_video_out()Stefano Sabatini2011-05-071-3/+2
| |
* | ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabledStefano Sabatini2011-05-071-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | Implement lazy initialization of the image resample context, so that the initialization code does not need to be duplicated. Also manage the case in which resample/size change mid-stream. For each packet the code computes if resampling is needed. Previously the resample check was done only at the initialization, in case size/format changed and no resample was detected at the init stage ffmpeg was silently exiting.
* | lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()Stefano Sabatini2011-05-071-0/+1
| | | | | | | | | | | | | | | | avfilter_copy_frame_props() avoids code duplication and increases robustness. The added files libavfilter/avcodec.[ch] are used for containing utilities useful for gluing togheter libavfilter and libavcodec.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-051-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) doc: Check standalone compilation before submitting new components. Fix standalone compilation of pipe protocol. Fix standalone compilation of ac3_fixed encoder. Fix standalone compilation of binkaudio_dct / binkaudio_rdft decoders. Fix standalone compilation of IMC decoder. Fix standalone compilation of WTV demuxer. Fix standalone compilation of MXPEG decoder. flashsv: K&R cosmetics matroskaenc: fix memory leak vc1: make overlap filter for I-frames bit-exact. vc1dec: use s->start/end_mb_y instead of passing them as function args. Revert "VC1: merge idct8x8, coeff adjustments and put_pixels." Replace strncpy() with av_strlcpy(). indeo3: Eliminate use of long. get_bits: make cache unsigned to eliminate undefined signed overflow. asfdec: fix assert failure on invalid files avfilter: check malloc return values. Not pulled as reason for reindent is not pulled: mpegvideo: reindent. nutenc: check malloc return values. Not pulled due to much simpler solution in ffmpeg *: don't av_malloc(0). ... Conflicts: doc/developer.texi libavcodec/Makefile libavcodec/get_bits.h libavcodec/mpegvideo.c libavformat/Makefile libavutil/log.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace strncpy() with av_strlcpy().Alex Converse2011-05-031-2/+1
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-041-7/+78
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: Implement fate-rsync target Make ffmpeg support generic data stream Conflicts: cmdutils.h Merged-by: Michael Niedermayer <michaelni@gmx.at>