ffmpeg.git
6 years agoMerge commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015'
Michael Niedermayer [Sun, 6 Oct 2013 09:38:02 +0000 (11:38 +0200)]
Merge commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015'

* commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015':
  swscale: provide a default scaler if none is set

Conflicts:
libswscale/utils.c

The default is left at bicubic until someone has compared the scalers
properly speed and quality wise.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '258414d0771845d20f646ffe4d4e60f22fba217c'
Michael Niedermayer [Sun, 6 Oct 2013 09:30:54 +0000 (11:30 +0200)]
Merge commit '258414d0771845d20f646ffe4d4e60f22fba217c'

* commit '258414d0771845d20f646ffe4d4e60f22fba217c':
  x86: fdct: Initialize optimized fdct implementations in the standard way

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '0b8b2ae5e93d616c2ece59f7175f483154cff918'
Michael Niedermayer [Sun, 6 Oct 2013 09:24:54 +0000 (11:24 +0200)]
Merge commit '0b8b2ae5e93d616c2ece59f7175f483154cff918'

* commit '0b8b2ae5e93d616c2ece59f7175f483154cff918':
  x86: xviddct: Employ more specific ifdefs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '4272bb6ef1533846a788c259cc498562d0704444'
Michael Niedermayer [Sun, 6 Oct 2013 09:15:40 +0000 (11:15 +0200)]
Merge commit '4272bb6ef1533846a788c259cc498562d0704444'

* commit '4272bb6ef1533846a788c259cc498562d0704444':
  doxy: Document avlog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_scale: change the default scaler to bicubic
Michael Niedermayer [Mon, 30 Sep 2013 21:44:06 +0000 (23:44 +0200)]
avfilter/vf_scale: change the default scaler to bicubic

See: [FFmpeg-devel] [PATCH] swscale/options: switch default to bicubic
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswscale/options: switch default to bicubic
Michael Niedermayer [Mon, 30 Sep 2013 20:18:50 +0000 (22:18 +0200)]
swscale/options: switch default to bicubic

Suggested-by: Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Michael Niedermayer [Sat, 5 Oct 2013 22:07:28 +0000 (00:07 +0200)]
avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Fixes Ticket2451

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/f_interleave: use the name 's' for the pointer to the private context
Paul B Mahol [Sat, 5 Oct 2013 19:16:55 +0000 (19:16 +0000)]
avfilter/f_interleave: use the name 's' for the pointer to the private context

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoconfigure: add --tempprefix option
Michael Niedermayer [Sat, 5 Oct 2013 11:48:22 +0000 (13:48 +0200)]
configure: add --tempprefix option

With this and ccache configure execution time goes down from 3.9 to 2.4 seconds

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswscale: provide a default scaler if none is set
Vittorio Giovara [Tue, 1 Oct 2013 17:11:00 +0000 (19:11 +0200)]
swscale: provide a default scaler if none is set

Lanczos for general case, sinc for upscaling, Gaussian for
downscaling. According to current literature these scalers
should be the best quality-wise algorithms for each case.

Inspired from a patch by wm4 <nfxjfg@googlemail.com>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agox86: fdct: Initialize optimized fdct implementations in the standard way
Diego Biurrun [Mon, 30 Sep 2013 13:25:47 +0000 (15:25 +0200)]
x86: fdct: Initialize optimized fdct implementations in the standard way

6 years agox86: xviddct: Employ more specific ifdefs
Diego Biurrun [Mon, 16 Sep 2013 11:47:35 +0000 (13:47 +0200)]
x86: xviddct: Employ more specific ifdefs

This avoids building mmxext and sse2 code when disabled by configure.

6 years agodoxy: Document avlog
Luca Barbato [Wed, 18 Sep 2013 13:27:52 +0000 (15:27 +0200)]
doxy: Document avlog

Provide some information for every function and add a group.

6 years agoavcodec/dpx: cosmetics: fix identation
Paul B Mahol [Sat, 5 Oct 2013 12:27:31 +0000 (12:27 +0000)]
avcodec/dpx: cosmetics: fix identation

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/dpx: reformat avpriv_report_missing_feature messages
Paul B Mahol [Sat, 5 Oct 2013 12:21:58 +0000 (12:21 +0000)]
avcodec/dpx: reformat avpriv_report_missing_feature messages

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/dpx: return proper error code for unsupported files
Paul B Mahol [Sat, 5 Oct 2013 12:18:28 +0000 (12:18 +0000)]
avcodec/dpx: return proper error code for unsupported files

Also use avpriv_report_missing_feature().

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_silencedetect: support more sample formats
Paul B Mahol [Fri, 4 Oct 2013 17:57:15 +0000 (17:57 +0000)]
avfilter/af_silencedetect: support more sample formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 5 Oct 2013 09:35:34 +0000 (11:35 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ismindex: Change the duration field to int64_t

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '583a287f6f48f263859df142e6f90993e4217c72'
Michael Niedermayer [Sat, 5 Oct 2013 09:28:58 +0000 (11:28 +0200)]
Merge commit '583a287f6f48f263859df142e6f90993e4217c72'

* commit '583a287f6f48f263859df142e6f90993e4217c72':
  ismindex: Calculate the file duration among the included tracks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'd347a7b248d4ffdc278373fecf033b0ade030343'
Michael Niedermayer [Sat, 5 Oct 2013 09:13:38 +0000 (11:13 +0200)]
Merge commit 'd347a7b248d4ffdc278373fecf033b0ade030343'

* commit 'd347a7b248d4ffdc278373fecf033b0ade030343':
  ismindex: Use the individual stream duration instead of the global one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38'
Michael Niedermayer [Sat, 5 Oct 2013 08:44:58 +0000 (10:44 +0200)]
Merge commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38'

* commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38':
  mov: Don't allocate arrays with av_malloc that will be realloced

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dpx: check packing
Michael Niedermayer [Fri, 4 Oct 2013 23:38:47 +0000 (01:38 +0200)]
avcodec/dpx: check packing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dpx: check encoding
Michael Niedermayer [Fri, 4 Oct 2013 23:38:08 +0000 (01:38 +0200)]
avcodec/dpx: check encoding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dpx: fix reading of the packing field
Michael Niedermayer [Fri, 4 Oct 2013 23:33:52 +0000 (01:33 +0200)]
avcodec/dpx: fix reading of the packing field

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dpx: fix reading 12bit dpx images, which have non zero padding bits
Michael Niedermayer [Fri, 4 Oct 2013 23:31:15 +0000 (01:31 +0200)]
avcodec/dpx: fix reading 12bit dpx images, which have non zero padding bits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/gifdec: make GIF_APP_EXT_LABEL parsing more robust
Michael Niedermayer [Fri, 4 Oct 2013 20:56:02 +0000 (22:56 +0200)]
avformat/gifdec: make GIF_APP_EXT_LABEL parsing more robust

Fixes Ticket3021

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavd/pulse: add MAINTAINERS entry
Lukasz Marek [Fri, 4 Oct 2013 18:35:14 +0000 (20:35 +0200)]
lavd/pulse: add MAINTAINERS entry

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoismindex: Change the duration field to int64_t
Martin Storsjö [Fri, 4 Oct 2013 07:14:49 +0000 (10:14 +0300)]
ismindex: Change the duration field to int64_t

This reduces the risk for overflow in pathlogical cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoismindex: Calculate the file duration among the included tracks
Martin Storsjö [Fri, 4 Oct 2013 07:12:07 +0000 (10:12 +0300)]
ismindex: Calculate the file duration among the included tracks

If the input file contains other tracks (non video/audio) that
aren't included in ismindex, the global file duration as returned
by libavformat might not be equal to the maximum of the duration
of the actual included tracks.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoismindex: Use the individual stream duration instead of the global one
Martin Storsjö [Wed, 2 Oct 2013 22:52:37 +0000 (01:52 +0300)]
ismindex: Use the individual stream duration instead of the global one

The stream duration is used for calculating the duration of the
last fragment easily without manually parsing anything else than
the mfra/tfra atoms. When the global file duration was used
previously, the duration of the last fragment could end up wrong
if the streams weren't equally long.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agomov: Don't allocate arrays with av_malloc that will be realloced
Martin Storsjö [Fri, 4 Oct 2013 06:52:02 +0000 (09:52 +0300)]
mov: Don't allocate arrays with av_malloc that will be realloced

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoavfilter/vf_histogram: use const for variables that are not supposed to change
Paul B Mahol [Fri, 4 Oct 2013 16:48:19 +0000 (16:48 +0000)]
avfilter/vf_histogram: use const for variables that are not supposed to change

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavformat/mov: force parsing of headers if stts is absent
Michael Niedermayer [Fri, 4 Oct 2013 15:39:19 +0000 (17:39 +0200)]
avformat/mov: force parsing of headers if stts is absent

Fixes Ticket2991

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavu/opt: fix doxy for av_opt_get* functions about return value
Stefano Sabatini [Fri, 4 Oct 2013 10:10:25 +0000 (12:10 +0200)]
lavu/opt: fix doxy for av_opt_get* functions about return value

Success code must be >= 0 and not == 0, consistently with the
implementation.

6 years agolavu/common: add warning to GET_UTF8 doxy
Stefano Sabatini [Wed, 2 Oct 2013 22:32:26 +0000 (00:32 +0200)]
lavu/common: add warning to GET_UTF8 doxy

Should prevent wrong uses, or at least decrease their chance.

6 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 4 Oct 2013 12:36:36 +0000 (14:36 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  x86: fdct: Only build fdct code if encoders have been enabled

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e'
Michael Niedermayer [Fri, 4 Oct 2013 12:29:59 +0000 (14:29 +0200)]
Merge commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e'

* commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e':
  rtmpproto: Validate the embedded flv packet size before copying

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '8921e32f730c191543b84e61338bc9d549aa05a3'
Michael Niedermayer [Fri, 4 Oct 2013 12:24:57 +0000 (14:24 +0200)]
Merge commit '8921e32f730c191543b84e61338bc9d549aa05a3'

* commit '8921e32f730c191543b84e61338bc9d549aa05a3':
  rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '24fee95321c1463360ba7042d026dae021854360'
Michael Niedermayer [Fri, 4 Oct 2013 12:18:22 +0000 (14:18 +0200)]
Merge commit '24fee95321c1463360ba7042d026dae021854360'

* commit '24fee95321c1463360ba7042d026dae021854360':
  rtmpproto: Move the flv header/trailer addition to append_flv_data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8'
Michael Niedermayer [Fri, 4 Oct 2013 12:13:12 +0000 (14:13 +0200)]
Merge commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8'

* commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8':
  rtmpproto: Clear the flv allocation size on reallocp failures

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f'
Michael Niedermayer [Fri, 4 Oct 2013 11:53:12 +0000 (13:53 +0200)]
Merge commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f'

* commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f':
  rtmpproto: Pass the 'live' parameter in the right unit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'
Michael Niedermayer [Fri, 4 Oct 2013 11:47:01 +0000 (13:47 +0200)]
Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'

* commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb':
  rtmpproto: Print the error code string if there's no description

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agocosmetics: group remaining .name and .long_name.
Clément Bœsch [Fri, 4 Oct 2013 13:33:20 +0000 (13:33 +0000)]
cosmetics: group remaining .name and .long_name.

See b2bed9325.

6 years agoMerge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
Michael Niedermayer [Fri, 4 Oct 2013 10:34:23 +0000 (12:34 +0200)]
Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'

* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
libavcodec/8svx.c
libavcodec/alac.c
libavcodec/cljr.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dpxenc.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/dvdsubenc.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g726.c
libavcodec/gif.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopencore-amr.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libspeexenc.c
libavcodec/libvo-amrwbenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/ljpegenc.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/proresdec_lgpl.c
libavcodec/proresenc_kostya.c
libavcodec/ra144enc.c
libavcodec/rawdec.c
libavcodec/rv10.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tta.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/wavpack.c
libavcodec/xbmenc.c
libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48'
Michael Niedermayer [Fri, 4 Oct 2013 10:01:17 +0000 (12:01 +0200)]
Merge commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48'

* commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48':
  oggparsevorbis: K&R formatting cosmetics

Conflicts:
libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '47b6cfc2a0333fb24f074d27830bf35ae5007050'
Michael Niedermayer [Fri, 4 Oct 2013 09:45:25 +0000 (11:45 +0200)]
Merge commit '47b6cfc2a0333fb24f074d27830bf35ae5007050'

* commit '47b6cfc2a0333fb24f074d27830bf35ae5007050':
  avformat/output-example: Declare link dependency on libswscale in the Makefile

Conflicts:
libavformat/Makefile

Changes to libavformat/Makefile are not merged as our build system for the examples
is different.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '80fefbed623491b92fe59ead99225f99c0d0ca08'
Michael Niedermayer [Fri, 4 Oct 2013 09:28:15 +0000 (11:28 +0200)]
Merge commit '80fefbed623491b92fe59ead99225f99c0d0ca08'

* commit '80fefbed623491b92fe59ead99225f99c0d0ca08':
  x86: cpu: Restore some explanatory comments removed in 7160bb7

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '6a5bfd4d49e7433f6de869ccfe682940dbca8740'
Michael Niedermayer [Fri, 4 Oct 2013 09:21:50 +0000 (11:21 +0200)]
Merge commit '6a5bfd4d49e7433f6de869ccfe682940dbca8740'

* commit '6a5bfd4d49e7433f6de869ccfe682940dbca8740':
  atrac: Add missing av_cold

See: 852241561d040e0b147b5c866fd4f288324fbe48
Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_frei0r: fix out of array read
Michael Niedermayer [Fri, 4 Oct 2013 09:16:35 +0000 (11:16 +0200)]
avfilter/vf_frei0r: fix out of array read

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/vobsub: raise packet even if apparently incomplete.
Clément Bœsch [Fri, 4 Oct 2013 09:25:08 +0000 (09:25 +0000)]
avformat/vobsub: raise packet even if apparently incomplete.

This restore the latest packet which was dropped from the FATE test in
dbfe61100.

6 years agox86: fdct: Only build fdct code if encoders have been enabled
Diego Biurrun [Mon, 16 Sep 2013 11:55:07 +0000 (13:55 +0200)]
x86: fdct: Only build fdct code if encoders have been enabled

fdct is only initialized if encoders are enabled.

6 years agortmpproto: Validate the embedded flv packet size before copying
Martin Storsjö [Thu, 3 Oct 2013 11:49:50 +0000 (13:49 +0200)]
rtmpproto: Validate the embedded flv packet size before copying

This wasn't an issue prior to 58404738, when the whole RTMP packet
was copied at once and the length of the individual embedded flv
packets only were validated by the flv demuxer.

Prior to this patch, this could lead to reads and writes out of bound.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agortmpproto: Readjust the end of the flv buffer if handle_metadata exited early
Martin Storsjö [Thu, 3 Oct 2013 11:44:38 +0000 (13:44 +0200)]
rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early

If the embedded flv packets were incomplete and we aborted the
copying loop early, make sure the flv buffer is trimmed to
only contain full packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agortmpproto: Move the flv header/trailer addition to append_flv_data
Martin Storsjö [Thu, 3 Oct 2013 10:29:37 +0000 (12:29 +0200)]
rtmpproto: Move the flv header/trailer addition to append_flv_data

update_offset is also called from handle_metadata, where the
packet header sizes is already included in the size.

Previously this lead to flv_data/flv_size including 15 uninitialized
bytes at the end after each call to handle_metadata, making the
flv demuxer lose sync with the stream.

Also remove leftover copying in handle_metadata. This is a leftover
from the refactoring in 5840473. (Previously this final mempcy was
the one that copied all the packets at once, while this is done
within the loop right now.) After making sure flv_size is set to
the right size, this write was out of bounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agortmpproto: Clear the flv allocation size on reallocp failures
Martin Storsjö [Thu, 3 Oct 2013 10:27:10 +0000 (12:27 +0200)]
rtmpproto: Clear the flv allocation size on reallocp failures

This was overlooked in d872fb0f7 since I assumed all the realloc
issues in the rtmp code was fixed already.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agortmpproto: Pass the 'live' parameter in the right unit
Martin Storsjö [Thu, 3 Oct 2013 07:09:56 +0000 (09:09 +0200)]
rtmpproto: Pass the 'live' parameter in the right unit

The current magic numbers passed are values in seconds, while the
parameter itself should be passed over the wire in milliseconds.

This makes (some/all?) live streams from Red5 work correctly, that
previously returned StreamNotFound even with "-rtmp_live live". After
this commit, the default 'any' also works on these streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agortmpproto: Print the error code string if there's no description
Martin Storsjö [Thu, 3 Oct 2013 05:44:51 +0000 (07:44 +0200)]
rtmpproto: Print the error code string if there's no description

On (certain streams/setups at least on) Red5, the description string
actually is present, but empty. Therefore, first try loading the
description, but if not found or empty, load the code string instead.
The code string is quite understandable in most cases anyway (like
"NetStream.Play.StreamNotFound").

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoavformat/vobsub: fix several issues.
Clément Bœsch [Sun, 29 Sep 2013 20:05:14 +0000 (22:05 +0200)]
avformat/vobsub: fix several issues.

Here is an extract of fate-samples/sub/vobsub.idx, with an additional
text at the end of each line to better identify each bitmap:

    timestamp: 00:04:55:445, filepos: 00001b000 Ace!
    timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey!
    timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work.
    timestamp: 00:05:02:035, filepos: 00001d000 <???>
    timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay?
    timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight.
    timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you.
    timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up?
    timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going?
    timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd!
    timestamp: 00:05:27:193, filepos: 000023800 Look over there!
    timestamp: 00:05:28:369, filepos: 000024800 Where are they going?
    timestamp: 00:05:28:361, filepos: 000025000 <???>
    timestamp: 00:05:29:946, filepos: 000025800 Let's go see.
    timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton.

Note the two "<???>": they are basically split subtitles (with the
previous one), which the dvdsub decoder is now supposed to reconstruct
with a previous commit. But also note that while the first chunk has
increasing timestamps,

    timestamp: 00:05:02:018, filepos: 00001c800
    timestamp: 00:05:02:035, filepos: 00001d000

...it's not the case of the second one (and this is not an exception in the
original file):

    timestamp: 00:05:28:369, filepos: 000024800
    timestamp: 00:05:28:361, filepos: 000025000

For the dvdsub decoder, they need to be "filepos'ed" ordered, but the
FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the
introduction of a sub sort method in the context, to allow giving
priority to the position, and then the timestamps. With that change, the
dvdsub decoder get fed with ordered packets.

Now the packet size estimation was also broken: the filepos differences
in the vobsub index defines the full data read between two subtitles
chunks, and it is necessary to take into account what is read by the
mpegps_read_pes_header() function since the length returned by that
function doesn't count the size of the data it reads. This is fixed with
the introduction of total_read, and {old,new}_pos. By doing this change,
we can drop the unreliable len16 heuristic and simplify the whole loop.
Note that mpegps_read_pes_header() often read more than one PES packet
(typically in one call it can read 0x1ba and 0x1be chunk along with the
relevant 0x1bd packet), which triggers the "total_read + pkt_size >
psize" check. This is an expected behaviour, which could be avoided by
having a more chunked version of mpegps_read_pes_header().

The latest change is the extraction of each stream into its own
subtitles queue. If we don't do this, the maximum size for a subtitle
chunk is broken, and the previous changes can not work. Having each
stream in a different queue requires some little adjustments in the
seek code of the demuxer.

This commit is only meaningful as a whole change and can not be easily
split. The FATE test changes because it uses the vobsub demuxer.

6 years agoavcodec/dvdsubdec: reconstruct incomplete SPU packets.
Clément Bœsch [Sun, 29 Sep 2013 20:11:51 +0000 (22:11 +0200)]
avcodec/dvdsubdec: reconstruct incomplete SPU packets.

6 years agoavcodec/dvdsubdec: extract every subtitle in a different file (debug).
Clément Bœsch [Sun, 29 Sep 2013 20:11:13 +0000 (22:11 +0200)]
avcodec/dvdsubdec: extract every subtitle in a different file (debug).

Even thought a generic solution would be more relevant, this is
currently helpful while debugging.

6 years agoavcodec/dvdsubdec: factor out rectangles reset.
Clément Bœsch [Sun, 29 Sep 2013 20:10:35 +0000 (22:10 +0200)]
avcodec/dvdsubdec: factor out rectangles reset.

6 years agocosmetics: Group .name and .long_name together in codec/format declarations
Diego Biurrun [Thu, 3 Oct 2013 20:57:53 +0000 (22:57 +0200)]
cosmetics: Group .name and .long_name together in codec/format declarations

6 years agooggparsevorbis: K&R formatting cosmetics
Vittorio Giovara [Wed, 2 Oct 2013 14:26:38 +0000 (16:26 +0200)]
oggparsevorbis: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agoavformat/output-example: Declare link dependency on libswscale in the Makefile
Diego Biurrun [Tue, 1 Oct 2013 11:34:02 +0000 (13:34 +0200)]
avformat/output-example: Declare link dependency on libswscale in the Makefile

6 years agox86: cpu: Restore some explanatory comments removed in 7160bb7
Diego Biurrun [Fri, 27 Sep 2013 13:24:55 +0000 (15:24 +0200)]
x86: cpu: Restore some explanatory comments removed in 7160bb7

6 years agoatrac: Add missing av_cold
Maxim Poliakovski [Thu, 3 Oct 2013 18:49:50 +0000 (20:49 +0200)]
atrac: Add missing av_cold

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agoffplay: avoid direct access to lowres use av_codec_g/set_lowres()
Michael Niedermayer [Thu, 3 Oct 2013 14:59:11 +0000 (16:59 +0200)]
ffplay: avoid direct access to lowres use av_codec_g/set_lowres()

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffplay: avoid direct access to max_lowres use av_codec_get_max_lowres()
Michael Niedermayer [Thu, 3 Oct 2013 14:59:11 +0000 (16:59 +0200)]
ffplay: avoid direct access to max_lowres use av_codec_get_max_lowres()

This avoids future ABI issues when the field is moved to the end of the
struct.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoatrac3: Generalize gain compensation code
Maxim Poliakovski [Mon, 30 Sep 2013 21:14:51 +0000 (23:14 +0200)]
atrac3: Generalize gain compensation code

Move it to the ATRAC common code, to reuse in the upcoming ATRAC3+ decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agoUse correct Doxygen syntax
Diego Biurrun [Thu, 3 Oct 2013 15:46:36 +0000 (17:46 +0200)]
Use correct Doxygen syntax

6 years agoatrac: Move doxygen comments to the header
Maxim Poliakovski [Mon, 30 Sep 2013 21:14:51 +0000 (23:14 +0200)]
atrac: Move doxygen comments to the header

Also update copyright info and file description.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
6 years agoatrac3: Replace a silly counter variable name with plain 'j'
Diego Biurrun [Tue, 1 Oct 2013 18:39:23 +0000 (20:39 +0200)]
atrac3: Replace a silly counter variable name with plain 'j'

6 years agoavfilter/vf_pullup: do not ignore frame field order
Paul B Mahol [Wed, 2 Oct 2013 21:13:54 +0000 (21:13 +0000)]
avfilter/vf_pullup: do not ignore frame field order

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 3 Oct 2013 19:46:42 +0000 (21:46 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  atrac3: Generalize gain compensation code

Conflicts:
libavcodec/atrac.c
libavcodec/atrac.h
libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f'
Michael Niedermayer [Thu, 3 Oct 2013 19:29:38 +0000 (21:29 +0200)]
Merge commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f'

* commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f':
  Use correct Doxygen syntax

Conflicts:
libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '4be292dac7e7f0586053fcced8d530ccf4ebef29'
Michael Niedermayer [Thu, 3 Oct 2013 19:22:55 +0000 (21:22 +0200)]
Merge commit '4be292dac7e7f0586053fcced8d530ccf4ebef29'

* commit '4be292dac7e7f0586053fcced8d530ccf4ebef29':
  atrac: Move doxygen comments to the header

Conflicts:
libavcodec/atrac.c
libavcodec/atrac.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'be0b4c70ec40d7f9ac8e416a4379d4a387421184'
Michael Niedermayer [Thu, 3 Oct 2013 19:14:54 +0000 (21:14 +0200)]
Merge commit 'be0b4c70ec40d7f9ac8e416a4379d4a387421184'

* commit 'be0b4c70ec40d7f9ac8e416a4379d4a387421184':
  atrac3: Replace a silly counter variable name with plain 'j'

Conflicts:
libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/h264_sei: make SEI type truncated message more informative
Michael Niedermayer [Thu, 3 Oct 2013 18:13:55 +0000 (20:13 +0200)]
avcodec/h264_sei: make SEI type truncated message more informative

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/jpeg2000dec: Zero code and quant style
Michael Niedermayer [Sat, 31 Aug 2013 01:35:49 +0000 (03:35 +0200)]
avcodec/jpeg2000dec: Zero code and quant style

This prevents future frames from using half initialized/inconsistent
structures
Fixes assertion failure
Fixes Ticket2897

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/tiff_common: Improve formating of long arrays
Michael Niedermayer [Sun, 29 Sep 2013 20:08:08 +0000 (22:08 +0200)]
avcodec/tiff_common: Improve formating of long arrays

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffmpeg: avoid direct access to lowres use av_codec_g/set_lowres()
Michael Niedermayer [Thu, 3 Oct 2013 14:59:11 +0000 (16:59 +0200)]
ffmpeg: avoid direct access to lowres use av_codec_g/set_lowres()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec: add av_codec_get_max_lowres()
Michael Niedermayer [Thu, 3 Oct 2013 10:27:07 +0000 (12:27 +0200)]
avcodec: add av_codec_get_max_lowres()

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_histogram: add mirrored waveform mode
Marton Balint [Wed, 2 Oct 2013 20:23:55 +0000 (22:23 +0200)]
avfilter/vf_histogram: add mirrored waveform mode

Added parameter to mirror the waveform (high values are shown on top in column mode)

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavfilter/vf_histogram: fix segfault in parade waveform mode for subsampled formats
Marton Balint [Wed, 2 Oct 2013 20:23:54 +0000 (22:23 +0200)]
avfilter/vf_histogram: fix segfault in parade waveform mode for subsampled formats

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoMerge remote-tracking branch 'rbultje/master'
Michael Niedermayer [Thu, 3 Oct 2013 10:44:17 +0000 (12:44 +0200)]
Merge remote-tracking branch 'rbultje/master'

* rbultje/master:
  Full-pixel MC functions.
  VP9 MC (ssse3) optimizations.
  Native VP9 decoder.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 3 Oct 2013 10:04:37 +0000 (12:04 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavc: mark deprecated AVCodec.max_lowres for removal on next bump

Conflicts:
libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76'
Michael Niedermayer [Thu, 3 Oct 2013 09:13:37 +0000 (11:13 +0200)]
Merge commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76'

* commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76':
  vf_interlace: do not process an already interlaced frame

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffprobe: print stream channel_layout when available
Stefano Sabatini [Tue, 1 Oct 2013 21:42:07 +0000 (23:42 +0200)]
ffprobe: print stream channel_layout when available

Fix trac ticket #3006.

6 years agoFull-pixel MC functions.
Ronald S. Bultje [Sun, 22 Sep 2013 02:03:00 +0000 (22:03 -0400)]
Full-pixel MC functions.

Decoding time of ped1080p.webm goes from 11.3sec to 11.1sec.

6 years agoVP9 MC (ssse3) optimizations.
Ronald S. Bultje [Sun, 22 Sep 2013 01:24:03 +0000 (21:24 -0400)]
VP9 MC (ssse3) optimizations.

Decoding time of ped1080p.webm goes from 20.7sec to 11.3sec.

6 years agoNative VP9 decoder.
Ronald S. Bultje [Tue, 1 Oct 2013 03:03:30 +0000 (23:03 -0400)]
Native VP9 decoder.

Authors: Ronald S. Bultje <rsbultje gmail com>,
         Clement Boesch <u pkh me>

6 years agoPrint pix_fmt name on h264 context reinitialisation.
Carl Eugen Hoyos [Wed, 2 Oct 2013 23:42:23 +0000 (01:42 +0200)]
Print pix_fmt name on h264 context reinitialisation.

6 years agoffmpeg: add support to force specific AVCodecs
Michael Niedermayer [Sat, 28 Sep 2013 15:52:45 +0000 (17:52 +0200)]
ffmpeg: add support to force specific AVCodecs

previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat: add support to force specific AVCodecs
Michael Niedermayer [Sat, 28 Sep 2013 15:52:45 +0000 (17:52 +0200)]
avformat: add support to force specific AVCodecs

previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/utils: pass AVFormatContext to find_decoder()
Michael Niedermayer [Sat, 28 Sep 2013 15:31:46 +0000 (17:31 +0200)]
avformat/utils: pass AVFormatContext to find_decoder()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoVC1 VDPAU: Mark missing reference frames as such.
Reimar Döffinger [Sat, 28 Sep 2013 09:13:35 +0000 (11:13 +0200)]
VC1 VDPAU: Mark missing reference frames as such.

Currently the code passes some nonsense values as
references instead, causing corruption with NVidia's
and assertion failures with Mesa's implementation.
For non-corrupted input this mostly happens in
interlaced bitstreams, e.g.
http://samples.mplayerhq.hu/V-codecs/WMV9/interlaced/480i30__codec_WVC1__mode_2__framerate_29.970__type_2__preproc_17.wmv.
The != VDP_INVALID handle assert does not trigger
(and probably is quite nonsense) because the frames
are initialized to 0.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
6 years agomov: fix trun / pseudo_stream_id handling
Michael Niedermayer [Wed, 2 Oct 2013 16:45:59 +0000 (18:45 +0200)]
mov: fix trun / pseudo_stream_id handling

This fixes simple concatenated h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/imgconvert/get_color_type: fix type for PAL8
Michael Niedermayer [Wed, 2 Oct 2013 16:11:28 +0000 (18:11 +0200)]
avcodec/imgconvert/get_color_type: fix type for PAL8

Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec: use designated initializers for bitstream filters
Paul B Mahol [Wed, 2 Oct 2013 17:20:29 +0000 (17:20 +0000)]
avcodec: use designated initializers for bitstream filters

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavc: mark deprecated AVCodec.max_lowres for removal on next bump
Anton Khirnov [Mon, 30 Sep 2013 12:44:24 +0000 (14:44 +0200)]
lavc: mark deprecated AVCodec.max_lowres for removal on next bump