Commit Graph

117 Commits

Author SHA1 Message Date
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Carl Eugen Hoyos
8dad213143 lavc: Add properties field to AVCodecContext.
The new field can hold information about losslessness and closed captions for now.
2015-07-16 12:18:30 +02:00
James Zern
e91f860ea7 vp9/update_prob: prevent out of bounds table read
the max value of the lookup in expanded form is:
(((1 << 7) - 1) << 1) - 65 + 1 + 64 = 254

add one entry of padding to inv_map_table[] to prevent out of bounds
access with non-conforming / fuzzed bitstreams

Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-30 13:24:19 +02:00
Ronald S. Bultje
d5a36edda4 vp9: fix profile check for intraonly frames.
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-25 04:29:03 +02:00
Andreas Cadhalpun
d216b9debd vp9: don't retain NULL as segmentation_map
This fixes segmentation faults, which were introduced in commit
4ba8f327.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-19 00:07:43 +02:00
Andreas Cadhalpun
28efeb6502 doc: avoid incorrect phrase 'allows to'
Also fix typo found by Lou Logan:
Sacrifying -> Sacrificing

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-16 21:48:51 +02:00
Andreas Cadhalpun
b18eac7ff2 vp9: change type of tile_size from unsigned to int64_t
Otherwise the check 'tile_size < size' treats a negative size as
unsigned, causing the check to pass. This subsequently leads to
segmentation faults.

This was originally fixed as part of Libav commit 72ca83, so the
original author is one of the following developers:
        Anton Khirnov <anton@khirnov.net>
        Diego Biurrun <diego@biurrun.de>
        Luca Barbato <lu_zero@gentoo.org>
        Martin Storsjö <martin@martin.st>

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-08 21:43:16 +02:00
Ronald S. Bultje
138581c41a vp9: clamp final zero MV if find_ref_mvs() found no suitable candidates.
This may actually result in a non-zero MV. Fixes ticket 4583.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 17:23:34 +02:00
Vittorio Giovara
3f38d4b816 vp9: Parse subsampling and report missing feature 2015-05-31 12:19:19 +02:00
Michael Niedermayer
451be676f3 Merge remote-tracking branch 'rbultje/vp9-bugfixes'
* rbultje/vp9-bugfixes:
  vp9: match another find_ref_mvs() bug in libvpx.
  vp9: fix scaled motion vector clipping for sub8x8 blocks.
  vp9: improve signbias check.
  vp9: don't allow compound references if error_resilience is enabled.
  vp9: clamp segmented lflvl before applying ref/mode deltas.
  vp9: reset loopfilter mode/ref deltas on keyframe.
  vp9: fix crash when playing back 440/440 content with width%64<56.
  vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.
  vp9: clip motion vectors in the same way as libvpx does.
  vp9: set skip flag if the block had no coded coefficients.
  vp9: apply mv scaling workaround only when subsampling is enabled.
  vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.
  vp9: fix segmentation map referencing upon framesize change.
  vp9: disable more pmulhrsw optimizations in idct16/32.
  vp9: disable all pmulhrsw in 8/16 iadst x86 optimizations.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-18 02:35:16 +02:00
Ronald S. Bultje
900e3af857 vp9: match another find_ref_mvs() bug in libvpx.
If we find a second non-sub8x8 motion vector for a non-first sub8x8
block, and the clamped value is identical to the first non-sub8x8
motion vector, then the resulting nearmv motion vector is forced to
zero.
2015-05-16 11:59:01 -04:00
Ronald S. Bultje
ccfb03ecc4 vp9: fix scaled motion vector clipping for sub8x8 blocks.
To match the obscure clipping bug behaviour in libvpx.
2015-05-16 08:36:19 -04:00
Ronald S. Bultje
68c1e91316 vp9: improve signbias check.
Otherwise it will still scale motion vectors, which leads to corrupted
prediction.
2015-05-15 21:14:08 -04:00
Ronald S. Bultje
32b6d31ef3 vp9: don't allow compound references if error_resilience is enabled.
libvpx (probably accidentally) clears the bits if error_res is set,
along with keyframe/intraonly. This probably wasn't the intention
(since it's local data), but it's behaviour we have to copy...
2015-05-15 15:43:24 -04:00
Ronald S. Bultje
5de142d316 vp9: clamp segmented lflvl before applying ref/mode deltas. 2015-05-15 15:43:23 -04:00
Ronald S. Bultje
c81677e9b7 vp9: reset loopfilter mode/ref deltas on keyframe. 2015-05-15 15:43:23 -04:00
Ronald S. Bultje
88126916c8 vp9: fix crash when playing back 440/440 content with width%64<56. 2015-05-15 15:43:23 -04:00
Ronald S. Bultje
3e634e3e98 vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422. 2015-05-15 15:43:20 -04:00
Michael Niedermayer
5e1d530f91 avcodec/vp9: Use separate memset for counts.eob
Makes no real difference, but maybe scares coverity less (CID1297578)

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 13:03:52 +02:00
Ronald S. Bultje
29045fbfd4 vp9: clip motion vectors in the same way as libvpx does.
The practical effect of this is that the scaling will wrongly not be
applied to the interpolation edge (the 3/4 constants in this patch).
In other words, we clip to the pre-scaling interpolation, even though
these should be clipped post-scaling. The resulting out-of-frame MVs
are thus automatically clipped within the visible portion of the frame,
which is probably not the intention, but is unfortunately what libvpx
does, so we need to copy that behaviour.
2015-05-14 22:13:46 -04:00
Ronald S. Bultje
96a58a8daa vp9: set skip flag if the block had no coded coefficients.
This reproduces libvpx behaviour. It seems like it originally only
targeted loopfilter behaviour, but this unfortunately effects following
block contexting and thus directs bitstream sync.
2015-05-14 20:13:43 -04:00
Ronald S. Bultje
1e4a77d001 vp9: apply mv scaling workaround only when subsampling is enabled. 2015-05-14 17:05:18 -04:00
Ronald S. Bultje
dc96c0f9fc vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability. 2015-05-14 16:38:53 -04:00
Ronald S. Bultje
e12188e143 vp9: fix segmentation map referencing upon framesize change. 2015-05-14 16:37:49 -04:00
Ronald S. Bultje
23ba4538f9 vp9: add inter-frame profile 2/3 suport. 2015-05-06 15:10:41 -04:00
Ronald S. Bultje
b224b165cb vp9: add keyframe profile 2/3 support. 2015-05-06 15:10:41 -04:00
Ronald S. Bultje
346ce5da19 vp9: parse profile 2/3 bitdepth in frame header. 2015-05-06 15:10:40 -04:00
Ronald S. Bultje
01e59d48ed vp9: add profile 2/3 to exported profiles. 2015-05-06 15:10:40 -04:00
Ronald S. Bultje
ed68fccf76 vp9: error out if chroma subsampling changes between frames.
This can happen after an intra-only frame. For reference, see:
https://groups.google.com/a/webmproject.org/forum/#!msg/webm-discuss/zaoTxREZjq8/v5Enht87AhcJ

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 20:09:44 +02:00
James Almer
079b7f6eac vp9: add profile names
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-04 18:39:51 -03:00
Ronald S. Bultje
2a7d7bef62 vp9: fix mask_edges and filter_plane_rows/cols() for 440. 2015-05-01 08:45:54 +02:00
Ronald S. Bultje
cf62f2d2d6 vp9: more specifically specify mask destination to mask_edges(). 2015-05-01 08:45:54 +02:00
Ronald S. Bultje
e4f77e6239 vp9: don't create special u/v filter masks for 444.
This fixes vp91-2-04-yuv444.webm.
2015-05-01 08:45:54 +02:00
Ronald S. Bultje
afa9d00b43 vp9: merge uv loopfilter code into generic filter_plane_rows/cols(). 2015-05-01 08:45:53 +02:00
Ronald S. Bultje
ba59a5ec42 vp9: split out loopfilter luma rows/cols functions from loopfilter_sb(). 2015-05-01 08:45:53 +02:00
Ronald S. Bultje
844799b033 vp9: invert order of two conditions.
This makes it equal to row-based loopfilter code, and also makes the
chroma/luma code identical.
2015-05-01 08:45:53 +02:00
Ronald S. Bultje
d382cc0fad vp9: use correct chroma subsampling for profile 1 inter block recon. 2015-05-01 08:45:52 +02:00
Ronald S. Bultje
d2aa6f65db vp9: use correct chroma subsampling for profile 1 intra block recon. 2015-05-01 08:45:52 +02:00
Ronald S. Bultje
ed3e0cc715 vp9: take chroma subsampling into account when walking the block tree. 2015-05-01 08:45:52 +02:00
Ronald S. Bultje
6019002f0f vp9: support non-420 chroma subsampling for profile 1 token decoding. 2015-05-01 08:45:52 +02:00
Ronald S. Bultje
2d0bea4719 vp9: increase buffer sizes for non-420 chroma subsamplings. 2015-05-01 08:45:51 +02:00
Ronald S. Bultje
a03b057ede vp9: profile 1 header decoding. 2015-05-01 08:45:51 +02:00
Ronald S. Bultje
5935513c0e vp9: fix show-existing-frames for multi-threading.
This also fixes intra-only MT failures (it was the same bug), see trac
4526 and 4527.

Tested-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-30 23:32:09 +02:00
Ronald S. Bultje
640d878bc1 vp9: fix intraonly frame decoding. 2015-04-24 16:54:31 +02:00
Ronald S. Bultje
ed45edb2f6 vp9: use aligned size to write segmentation map into cache.
The unaligned size is not handled in setctx_2d(), causing edges of images
to have improper segmentation prediction, which causes visual artifacts
at image edges a few frames later.
2015-04-24 16:54:31 +02:00
Ronald S. Bultje
d9555adf06 vp9: set timestamps for show_existing_frame return images.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 20:34:51 +02:00
Ronald S. Bultje
c82e870c12 vp9: maintain lf_delta values if feature is turned off.
This is required if it's subsequently re-enabled with no value updates
(which means, use values that were previously set).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 15:55:15 +02:00
Ronald S. Bultje
e8b4f6d6be vp9: add support for resolution changes in inter frames.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 05:09:51 +02:00
Ronald S. Bultje
1fd1f58bd6 vp9: make above buffer pointer 32-byte aligned.
Fixes ticket #4383

Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-21 17:13:46 -03:00