ffmpeg.git
5 years agoavcodec/cinepakenc: fixes and improvements
addr-see-the-website@aetey.se [Wed, 22 Jan 2014 10:21:02 +0000 (11:21 +0100)]
avcodec/cinepakenc: fixes and improvements

Fixed/improved multistrip adaptivity.
Improved R/D by optimized codebook generation.
Support for the correct color space.
Vintage compatibility.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoAdding Cinepak encoder
Tomas Härdin [Wed, 22 Jan 2014 10:12:11 +0000 (11:12 +0100)]
Adding Cinepak encoder

With permission of Tomas Härdin applied by Rl aetey.se

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'lukaszmluki/master'
Michael Niedermayer [Wed, 22 Jan 2014 00:12:18 +0000 (01:12 +0100)]
Merge remote-tracking branch 'lukaszmluki/master'

* lukaszmluki/master:
  lavf/ftp: remove double space
  lavf/libssh: fix seek with whence==SEEK_CUR
  lavf/libssh: rename context variable from s into libssh
  lavf/libssh: add av_cold attributes
  lavf/libssh: factorize create_sftp_session function
  lavf/libssh: factorize create_ssh_session function
  lavf/libssh: factorize file_stat function
  lavf/libssh: factorize open_file function
  lavf/libssh: add private_key option

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/ftp: remove double space
Lukasz Marek [Tue, 21 Jan 2014 00:26:18 +0000 (01:26 +0100)]
lavf/ftp: remove double space

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: fix seek with whence==SEEK_CUR
Lukasz Marek [Tue, 21 Jan 2014 00:18:15 +0000 (01:18 +0100)]
lavf/libssh: fix seek with whence==SEEK_CUR

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: rename context variable from s into libssh
Lukasz Marek [Tue, 21 Jan 2014 00:12:05 +0000 (01:12 +0100)]
lavf/libssh: rename context variable from s into libssh

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: add av_cold attributes
Lukasz Marek [Mon, 20 Jan 2014 23:50:27 +0000 (00:50 +0100)]
lavf/libssh: add av_cold attributes

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: factorize create_sftp_session function
Lukasz Marek [Tue, 21 Jan 2014 23:00:21 +0000 (00:00 +0100)]
lavf/libssh: factorize create_sftp_session function

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: factorize create_ssh_session function
Lukasz Marek [Tue, 21 Jan 2014 22:59:59 +0000 (23:59 +0100)]
lavf/libssh: factorize create_ssh_session function

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: factorize file_stat function
Lukasz Marek [Mon, 20 Jan 2014 22:59:59 +0000 (23:59 +0100)]
lavf/libssh: factorize file_stat function

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: factorize open_file function
Lukasz Marek [Mon, 20 Jan 2014 22:53:47 +0000 (23:53 +0100)]
lavf/libssh: factorize open_file function

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agolavf/libssh: add private_key option
Lukasz Marek [Mon, 20 Jan 2014 21:57:57 +0000 (22:57 +0100)]
lavf/libssh: add private_key option

Allows to specify private key to use during authorization.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
5 years agoavformat/mov: redesign the fps calculation
Michael Niedermayer [Tue, 21 Jan 2014 23:33:38 +0000 (00:33 +0100)]
avformat/mov: redesign the fps calculation

This uses STTS and TRUN information to calculate the fps
It seems to work with more files than the previous code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 21 Jan 2014 21:19:16 +0000 (22:19 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes

Conflicts:
libswscale/x86/rgb2rgb_template.c

See: 3033cd7555921242cbdc06d0d8aee9f8925d6a3c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5'
Michael Niedermayer [Tue, 21 Jan 2014 21:03:28 +0000 (22:03 +0100)]
Merge commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5'

* commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5':
  swscale/x86/rgb2rgb: add support for AVX

Conflicts:
libswscale/x86/rgb2rgb_template.c

See: 4729b529e60fb99356a1d9e13793835af50b3e87
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '9047491f8bcd87673eed55fb310647a03b0981e9'
Michael Niedermayer [Tue, 21 Jan 2014 20:55:20 +0000 (21:55 +0100)]
Merge commit '9047491f8bcd87673eed55fb310647a03b0981e9'

* commit '9047491f8bcd87673eed55fb310647a03b0981e9':
  swscale: add nv12/nv21->yuv420 converter

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

See: ef627bf9ecddfa888d4c6e4fd633852798c3b4a9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'eb01a25fe1452740a7f3ae2cbaff356a5c6e7806'
Michael Niedermayer [Tue, 21 Jan 2014 20:45:24 +0000 (21:45 +0100)]
Merge commit 'eb01a25fe1452740a7f3ae2cbaff356a5c6e7806'

* commit 'eb01a25fe1452740a7f3ae2cbaff356a5c6e7806':
  swscale: fix stride used in planarToNv12Wrapper()

Conflicts:
libswscale/swscale_unscaled.c

See: 94d7ca2b58af13c379d90aad595e82448743abc7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'e0ab5078a7d865f8f6fd6a6d3cbe0f380ead4a3d'
Michael Niedermayer [Tue, 21 Jan 2014 20:26:13 +0000 (21:26 +0100)]
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>
5 years agoMerge commit '025fd76e1a2623c858d8c686a73cc30980a314b0'
Michael Niedermayer [Tue, 21 Jan 2014 20:17:11 +0000 (21:17 +0100)]
Merge commit '025fd76e1a2623c858d8c686a73cc30980a314b0'

* commit '025fd76e1a2623c858d8c686a73cc30980a314b0':
  dxtory: change error code for unexpected slice configuration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'e91a3f1bdba9b4945e42c191d2e35e9844625fb4'
Michael Niedermayer [Tue, 21 Jan 2014 20:01:27 +0000 (21:01 +0100)]
Merge commit 'e91a3f1bdba9b4945e42c191d2e35e9844625fb4'

* commit 'e91a3f1bdba9b4945e42c191d2e35e9844625fb4':
  dxtory: correctly handle YUV slices with average odd height

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'ade4ecb42d2dacd18d04eb8df2afa8131e5ad653'
Michael Niedermayer [Tue, 21 Jan 2014 19:45:51 +0000 (20:45 +0100)]
Merge commit 'ade4ecb42d2dacd18d04eb8df2afa8131e5ad653'

* commit 'ade4ecb42d2dacd18d04eb8df2afa8131e5ad653':
  dxva2: Use correct printf format strings

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '766df7ca89a2398e71182f5f2b46053e3aa9bd69'
Michael Niedermayer [Tue, 21 Jan 2014 19:39:26 +0000 (20:39 +0100)]
Merge commit '766df7ca89a2398e71182f5f2b46053e3aa9bd69'

* commit '766df7ca89a2398e71182f5f2b46053e3aa9bd69':
  dxva2: Add missing #includes

See: 9056d0c94af5c09478acf0e1bc129a9c539070f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/segment: drop pointless variable oc from seg_write_packet()
Stefano Sabatini [Tue, 21 Jan 2014 19:06:49 +0000 (20:06 +0100)]
lavf/segment: drop pointless variable oc from seg_write_packet()

5 years agolavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()
Stefano Sabatini [Tue, 21 Jan 2014 18:58:41 +0000 (19:58 +0100)]
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

5 years agolavf/mpegtsenc: fix weird indent
Stefano Sabatini [Tue, 21 Jan 2014 18:56:22 +0000 (19:56 +0100)]
lavf/mpegtsenc: fix weird indent

5 years agoexamples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
Stefano Sabatini [Tue, 21 Jan 2014 18:51:28 +0000 (19:51 +0100)]
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.

5 years agoavformat/mov: Ignore the last frame for duration and fps calculation if it looks...
Michael Niedermayer [Tue, 21 Jan 2014 17:31:54 +0000 (18:31 +0100)]
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>
5 years agolossless_videodsp.asm: fix compilation.
Reimar Döffinger [Mon, 20 Jan 2014 22:23:58 +0000 (23:23 +0100)]
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>
5 years agorgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes
Michael Niedermayer [Tue, 19 Nov 2013 13:57:52 +0000 (14:57 +0100)]
rgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoswscale/x86/rgb2rgb: add support for AVX
Michael Niedermayer [Tue, 19 Nov 2013 13:46:01 +0000 (14:46 +0100)]
swscale/x86/rgb2rgb: add support for AVX

This does not yet include any actual AVX code

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoswscale: add nv12/nv21->yuv420 converter
Michael Niedermayer [Tue, 19 Nov 2013 13:17:26 +0000 (14:17 +0100)]
swscale: add nv12/nv21->yuv420 converter

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoswscale: fix stride used in planarToNv12Wrapper()
Michael Niedermayer [Tue, 19 Nov 2013 13:19:22 +0000 (14:19 +0100)]
swscale: fix stride used in planarToNv12Wrapper()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agolavc: do not force the emu edge flag
Anton Khirnov [Mon, 20 Jan 2014 14:22:09 +0000 (15:22 +0100)]
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.

5 years agodxtory: change error code for unexpected slice configuration
Kostya Shishkov [Sat, 18 Jan 2014 13:35:47 +0000 (14:35 +0100)]
dxtory: change error code for unexpected slice configuration

5 years agodxtory: correctly handle YUV slices with average odd height
Kostya Shishkov [Sat, 18 Jan 2014 13:34:30 +0000 (14:34 +0100)]
dxtory: correctly handle YUV slices with average odd height

5 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 21 Jan 2014 15:01:59 +0000 (16:01 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dxva2: Log errors verbosely

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '5b2b23f2d69e05c5fcd1c933e383fe60e185574d'
Michael Niedermayer [Tue, 21 Jan 2014 14:53:40 +0000 (15:53 +0100)]
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>
5 years agoMerge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'
Michael Niedermayer [Tue, 21 Jan 2014 14:42:51 +0000 (15:42 +0100)]
Merge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'

* commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac':
  hevc: Bound check cu_qp_delta

Conflicts:
libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '0d999333f96a34903448579bf13a3209deaee9da'
Michael Niedermayer [Tue, 21 Jan 2014 14:38:29 +0000 (15:38 +0100)]
Merge commit '0d999333f96a34903448579bf13a3209deaee9da'

* commit '0d999333f96a34903448579bf13a3209deaee9da':
  hevc: Bound check slice_qp

Conflicts:
libavcodec/hevc.c

See: aead772b5814142b0e530804486ff7970ecd9eef
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '838740e6420538ad45982da6b1d3aa3ae91307f5'
Michael Niedermayer [Tue, 21 Jan 2014 14:30:01 +0000 (15:30 +0100)]
Merge commit '838740e6420538ad45982da6b1d3aa3ae91307f5'

* commit '838740e6420538ad45982da6b1d3aa3ae91307f5':
  hevc: Prevent some integer overflows

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'faf03ecba03155bb1f5416713bd01da043863b43'
Michael Niedermayer [Tue, 21 Jan 2014 14:27:51 +0000 (15:27 +0100)]
Merge commit 'faf03ecba03155bb1f5416713bd01da043863b43'

* commit 'faf03ecba03155bb1f5416713bd01da043863b43':
  hevc: Remove useless clip

See: b00a8b4d194f1bf23343f3f42138affa1fe26641
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a246d06fe0dc6c2ea65e95327624b4537ff9bd0d'
Michael Niedermayer [Tue, 21 Jan 2014 14:25:37 +0000 (15:25 +0100)]
Merge commit 'a246d06fe0dc6c2ea65e95327624b4537ff9bd0d'

* commit 'a246d06fe0dc6c2ea65e95327624b4537ff9bd0d':
  hevc: clip pixels when transquant bypass is used

See: c9fe0caf7a1abde7ca0b1a359f551103064867b1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'b37e796082b2d787aff3cd5631bb89c4fd374708'
Michael Niedermayer [Tue, 21 Jan 2014 14:18:55 +0000 (15:18 +0100)]
Merge commit 'b37e796082b2d787aff3cd5631bb89c4fd374708'

* commit 'b37e796082b2d787aff3cd5631bb89c4fd374708':
  hevc: Use uint64 to check for tile dimensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'd5c15ebeaf1914ea5e3e0599d4316d7c4cf74434'
Michael Niedermayer [Tue, 21 Jan 2014 14:12:53 +0000 (15:12 +0100)]
Merge commit 'd5c15ebeaf1914ea5e3e0599d4316d7c4cf74434'

* commit 'd5c15ebeaf1914ea5e3e0599d4316d7c4cf74434':
  hevc: Fix modulo operations

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

See: 4ced5d7780fea2ea49444d6686d26f26b3a2160f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a7a07cc98ac548297b5b0628cb81280e11952e3f'
Michael Niedermayer [Tue, 21 Jan 2014 14:03:10 +0000 (15:03 +0100)]
Merge commit 'a7a07cc98ac548297b5b0628cb81280e11952e3f'

* commit 'a7a07cc98ac548297b5b0628cb81280e11952e3f':
  hevc: check that VPS referenced from SPS exists

Conflicts:
libavcodec/hevc_ps.c

See: d66bab0a69ac1860e78dd951ad8db1a507e75642
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodxva2: Use correct printf format strings
Diego Biurrun [Tue, 21 Jan 2014 13:42:44 +0000 (14:42 +0100)]
dxva2: Use correct printf format strings

5 years agodxva2: Add missing #includes
Diego Biurrun [Tue, 21 Jan 2014 13:42:23 +0000 (14:42 +0100)]
dxva2: Add missing #includes

5 years agodxva2: Log errors verbosely
Sam Lantinga [Sun, 19 Jan 2014 14:42:36 +0000 (15:42 +0100)]
dxva2: Log errors verbosely

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agodxva2: Retry IDirectXVideoDecoder_BeginFrame()
Sam Lantinga [Thu, 9 Jan 2014 19:59:54 +0000 (19:59 +0000)]
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>
5 years agohevc: Bound check cu_qp_delta
Luca Barbato [Sat, 11 Jan 2014 19:13:20 +0000 (20:13 +0100)]
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)].

5 years agohevc: Bound check slice_qp
Luca Barbato [Sat, 11 Jan 2014 19:13:20 +0000 (20:13 +0100)]
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
5 years agohevc: Prevent some integer overflows
Luca Barbato [Sat, 11 Jan 2014 11:33:42 +0000 (12:33 +0100)]
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
5 years agohevc: Remove useless clip
Guillaume Martres [Sat, 11 Jan 2014 21:46:25 +0000 (22:46 +0100)]
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>
5 years agohevc: clip pixels when transquant bypass is used
Guillaume Martres [Sat, 11 Jan 2014 21:46:24 +0000 (22:46 +0100)]
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>
5 years agohevc: Use uint64 to check for tile dimensions
Luca Barbato [Sat, 11 Jan 2014 02:20:45 +0000 (03:20 +0100)]
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
5 years agohevc: Fix modulo operations
Michael Niedermayer [Fri, 10 Jan 2014 20:32:05 +0000 (21:32 +0100)]
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>
5 years agohevc: check that VPS referenced from SPS exists
Michael Niedermayer [Fri, 10 Jan 2014 20:32:04 +0000 (21:32 +0100)]
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>
5 years agoexamples/muxing: reduce duration, remove wrong and misleading comment
Stefano Sabatini [Sun, 19 Jan 2014 17:32:11 +0000 (18:32 +0100)]
examples/muxing: reduce duration, remove wrong and misleading comment

Set duration to 10 seconds, after it was increased from 5 to 200 seconds
in 8d80f3cb877b890889b1673029387229648901ed.

200 seconds will generate too much data which is annoying especially when
testing.

5 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 21 Jan 2014 03:26:30 +0000 (04:26 +0100)]
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>
5 years agoMerge commit '89564be444d24f75ea5add8b6987e414cf7aa7d5'
Michael Niedermayer [Tue, 21 Jan 2014 03:20:47 +0000 (04:20 +0100)]
Merge commit '89564be444d24f75ea5add8b6987e414cf7aa7d5'

* commit '89564be444d24f75ea5add8b6987e414cf7aa7d5':
  rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '24eb3c791606fe98a1591c13a8b2ba6c342bb3b5'
Michael Niedermayer [Tue, 21 Jan 2014 03:13:50 +0000 (04:13 +0100)]
Merge commit '24eb3c791606fe98a1591c13a8b2ba6c342bb3b5'

* commit '24eb3c791606fe98a1591c13a8b2ba6c342bb3b5':
  rtmpproto: Avoid using uninitialized memory

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'd01e684186bc1631bc176f06b89d33c27ec0d24d'
Michael Niedermayer [Tue, 21 Jan 2014 02:30:25 +0000 (03:30 +0100)]
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>
5 years agofate: add a few tests for >8bpc ffvhuff
Michael Niedermayer [Tue, 21 Jan 2014 02:11:15 +0000 (03:11 +0100)]
fate: add a few tests for >8bpc ffvhuff

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/lossless_videodsp: fix diff_int16_c on MIPS
Michael Niedermayer [Tue, 21 Jan 2014 02:20:11 +0000 (03:20 +0100)]
avcodec/lossless_videodsp: fix diff_int16_c on MIPS

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/x86/lossless_videodsp: Port lorens add_hfyu_left_prediction_ssse3/sse4 to...
Michael Niedermayer [Tue, 21 Jan 2014 01:53:43 +0000 (02:53 +0100)]
avcodec/x86/lossless_videodsp: Port lorens add_hfyu_left_prediction_ssse3/sse4 to 16bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/x86/lossless_videodsp: use SPLATW in add_int16
Michael Niedermayer [Tue, 21 Jan 2014 01:33:20 +0000 (02:33 +0100)]
avcodec/x86/lossless_videodsp: use SPLATW in add_int16

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agovc1: Always reset numref when parsing a new frame header.
Michael Niedermayer [Sun, 19 Jan 2014 15:28:25 +0000 (15:28 +0000)]
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>
5 years agoMove sub_hfyu_median_prediction_int16() to losslessviddsp
Michael Niedermayer [Mon, 20 Jan 2014 21:21:24 +0000 (22:21 +0100)]
Move sub_hfyu_median_prediction_int16() to losslessviddsp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMove add_hfyu_median_prediction_int16() to losslessviddsp
Michael Niedermayer [Mon, 20 Jan 2014 21:21:24 +0000 (22:21 +0100)]
Move add_hfyu_median_prediction_int16() to losslessviddsp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMove add_hfyu_left_prediction_int16 to losslessviddsp
Michael Niedermayer [Mon, 20 Jan 2014 21:21:24 +0000 (22:21 +0100)]
Move add_hfyu_left_prediction_int16 to losslessviddsp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcdoec/huffyuvenc: optimize sub_left_prediction()
Michael Niedermayer [Mon, 20 Jan 2014 21:12:56 +0000 (22:12 +0100)]
avcdoec/huffyuvenc: optimize sub_left_prediction()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMove add/diff_int16 to lossless_videodsp
Michael Niedermayer [Mon, 20 Jan 2014 19:32:51 +0000 (20:32 +0100)]
Move add/diff_int16 to lossless_videodsp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortmpproto: Send a full, absolute timestamp if it isn't monotonically growing
Martin Storsjö [Fri, 17 Jan 2014 12:30:57 +0000 (14:30 +0200)]
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>
5 years agortmpproto: Avoid using uninitialized memory
Martin Storsjö [Fri, 17 Jan 2014 12:29:57 +0000 (14:29 +0200)]
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>
5 years agomov: do not set avg_frame_rate in the demuxer
Justin Ruggles [Thu, 16 Jan 2014 20:59:05 +0000 (15:59 -0500)]
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>
5 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Mon, 20 Jan 2014 18:54:41 +0000 (19:54 +0100)]
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>
5 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 20 Jan 2014 17:55:22 +0000 (18:55 +0100)]
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>
5 years agoavcodec/jpeg2000dec: fix error detection in pix_fmt_match()
Michael Niedermayer [Mon, 20 Jan 2014 17:40:37 +0000 (18:40 +0100)]
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>
5 years agoavcodec/jpeg2000dec: calculate planar and pixelsize from pixel format descriptor
Michael Niedermayer [Mon, 20 Jan 2014 17:31:52 +0000 (18:31 +0100)]
avcodec/jpeg2000dec: calculate planar and pixelsize from pixel format descriptor

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vmnc: Check that rectangles are within the picture
Michael Niedermayer [Mon, 20 Jan 2014 17:08:18 +0000 (18:08 +0100)]
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>
5 years agoavcodec/diracdec: allocate edges internally instead of depending on CODEC_FLAG_EMU_ED...
Michael Niedermayer [Mon, 20 Jan 2014 16:52:08 +0000 (17:52 +0100)]
avcodec/diracdec: allocate edges internally instead of depending on CODEC_FLAG_EMU_EDGE being not set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '024db24912a39316b0ef0b7d793307d62da038f4'
Michael Niedermayer [Mon, 20 Jan 2014 16:09:30 +0000 (17:09 +0100)]
Merge commit '024db24912a39316b0ef0b7d793307d62da038f4'

* commit '024db24912a39316b0ef0b7d793307d62da038f4':
  mpegvideo: allocate edges when encoding.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions...
Michael Niedermayer [Mon, 20 Jan 2014 15:36:02 +0000 (16:36 +0100)]
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>
5 years agoMerge commit 'f7e85ee996b3886c2b13e928b83277382311af96'
Michael Niedermayer [Mon, 20 Jan 2014 14:07:45 +0000 (15:07 +0100)]
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>
5 years agoexamples/muxing: remove redundant {}
Stefano Sabatini [Sun, 19 Jan 2014 17:38:53 +0000 (18:38 +0100)]
examples/muxing: remove redundant {}

5 years agoexamples/muxing: change error checks, from "ret != 0" to "ret < 0"
Stefano Sabatini [Sun, 19 Jan 2014 16:18:40 +0000 (17:18 +0100)]
examples/muxing: change error checks, from "ret != 0" to "ret < 0"

More consistent and more future-proof.

5 years agoexamples/muxing: factorize write_interleave code
Stefano Sabatini [Sun, 19 Jan 2014 16:17:14 +0000 (17:17 +0100)]
examples/muxing: factorize write_interleave code

Also log output packet information.

5 years agoexamples: add remuxing example
Stefano Sabatini [Sun, 19 Jan 2014 12:45:48 +0000 (13:45 +0100)]
examples: add remuxing example

Show how to perform streamcopy from one container to another.

5 years agolavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().
Anton Khirnov [Thu, 2 Jan 2014 10:07:11 +0000 (11:07 +0100)]
lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().

5 years agompegvideo: allocate edges when encoding.
Anton Khirnov [Wed, 1 Jan 2014 19:04:53 +0000 (20:04 +0100)]
mpegvideo: allocate edges when encoding.

Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.

5 years agolavc: allow the caller to override dimensions in ff_get_buffer()
Anton Khirnov [Wed, 1 Jan 2014 19:03:05 +0000 (20:03 +0100)]
lavc: allow the caller to override dimensions in ff_get_buffer()

This will be useful for allocating edges in the encoders.

5 years agoAvoid a possible overflow when reading Nikon avi files.
Carl Eugen Hoyos [Mon, 20 Jan 2014 10:40:35 +0000 (11:40 +0100)]
Avoid a possible overflow when reading Nikon avi files.

Suggested-by: Reimar
5 years agoAdd h263dsp dependency to mpeg1video and mpeg2video encoders.
Carl Eugen Hoyos [Mon, 20 Jan 2014 10:25:55 +0000 (11:25 +0100)]
Add h263dsp dependency to mpeg1video and mpeg2video encoders.

Fixes compilation with:
configure --disable-everything --enable-encoder=mpeg2video --disable-asm

5 years agoFix compilation with --disable-hwaccel=mpeg1_xvmc,mpeg2_xvmc
Carl Eugen Hoyos [Mon, 20 Jan 2014 10:20:46 +0000 (11:20 +0100)]
Fix compilation with --disable-hwaccel=mpeg1_xvmc,mpeg2_xvmc

5 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Mon, 20 Jan 2014 03:23:57 +0000 (04:23 +0100)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Allow decoding of slightly broken Nikon avi files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/x86/dsp: add_int16_mmx / add_int16_sse2
Michael Niedermayer [Mon, 20 Jan 2014 02:51:21 +0000 (03:51 +0100)]
avcodec/x86/dsp: add_int16_mmx / add_int16_sse2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/dsputil/huffyuv: move diff int16 and add int16 to dsputil
Michael Niedermayer [Mon, 20 Jan 2014 02:50:43 +0000 (03:50 +0100)]
avcodec/dsputil/huffyuv: move diff int16 and add int16 to dsputil

This also fixes masking the bits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoAllow decoding of slightly broken Nikon avi files.
Carl Eugen Hoyos [Mon, 20 Jan 2014 00:44:07 +0000 (01:44 +0100)]
Allow decoding of slightly broken Nikon avi files.

Fixes ticket #3330.

5 years agovp8: remove redundant "equals 1" test
Peter Ross [Sat, 18 Jan 2014 15:38:45 +0000 (02:38 +1100)]
vp8: remove redundant "equals 1" test

mb_layout is either zero or non-zero.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf: add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags()
wm4 [Sun, 19 Jan 2014 20:50:58 +0000 (21:50 +0100)]
lavf: add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>