]> git.sesse.net Git - ffmpeg/log
ffmpeg
12 years agoffmpeg: Fix (next)_dts/pts init.
Michael Niedermayer [Wed, 8 Feb 2012 06:56:17 +0000 (07:56 +0100)]
ffmpeg: Fix (next)_dts/pts init.

Based on Anton Khirnovs code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: use ist->dts instead of passing an argument into transcode_video().
Michael Niedermayer [Wed, 8 Feb 2012 05:31:06 +0000 (06:31 +0100)]
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>
12 years agoffmpeg: Init dts variables in output_packet()
Michael Niedermayer [Wed, 8 Feb 2012 05:19:43 +0000 (06:19 +0100)]
ffmpeg: Init dts variables in output_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: add (next_dts/dts) variables.
Michael Niedermayer [Wed, 8 Feb 2012 05:13:44 +0000 (06:13 +0100)]
ffmpeg: add (next_dts/dts) variables.

Strongly based on Anton Khirnovs code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 8 Feb 2012 01:59:09 +0000 (02:59 +0100)]
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>
12 years agoSet default qmax for VC-3/DNxHD to 1024 (maximum allowed by VC-3 spec).
Joseph Artsimovich [Tue, 7 Feb 2012 15:47:23 +0000 (15:47 +0000)]
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>
12 years agoswscale: make yuv2yuv1 use named registers.
Ronald S. Bultje [Sat, 4 Feb 2012 09:00:27 +0000 (10:00 +0100)]
swscale: make yuv2yuv1 use named registers.

12 years agoh264: mark h264_idct_add8_10 with number of XMM registers.
Michael Kostylev [Sat, 4 Feb 2012 08:16:35 +0000 (00:16 -0800)]
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>
12 years agoswscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
Ronald S. Bultje [Tue, 7 Feb 2012 19:33:20 +0000 (11:33 -0800)]
swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.

Fixes bug 221.

CC: libav-stable@libav.org
12 years agovp8: always update next_framep[] before returning from decode_frame().
Ronald S. Bultje [Tue, 31 Jan 2012 23:17:59 +0000 (15:17 -0800)]
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
12 years agoavconv: estimate next_dts from framerate if it is set.
Anton Khirnov [Thu, 2 Feb 2012 12:18:49 +0000 (13:18 +0100)]
avconv: estimate next_dts from framerate if it is set.

12 years agoavconv: better next_dts usage.
Anton Khirnov [Thu, 2 Feb 2012 11:21:37 +0000 (12:21 +0100)]
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.

12 years agoavconv: rename InputStream.pts to last_dts.
Anton Khirnov [Sun, 5 Feb 2012 20:12:43 +0000 (21:12 +0100)]
avconv: rename InputStream.pts to last_dts.

It more accurately describes what does this variable store.

12 years agoavconv: reduce overloading for InputStream.pts.
Anton Khirnov [Sun, 5 Feb 2012 19:56:24 +0000 (20:56 +0100)]
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.

12 years agoavconv: rename InputStream.next_pts to next_dts.
Anton Khirnov [Fri, 3 Feb 2012 14:32:51 +0000 (15:32 +0100)]
avconv: rename InputStream.next_pts to next_dts.

It's used to predict dts, not pts.

12 years agoavconv: rework -t handling for encoding.
Anton Khirnov [Sun, 5 Feb 2012 13:32:10 +0000 (14:32 +0100)]
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.

12 years agoavconv: set encoder timebase for subtitles.
Anton Khirnov [Sun, 5 Feb 2012 13:28:19 +0000 (14:28 +0100)]
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.

12 years agopva-demux test: add -vn
Anton Khirnov [Sun, 5 Feb 2012 11:18:14 +0000 (12:18 +0100)]
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.

12 years agoswscale: K&R formatting cosmetics for SPARC code
Diego Biurrun [Wed, 18 Jan 2012 17:33:16 +0000 (18:33 +0100)]
swscale: K&R formatting cosmetics for SPARC code

12 years agoFix libutvideo compilation.
Carl Eugen Hoyos [Tue, 7 Feb 2012 17:28:00 +0000 (18:28 +0100)]
Fix libutvideo compilation.

Fixes ticket #985.

12 years agoapedec: allow the user to set the maximum number of output samples per call
Justin Ruggles [Mon, 6 Feb 2012 22:46:41 +0000 (17:46 -0500)]
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.

12 years agoapedec: do not unnecessarily zero output samples for mono frames
Justin Ruggles [Mon, 6 Feb 2012 21:34:50 +0000 (16:34 -0500)]
apedec: do not unnecessarily zero output samples for mono frames

12 years agoapedec: allocate a single flat buffer for decoded samples
Justin Ruggles [Mon, 6 Feb 2012 21:31:26 +0000 (16:31 -0500)]
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.

12 years agoapedec: use sizeof(field) instead of sizeof(type)
Justin Ruggles [Mon, 6 Feb 2012 18:36:42 +0000 (13:36 -0500)]
apedec: use sizeof(field) instead of sizeof(type)

12 years agolavfi/aspect: rename field aspect->aspect to aspect->ratio
Stefano Sabatini [Tue, 24 Jan 2012 21:47:32 +0000 (22:47 +0100)]
lavfi/aspect: rename field aspect->aspect to aspect->ratio

The new name is more sensible.

12 years agolavc: provide aliases to the PCM A-law/mu-law codecs
Stefano Sabatini [Mon, 6 Feb 2012 21:03:13 +0000 (22:03 +0100)]
lavc: provide aliases to the PCM A-law/mu-law codecs

They are also known as G.711 codecs.

12 years agoswscale: split C output functions into separate file.
Ronald S. Bultje [Wed, 1 Feb 2012 15:38:56 +0000 (07:38 -0800)]
swscale: split C output functions into separate file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agoswscale: Split C input functions into separate file.
Ronald S. Bultje [Wed, 1 Feb 2012 15:38:55 +0000 (07:38 -0800)]
swscale: Split C input functions into separate file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agoffserver: use avcodec_get_context_defaults3()
Paul B Mahol [Sun, 5 Feb 2012 22:53:31 +0000 (22:53 +0000)]
ffserver: use avcodec_get_context_defaults3()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 7 Feb 2012 00:40:29 +0000 (01:40 +0100)]
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>
12 years agobytestream: Add bytestream2 writing API.
Aneesh Dogra [Mon, 6 Feb 2012 20:09:22 +0000 (01:39 +0530)]
bytestream: Add bytestream2 writing API.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoutvideo: remove ff_thread_finish_setup, it isn't needed at all
Paul B Mahol [Mon, 6 Feb 2012 21:30:29 +0000 (21:30 +0000)]
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>
12 years agoDetect theora keyframes by content in Ogg demuxer.
Reimar Döffinger [Mon, 6 Feb 2012 21:03:25 +0000 (22:03 +0100)]
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>
12 years agoffv1: PIX_FMT_GRAY16 support
Paul B Mahol [Mon, 6 Feb 2012 18:23:44 +0000 (18:23 +0000)]
ffv1: PIX_FMT_GRAY16 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoDNxHD: remove ff_thread_finish_setup, it isn't needed at all.
Javier Cabezas [Mon, 6 Feb 2012 18:36:39 +0000 (19:36 +0100)]
DNxHD: remove ff_thread_finish_setup, it isn't needed at all.

Should fix issue #938

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: document the unit for the -fs option parameter
Stefano Sabatini [Wed, 18 Jan 2012 12:13:41 +0000 (13:13 +0100)]
ffmpeg: document the unit for the -fs option parameter

12 years agolavfi: add setfield filter
Stefano Sabatini [Wed, 1 Feb 2012 23:31:00 +0000 (00:31 +0100)]
lavfi: add setfield filter

12 years agolavf/4xm: use proper error codes
Stefano Sabatini [Mon, 6 Feb 2012 09:46:53 +0000 (10:46 +0100)]
lavf/4xm: use proper error codes

12 years agoRevert "v210enc: use FFALIGN()"
Paul B Mahol [Mon, 6 Feb 2012 17:54:39 +0000 (17:54 +0000)]
Revert "v210enc: use FFALIGN()"

FFALIGN doesn't work with non-powers-of-2.

This reverts commit 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agodoxygen: Do not include license boilerplates in Doxygen comment blocks.
Diego Biurrun [Sun, 5 Feb 2012 10:31:33 +0000 (11:31 +0100)]
doxygen: Do not include license boilerplates in Doxygen comment blocks.

12 years agoavplay: reset decoder flush state when seeking
Justin Ruggles [Sat, 4 Feb 2012 22:32:26 +0000 (17:32 -0500)]
avplay: reset decoder flush state when seeking

Fixes seeking after decoder has already been flushed for codecs using
CODEC_CAP_DELAY.

12 years agoape: skip packets with invalid size
Justin Ruggles [Sat, 4 Feb 2012 22:08:34 +0000 (17:08 -0500)]
ape: skip packets with invalid size

12 years agoape: calculate final packet size instead of guessing
Justin Ruggles [Sat, 4 Feb 2012 22:01:03 +0000 (17:01 -0500)]
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.

12 years agoape: stop reading after the last frame has been read
Justin Ruggles [Sat, 4 Feb 2012 21:34:20 +0000 (16:34 -0500)]
ape: stop reading after the last frame has been read

This avoids buffer overread when the last packet size estimate is too small.

12 years agoape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished
Justin Ruggles [Sat, 4 Feb 2012 21:31:37 +0000 (16:31 -0500)]
ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished

12 years agoape: return error if seeking to the current packet fails in ape_read_packet()
Justin Ruggles [Sat, 4 Feb 2012 21:29:37 +0000 (16:29 -0500)]
ape: return error if seeking to the current packet fails in ape_read_packet()

12 years agoavcodec: Clarify AVFrame member documentation.
Kieran Kunhya [Sun, 5 Feb 2012 10:28:58 +0000 (04:28 -0600)]
avcodec: Clarify AVFrame member documentation.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agodoc/filters.texi: use multiple @example blocks for distinct examples in setdar docs
Stefano Sabatini [Tue, 24 Jan 2012 22:50:33 +0000 (23:50 +0100)]
doc/filters.texi: use multiple @example blocks for distinct examples in setdar docs

12 years agodoc/filters.texi: prefer @example over the unsupported @math for showing equation
Stefano Sabatini [Tue, 24 Jan 2012 22:32:49 +0000 (23:32 +0100)]
doc/filters.texi: prefer @example over the unsupported @math for showing equation

12 years agodoc/filters.texi: merge setdar and setsar documentation
Stefano Sabatini [Tue, 24 Jan 2012 22:28:26 +0000 (23:28 +0100)]
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.

12 years agolavu: introduce av_parse_ratio() and use it in ffmpeg and lavfi/aspect
Stefano Sabatini [Tue, 17 Jan 2012 14:25:14 +0000 (15:25 +0100)]
lavu: introduce av_parse_ratio() and use it in ffmpeg and lavfi/aspect

Factorize code and provide ratio parsing consistency.

12 years agoffprobe: fix typo in ESCAPE_CHECK_SIZE
Stefano Sabatini [Mon, 6 Feb 2012 09:44:54 +0000 (10:44 +0100)]
ffprobe: fix typo in ESCAPE_CHECK_SIZE

12 years agov210dec: check for coded_frame allocation failure
Paul B Mahol [Sun, 5 Feb 2012 21:14:39 +0000 (21:14 +0000)]
v210dec: check for coded_frame allocation failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agov210enc: use stride as it is already calculated
Paul B Mahol [Sun, 5 Feb 2012 21:14:38 +0000 (21:14 +0000)]
v210enc: use stride as it is already calculated

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agov210enc: use FFALIGN()
Paul B Mahol [Sun, 5 Feb 2012 21:14:37 +0000 (21:14 +0000)]
v210enc: use FFALIGN()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agov210enc: return proper AVERROR codes instead of -1
Paul B Mahol [Sun, 5 Feb 2012 21:14:36 +0000 (21:14 +0000)]
v210enc: return proper AVERROR codes instead of -1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agov210enc: do not set coded_frame->key_frame
Paul B Mahol [Sun, 5 Feb 2012 21:14:35 +0000 (21:14 +0000)]
v210enc: do not set coded_frame->key_frame

It is already set in avcodec_alloc_frame().

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agov210enc: check for coded_frame allocation failure
Paul B Mahol [Sun, 5 Feb 2012 21:14:34 +0000 (21:14 +0000)]
v210enc: check for coded_frame allocation failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agodrawtext: add 'fix_bounds' option on coords fixing
Andrey Utkin [Sun, 5 Feb 2012 12:41:01 +0000 (14:41 +0200)]
drawtext: add 'fix_bounds' option on coords fixing

Before, drawtext filter deliberately altered given text coordinates if
text didn't fully fit on the picture. This breaks the use case of
scrolling large text, e.g. movie closing credits.
Add 'fix_bounds', to make it usable in such cases (by setting its value to 0).
Default behavior is not changed, and non-fitting text coords are fixed.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agodrawtext: fix text_{w, h} expression vars
Andrey Utkin [Sat, 4 Feb 2012 22:14:16 +0000 (00:14 +0200)]
drawtext: fix text_{w, h} expression vars

Before, {text_,}{w,h} vars hadn't got initialized

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agocache: fix "warning: passing argument 2 of ‘av_tempfile’ from incompatible pointer...
Michael Niedermayer [Mon, 6 Feb 2012 00:02:45 +0000 (01:02 +0100)]
cache: fix "warning: passing argument 2 of ‘av_tempfile’ from incompatible pointer type"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agofix "warning: variable ‘cflags’ set but not used"
Michael Niedermayer [Mon, 6 Feb 2012 00:02:07 +0000 (01:02 +0100)]
fix "warning: variable ‘cflags’ set but not used"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoavio: Fix "warning: initialization from incompatible pointer type"
Michael Niedermayer [Sun, 5 Feb 2012 22:21:51 +0000 (23:21 +0100)]
avio: Fix "warning: initialization from incompatible pointer type"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agochangelog: fix typo
Paul B Mahol [Sun, 5 Feb 2012 23:31:12 +0000 (00:31 +0100)]
changelog: fix typo

12 years agov408: do not unconditionally compile codecs
Paul B Mahol [Sun, 5 Feb 2012 23:29:32 +0000 (00:29 +0100)]
v408: do not unconditionally compile codecs

12 years agoAdd v408 / AYUV encoder and decoder.
Carl Eugen Hoyos [Sun, 5 Feb 2012 19:43:33 +0000 (20:43 +0100)]
Add v408 / AYUV encoder and decoder.

Fixes last part of ticket #470.

Reviewed-by: Paul B Mahol
12 years agoSupport YV12 from video4linux2 devices.
Carl Eugen Hoyos [Sun, 5 Feb 2012 19:06:12 +0000 (20:06 +0100)]
Support YV12 from video4linux2 devices.

Reviewed-by: Luca Abeni
12 years agoAllow muxing VP6A into flv.
Carl Eugen Hoyos [Sun, 5 Feb 2012 16:42:26 +0000 (17:42 +0100)]
Allow muxing VP6A into flv.

Reviewed-by: James Zern
12 years agooggdec: add missing ogg_reset on seek.
Reimar Döffinger [Sat, 4 Feb 2012 20:04:19 +0000 (21:04 +0100)]
oggdec: add missing ogg_reset on seek.

It would never be called when the searched-for position
was already in the index.
In the other cases, the ogg_reset at the end of the
read_timestamp function handled it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agooggdec: fix keyframe seeking when granule_is_start is 0.
Reimar Döffinger [Sat, 4 Feb 2012 19:31:21 +0000 (20:31 +0100)]
oggdec: fix keyframe seeking when granule_is_start is 0.

In this case, the pts values will be delayed by one, but
at the same time pts values might only be supplied for e.g.
keyframes.
This results on only the frame after the keyframe having a
pts value.
As a hack, make read_timestamp return the keyframe position
together with the pts from a following frame when seeking
to a keyframe.
Fixes trac issue #438.
However it causes the read_timestamp function to return a
pos value that is actually before the packet with the
indicated pts.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agodrawtext: add missing braces around an if() block.
Andrey Utkin [Sat, 4 Feb 2012 22:14:15 +0000 (00:14 +0200)]
drawtext: add missing braces around an if() block.

Prevents uninitialized read.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoffmpeg: document avi special case
Michael Niedermayer [Sun, 5 Feb 2012 04:14:26 +0000 (05:14 +0100)]
ffmpeg: document avi special case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 5 Feb 2012 02:02:23 +0000 (03:02 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ape: fix seeking
  apedec: 8bit and 24bit support

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agodwt: fix about a dozen "warning: assignment from incompatible pointer type"
Michael Niedermayer [Sun, 5 Feb 2012 01:08:03 +0000 (02:08 +0100)]
dwt: fix about a dozen "warning: assignment from incompatible pointer type"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agodwt: fix a dozen or so "warning: initialization from incompatible pointer type"
Michael Niedermayer [Sun, 5 Feb 2012 01:00:02 +0000 (02:00 +0100)]
dwt: fix a dozen or so "warning: initialization from incompatible pointer type"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agompegaudiodec: remove unused variable
Michael Niedermayer [Sun, 5 Feb 2012 00:34:59 +0000 (01:34 +0100)]
mpegaudiodec: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoape: fix seeking
Paul B Mahol [Fri, 3 Feb 2012 18:30:18 +0000 (18:30 +0000)]
ape: fix seeking

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoadler32: add comment for the SIMD code
Michael Niedermayer [Sat, 4 Feb 2012 19:27:02 +0000 (20:27 +0100)]
adler32: add comment for the SIMD code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoadler32: rewrite using integer SIMD.
Michael Niedermayer [Sat, 4 Feb 2012 06:52:31 +0000 (07:52 +0100)]
adler32: rewrite using integer SIMD.

about twice as fast as before.
the not CONFIG_SMALL case is also droped as it is not faster than the
CONFIG_SMALL case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoRemove warning about Ogg skeleton v4.
Reimar Döffinger [Sat, 4 Feb 2012 19:15:55 +0000 (20:15 +0100)]
Remove warning about Ogg skeleton v4.

We can handle v4 just fine, the parts we currently use
are the same for v3 and v4.
v4 can in addition contain an index which we so far do
not use though.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoapedec: 8bit and 24bit support
Paul B Mahol [Fri, 3 Feb 2012 15:37:06 +0000 (15:37 +0000)]
apedec: 8bit and 24bit support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agofate: use compression level 0 for flashsv2 tests.
Clément Bœsch [Fri, 3 Feb 2012 19:28:32 +0000 (20:28 +0100)]
fate: use compression level 0 for flashsv2 tests.

Output sizes mismatch (and thus MD5) between zlib version 1.2.5 and
1.2.6 if compression level > 0. The issue doesn't affect the intra-only
tests.

12 years agoFix potential infinite discard loop.
Reimar Döffinger [Sat, 4 Feb 2012 14:27:34 +0000 (15:27 +0100)]
Fix potential infinite discard loop.

Fixes trac issue #438.
Seeking in that sample would cause ogg_read_timestamp to fail
because ogg_packet would go into a state where all packets
of stream 1 would be discarded until the end of the stream.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoadler32: avoid "too big" check in the inner loop
Michael Niedermayer [Fri, 3 Feb 2012 21:18:05 +0000 (22:18 +0100)]
adler32: avoid "too big" check in the inner loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoxvid_rc: check that write() succeeded.
Michael Niedermayer [Sat, 4 Feb 2012 00:09:29 +0000 (01:09 +0100)]
xvid_rc: check that write() succeeded.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 4 Feb 2012 01:14:54 +0000 (02:14 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dsputil: remove debug message in dsputil_init().
  movdec: Avoid av_malloc(0) in stss
  build: Drop YASM-OBJS-FFT from SUBDIR_VARS.
  build: Drop unused X86-OBJS variable.
  avconv: remove debugging cruft from do_video_out().
  avconv: factorize setting stream_index for the output packet.
  frame{crc/md5}: set the stream timebase from codec timebase.
  apedec: remove unneeded #include of get_bits.h and associated macro
  apedec: av_fast_malloc() instead of av_realloc()
  apedec: fix handling of packet sizes that are not a multiple of 4 bytes

Conflicts:
libavcodec/apedec.c
tests/ref/fate/4xm-1
tests/ref/fate/4xm-2
tests/ref/fate/aasc
tests/ref/fate/armovie-escape124
tests/ref/fate/bethsoft-vid
tests/ref/fate/cljr
tests/ref/fate/creatureshock-avs
tests/ref/fate/cscd
tests/ref/fate/cvid-partial
tests/ref/fate/deluxepaint-anm
tests/ref/fate/dfa1
tests/ref/fate/dfa10
tests/ref/fate/dfa11
tests/ref/fate/dfa2
tests/ref/fate/dfa3
tests/ref/fate/dfa4
tests/ref/fate/dfa5
tests/ref/fate/dfa6
tests/ref/fate/dfa7
tests/ref/fate/dfa8
tests/ref/fate/dfa9
tests/ref/fate/film-cvid-pcm-stereo-8bit
tests/ref/fate/flic-af11-palette-change
tests/ref/fate/flic-magiccarpet
tests/ref/fate/fraps-v2
tests/ref/fate/fraps-v3
tests/ref/fate/h264-lossless
tests/ref/fate/interplay-mve-16bit
tests/ref/fate/interplay-mve-8bit
tests/ref/fate/mimic
tests/ref/fate/motionpixels
tests/ref/fate/mpeg2-field-enc
tests/ref/fate/msvideo1-16bit
tests/ref/fate/mtv
tests/ref/fate/nuv
tests/ref/fate/pictor
tests/ref/fate/prores-alpha
tests/ref/fate/ptx
tests/ref/fate/qtrle-16bit
tests/ref/fate/qtrle-1bit
tests/ref/fate/quickdraw
tests/ref/fate/rpza
tests/ref/fate/sierra-vmd
tests/ref/fate/targa-conformance-CCM8
tests/ref/fate/targa-conformance-UCM8
tests/ref/fate/tiertex-seq
tests/ref/fate/truemotion1-15
tests/ref/fate/truemotion1-24
tests/ref/fate/tscc-15bit
tests/ref/fate/tscc-32bit
tests/ref/fate/v210
tests/ref/fate/vc1-ism
tests/ref/fate/vc1_sa00040
tests/ref/fate/vc1_sa00050
tests/ref/fate/vc1_sa10091
tests/ref/fate/vc1_sa20021
tests/ref/fate/vmnc-16bit
tests/ref/fate/vmnc-32bit
tests/ref/fate/vp5
tests/ref/fate/vp8-sign-bias
tests/ref/fate/vqa-cc
tests/ref/fate/wmv8-drm
tests/ref/fate/yop
tests/ref/fate/zmbv-8bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoapedec: remove unused variable
Michael Niedermayer [Sat, 4 Feb 2012 00:01:56 +0000 (01:01 +0100)]
apedec: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agozmbv: remove unused variable
Michael Niedermayer [Fri, 3 Feb 2012 23:44:15 +0000 (00:44 +0100)]
zmbv: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoFix png decoding on x86.
Reimar Döffinger [Fri, 3 Feb 2012 20:23:49 +0000 (21:23 +0100)]
Fix png decoding on x86.

Line sizes are only 8-byte aligned, so use unaliged loads
for add_bytes_l2 pointers.
Increasing the alignment requirement to 16 seemed a bit extreme
(png may be used for rather small sizes).
Also fix a mov that had its arguments swapped, leading
add_bytes_l2 being applied on up to 8 bytes too few.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agodsputil: remove debug message in dsputil_init().
Justin Ruggles [Wed, 10 Aug 2011 13:39:43 +0000 (09:39 -0400)]
dsputil: remove debug message in dsputil_init().

AVCodecContext.bits_per_raw_sample is used for audio too, and values other
than 8, 9, and 10 are valid.

12 years agoFix NASM compilation.
Reimar Döffinger [Fri, 3 Feb 2012 19:34:56 +0000 (20:34 +0100)]
Fix NASM compilation.

movd needs explicit register size prefix for NASM.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoRemove some warnings when compiling with mingw (mingw-w64, 32 bits)
Vincent Torri [Sun, 29 Jan 2012 09:45:22 +0000 (10:45 +0100)]
Remove some warnings when compiling with mingw (mingw-w64, 32 bits)

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomovdec: Avoid av_malloc(0) in stss
Alex Converse [Fri, 3 Feb 2012 18:43:21 +0000 (10:43 -0800)]
movdec: Avoid av_malloc(0) in stss

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agodshow: use DirectShow information to set time_base
Ramiro Polla [Fri, 3 Feb 2012 16:55:20 +0000 (14:55 -0200)]
dshow: use DirectShow information to set time_base

Fixes build after removal of AVFormatParameters.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agodshow: fix AVInputFormat declaration after ABI breakage
Ramiro Polla [Fri, 3 Feb 2012 16:50:19 +0000 (14:50 -0200)]
dshow: fix AVInputFormat declaration after ABI breakage

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agobuild: Drop YASM-OBJS-FFT from SUBDIR_VARS.
Diego Biurrun [Thu, 2 Feb 2012 22:39:23 +0000 (23:39 +0100)]
build: Drop YASM-OBJS-FFT from SUBDIR_VARS.

FFT code only appears in libavcodec, so there is no need to reset the variable
when the build templates are instantiated for other libraries.

12 years agobuild: Drop unused X86-OBJS variable.
Diego Biurrun [Thu, 2 Feb 2012 22:37:30 +0000 (23:37 +0100)]
build: Drop unused X86-OBJS variable.

12 years agoavconv: remove debugging cruft from do_video_out().
Anton Khirnov [Wed, 1 Feb 2012 09:25:19 +0000 (10:25 +0100)]
avconv: remove debugging cruft from do_video_out().

12 years agoavconv: factorize setting stream_index for the output packet.
Anton Khirnov [Wed, 1 Feb 2012 09:23:28 +0000 (10:23 +0100)]
avconv: factorize setting stream_index for the output packet.

12 years agoframe{crc/md5}: set the stream timebase from codec timebase.
Anton Khirnov [Thu, 2 Feb 2012 13:20:43 +0000 (14:20 +0100)]
frame{crc/md5}: set the stream timebase from codec timebase.

Right now those muxers use the default timebase in all cases(1/90000).

This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.

Also, extend the printed information to include the timebases and packet
pts/duration and align the columns.

Obviously changes the results of all fate tests which use those two
muxers.