Permalink
Browse files

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpegvideo: reduce excessive inlining of mpeg_motion()
  mpegvideo: convert mpegvideo_common.h to a .c file
  build: factor out mpegvideo.o dependencies to CONFIG_MPEGVIDEO
  Move MASK_ABS macro to libavcodec/mathops.h
  x86: move MANGLE() and related macros to libavutil/x86/asm.h
  x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
  aacdec: Don't fall back to the old output configuration when no old configuration is present.
  rtmp: Add message tracking
  rtsp: Support mpegts in raw udp packets
  rtsp: Support receiving plain data over UDP without any RTP encapsulation
  rtpdec: Remove an unused include
  rtpenc: Remove an av_abort() that depends on user-supplied data
  vsrc_movie: discourage its use with avconv.
  avconv: allow no input files.
  avconv: prevent invalid reads in transcode_init()
  avconv: rename OutputStream.is_past_recording_time to finished.

Conflicts:
	configure
	doc/filters.texi
	ffmpeg.c
	ffmpeg.h
	libavcodec/Makefile
	libavcodec/aacdec.c
	libavcodec/mpegvideo.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents e1a983e + f69f403 commit 9f088a1ed4d34f0cf4244a4b80960af9e8f23dfc @michaelni michaelni committed Aug 9, 2012
Showing with 534 additions and 446 deletions.
  1. +28 −18 configure
  2. +8 −0 doc/ffmpeg.texi
  3. +11 −10 ffmpeg.c
  4. +1 −1 ffmpeg.h
  5. +29 −36 libavcodec/Makefile
  6. +4 −6 libavcodec/aacdec.c
  7. +0 −1 libavcodec/dnxhdenc.c
  8. +7 −0 libavcodec/mathops.h
  9. +1 −1 libavcodec/mpeg12enc.c
  10. +2 −3 libavcodec/mpegvideo.c
  11. +15 −0 libavcodec/mpegvideo.h
  12. +6 −5 libavcodec/mpegvideo_enc.c
  13. +48 −49 libavcodec/{mpegvideo_common.h → mpegvideo_motion.c}
  14. +1 −1 libavcodec/msmpeg4.c
  15. +1 −1 libavcodec/x86/ac3dsp_mmx.c
  16. +1 −1 libavcodec/x86/cabac.h
  17. +1 −1 libavcodec/x86/cavsdsp_mmx.c
  18. +1 −1 libavcodec/x86/dnxhd_mmx.c
  19. +1 −1 libavcodec/x86/dsputil_mmx.c
  20. +1 −1 libavcodec/x86/dsputil_mmx.h
  21. +1 −1 libavcodec/x86/dsputilenc_mmx.c
  22. +1 −1 libavcodec/x86/dwt.c
  23. +1 −1 libavcodec/x86/fdct_mmx.c
  24. +1 −1 libavcodec/x86/fmtconvert_mmx.c
  25. +1 −1 libavcodec/x86/h264dsp_mmx.c
  26. +1 −1 libavcodec/x86/idct_mmx.c
  27. +1 −1 libavcodec/x86/idct_sse2_xvid.c
  28. +1 −1 libavcodec/x86/lpc_mmx.c
  29. +6 −0 libavcodec/x86/mathops.h
  30. +1 −1 libavcodec/x86/mlpdsp.c
  31. +1 −1 libavcodec/x86/motion_est_mmx.c
  32. +1 −1 libavcodec/x86/mpegaudiodec_mmx.c
  33. +1 −1 libavcodec/x86/mpegvideo_mmx.c
  34. +1 −1 libavcodec/x86/rv34dsp_init.c
  35. +1 −1 libavcodec/x86/snowdsp_mmx.c
  36. +1 −1 libavcodec/x86/vc1dsp_mmx.c
  37. +1 −1 libavcodec/x86/vp56dsp_init.c
  38. +1 −1 libavcodec/x86/vp8dsp-init.c
  39. +1 −1 libavfilter/x86/gradfun.c
  40. +1 −1 libavfilter/x86/yadif.c
  41. +160 −138 libavformat/rtmpproto.c
  42. +0 −1 libavformat/rtpdec_h264.c
  43. +9 −12 libavformat/rtpenc.c
  44. +46 −5 libavformat/rtsp.c
  45. +8 −0 libavformat/rtsp.h
  46. +1 −1 libavformat/version.h
  47. +0 −28 libavutil/internal.h
  48. +110 −0 libavutil/x86/asm.h
  49. +1 −1 libavutil/x86/cpu.c
  50. +1 −98 libavutil/x86_cpu.h
  51. +1 −1 libpostproc/postprocess_template.c
  52. +1 −1 libswresample/x86/resample_mmx.h
  53. +1 −1 libswscale/utils.c
  54. +1 −1 libswscale/x86/rgb2rgb.c
  55. +1 −1 libswscale/x86/swscale.c
  56. +1 −1 libswscale/x86/yuv2rgb.c
View
@@ -1361,6 +1361,7 @@ CONFIG_EXTRA="
lgplv3
lpc
mpegaudiodsp
+ mpegvideo
nettle
rtpdec
sinewin
@@ -1500,18 +1501,18 @@ atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
binkaudio_rdft_decoder_select="mdct rdft sinewin"
-cavs_decoder_select="golomb"
+cavs_decoder_select="golomb mpegvideo"
cook_decoder_select="mdct sinewin"
cscd_decoder_suggest="zlib"
dca_decoder_select="mdct"
dirac_decoder_select="dwt golomb"
-dnxhd_encoder_select="aandcttables"
+dnxhd_encoder_select="aandcttables mpegvideo"
dxa_decoder_select="zlib"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="mdct ac3dsp"
eamad_decoder_select="aandcttables"
eatgq_decoder_select="aandcttables"
-eatqi_decoder_select="aandcttables"
+eatqi_decoder_select="aandcttables mpegvideo"
exr_decoder_select="zlib"
ffv1_decoder_select="golomb"
flac_decoder_select="golomb"
@@ -1523,14 +1524,15 @@ flashsv2_decoder_select="zlib"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
fraps_decoder_select="huffman"
-h261_encoder_select="aandcttables"
-h263_decoder_select="h263_parser"
-h263_encoder_select="aandcttables"
+h261_decoder_select="mpegvideo"
+h261_encoder_select="aandcttables mpegvideo"
+h263_decoder_select="h263_parser mpegvideo"
+h263_encoder_select="aandcttables mpegvideo"
h263_vaapi_hwaccel_select="vaapi h263_decoder"
h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
-h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel"
+h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
h264_dxva2_hwaccel_deps="dxva2api_h"
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
h264_vaapi_hwaccel_select="vaapi h264_decoder"
@@ -1541,9 +1543,10 @@ iac_decoder_select="fft mdct sinewin"
imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
-ljpeg_encoder_select="aandcttables"
+ljpeg_encoder_select="aandcttables mpegvideo"
loco_decoder_select="golomb"
-mjpeg_encoder_select="aandcttables"
+mdec_decoder_select="mpegvideo"
+mjpeg_encoder_select="aandcttables mpegvideo"
mlp_decoder_select="mlp_parser"
mp1_decoder_select="mpegaudiodsp"
mp1float_decoder_select="mpegaudiodsp"
@@ -1562,13 +1565,15 @@ mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder"
-mpeg1video_encoder_select="aandcttables"
+mpeg1video_decoder_select="mpegvideo"
+mpeg1video_encoder_select="aandcttables mpegvideo"
mpeg2_crystalhd_decoder_select="crystalhd"
mpeg2_dxva2_hwaccel_deps="dxva2api_h"
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder"
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
-mpeg2video_encoder_select="aandcttables"
+mpeg2video_encoder_select="mpegvideo"
+mpeg2video_encoder_select="aandcttables mpegvideo"
mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
mpeg4_encoder_select="h263_encoder"
@@ -1593,17 +1598,18 @@ rv10_decoder_select="h263_decoder"
rv10_encoder_select="h263_encoder"
rv20_decoder_select="h263_decoder"
rv20_encoder_select="h263_encoder"
-rv30_decoder_select="golomb h264chroma h264pred h264qpel"
-rv40_decoder_select="golomb h264chroma h264pred h264qpel"
+rv30_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo"
+rv40_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
snow_decoder_select="dwt"
-snow_encoder_select="aandcttables dwt"
+snow_encoder_select="aandcttables dwt mpegvideo"
sonic_decoder_select="golomb"
sonic_encoder_select="golomb"
sonic_ls_encoder_select="golomb"
-svq1_encoder_select="aandcttables"
-svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel"
+svq1_encoder_select="mpegvideo"
+svq1_encoder_select="aandcttables mpegvideo"
+svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
svq3_decoder_suggest="zlib"
theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib"
@@ -1653,7 +1659,10 @@ vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
# parsers
-h264_parser_select="golomb h264dsp h264pred"
+h264_parser_select="golomb h264dsp h264pred mpegvideo"
+mpeg4video_parser_select="mpegvideo"
+mpegvideo_parser_select="mpegvideo"
+vc1_parser_select="mpegvideo"
# external libraries
libaacplus_encoder_deps="libaacplus"
@@ -1709,12 +1718,13 @@ matroska_demuxer_suggest="zlib bzlib"
mov_demuxer_suggest="zlib"
mp3_demuxer_select="mpegaudio_parser"
mp4_muxer_select="mov_muxer"
-mpegts_muxer_select="adts_muxer latm_muxer"
+mpegts_muxer_select="adts_muxer latm_muxer mpegvideo"
mpegtsraw_demuxer_select="mpegts_demuxer"
mxf_d10_muxer_select="mxf_muxer"
ogg_demuxer_select="golomb"
psp_muxer_select="mov_muxer"
rtp_demuxer_select="sdp_demuxer"
+rtp_muxer_select="mpegvideo"
rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer"
rtsp_demuxer_select="http_protocol rtpdec"
rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol"
View
@@ -965,6 +965,9 @@ the matching type.
Output link labels are referred to with @option{-map}. Unlabeled outputs are
added to the first output file.
+Note that with this option it is possible to use only lavfi sources without
+normal input files.
+
For example, to overlay an image over video
@example
ffmpeg -i video.mkv -i image.png -filter_complex '[0:v][1:v]overlay[out]' -map
@@ -987,6 +990,11 @@ graph will be added to the output file automatically, so we can simply write
@example
ffmpeg -i video.mkv -i image.png -filter_complex 'overlay' out.mkv
@end example
+
+To generate 5 seconds of pure red video using lavfi @code{color} source:
+@example
+ffmpeg -filter_complex 'color=red' -t 5 out.mkv
+@end example
@end table
As a special exception, you can use a bitmap subtitle stream as input: it
View
@@ -565,7 +565,7 @@ static int check_recording_time(OutputStream *ost)
if (of->recording_time != INT64_MAX &&
av_compare_ts(ost->sync_opts - ost->first_pts, ost->st->codec->time_base, of->recording_time,
AV_TIME_BASE_Q) >= 0) {
- ost->is_past_recording_time = 1;
+ ost->finished = 1;
return 0;
}
return 1;
@@ -1315,7 +1315,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
if (of->recording_time != INT64_MAX &&
ist->pts >= of->recording_time + of->start_time) {
- ost->is_past_recording_time = 1;
+ ost->finished = 1;
return;
}
@@ -1911,7 +1911,7 @@ static int transcode_init(void)
{
int ret = 0, i, j, k;
AVFormatContext *oc;
- AVCodecContext *codec, *icodec = NULL;
+ AVCodecContext *codec;
OutputStream *ost;
InputStream *ist;
char error[1024];
@@ -1942,6 +1942,7 @@ static int transcode_init(void)
/* for each output stream, we compute the right encoding parameters */
for (i = 0; i < nb_output_streams; i++) {
+ AVCodecContext *icodec = NULL;
ost = output_streams[i];
oc = output_files[ost->file_index]->ctx;
ist = get_input_stream(ost);
@@ -2367,13 +2368,13 @@ static int need_output(void)
OutputFile *of = output_files[ost->file_index];
AVFormatContext *os = output_files[ost->file_index]->ctx;
- if (ost->is_past_recording_time ||
+ if (ost->finished ||
(os->pb && avio_tell(os->pb) >= of->limit_filesize))
continue;
if (ost->frame_number >= ost->max_frames) {
int j;
for (j = 0; j < of->ctx->nb_streams; j++)
- output_streams[of->ost_index + j]->is_past_recording_time = 1;
+ output_streams[of->ost_index + j]->finished = 1;
continue;
}
@@ -2424,7 +2425,7 @@ static int select_input_file(void)
for (i = 0; i < nb_output_streams; i++)
nb_active_out -= output_streams[i]->unavailable =
- output_streams[i]->is_past_recording_time;
+ output_streams[i]->finished;
while (nb_active_out) {
opts_min = INT64_MAX;
ost_index = -1;
@@ -3078,10 +3079,10 @@ int main(int argc, char **argv)
exit_program(1);
}
- if (nb_input_files == 0) {
- av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n");
- exit_program(1);
- }
+// if (nb_input_files == 0) {
+// av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n");
+// exit_program(1);
+// }
current_time = ti = getutime();
if (transcode() < 0)
View
@@ -306,7 +306,7 @@ typedef struct OutputStream {
int64_t swr_dither_method;
double swr_dither_scale;
AVDictionary *opts;
- int is_past_recording_time;
+ int finished; /* no more packets should be written for this stream */
int unavailable; /* true if the steram is unavailable (possibly temporarily) */
int stream_copy;
const char *attachment_filename;
Oops, something went wrong.

0 comments on commit 9f088a1

Please sign in to comment.