OSDN Git Service

android-x86/external-ffmpeg.git
9 years agoMerge commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4'
Michael Niedermayer [Fri, 19 Dec 2014 03:19:58 +0000 (04:19 +0100)]
Merge commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4'

* commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4':
  roqvideo: check memory allocations and propagate errors

Conflicts:
libavcodec/roqvideoenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a'
Michael Niedermayer [Fri, 19 Dec 2014 03:10:17 +0000 (04:10 +0100)]
Merge commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a'

* commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a':
  elbg: check memory allocations and propagate errors

Conflicts:
libavcodec/elbg.c
libavcodec/elbg.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'
Michael Niedermayer [Fri, 19 Dec 2014 02:57:12 +0000 (03:57 +0100)]
Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'

* commit '5d839778b9f3edb682b7f71dde4f80f07c75b098':
  lavu: Refactor side data wiping

Conflicts:
libavutil/frame.c

See: a400edbb6d00c0211de38e4f1b4f593681db91d8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb'
Michael Niedermayer [Fri, 19 Dec 2014 02:42:43 +0000 (03:42 +0100)]
Merge commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb'

* commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb':
  fate: add test for offset theora

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '67fc8a15e4182ea111cfcd05897709f09d99a33a'
Michael Niedermayer [Fri, 19 Dec 2014 02:42:16 +0000 (03:42 +0100)]
Merge commit '67fc8a15e4182ea111cfcd05897709f09d99a33a'

* commit '67fc8a15e4182ea111cfcd05897709f09d99a33a':
  theora: support different visible and coded frame size

Conflicts:
libavcodec/vp3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'a381e0cec87bcb28ebc05fe840bb937a495de736'
Michael Niedermayer [Fri, 19 Dec 2014 02:31:08 +0000 (03:31 +0100)]
Merge commit 'a381e0cec87bcb28ebc05fe840bb937a495de736'

* commit 'a381e0cec87bcb28ebc05fe840bb937a495de736':
  fate: add a DPX parser test

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '87bd298abeb901fe16383a0d267502cc7fc03878'
Michael Niedermayer [Fri, 19 Dec 2014 02:29:30 +0000 (03:29 +0100)]
Merge commit '87bd298abeb901fe16383a0d267502cc7fc03878'

* commit '87bd298abeb901fe16383a0d267502cc7fc03878':
  DPX parser

Conflicts:
libavcodec/dpx_parser.c
libavcodec/version.h

See: 8ec328668a7d10c8224ae5f591add5b388ea82ed
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '3a3790b8f8b56ee6abc93ccac280eb693675e294'
Michael Niedermayer [Fri, 19 Dec 2014 02:13:31 +0000 (03:13 +0100)]
Merge commit '3a3790b8f8b56ee6abc93ccac280eb693675e294'

* commit '3a3790b8f8b56ee6abc93ccac280eb693675e294':
  tiff: support encoding and decoding 64bit images

Conflicts:
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/version.h

See: c714cd3bd4af70e0cba1db399ca420b1f51a773d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'
Michael Niedermayer [Fri, 19 Dec 2014 01:56:45 +0000 (02:56 +0100)]
Merge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'

* commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0':
  movenc: Adjust the pts of new fragments similarly to what is done for dts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a'
Michael Niedermayer [Fri, 19 Dec 2014 01:49:36 +0000 (02:49 +0100)]
Merge commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a'

* commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a':
  libavformat: Add a muxer wrapping mpegts encoding into RTP

Conflicts:
Changelog
libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'
Michael Niedermayer [Fri, 19 Dec 2014 01:33:15 +0000 (02:33 +0100)]
Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'

* commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f':
  rtp: Initial H.261 support

Conflicts:
Changelog
libavformat/rtpdec_h261.c
libavformat/rtpenc_h261.c
libavformat/sdp.c
libavformat/version.h

See: 50a4d5cfc6749932347ee38c25b5040aea4b13a0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'adc214e6797750285a5e62634b8521db521162ad'
Michael Niedermayer [Fri, 19 Dec 2014 01:24:02 +0000 (02:24 +0100)]
Merge commit 'adc214e6797750285a5e62634b8521db521162ad'

* commit 'adc214e6797750285a5e62634b8521db521162ad':
  rtpenc: Avoid brittle switch fallthroughs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '3bb465245fed6069512e6821000391beae8a6066'
Michael Niedermayer [Fri, 19 Dec 2014 01:15:19 +0000 (02:15 +0100)]
Merge commit '3bb465245fed6069512e6821000391beae8a6066'

* commit '3bb465245fed6069512e6821000391beae8a6066':
  h261dec: Fix context initialization sequence

See: 6c1ee1a11446abbe662fc89b9dff0f0a3d5fdd55
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoqdm2: Allow hard-coding VLC tables.
Reimar Döffinger [Sun, 7 Sep 2014 11:55:23 +0000 (13:55 +0200)]
qdm2: Allow hard-coding VLC tables.

Also adds a lot of infrastructure necessary for it.
Some of it is a bit ugly though.
Increases binary size for hardcoded tables by about 12 kB,
which is about 15 kB from qdm2_table minus data and code
saved that was only used for creating it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
9 years agoaacps.c: Move large arrays to context to reduce stack usage.
Reimar Döffinger [Sat, 22 Nov 2014 20:26:45 +0000 (21:26 +0100)]
aacps.c: Move large arrays to context to reduce stack usage.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
9 years agoroqvideo: check memory allocations and propagate errors
Vittorio Giovara [Tue, 16 Dec 2014 09:33:37 +0000 (10:33 +0100)]
roqvideo: check memory allocations and propagate errors

9 years agoelbg: check memory allocations and propagate errors
Vittorio Giovara [Tue, 16 Dec 2014 09:33:36 +0000 (10:33 +0100)]
elbg: check memory allocations and propagate errors

9 years agolavu: Refactor side data wiping
Luca Barbato [Mon, 15 Dec 2014 19:38:00 +0000 (20:38 +0100)]
lavu: Refactor side data wiping

And make sure the nb_side_data field is reset as well.

Based on an initial patch from wm4 <nfxjfg@googlemail.com>.

CC: libav-stable@libav.org
9 years agofate: add test for offset theora
Vittorio Giovara [Fri, 12 Dec 2014 03:35:46 +0000 (03:35 +0000)]
fate: add test for offset theora

9 years agotheora: support different visible and coded frame size
Vittorio Giovara [Fri, 12 Dec 2014 20:27:46 +0000 (20:27 +0000)]
theora: support different visible and coded frame size

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agofate: add a DPX parser test
Vittorio Giovara [Mon, 1 Dec 2014 15:20:10 +0000 (16:20 +0100)]
fate: add a DPX parser test

9 years agoDPX parser
Paul B Mahol [Mon, 1 Dec 2014 15:20:09 +0000 (16:20 +0100)]
DPX parser

Additional improvements and fixes by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agotiff: support encoding and decoding 64bit images
Carl Eugen Hoyos [Wed, 10 Dec 2014 18:16:09 +0000 (18:16 +0000)]
tiff: support encoding and decoding 64bit images

9 years agomovenc: Adjust the pts of new fragments similarly to what is done for dts
Martin Storsjö [Sun, 23 Nov 2014 21:23:43 +0000 (23:23 +0200)]
movenc: Adjust the pts of new fragments similarly to what is done for dts

The pts and the corresponding duration is written in sidx
atoms, thus make sure these match up correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agolibavformat: Add a muxer wrapping mpegts encoding into RTP
Martin Storsjö [Mon, 9 May 2011 13:44:54 +0000 (16:44 +0300)]
libavformat: Add a muxer wrapping mpegts encoding into RTP

Since this structurally is quite different from normal RTP
(multiple streams are muxed into one single mpegts stream,
which is packetized into one single RTP session), it is kept
as a separate muxer.

Since this structurally also behaves differently than normal
RTP, all of the other muxers that do chained RTP muxing
(rtsp, sap, mp4) would need to be updated similarly to handle
this - in particular, creating one single rtp_mpegts muxer
for the whole presentation instead of one rtp muxer per stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortp: Initial H.261 support
Thomas Volkert [Sat, 6 Dec 2014 18:54:07 +0000 (19:54 +0100)]
rtp: Initial H.261 support

The packetizer only supports splitting at GOB headers - if
such aren't available frequently enough, it splits at any
random byte offset (not at a macroblock boundary either, which
would be allowed by the spec) and sends a payload header pretend
that it starts with a GOB header.

As long as a receiver doesn't try to handle such cases cleverly
but just drops broken frames, this shouldn't matter too much
in practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc: Avoid brittle switch fallthroughs
Martin Storsjö [Thu, 18 Dec 2014 10:20:11 +0000 (12:20 +0200)]
rtpenc: Avoid brittle switch fallthroughs

Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoh261dec: Fix context initialization sequence
Michael Niedermayer [Fri, 15 Aug 2014 00:50:41 +0000 (02:50 +0200)]
h261dec: Fix context initialization sequence

ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavfilter/lut: reduce dereference in the inner loop
Yayoi [Thu, 18 Dec 2014 08:08:54 +0000 (00:08 -0800)]
avfilter/lut: reduce dereference in the inner loop

For rgb, with a 1080p source, 69 to 74fps on core i5(2 core, 1.8GHz),
and 136 to 160 fps on an core i7(4770R, 3.2Ghz)
Changed the yuv code for consistency, even though the performance
increase is not as obvious as rgb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'
Michael Niedermayer [Thu, 18 Dec 2014 19:54:47 +0000 (20:54 +0100)]
Merge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'

* commit '91bfac759dfd536e439ad3e35964705012c6a5a7':
  h261enc: Disallow sliced encoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'
Michael Niedermayer [Thu, 18 Dec 2014 19:40:34 +0000 (20:40 +0100)]
Merge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'

* commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '42181740a3972e17d0097d28fabc9a1a60322d47'
Michael Niedermayer [Thu, 18 Dec 2014 19:30:07 +0000 (20:30 +0100)]
Merge commit '42181740a3972e17d0097d28fabc9a1a60322d47'

* commit '42181740a3972e17d0097d28fabc9a1a60322d47':
  rtpenc: Set the AVFMT_TS_NONSTRICT flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '01f251c44d83eedc819625d2caac9ff9697a085d'
Michael Niedermayer [Thu, 18 Dec 2014 19:22:01 +0000 (20:22 +0100)]
Merge commit '01f251c44d83eedc819625d2caac9ff9697a085d'

* commit '01f251c44d83eedc819625d2caac9ff9697a085d':
  rtpenc: Set the timestamp properly when sending mpegts data, too

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'
Michael Niedermayer [Thu, 18 Dec 2014 18:58:59 +0000 (19:58 +0100)]
Merge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'

* commit 'f2c614e8c4a935b52bbf86819128d9e797230c20':
  srtpproto: fix option flag type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/indeo3: ensure offsets are non negative
Michael Niedermayer [Thu, 18 Dec 2014 17:57:27 +0000 (18:57 +0100)]
avcodec/indeo3: ensure offsets are non negative

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/vf_spp: add gbrp support
Michael Niedermayer [Thu, 18 Dec 2014 16:46:35 +0000 (17:46 +0100)]
avfilter/vf_spp: add gbrp support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/vf_spp: add gray8 support
Michael Niedermayer [Thu, 18 Dec 2014 16:43:10 +0000 (17:43 +0100)]
avfilter/vf_spp: add gray8 support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/vf_spp: Fix pointer type warning
Michael Niedermayer [Thu, 18 Dec 2014 15:54:18 +0000 (16:54 +0100)]
avfilter/vf_spp: Fix pointer type warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/adpcm: Check idelta
Michael Niedermayer [Thu, 18 Dec 2014 15:09:31 +0000 (16:09 +0100)]
avcodec/adpcm: Check idelta

Fixes integer overflow
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoh261enc: Disallow sliced encoding
Martin Storsjö [Wed, 17 Dec 2014 10:18:03 +0000 (12:18 +0200)]
h261enc: Disallow sliced encoding

This avoids trying to do sliced encoding, even if a slice/packet
size is requested (via the -ps option or the rtp_payload_size
field), since the encoder currently doesn't support it (or at least
our decoder can't decode it, even if the h261_encode_gob_header
function is hooked up to be called from the slicing part in
mpegvideo_enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
Martin Storsjö [Wed, 17 Dec 2014 11:50:06 +0000 (13:50 +0200)]
rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc: Set the AVFMT_TS_NONSTRICT flag
Martin Storsjö [Fri, 12 Dec 2014 16:57:38 +0000 (18:57 +0200)]
rtpenc: Set the AVFMT_TS_NONSTRICT flag

In particular, when packetizing mpegts into rtp, the input packet
timestamp may come from more than one stream, which could cause
multiple packets be written with the same timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc: Set the timestamp properly when sending mpegts data, too
Martin Storsjö [Mon, 9 May 2011 13:44:37 +0000 (16:44 +0300)]
rtpenc: Set the timestamp properly when sending mpegts data, too

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agosrtpproto: fix option flag type
Tristan Matthews [Tue, 16 Dec 2014 19:07:53 +0000 (14:07 -0500)]
srtpproto: fix option flag type

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavcodec/h264: Check *log2_weight_denom
Michael Niedermayer [Thu, 18 Dec 2014 02:16:39 +0000 (03:16 +0100)]
avcodec/h264: Check *log2_weight_denom

Fixes undefined behavior
Fixes: signal_sigsegv_14768d2_2248_cov_3629497219_h264_h264___pi_20070614T182942.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc_ps: Check diff_cu_qp_delta_depth
Michael Niedermayer [Thu, 18 Dec 2014 01:09:23 +0000 (02:09 +0100)]
avcodec/hevc_ps: Check diff_cu_qp_delta_depth

Fixes undefined behavior
Fixes: asan_static-oob_17aa046_582_cov_1577759978_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: move qp_block_mask to where its used
Michael Niedermayer [Thu, 18 Dec 2014 00:55:02 +0000 (01:55 +0100)]
avcodec/hevc: move qp_block_mask to where its used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agowavdec: RIFX file format support
Thomas Volkert [Wed, 17 Dec 2014 11:04:37 +0000 (12:04 +0100)]
wavdec: RIFX file format support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: Clear delayed_pic on deallocation
Michael Niedermayer [Wed, 17 Dec 2014 20:27:37 +0000 (21:27 +0100)]
avcodec/h264: Clear delayed_pic on deallocation

Fixes use of freed memory

Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: clear filter_slice_edges() on allocation
Michael Niedermayer [Wed, 17 Dec 2014 18:42:57 +0000 (19:42 +0100)]
avcodec/hevc: clear filter_slice_edges() on allocation

This avoids use of uninitialized memory
Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dcadec: Check that the added xch channel isnt already there
Michael Niedermayer [Wed, 17 Dec 2014 14:33:05 +0000 (15:33 +0100)]
avcodec/dcadec: Check that the added xch channel isnt already there

Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'
Michael Niedermayer [Wed, 17 Dec 2014 10:57:35 +0000 (11:57 +0100)]
Merge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'

* commit '456e93bfdd4cbc5e995dea415019abd0703d0e16':
  dashenc: Adjust the start time of a segment to the end of the previous segment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'
Michael Niedermayer [Wed, 17 Dec 2014 10:36:23 +0000 (11:36 +0100)]
Merge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'

* commit '2f628d5943c12389c07d652d23d3916997f9f0f6':
  dashenc: Write segment timelines properly if the timeline has gaps

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodashenc: Adjust the start time of a segment to the end of the previous segment
Martin Storsjö [Fri, 28 Nov 2014 08:43:53 +0000 (10:43 +0200)]
dashenc: Adjust the start time of a segment to the end of the previous segment

This is the same adjustment that the mp4 muxer does to the start
timestamp of fragments, since the timestamp of a sample in an mp4
file is implicit from the sum of earlier sample durations.

This avoids gaps in the timeline (which can stop dash.js from
playing it back), and makes sure the timestamp on the segmenter
level matches what the mp4 muxer actually writes into the segments.

This is only an issue if the AVPacket duration of the last
packet of a segment doesn't point to the actual start timestamp
of the next packet (the first in the next segment).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodashenc: Write segment timelines properly if the timeline has gaps
Martin Storsjö [Fri, 28 Nov 2014 08:40:05 +0000 (10:40 +0200)]
dashenc: Write segment timelines properly if the timeline has gaps

Write a new start time if the duration of the previous segment
didn't match the start of the next one. Check that segments
actually are continuous before writing a repeat count.

This makes sure timestamps deduced from the timeline actually
match the real start timestamp as written in filenames (if
using a template containing $Time$).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavcodec/imc: dont read bits beyond the end
Michael Niedermayer [Wed, 17 Dec 2014 03:51:06 +0000 (04:51 +0100)]
avcodec/imc: dont read bits beyond the end

Fixes use of uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/utils: check the private context class
Michael Niedermayer [Wed, 17 Dec 2014 02:28:25 +0000 (03:28 +0100)]
avcodec/utils: check the private context class

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/indeo3: use signed variables to avoid underflow
Michael Niedermayer [Wed, 17 Dec 2014 02:14:21 +0000 (03:14 +0100)]
avcodec/indeo3: use signed variables to avoid underflow

Fixes out of array read
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoflacenc: calculate lower sum levels in-place.
Reimar Döffinger [Sat, 22 Nov 2014 19:05:08 +0000 (20:05 +0100)]
flacenc: calculate lower sum levels in-place.

Should improve cache usage and reduces stack usage.
Also reduces number of copies in case many levels
have the same number of bits.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
9 years agolibavutil: cosmetic: inserted spaces wherever necessary
Supraja Meedinti [Tue, 16 Dec 2014 20:31:42 +0000 (02:01 +0530)]
libavutil: cosmetic: inserted spaces wherever necessary

Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: make the first field of H264Context an AVClass
Michael Niedermayer [Wed, 17 Dec 2014 00:31:48 +0000 (01:31 +0100)]
avcodec/h264: make the first field of H264Context an AVClass

Fixes use of freed memory
Fixes: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswscale: increase yuv2rgb table headroom
Michael Niedermayer [Tue, 16 Dec 2014 21:21:21 +0000 (22:21 +0100)]
swscale: increase yuv2rgb table headroom

Fixes out of array access
Fixes: case2_bad_read_yuv2rgbx32.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mov: fix integer overflow of size
Michael Niedermayer [Tue, 16 Dec 2014 20:29:27 +0000 (21:29 +0100)]
avformat/mov: fix integer overflow of size

Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mov: check atom nesting depth
Michael Niedermayer [Tue, 16 Dec 2014 20:14:40 +0000 (21:14 +0100)]
avformat/mov: check atom nesting depth

Fixes call stack overflow
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/utvideodec: Fix handling of slice_height=0
Michael Niedermayer [Tue, 16 Dec 2014 19:45:31 +0000 (20:45 +0100)]
avcodec/utvideodec: Fix handling of slice_height=0

Fixes out of array accesses
Fixes: asan_heap-oob_25bcd7e_3783_cov_3553517262_utvideo_rgba_median.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodoc/filters: fix typos and spelling errors
Lou Logan [Tue, 16 Dec 2014 19:32:00 +0000 (10:32 -0900)]
doc/filters: fix typos and spelling errors

Prompted-by: Carl Oxwall <@oxwall>
Signed-off-by: Lou Logan <lou@lrcd.com>
9 years agoavcodec/xface: Add asserts to limit nb_words from becoming too large
Michael Niedermayer [Tue, 16 Dec 2014 17:09:16 +0000 (18:09 +0100)]
avcodec/xface: Add asserts to limit nb_words from becoming too large

Approved-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/xface: correct the XFACE_MAX_* values
Michael Niedermayer [Tue, 16 Dec 2014 17:57:54 +0000 (18:57 +0100)]
avcodec/xface: correct the XFACE_MAX_* values

Fixes out of array access

Fixes: asan_stack-oob_32c12e5_2536_cov_2442316831_lena.xface
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vmdvideo: Check len before using it in method 3
Michael Niedermayer [Tue, 16 Dec 2014 15:24:55 +0000 (16:24 +0100)]
avcodec/vmdvideo: Check len before using it in method 3

Fixes out of array access
Fixes: asan_heap-oob_4d23ba_91_cov_3853393937_128.vmd

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/hlsenc: Use av_freep() to avoid leaving stale pointers in memory
Michael Niedermayer [Tue, 16 Dec 2014 14:04:41 +0000 (15:04 +0100)]
avformat/hlsenc: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
Michael Niedermayer [Tue, 16 Dec 2014 14:03:32 +0000 (15:03 +0100)]
avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory
Michael Niedermayer [Tue, 16 Dec 2014 14:01:05 +0000 (15:01 +0100)]
avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavfi: add colorlevels filter
Paul B Mahol [Sat, 6 Dec 2014 14:04:38 +0000 (14:04 +0000)]
lavfi: add colorlevels filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years agoavformat/hlsenc: fix hls_write_trailer() on hls_start() failure
Christian Suloway [Tue, 16 Dec 2014 00:10:46 +0000 (18:10 -0600)]
avformat/hlsenc: fix hls_write_trailer() on hls_start() failure

Close segment I/O context and append segment in hls_write_trailer() only
when segment I/O context is allocated.

Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agosnow_dwt: Don't try and free members of non-existent arrays
Derek Buitenhuis [Mon, 15 Dec 2014 22:59:08 +0000 (17:59 -0500)]
snow_dwt: Don't try and free members of non-existent arrays

If allocation fails earlier on, and the next frame is processed,
the slice buffer could be left in a state where line and data_stack
have already been freed, or are otherwise null pointers.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years agovp9/x86: save one register on 32bit idct32x32.
Ronald S. Bultje [Tue, 16 Dec 2014 01:40:48 +0000 (20:40 -0500)]
vp9/x86: save one register on 32bit idct32x32.

Fixes build on win32.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '6f4364aba9d70dc5fd9f1c88b9c03bf9ea893d40'
Michael Niedermayer [Tue, 16 Dec 2014 01:23:43 +0000 (02:23 +0100)]
Merge commit '6f4364aba9d70dc5fd9f1c88b9c03bf9ea893d40'

* commit '6f4364aba9d70dc5fd9f1c88b9c03bf9ea893d40':
  mov: Fix handling of zero-length metadata values

Conflicts:
libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: Check for subtitle_out malloc failure
Michael Niedermayer [Mon, 15 Dec 2014 22:26:54 +0000 (23:26 +0100)]
ffmpeg: Check for subtitle_out malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/tiffenc: Consistently use ADD_ENTRY1()
Michael Niedermayer [Mon, 15 Dec 2014 21:45:41 +0000 (22:45 +0100)]
avcodec/tiffenc: Consistently use ADD_ENTRY1()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomov: Fix handling of zero-length metadata values
Martin Storsjö [Mon, 15 Dec 2014 10:09:10 +0000 (12:09 +0200)]
mov: Fix handling of zero-length metadata values

Since 3cec81f4d4, a zero-length metadata value would try to
allocate 2*0 bytes, where av_malloc() returns NULL.

Always add one to the allocated length, to allow space for
a null terminator in the zero-length case.

Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler
bug seems to mess up the mov muxer to the point that it writes
the wrong sort of metadata. Previously this bug was undetected,
but since 3cec81f4d4 such mov files started returning
AVERROR(ENOMEM) in the mov demuxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoMerge commit '10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0'
Michael Niedermayer [Mon, 15 Dec 2014 21:12:40 +0000 (22:12 +0100)]
Merge commit '10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0'

* commit '10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0':
  tiff: set the correct return value when check_size() fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '3c27275c1309190f2d6ed69140b67d014215b6c9'
Michael Niedermayer [Mon, 15 Dec 2014 21:00:32 +0000 (22:00 +0100)]
Merge commit '3c27275c1309190f2d6ed69140b67d014215b6c9'

* commit '3c27275c1309190f2d6ed69140b67d014215b6c9':
  tiff: Check the check_size() return value and forward it

Conflicts:
libavcodec/tiffenc.c

See: d50aa006fb3430bedc3872ba10e028a714499625
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '4690e01c3aaf495c87127e5dc74aa347197dbc0b'
Michael Niedermayer [Mon, 15 Dec 2014 20:35:43 +0000 (21:35 +0100)]
Merge commit '4690e01c3aaf495c87127e5dc74aa347197dbc0b'

* commit '4690e01c3aaf495c87127e5dc74aa347197dbc0b':
  prores: Evaluate all the quantizers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '490a3ebf36821b81f73e34ad3f554cb523dd2682'
Michael Niedermayer [Mon, 15 Dec 2014 20:34:15 +0000 (21:34 +0100)]
Merge commit '490a3ebf36821b81f73e34ad3f554cb523dd2682'

* commit '490a3ebf36821b81f73e34ad3f554cb523dd2682':
  matroskadec: Fix read-after-free in matroska_read_seek()

See: 33301f001747d7a542073c634cc81da5eff051cf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1'
Michael Niedermayer [Mon, 15 Dec 2014 20:27:05 +0000 (21:27 +0100)]
Merge commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1'

* commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1':
  mpegvideo: move REBASE_PICTURE where it is used

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '63fcedcf01247f15b72c0d1f959bb3b612853ba8'
Michael Niedermayer [Mon, 15 Dec 2014 20:19:29 +0000 (21:19 +0100)]
Merge commit '63fcedcf01247f15b72c0d1f959bb3b612853ba8'

* commit '63fcedcf01247f15b72c0d1f959bb3b612853ba8':
  mpegvideo: remove unused function declaration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: Print an error if luma_log2_weight_denom is out of range
Michael Niedermayer [Mon, 15 Dec 2014 20:10:23 +0000 (21:10 +0100)]
avcodec/hevc: Print an error if luma_log2_weight_denom is out of range

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'b2bece5e9a4dd96142962c6798e187c77b88bbfa'
Michael Niedermayer [Mon, 15 Dec 2014 20:03:49 +0000 (21:03 +0100)]
Merge commit 'b2bece5e9a4dd96142962c6798e187c77b88bbfa'

* commit 'b2bece5e9a4dd96142962c6798e187c77b88bbfa':
  hevc: always clip luma_log2_weight_denom

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavf/concatdec: handle NOPTS start_time.
Nicolas George [Mon, 15 Dec 2014 17:42:41 +0000 (18:42 +0100)]
lavf/concatdec: handle NOPTS start_time.

Fix trac ticket #3598.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoChangelog: Add 10bit spp
Michael Niedermayer [Mon, 15 Dec 2014 17:59:13 +0000 (18:59 +0100)]
Changelog: Add 10bit spp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/vf_spp: support 10bit per sample
Michael Niedermayer [Fri, 12 Dec 2014 15:22:27 +0000 (16:22 +0100)]
avfilter/vf_spp: support 10bit per sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/avdct: support >8bit per sample dcts
Michael Niedermayer [Fri, 12 Dec 2014 15:21:54 +0000 (16:21 +0100)]
avcodec/avdct: support >8bit per sample dcts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodoc/ffplay: remove duplicate threads option, this is documented in codecs.*
Michael Niedermayer [Mon, 15 Dec 2014 16:54:14 +0000 (17:54 +0100)]
doc/ffplay: remove duplicate threads option, this is documented in codecs.*

Fixes Ticket3610

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/xmv: Check return code of ff_alloc_extradata()
Michael Niedermayer [Mon, 15 Dec 2014 14:51:04 +0000 (15:51 +0100)]
avformat/xmv: Check return code of ff_alloc_extradata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/flic: se av_freep() to avoid leaving stale extradata pointer
Michael Niedermayer [Mon, 15 Dec 2014 14:49:00 +0000 (15:49 +0100)]
avformat/flic: se av_freep() to avoid leaving stale extradata pointer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/rtpdec_mpeg4: Use av_freep() to avoid leaving stale extradata pointer
Michael Niedermayer [Mon, 15 Dec 2014 14:48:35 +0000 (15:48 +0100)]
avformat/rtpdec_mpeg4: Use av_freep() to avoid leaving stale extradata pointer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/xmv: use av_freep() to avoid leaving stale extradata pointer
Michael Niedermayer [Mon, 15 Dec 2014 14:47:54 +0000 (15:47 +0100)]
avformat/xmv: use av_freep() to avoid leaving stale extradata pointer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agotiff: set the correct return value when check_size() fails
Vittorio Giovara [Fri, 12 Dec 2014 18:25:58 +0000 (18:25 +0000)]
tiff: set the correct return value when check_size() fails

Only one instance affected and solved as other occurences.

9 years agotiff: Check the check_size() return value and forward it
Luca Barbato [Wed, 10 Dec 2014 01:44:20 +0000 (02:44 +0100)]
tiff: Check the check_size() return value and forward it

Also use the same type for add_entry and check_size.

Bug-Id: CID 700699
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovarao@gmail.com>
9 years agoprores: Evaluate all the quantizers
Luca Barbato [Wed, 10 Dec 2014 00:43:50 +0000 (01:43 +0100)]
prores: Evaluate all the quantizers

Prevent an uninitialized data access.

CC: libav-stable@libav.org
Bug-Id: CID 703824 / CID 703825
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>