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

60401 Commits

Author SHA1 Message Date
Michael Niedermayer
5b93b2722d Merge commit '838740e6420538ad45982da6b1d3aa3ae91307f5'
* commit '838740e6420538ad45982da6b1d3aa3ae91307f5':
  hevc: Prevent some integer overflows

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:31:04 +01:00
Michael Niedermayer
c7b454f7a4 Merge commit 'faf03ecba03155bb1f5416713bd01da043863b43'
* commit 'faf03ecba03155bb1f5416713bd01da043863b43':
  hevc: Remove useless clip

See: b00a8b4d19
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:29:05 +01:00
Michael Niedermayer
ee3e1951af Merge commit 'a246d06fe0dc6c2ea65e95327624b4537ff9bd0d'
* commit 'a246d06fe0dc6c2ea65e95327624b4537ff9bd0d':
  hevc: clip pixels when transquant bypass is used

See: c9fe0caf7a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:26:14 +01:00
Michael Niedermayer
29ba1cff2b Merge commit 'b37e796082b2d787aff3cd5631bb89c4fd374708'
* commit 'b37e796082b2d787aff3cd5631bb89c4fd374708':
  hevc: Use uint64 to check for tile dimensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:19:39 +01:00
Michael Niedermayer
7c4b96f55e Merge commit 'd5c15ebeaf1914ea5e3e0599d4316d7c4cf74434'
* commit 'd5c15ebeaf1914ea5e3e0599d4316d7c4cf74434':
  hevc: Fix modulo operations

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_filter.c

See: 4ced5d7780
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:12:53 +01:00
Michael Niedermayer
42a29015e1 Merge commit 'a7a07cc98ac548297b5b0628cb81280e11952e3f'
* commit 'a7a07cc98ac548297b5b0628cb81280e11952e3f':
  hevc: check that VPS referenced from SPS exists

Conflicts:
	libavcodec/hevc_ps.c

See: d66bab0a69
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:04:24 +01:00
Diego Biurrun
ade4ecb42d dxva2: Use correct printf format strings 2014-01-21 14:42:44 +01:00
Diego Biurrun
766df7ca89 dxva2: Add missing #includes 2014-01-21 14:42:23 +01:00
Sam Lantinga
9d80b1ae95 dxva2: Log errors verbosely
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 12:46:29 +01:00
Sam Lantinga
5b2b23f2d6 dxva2: Retry IDirectXVideoDecoder_BeginFrame()
If the function returns E_PENDING retry for a fixed number of times.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 12:46:28 +01:00
Luca Barbato
e22ebd04bc hevc: Bound check cu_qp_delta
The T-REC-H.265-2013044 page 91 states it has to be in the range
[-(26 + s->sps->qp_bd_offset / 2), (25 + s->sps->qp_bd_offset / 2)].
2014-01-21 11:59:54 +01:00
Luca Barbato
0d999333f9 hevc: Bound check slice_qp
The T-REC-H.265-2013044 page 79 states it has to be in the range
[-s->sps->qp_bd_offset, 51].

Sample-Id: 00001386-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-01-21 11:59:30 +01:00
Luca Barbato
838740e642 hevc: Prevent some integer overflows
get_ue_golomb_long() returns an unsigned.

Sample-Id: 00001541-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-01-21 11:59:18 +01:00
Guillaume Martres
faf03ecba0 hevc: Remove useless clip
The src buffer should only contain values in the interval
[0, (1 << BIT_DEPTH) - 1].

Since shift = (BIT_DEPTH - 5), src[x] >> shift must be in
the interval [0, 31], so no clip is needed.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 11:58:52 +01:00
Guillaume Martres
a246d06fe0 hevc: clip pixels when transquant bypass is used
The reconstructed picture should always be clipped (see section 8.6.5),
previously we did not clip coding units where
cu_transquant_bypass_flag == 1.

Sample-Id: 00001325-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 11:58:37 +01:00
Luca Barbato
b37e796082 hevc: Use uint64 to check for tile dimensions
And use unsigned datatypes.

Otherwise it would overflow.

Sample-Id: 00001315-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-01-21 11:57:51 +01:00
Michael Niedermayer
d5c15ebeaf hevc: Fix modulo operations
Keep qp fields within the range.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 11:57:43 +01:00
Michael Niedermayer
a7a07cc98a hevc: check that VPS referenced from SPS exists
This matches how its done for SPS/PPS.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 11:57:36 +01:00
Stefano Sabatini
e34ad128a3 examples/muxing: reduce duration, remove wrong and misleading comment
Set duration to 10 seconds, after it was increased from 5 to 200 seconds
in 8d80f3cb87.

200 seconds will generate too much data which is annoying especially when
testing.
2014-01-21 11:52:14 +01:00
Michael Niedermayer
a459891e62 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vc1: Always reset numref when parsing a new frame header.

Conflicts:
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 04:29:59 +01:00
Michael Niedermayer
1c7d287044 Merge commit '89564be444d24f75ea5add8b6987e414cf7aa7d5'
* commit '89564be444d24f75ea5add8b6987e414cf7aa7d5':
  rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 04:20:50 +01:00
Michael Niedermayer
ca9d7c57f4 Merge commit '24eb3c791606fe98a1591c13a8b2ba6c342bb3b5'
* commit '24eb3c791606fe98a1591c13a8b2ba6c342bb3b5':
  rtmpproto: Avoid using uninitialized memory

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 04:13:57 +01:00
Michael Niedermayer
e9b836cd87 Merge commit 'd01e684186bc1631bc176f06b89d33c27ec0d24d'
* commit 'd01e684186bc1631bc176f06b89d33c27ec0d24d':
  mov: do not set avg_frame_rate in the demuxer

Conflicts:
	libavformat/mov.c

Not merged
The default fallback code that sets avg_frame_rate guesses the value
from a very small number of frames at the videos start and is wrong in
some cases for the file as a whole.
Now that makes it guess vs guess, but the code in mov is much faster

Also ideally the mov code should be fixed and give a exact avg_frame_rate
based on the actual cts from the index (CTTS/STTS)

If someone has sample(s) which show wrong fps values, please open a ticket
on trac or mail me if its private.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 04:10:44 +01:00
Michael Niedermayer
13e0109a5f fate: add a few tests for >8bpc ffvhuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 03:20:39 +01:00
Michael Niedermayer
3715f9e2c6 avcodec/lossless_videodsp: fix diff_int16_c on MIPS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 03:20:39 +01:00
Michael Niedermayer
83b67ca056 avcodec/x86/lossless_videodsp: Port lorens add_hfyu_left_prediction_ssse3/sse4 to 16bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 02:55:41 +01:00
Michael Niedermayer
63d2be7533 avcodec/x86/lossless_videodsp: use SPLATW in add_int16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 02:33:20 +01:00
Michael Niedermayer
dd2d0039b6 vc1: Always reset numref when parsing a new frame header.
Fixes an issue where the B-frame coding mode switches from interlaced
fields to interlaced frames, causing incorrect decisions in the motion
compensation code and resulting in visual artifacts.

CC: libav-stable@libav.org
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
2014-01-20 23:22:30 +01:00
Michael Niedermayer
d9779d648e Move sub_hfyu_median_prediction_int16() to losslessviddsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 23:02:58 +01:00
Michael Niedermayer
13c33c8e1f Move add_hfyu_median_prediction_int16() to losslessviddsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 22:25:45 +01:00
Michael Niedermayer
883570e6b7 Move add_hfyu_left_prediction_int16 to losslessviddsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 22:21:24 +01:00
Michael Niedermayer
f9c7b14c04 avcdoec/huffyuvenc: optimize sub_left_prediction()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 22:12:56 +01:00
Michael Niedermayer
f70d7eb20c Move add/diff_int16 to lossless_videodsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 21:32:47 +01:00
Martin Storsjö
89564be444 rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing
The normal differential timestamps can't handle negative
differences, thus send a full packet header with an absolute
timestamp in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-20 21:57:02 +02:00
Martin Storsjö
24eb3c7916 rtmpproto: Avoid using uninitialized memory
If the url ends with .flv, we stripped it but didn't initialize
rt->playpath, doing av_strlcat on an uninitialized buffer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-20 21:56:57 +02:00
Justin Ruggles
d01e684186 mov: do not set avg_frame_rate in the demuxer
The track duration is often not reliable or is not the duration
represented by the number of frames. In those cases, avg_frame_rate
was reported incorrectly. Removing this code falls back to the
default calculation in avformat_find_stream_info().

This is a partial revert of commit c3aeaa540.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-01-20 19:15:36 +00:00
Michael Niedermayer
78e39aa7ee Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Avoid a possible overflow when reading Nikon avi files.
  Add h263dsp dependency to mpeg1video and mpeg2video encoders.
  Fix compilation with --disable-hwaccel=mpeg1_xvmc,mpeg2_xvmc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 19:54:45 +01:00
Michael Niedermayer
eef74b2e97 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().

Conflicts:
	doc/APIchanges
	libavcodec/utils.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:55:22 +01:00
Michael Niedermayer
8001e9f7d1 avcodec/jpeg2000dec: fix error detection in pix_fmt_match()
Fixes out of array accesses with CODEC_FLAG_EMU_EDGE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:46:38 +01:00
Michael Niedermayer
723e7b86ea avcodec/jpeg2000dec: calculate planar and pixelsize from pixel format descriptor
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:46:37 +01:00
Michael Niedermayer
6ba02602aa avcodec/vmnc: Check that rectangles are within the picture
Prevents out of array accesses with CODEC_FLAG_EMU_EDGE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:46:37 +01:00
Michael Niedermayer
7c6cf689d8 avcodec/diracdec: allocate edges internally instead of depending on CODEC_FLAG_EMU_EDGE being not set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 17:52:55 +01:00
Michael Niedermayer
d83707c641 Merge commit '024db24912a39316b0ef0b7d793307d62da038f4'
* commit '024db24912a39316b0ef0b7d793307d62da038f4':
  mpegvideo: allocate edges when encoding.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 17:09:35 +01:00
Michael Niedermayer
d08dd32863 avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0
We currently read a whole 16x16 block from the input at a few places

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 17:04:57 +01:00
Michael Niedermayer
ea4b477a1b Merge commit 'f7e85ee996b3886c2b13e928b83277382311af96'
* commit 'f7e85ee996b3886c2b13e928b83277382311af96':
  lavc: allow the caller to override dimensions in ff_get_buffer()

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 15:07:45 +01:00
Stefano Sabatini
9ab8f3738a examples/muxing: remove redundant {} 2014-01-20 13:10:10 +01:00
Stefano Sabatini
b933c72b5e examples/muxing: change error checks, from "ret != 0" to "ret < 0"
More consistent and more future-proof.
2014-01-20 13:10:10 +01:00
Stefano Sabatini
d72c742d47 examples/muxing: factorize write_interleave code
Also log output packet information.
2014-01-20 13:10:10 +01:00
Stefano Sabatini
5e2b8e4934 examples: add remuxing example
Show how to perform streamcopy from one container to another.
2014-01-20 13:10:10 +01:00
Anton Khirnov
93c553c71e lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width(). 2014-01-20 12:52:28 +01:00