1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

32041 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
b453e76842 lavc/qdrw: Also support real-world qdraw images. 2015-05-07 01:21:08 +02:00
Michael Niedermayer
0c015aa95c avcodec/tableprint_vlc: Do not define functions to nothing
This avoids potential warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-07 00:52:47 +02:00
Michael Niedermayer
1caff5731d Merge commit '04070dbca0688ab1e24528ce5c135254a9a79c47'
* commit '04070dbca0688ab1e24528ce5c135254a9a79c47':
  libx265: Fix 'braces around scalar initializer' warning

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 21:46:52 +02:00
Michael Niedermayer
39e89f5211 Merge commit '34efb8a169e4551326e069be47125c6c2cb7ab90'
* commit '34efb8a169e4551326e069be47125c6c2cb7ab90':
  quickdraw: Support direct pixel blocks

Conflicts:
	Changelog
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 20:40:26 +02:00
Michael Niedermayer
251f9dcf22 Merge commit 'bb2cb0a66d86ec4ad9f43a488e8b6ab894c22d2f'
* commit 'bb2cb0a66d86ec4ad9f43a488e8b6ab894c22d2f':
  quickdraw: Switch to greedy parsing

Conflicts:
	libavcodec/qdrw.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 20:32:52 +02:00
Michael Niedermayer
d423fc12e6 Merge commit 'd00f1e0fc10bb945cdf140a6c320eb0c9cd25162'
* commit 'd00f1e0fc10bb945cdf140a6c320eb0c9cd25162':
  quickdraw: Convert to bytestream2

Conflicts:
	libavcodec/qdrw.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 20:23:54 +02:00
Andreas Cadhalpun
75fc81c831 diracdec: check that block length is valid
In init_planes p->xblen and p->yblen are set to:
            p->xblen = s->plane[0].xblen >> s->chroma_x_shift;
            p->yblen = s->plane[0].yblen >> s->chroma_y_shift;

These are later used as block_w and block_h arguments of
s->vdsp.emulated_edge_mc. If one of them is 0 it triggers an av_assert2
in emulated_edge_mc:
    av_assert2(start_x < end_x && block_w > 0);
    av_assert2(start_y < end_y && block_h > 0);

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 18:02:35 +02:00
Andreas Cadhalpun
4b13a542a2 dirac: use and forward error codes
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 17:50:09 +02:00
Michael Niedermayer
0a6b410edf avcodec/vp8: Suppress empty body warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 16:03:56 +02:00
Vittorio Giovara
04070dbca0 libx265: Fix 'braces around scalar initializer' warning
x265 Reordered the x265_picture fields in the commit

51b1518de2 (diff-945b5354d8767dfac13334f2d22cf58fR107)

Now the first field is an integer and not an array.
2015-05-06 14:53:29 +01:00
Vittorio Giovara
34efb8a169 quickdraw: Support direct pixel blocks
Data is stored in separated components so rework decode_rle() to support
stepping and offsets.
2015-05-06 14:27:34 +01:00
Vittorio Giovara
bb2cb0a66d quickdraw: Switch to greedy parsing
Quickdraw packs data as a series of codes that the application is supposed
to handle, but it does not define any order in which they might appear.
Since it's unfeasible to support *all* opcodes defined by the spec,
only handle well-known blocks containing video data and ignore any unknown
or unsupported ones.

Move palette loading and rle decoding to separate functions to resue them
in other blocks and drop format initialization in init since it can
support more formats than pal8.

Validate width and height.
2015-05-06 14:26:30 +01:00
Vittorio Giovara
d00f1e0fc1 quickdraw: Convert to bytestream2
Add appropriate error messages and reduce r, g, b variables scope.
Drop the now redundant line checks in RLE decoding.
2015-05-06 14:26:30 +01:00
Michael Niedermayer
a2190de52d avcodec/diracdec: Fix types and wraparounds in dirac_decode_picture_header()
previously various variables had a too small type to support the required 32bit unsigned
range allowed from the spec

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 02:44:21 +02:00
Andreas Cadhalpun
d93181ef3e diracdec: check if reference could not be allocated
s->ref_pics[i] is later used as ref argument of interpolate_refplane,
where it is dereferenced.

If it is NULL, it causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 01:54:51 +02:00
Andreas Cadhalpun
9e66b39aa8 diracdec: avoid overflow of bytes*8 in decode_lowdelay
If bytes is large enough, bytes*8 can overflow and become negative.

In that case 'bufsize -= bytes*8' causes bufsize to increase instead of
decrease.

This leads to a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 00:28:52 +02:00
Michael Niedermayer
5a455dd011 avcodec/diracdec: Move buf[] read after size check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 22:01:58 +02:00
Andreas Cadhalpun
984f50deb2 diracdec: prevent overflow in data_unit_size check
buf_idx + data_unit_size can overflow, causing the '> buf_size' check to
wrongly fail.

This causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 21:52:31 +02: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
Andreas Cadhalpun
60f1cc4a1f alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:10:52 +02:00
Andreas Cadhalpun
94bb1ce882 alsdec: check sample pointer range in revert_channel_correlation
Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:06:58 +02:00
Andreas Cadhalpun
110f7f35fb aacpsy: correct calculation of minath in psy_3gpp_init
The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
This patch uses the first order approximation to determine it.

For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
not the one at 3410 (-5.24237967).

CC: libav-stabl@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:28:02 +02:00
Andreas Cadhalpun
e191aaca44 alsdec: limit avctx->bits_per_raw_sample to 32
avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:22:29 +02:00
Andreas Cadhalpun
8fc8024ea5 aasc: return correct buffer size from aasc_decode_frame
CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:18:59 +02:00
Michael Niedermayer
7f45f7fc7f avcodec/mpeg12dec: use the correct dimensions for checking SAR
Fixes Ticket4533

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 04:33:44 +02:00
Michael Niedermayer
6ef3426d90 avcodec/x86/deinterlace: use INIT_MMX like other asm code does too 2015-05-05 02:41:15 +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
Carl Eugen Hoyos
d90f91c1c8 lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.
Reported and early patch version tested by forum user gridtank.
Reviewed-by: Tomas Härdin
2015-05-04 17:44:14 +02:00
Michael Niedermayer
d43cd6b08e avcodec/ffv1dec: Check chroma shift parameters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Michael Niedermayer
03baa861ea avcodec/ffv1dec: More completely check micro_version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Michael Niedermayer
3dfbdb328e avcodec/ffv1dec: Check quant table symbols more completely
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Anshul Maheshwari
a6b630e9b6 avcodec/ccaption_dec: correcting line breaks in cc
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 23:38:57 +02:00
Andreas Cadhalpun
372aa0777a pngdec: don't use AV_PIX_FMT_MONOBLACK for apng
AV_PIX_FMT_MONOBLACK has the AV_PIX_FMT_FLAG_BITSTREAM flag, i.e.
linesize can be smaller than width.

Since x_offset is only check against the width, this can lead to
x_offset * bpp >= image_linesize.

In this case ptr could be set to a position outside the image_buf in
png_handle_row, leading to memory corruption and thus crashes.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 21:50:09 +02:00
Andreas Cadhalpun
8f760be4d3 pngdec: return correct error code from decode_frame_common
During the loop ret can get changed. Since it is not set on all failure
paths, decode_frame_common can return 0 even though an error occurred.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 20:28:35 +02:00
Andreas Cadhalpun
287dbb0771 pngdec: check s->last_picture.f->data[0] before using it
This check was removed in commit 08aec6f6, but
s->last_picture.f->data[0] is still used in handle_p_frame_apng
unconditionally.

This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 17:24:28 +02:00
Michael Niedermayer
042260cde4 avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 16:37:10 +02:00
Michael Niedermayer
29ef54aa90 avcodec/nvenc: Make pix_fmts_nvenc const
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 04:14:01 +02:00
Jérôme Martinez
14605a0b99 ffv1dec: plane_index is 1 in case of version 4 gray+alpha.
Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:55:12 +02:00
Michael Niedermayer
4e8ee7acb8 libavcodec/svq3: clarify unknown_flag by renaming to has_watermark
The name is based on how the field is used in the code

Reviewed-by: compn <tempn@mi.rr.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 15:34:02 +02:00
Michael Niedermayer
dfc0708e23 avcodec/x86/dct-test: Use uint8_t for idct_simple_mmx_perm
The table contains no element outside the unsigned 8bit range

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 13:43:15 +02:00
Michael Niedermayer
270e647adc avcodec/x86/dct-test: Make static table const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 13:42:46 +02:00
Michael Niedermayer
6197672720 avcodec/svq3: Print unknown fields at debug level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 02:58:00 +02:00
Michael Niedermayer
d56245f770 Merge remote-tracking branch 'rbultje/vp9-profile1-wip'
* rbultje/vp9-profile1-wip:
  vp9: add fate test for 422.
  vp9: copy bug in libvpx for 4:2:2 chroma bs=8x4/4x4 prediction.
  vp9: add yuv440 fate test.
  vp9: fix mask_edges and filter_plane_rows/cols() for 440.
  vp9: more specifically specify mask destination to mask_edges().
  vp9: add fate test for profile 1 444.
  vp9: don't create special u/v filter masks for 444.
  vp9: merge uv loopfilter code into generic filter_plane_rows/cols().
  vp9: split out loopfilter luma rows/cols functions from loopfilter_sb().
  vp9: invert order of two conditions.
  vp9: use correct chroma subsampling for profile 1 inter block recon.
  vp9: use correct chroma subsampling for profile 1 intra block recon.
  vp9: take chroma subsampling into account when walking the block tree.
  vp9: support non-420 chroma subsampling for profile 1 token decoding.
  vp9: increase buffer sizes for non-420 chroma subsamplings.
  vp9: profile 1 header decoding.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 22:23:48 +02:00
Carl Eugen Hoyos
3ecb82dd41 dnxhddec: Fix pixel format change
Regression introduced in 598f7d046c.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-01 14:52:24 +01:00
Vittorio Giovara
6503cbf842 ffv1enc: Add const attribute to input frame
warning: assigning to 'AVFrame *' (aka 'struct AVFrame *') from
         'const AVFrame *' (aka 'const struct AVFrame *') discards
         qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
2015-05-01 14:52:24 +01:00
Michael Niedermayer
c9ac9adb46 avcodec/h264: Remove failure on data partitioning
decode all NAL units instead

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 12:30:57 +02:00
Ronald S. Bultje
6f63bdbae6 vp9: copy bug in libvpx for 4:2:2 chroma bs=8x4/4x4 prediction. 2015-05-01 08:45:55 +02: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