Commit Graph

37637 Commits

Author SHA1 Message Date
Michael Niedermayer
4eea0cfc22 ffmpeg: use ist->dts instead of passing an argument into transcode_video().
This makes the code more similar to qatar
And fixes decoding of the last frame of fate/vc1-ism

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-08 06:46:58 +01:00
Michael Niedermayer
f72eaf69ab ffmpeg: Init dts variables in output_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-08 06:19:43 +01:00
Michael Niedermayer
fe380adbfb ffmpeg: add (next_dts/dts) variables.
Strongly based on Anton Khirnovs code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-08 06:13:44 +01:00
Michael Niedermayer
18d0a16fc9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: make yuv2yuv1 use named registers.
  h264: mark h264_idct_add8_10 with number of XMM registers.
  swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
  vp8: always update next_framep[] before returning from decode_frame().
  avconv: estimate next_dts from framerate if it is set.
  avconv: better next_dts usage.
  avconv: rename InputStream.pts to last_dts.
  avconv: reduce overloading for InputStream.pts.
  avconv: rename InputStream.next_pts to next_dts.
  avconv: rework -t handling for encoding.
  avconv: set encoder timebase for subtitles.
  pva-demux test: add -vn
  swscale: K&R formatting cosmetics for SPARC code
  apedec: allow the user to set the maximum number of output samples per call
  apedec: do not unnecessarily zero output samples for mono frames
  apedec: allocate a single flat buffer for decoded samples
  apedec: use sizeof(field) instead of sizeof(type)
  swscale: split C output functions into separate file.
  swscale: Split C input functions into separate file.
  bytestream: Add bytestream2 writing API.

The avconv changes are due to massive regressions and bugs not merged yet.

Conflicts:
	ffmpeg.c
	libavcodec/vp8.c
	libswscale/swscale.c
	libswscale/x86/swscale_template.c
	tests/fate/demux.mak
	tests/ref/lavf/asf
	tests/ref/lavf/avi
	tests/ref/lavf/mkv
	tests/ref/lavf/mpg
	tests/ref/lavf/nut
	tests/ref/lavf/ogg
	tests/ref/lavf/rm
	tests/ref/lavf/ts
	tests/ref/seek/lavf_avi
	tests/ref/seek/lavf_mkv
	tests/ref/seek/lavf_rm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-08 05:53:35 +01:00
Joseph Artsimovich
950930b461 Set default qmax for VC-3/DNxHD to 1024 (maximum allowed by VC-3 spec).
Also increase the global limit on qmax.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 22:02:40 +01:00
Ronald S. Bultje
ef1c785f11 swscale: make yuv2yuv1 use named registers. 2012-02-07 11:38:13 -08:00
Michael Kostylev
3206cccc0e h264: mark h264_idct_add8_10 with number of XMM registers.
This fixes XMM register clobber problems on Win64.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-07 11:37:13 -08:00
Ronald S. Bultje
b7542dd3d7 swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
Fixes bug 221.

CC: libav-stable@libav.org
2012-02-07 11:33:20 -08:00
Ronald S. Bultje
fb90785e98 vp8: always update next_framep[] before returning from decode_frame().
Also slightly move around code not allocate a new frame if we won't
decode it. This prevents us from putting undecoded frames in frame
pointers, which (in mt decoding) other threads will use and wait on
as references, causing a deadlock (if we skipped decoding) or a crash
(if we didn't initialized next_framep[] at all).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-07 11:29:02 -08:00
Anton Khirnov
722410ade5 avconv: estimate next_dts from framerate if it is set. 2012-02-07 20:14:54 +01:00
Anton Khirnov
b34856a116 avconv: better next_dts usage.
next_dts is used for estimating the dts of the next packet if it's
missing. Therefore, it makes no sense to set it from the pts of the last
decoded frame. Also it should be estimated from the current packet
duration/ticks_per_frame always, not only when a frame was successfully
decoded.
2012-02-07 20:14:41 +01:00
Anton Khirnov
23576b3fbb avconv: rename InputStream.pts to last_dts.
It more accurately describes what does this variable store.
2012-02-07 20:13:15 +01:00
Anton Khirnov
6e98390258 avconv: reduce overloading for InputStream.pts.
It currently has different meanings at different times (dts of the last
read packet/pts of the last decoded frame). Reduce obfuscation by
storing pts of the decoded frame in the frame itself.
2012-02-07 20:12:04 +01:00
Anton Khirnov
3101bb6669 avconv: rename InputStream.next_pts to next_dts.
It's used to predict dts, not pts.
2012-02-07 20:11:22 +01:00
Anton Khirnov
1270e12e49 avconv: rework -t handling for encoding.
Current code compares the desired recording time with InputStream.pts,
which has a very unclear meaning. Change the code to use actual
timestamps of the frames passed to the encoder.

In several tests, one less frame is encoded, which is more correct.

In the idroq test one more frame is encoded, which is again more
correct.

Behavior with stream copy should be unchanged.
2012-02-07 20:11:11 +01:00
Anton Khirnov
c9af832623 avconv: set encoder timebase for subtitles.
The actual number (1/1000) will probably require some
discussion/tweaking in the future, but should be good enough for now,
since the timestamps in AVSubtitle are in this timebase by definition.
2012-02-07 20:07:14 +01:00
Anton Khirnov
4be1d7dc20 pva-demux test: add -vn
The output is obviously not supposed to contain video (since only
-acodec copy is specified), but that only happens because of the way -t
handling is implemented currently.
2012-02-07 20:06:57 +01:00
Diego Biurrun
06b320ad78 swscale: K&R formatting cosmetics for SPARC code 2012-02-07 19:49:49 +01:00
Carl Eugen Hoyos
bf5c0308f2 Fix libutvideo compilation.
Fixes ticket #985.
2012-02-07 18:28:00 +01:00
Justin Ruggles
37390d5cca apedec: allow the user to set the maximum number of output samples per call
It makes sense in some cases to split up the output packet to save on memory
usage (ape frames can be very large), but the current/default size is
arbitrary. Allowing the user to configure this gives more flexibility and
requires minimal additional code.
2012-02-07 10:01:15 -05:00
Justin Ruggles
39575eead2 apedec: do not unnecessarily zero output samples for mono frames 2012-02-07 10:01:15 -05:00
Justin Ruggles
1d3c672d27 apedec: allocate a single flat buffer for decoded samples
This will allow the decoder to return samples for the full packet, and it also
makes the decoded buffer pointers aligned.
2012-02-07 10:01:14 -05:00
Justin Ruggles
32c61400c0 apedec: use sizeof(field) instead of sizeof(type) 2012-02-07 10:01:14 -05:00
Stefano Sabatini
0349d61eef lavfi/aspect: rename field aspect->aspect to aspect->ratio
The new name is more sensible.
2012-02-07 15:49:01 +01:00
Stefano Sabatini
d21b82fd3a lavc: provide aliases to the PCM A-law/mu-law codecs
They are also known as G.711 codecs.
2012-02-07 15:48:33 +01:00
Ronald S. Bultje
2144941069 swscale: split C output functions into separate file.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-07 12:03:51 +01:00
Ronald S. Bultje
2dd7a1c030 swscale: Split C input functions into separate file.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-07 12:03:50 +01:00
Paul B Mahol
0b717e24f9 ffserver: use avcodec_get_context_defaults3()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 05:51:31 +01:00
Michael Niedermayer
b479e01612 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Revert "v210enc: use FFALIGN()"
  doxygen: Do not include license boilerplates in Doxygen comment blocks.
  avplay: reset decoder flush state when seeking
  ape: skip packets with invalid size
  ape: calculate final packet size instead of guessing
  ape: stop reading after the last frame has been read
  ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished
  ape: return error if seeking to the current packet fails in ape_read_packet()
  avcodec: Clarify AVFrame member documentation.
  v210dec: check for coded_frame allocation failure
  v210enc: use stride as it is already calculated
  v210enc: use FFALIGN()
  v210enc: return proper AVERROR codes instead of -1
  v210enc: do not set coded_frame->key_frame
  v210enc: check for coded_frame allocation failure
  drawtext: add 'fix_bounds' option on coords fixing
  drawtext: fix text_{w, h} expression vars
  drawtext: add missing braces around an if() block.

Conflicts:
	libavcodec/arm/vp8.h
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/v210dec.c
	libavfilter/vf_drawtext.c
	libavformat/ape.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 01:40:29 +01:00
Aneesh Dogra
db7d45237a bytestream: Add bytestream2 writing API.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-06 18:56:13 -05:00
Paul B Mahol
6ba2505a0e utvideo: remove ff_thread_finish_setup, it isn't needed at all
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 00:46:01 +01:00
Reimar Döffinger
787528b4a6 Detect theora keyframes by content in Ogg demuxer.
A lot of files do not mark keyframes correctly via
granule, so detect keyframe or not based on data
and complain if it mismatches.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-06 22:08:45 +01:00
Paul B Mahol
6833fe4342 ffv1: PIX_FMT_GRAY16 support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-06 21:03:24 +01:00
Javier Cabezas
d4385299d3 DNxHD: remove ff_thread_finish_setup, it isn't needed at all.
Should fix issue #938

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-06 20:59:59 +01:00
Stefano Sabatini
f491f033f5 ffmpeg: document the unit for the -fs option parameter 2012-02-06 20:47:09 +01:00
Stefano Sabatini
b7d45d0b0f lavfi: add setfield filter 2012-02-06 20:46:58 +01:00
Stefano Sabatini
e8a06b1486 lavf/4xm: use proper error codes 2012-02-06 20:33:06 +01:00
Paul B Mahol
d016d3074c Revert "v210enc: use FFALIGN()"
FFALIGN doesn't work with non-powers-of-2.

This reverts commit 7ad1b612c8.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 19:57:52 +01:00
Diego Biurrun
32f3c541bc doxygen: Do not include license boilerplates in Doxygen comment blocks. 2012-02-06 19:39:24 +01:00
Justin Ruggles
ec1f3cab20 avplay: reset decoder flush state when seeking
Fixes seeking after decoder has already been flushed for codecs using
CODEC_CAP_DELAY.
2012-02-06 13:22:01 -05:00
Justin Ruggles
f1c3d4a68a ape: skip packets with invalid size 2012-02-06 13:22:01 -05:00
Justin Ruggles
ac3f8d317c ape: calculate final packet size instead of guessing
Calculates based on total file size and wavetaillength from the header.
Falls back to multiplying finalframeblocks by 8 instead of 4 so that it will
at least be overestimating for 24-bit. Currently it can underestimate the
final packet size, leading to decoding errors.
2012-02-06 13:22:01 -05:00
Justin Ruggles
c2c316158f ape: stop reading after the last frame has been read
This avoids buffer overread when the last packet size estimate is too small.
2012-02-06 13:09:11 -05:00
Justin Ruggles
66f7be3603 ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished 2012-02-06 13:09:11 -05:00
Justin Ruggles
1bc035bc03 ape: return error if seeking to the current packet fails in ape_read_packet() 2012-02-06 13:09:11 -05:00
Kieran Kunhya
9814974d2e avcodec: Clarify AVFrame member documentation.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-06 18:08:08 +01:00
Stefano Sabatini
2cbe9121ac doc/filters.texi: use multiple @example blocks for distinct examples in setdar docs 2012-02-06 11:30:54 +01:00
Stefano Sabatini
23534d0c4c doc/filters.texi: prefer @example over the unsupported @math for showing equation 2012-02-06 11:30:54 +01:00
Stefano Sabatini
3fa9ace3d8 doc/filters.texi: merge setdar and setsar documentation
Most of the documentation is common to both filters, and I'm going to add
more shared docs. Factorize.
2012-02-06 11:30:54 +01:00
Stefano Sabatini
70ffda3217 lavu: introduce av_parse_ratio() and use it in ffmpeg and lavfi/aspect
Factorize code and provide ratio parsing consistency.
2012-02-06 11:30:54 +01:00