Commit Graph

60126 Commits

Author SHA1 Message Date
Michael Niedermayer
ef25595b71 Merge commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5'
* commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5':
  swscale/x86/rgb2rgb: add support for AVX

Conflicts:
	libswscale/x86/rgb2rgb_template.c

See: 4729b529e6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 22:03:28 +01:00
Michael Niedermayer
53feab7a4e Merge commit '9047491f8bcd87673eed55fb310647a03b0981e9'
* commit '9047491f8bcd87673eed55fb310647a03b0981e9':
  swscale: add nv12/nv21->yuv420 converter

Conflicts:
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb_template.c

See: ef627bf9ec
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 21:55:20 +01:00
Michael Niedermayer
797d807869 Merge commit 'eb01a25fe1452740a7f3ae2cbaff356a5c6e7806'
* commit 'eb01a25fe1452740a7f3ae2cbaff356a5c6e7806':
  swscale: fix stride used in planarToNv12Wrapper()

Conflicts:
	libswscale/swscale_unscaled.c

See: 94d7ca2b58
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 21:45:24 +01:00
Michael Niedermayer
8a77baae6e Merge commit 'e0ab5078a7d865f8f6fd6a6d3cbe0f380ead4a3d'
* commit 'e0ab5078a7d865f8f6fd6a6d3cbe0f380ead4a3d':
  lavc: do not force the emu edge flag

Conflicts:
	libavcodec/utils.c

There should be no such bugs in ffmpeg, but merging it anyway
as its safer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 21:26:13 +01:00
Michael Niedermayer
a298f934ec Merge commit '025fd76e1a2623c858d8c686a73cc30980a314b0'
* commit '025fd76e1a2623c858d8c686a73cc30980a314b0':
  dxtory: change error code for unexpected slice configuration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 21:17:16 +01:00
Michael Niedermayer
9eb954b91d Merge commit 'e91a3f1bdba9b4945e42c191d2e35e9844625fb4'
* commit 'e91a3f1bdba9b4945e42c191d2e35e9844625fb4':
  dxtory: correctly handle YUV slices with average odd height

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 21:01:36 +01:00
Michael Niedermayer
57a0c5fa9c Merge commit 'ade4ecb42d2dacd18d04eb8df2afa8131e5ad653'
* commit 'ade4ecb42d2dacd18d04eb8df2afa8131e5ad653':
  dxva2: Use correct printf format strings

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 20:45:55 +01:00
Michael Niedermayer
075989c33c Merge commit '766df7ca89a2398e71182f5f2b46053e3aa9bd69'
* commit '766df7ca89a2398e71182f5f2b46053e3aa9bd69':
  dxva2: Add missing #includes

See: 9056d0c94a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 20:40:23 +01:00
Stefano Sabatini
f57baf743f lavf/segment: drop pointless variable oc from seg_write_packet() 2014-01-21 20:08:36 +01:00
Stefano Sabatini
169065fbfb lavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()
In particular, avoid to leave around the seg->avf pointer to freed
structure, and fix crash with:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -f segment foo-%d.ts
2014-01-21 20:08:36 +01:00
Stefano Sabatini
a2e78161ce lavf/mpegtsenc: fix weird indent 2014-01-21 20:08:36 +01:00
Stefano Sabatini
b539a72bba examples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
The avcodec_get_frame_defaults() function is deprecated and its use
doesn't seem required.
2014-01-21 20:08:36 +01:00
Michael Niedermayer
8e5e84c2a2 avformat/mov: Ignore the last frame for duration and fps calculation if it looks suspect
The used heuristic will potentially need to be finetuned
Fixes daemon404s fps.mov

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 19:48:05 +01:00
Reimar Döffinger
76421982d0 lossless_videodsp.asm: fix compilation.
Fixes these errors with nasm:
libavcodec/x86/lossless_videodsp.asm:86: error: invalid combination of opcode and operands
libavcodec/x86/lossless_videodsp.asm:88: error: invalid combination of opcode and operands
I don't know whether movd or movq was meant, but either way
maskq vs. maskd must match the mov size.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-01-21 19:46:02 +01:00
Michael Niedermayer
91c981857b rgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 18:03:41 +01:00
Michael Niedermayer
7597e6efe4 swscale/x86/rgb2rgb: add support for AVX
This does not yet include any actual AVX code

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 18:01:29 +01:00
Michael Niedermayer
9047491f8b swscale: add nv12/nv21->yuv420 converter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 17:55:07 +01:00
Michael Niedermayer
eb01a25fe1 swscale: fix stride used in planarToNv12Wrapper()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 17:54:40 +01:00
Anton Khirnov
e0ab5078a7 lavc: do not force the emu edge flag
The default get_buffer2() implementation (and possibly some
user ones) does not allocate edges when this flag is set, which may
expose bugs in some decoders. Until the 10 release is out, it is safer
to remove this part.
2014-01-21 17:54:09 +01:00
Kostya Shishkov
025fd76e1a dxtory: change error code for unexpected slice configuration 2014-01-21 17:47:50 +01:00
Kostya Shishkov
e91a3f1bdb dxtory: correctly handle YUV slices with average odd height 2014-01-21 17:47:50 +01:00
Michael Niedermayer
91f4394ed3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxva2: Log errors verbosely

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 16:02:13 +01:00
Michael Niedermayer
9056d0c94a Merge commit '5b2b23f2d69e05c5fcd1c933e383fe60e185574d'
* commit '5b2b23f2d69e05c5fcd1c933e383fe60e185574d':
  dxva2: Retry IDirectXVideoDecoder_BeginFrame()

This also adds a missig #include to prevent breaking building

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:56:03 +01:00
Michael Niedermayer
a69dd1163b Merge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'
* commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac':
  hevc: Bound check cu_qp_delta

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:42:51 +01:00
Michael Niedermayer
58f437c3f6 Merge commit '0d999333f96a34903448579bf13a3209deaee9da'
* commit '0d999333f96a34903448579bf13a3209deaee9da':
  hevc: Bound check slice_qp

Conflicts:
	libavcodec/hevc.c

See: aead772b58
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-21 15:38:29 +01:00
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