ffmpeg.git
7 years agosws: Support error diffusion dither for mono output
Michael Niedermayer [Fri, 18 Jan 2013 22:01:08 +0000 (23:01 +0100)]
sws: Support error diffusion dither for mono output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc/filters: create a dedicated "Examples" subsection for fade, and use @itemize
Stefano Sabatini [Fri, 18 Jan 2013 18:00:35 +0000 (19:00 +0100)]
doc/filters: create a dedicated "Examples" subsection for fade, and use @itemize

7 years agolavfi/fade: accept shorthand syntax
Stefano Sabatini [Fri, 18 Jan 2013 17:56:29 +0000 (18:56 +0100)]
lavfi/fade: accept shorthand syntax

7 years agodoc/filters: avoid @example for showing the drawbox shorthand syntax
Stefano Sabatini [Fri, 18 Jan 2013 17:36:35 +0000 (18:36 +0100)]
doc/filters: avoid @example for showing the drawbox shorthand syntax

Improve overall consistency.

7 years agogolomb: check log validity before shifting
Michael Niedermayer [Sat, 12 Jan 2013 21:14:25 +0000 (22:14 +0100)]
golomb: check log validity before shifting

Fixes invalid right shift in fate-cavs

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovf_fade: support YUVA422P & YUVA444P
Paul B Mahol [Fri, 18 Jan 2013 10:41:09 +0000 (10:41 +0000)]
vf_fade: support YUVA422P & YUVA444P

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoh264/get_lowest_part_list_y: remove unneeded operations
Michael Niedermayer [Wed, 16 Jan 2013 00:26:44 +0000 (01:26 +0100)]
h264/get_lowest_part_list_y: remove unneeded operations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 18 Jan 2013 12:54:38 +0000 (13:54 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: avoid pointless copying of ref lists
  lavr: always reset mix function names and pointers in mix_function_init()
  lavr: call mix_function_init() in ff_audio_mix_set_matrix()
  fate: update ref after rv30_loop_filter fix
  rv30: fix masking in rv30_loop_filter()

Conflicts:
tests/ref/fate/filter-delogo
tests/ref/fate/rv30

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '80ac87c13dc8c6c063e26a464c5c542357c0583f'
Michael Niedermayer [Fri, 18 Jan 2013 12:36:39 +0000 (13:36 +0100)]
Merge commit '80ac87c13dc8c6c063e26a464c5c542357c0583f'

* commit '80ac87c13dc8c6c063e26a464c5c542357c0583f':
  lavc: support ZenoXVID custom tag
  libcdio: support recent cdio-paranoia
  float_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window
  theora: Skip zero-sized headers

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix opencv detection.
Jonas Bechtel [Sun, 13 Jan 2013 20:45:15 +0000 (21:45 +0100)]
Fix opencv detection.

This commit changes the ".so" argument placement in check_ld sub-program.

7 years agoh264: avoid pointless copying of ref lists
Anton Khirnov [Thu, 17 Jan 2013 11:25:31 +0000 (12:25 +0100)]
h264: avoid pointless copying of ref lists

ref_list is constructed from other fields per slice when needed, so do
not copy it for both frame and slice threading.
default_ref_list is constructed per frame and still needs to be copied
to per-slice contexts for slice threading, but a copy is not needed for
frame threading.

7 years agoavcodec_decode_audio: do not trust the channel layout, use the channel count.
Michael Niedermayer [Fri, 18 Jan 2013 00:28:44 +0000 (01:28 +0100)]
avcodec_decode_audio: do not trust the channel layout, use the channel count.

Fixes memory corruption

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavr: always reset mix function names and pointers in mix_function_init()
Justin Ruggles [Wed, 16 Jan 2013 19:18:38 +0000 (14:18 -0500)]
lavr: always reset mix function names and pointers in mix_function_init()

CC: libav-stable@libav.org
7 years agolavr: call mix_function_init() in ff_audio_mix_set_matrix()
Justin Ruggles [Wed, 16 Jan 2013 19:15:57 +0000 (14:15 -0500)]
lavr: call mix_function_init() in ff_audio_mix_set_matrix()

This is needed if a custom matrix is set by the user after opening the
AVAudioResampleContext because the matrix channel count can change if
different mixing coefficients are used.

CC:libav-stable@libav.org

7 years agomlpdec: dont leave a invalid huff_lsb in the context.
Michael Niedermayer [Thu, 17 Jan 2013 23:22:39 +0000 (00:22 +0100)]
mlpdec: dont leave a invalid huff_lsb in the context.

Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegvideo: reset context state on failed thread update.
Michael Niedermayer [Thu, 17 Jan 2013 21:45:12 +0000 (22:45 +0100)]
mpegvideo: reset context state on failed thread update.

Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: update ref after rv30_loop_filter fix
Luca Barbato [Thu, 17 Jan 2013 22:06:46 +0000 (23:06 +0100)]
fate: update ref after rv30_loop_filter fix

7 years agorv30: fix masking in rv30_loop_filter()
Xi Wang [Thu, 17 Jan 2013 06:24:15 +0000 (01:24 -0500)]
rv30: fix masking in rv30_loop_filter()

The mask `x && (1 << y)' is incorrect and always yields true.

The correct form should be `x & (1 << y)'.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agolavc: support ZenoXVID custom tag
Luca Barbato [Thu, 17 Jan 2013 13:12:44 +0000 (14:12 +0100)]
lavc: support ZenoXVID custom tag

Looks like this kind of samples are produced by certain Russian
equipment.

7 years agolibcdio: support recent cdio-paranoia
Luca Barbato [Thu, 17 Jan 2013 10:24:01 +0000 (11:24 +0100)]
libcdio: support recent cdio-paranoia

Upstream decided to split the paranoia interface and move the headers
accordingly.

7 years agoUse new function av_codec_get_tag2() in ffmpeg.c.
Carl Eugen Hoyos [Thu, 17 Jan 2013 19:46:21 +0000 (20:46 +0100)]
Use new function av_codec_get_tag2() in ffmpeg.c.

Fixes ticket #1953.

7 years agoAdd a new function av_codec_get_tag2().
Carl Eugen Hoyos [Thu, 17 Jan 2013 19:44:33 +0000 (20:44 +0100)]
Add a new function av_codec_get_tag2().

av_codec_get_tag() may return 0 both in case a codec_tag was
found and if no codec_tag was found.
The new function does not have this ambiguity.

7 years ago.gitignore: add /doc/examples/pc-uninstalled
Paul B Mahol [Wed, 16 Jan 2013 20:08:20 +0000 (20:08 +0000)]
.gitignore: add /doc/examples/pc-uninstalled

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agofloat_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window
Martin Storsjö [Thu, 17 Jan 2013 16:58:25 +0000 (18:58 +0200)]
float_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window

This fixes builds on 64bit MSVC.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agotheora: Skip zero-sized headers
Martin Storsjö [Thu, 17 Jan 2013 14:03:36 +0000 (16:03 +0200)]
theora: Skip zero-sized headers

This fixes a regression since d9cf5f51 with theora over RTP
(possibly with other variants of theora as well).

In theora over RTP, the second of the 3 headers turns out to be
0 bytes long, which prior to d9cf5f51 worked just fine. After
d9cf5f51, reading from the bitstream reader fails (since the reader
wasn't initialized but returned an error if initialized with 0 bits).

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoOnly skip MLP header in mpeg files if the codec actually is MLP.
Carl Eugen Hoyos [Thu, 17 Jan 2013 16:19:08 +0000 (17:19 +0100)]
Only skip MLP header in mpeg files if the codec actually is MLP.

Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file.
Reported-by: Mashiat Sarker Shakkhar
7 years agoMake the latm decoder less verbose on initialisation.
Carl Eugen Hoyos [Thu, 17 Jan 2013 15:12:59 +0000 (16:12 +0100)]
Make the latm decoder less verbose on initialisation.

Reviewed-by: Paul B Mahol
7 years agomux/chunked interleaver: better align duration chunks.
Michael Niedermayer [Tue, 15 Jan 2013 23:03:36 +0000 (00:03 +0100)]
mux/chunked interleaver: better align duration chunks.

This code causes the chunking to tend toward more optimal
alignment between streams.
The first chunks can still be less optimal aligned

7 years agomux: de-obfuscate chunked interleaver checks
Michael Niedermayer [Thu, 17 Jan 2013 14:08:50 +0000 (15:08 +0100)]
mux: de-obfuscate chunked interleaver checks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomux: simplify chunking interleaver code
Michael Niedermayer [Tue, 15 Jan 2013 22:56:37 +0000 (23:56 +0100)]
mux: simplify chunking interleaver code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 17 Jan 2013 12:44:37 +0000 (13:44 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  idcin: fix memleaks in idcin_read_packet()

Conflicts:
libavformat/idcin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolatmenc: Check for LOAS sync word
James Almer [Wed, 16 Jan 2013 21:27:14 +0000 (18:27 -0300)]
latmenc: Check for LOAS sync word

Write the packet unaltered if found.

Fixes ticket #1917

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix detection of struct v4l2_frmsize_discrete.
Carl Eugen Hoyos [Thu, 17 Jan 2013 01:11:12 +0000 (02:11 +0100)]
Fix detection of struct v4l2_frmsize_discrete.

It was always detected successfully.

7 years agoh264: add assert to check that block_offset is consistent.
Michael Niedermayer [Wed, 16 Jan 2013 23:15:33 +0000 (00:15 +0100)]
h264: add assert to check that block_offset is consistent.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: always copy linesizes in thread update
Michael Niedermayer [Wed, 16 Jan 2013 23:00:34 +0000 (00:00 +0100)]
h264: always copy linesizes in thread update

Fixes inconsistencies in context

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: always copy block_offset in thread update
Michael Niedermayer [Wed, 16 Jan 2013 23:00:34 +0000 (00:00 +0100)]
h264: always copy block_offset in thread update

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovima: switch to init_get_bits8()
Paul B Mahol [Wed, 16 Jan 2013 19:51:39 +0000 (19:51 +0000)]
vima: switch to init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agomux: fix chunked interleaver
Michael Niedermayer [Tue, 15 Jan 2013 18:58:23 +0000 (19:58 +0100)]
mux: fix chunked interleaver

The code did not account properly for packets that where added to
the end of the packet list. Also flags for such packets where not
set correctly leading to incorrect chunked interleaving.

Reported-by: bcoudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomips: move vector_fmul_window_mips to libavutil
Michael Niedermayer [Wed, 16 Jan 2013 12:22:48 +0000 (13:22 +0100)]
mips: move vector_fmul_window_mips to libavutil

Reviewed-by: "Babic, Nedeljko" <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoidcin: fix memleaks in idcin_read_packet()
Justin Ruggles [Tue, 15 Jan 2013 21:20:57 +0000 (16:20 -0500)]
idcin: fix memleaks in idcin_read_packet()

Fixes fate-id-cin-video failures when running FATE with valgrind.

7 years agolafv/matroska: add A_OPUS/EXPERIMENTAL codec name.
Nicolas George [Sun, 13 Jan 2013 20:34:03 +0000 (21:34 +0100)]
lafv/matroska: add A_OPUS/EXPERIMENTAL codec name.

The exact packing of Opus inside Matroska is not finalized.
Use A_OPUS/EXPERIMENTAL as codec name, like mkvtoolnix.
The A_OPUS name stays to let ffmpeg open files it has produced
until now, but newly produced file use the EXPERIMENTAL version.
Once the spec is stabilized it will be possible to consider
options to ensure compatibility with these files.

7 years agoconfigure: suppress "enumerated type mixed with another type" for icc
Michael Niedermayer [Thu, 3 Jan 2013 14:57:42 +0000 (15:57 +0100)]
configure: suppress "enumerated type mixed with another type" for icc

icc should not complain when 2 enum values are combined (for example when
used as flags)
Adding casts to suppress these would not help code quality

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomux: fix chunked_duration rounding anomaly
Michael Niedermayer [Tue, 15 Jan 2013 19:04:52 +0000 (20:04 +0100)]
mux: fix chunked_duration rounding anomaly

a small value was rounded to 0 and then treated special as if
chunked_duration was 0. This led to a inconsistency that further led
to wrong interleaving

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 16 Jan 2013 11:38:41 +0000 (12:38 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavc: Move vector_fmul_window to AVFloatDSPContext
  rtpdec_mpeg4: Check the remaining amount of data before reading

Conflicts:
libavcodec/dsputil.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavd/v4l2: init return value.
Nicolas George [Wed, 16 Jan 2013 11:00:06 +0000 (12:00 +0100)]
lavd/v4l2: init return value.

Fix a warning and random failures.

7 years agoMerge commit '977d4a3b8a2dbc2fb5e747c7072485016c9cdfaa'
Michael Niedermayer [Wed, 16 Jan 2013 11:13:10 +0000 (12:13 +0100)]
Merge commit '977d4a3b8a2dbc2fb5e747c7072485016c9cdfaa'

* commit '977d4a3b8a2dbc2fb5e747c7072485016c9cdfaa':
  rtpdec_mpeg4: Check the return value from malloc
  srtp: Mark a few variables as uninitialized

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '0eecafc948b74c247ebbc59f18f508db5d590d0b'
Michael Niedermayer [Wed, 16 Jan 2013 11:07:04 +0000 (12:07 +0100)]
Merge commit '0eecafc948b74c247ebbc59f18f508db5d590d0b'

* commit '0eecafc948b74c247ebbc59f18f508db5d590d0b':
  configure: Make the new srtp protocol depend on the rtp protocol
  lavf: Add a fate test for the SRTP functions
  lavu: Add a fate test for the HMAC API

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e'
Michael Niedermayer [Wed, 16 Jan 2013 11:01:21 +0000 (12:01 +0100)]
Merge commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e'

* commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e':
  h264: add 3 pixels below for subpixel filter wait position
  dvdsubdec: Support palette in mkv

Conflicts:
libavcodec/dvdsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'dae1d507af94261bafd3b11549884e5d1eca590e'
Michael Niedermayer [Wed, 16 Jan 2013 10:44:23 +0000 (11:44 +0100)]
Merge commit 'dae1d507af94261bafd3b11549884e5d1eca590e'

* commit 'dae1d507af94261bafd3b11549884e5d1eca590e':
  x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags
  vf_fps: add final flushed frames to the dropped frame count
  rv34_parser: Adjust #if for disabling individual parsers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavd/v4l2: update broken link to v4l2 video capture example
Stephan Hilb [Wed, 16 Jan 2013 10:27:20 +0000 (11:27 +0100)]
lavd/v4l2: update broken link to v4l2 video capture example

Reviewed-by: Stefano Sabatini
7 years agolavd/v4l2: improve debug message
Stephan Hilb [Wed, 16 Jan 2013 10:26:38 +0000 (11:26 +0100)]
lavd/v4l2: improve debug message

Reviewed-by: Stefano Sabatini
7 years agolavc: Move vector_fmul_window to AVFloatDSPContext
Justin Ruggles [Mon, 7 Jan 2013 04:47:30 +0000 (23:47 -0500)]
lavc: Move vector_fmul_window to AVFloatDSPContext

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agortpdec_mpeg4: Check the remaining amount of data before reading
Martin Storsjö [Tue, 15 Jan 2013 13:35:18 +0000 (15:35 +0200)]
rtpdec_mpeg4: Check the remaining amount of data before reading

This fixes possible buffer overreads.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomotion_est: Limit motion vector search range to MAX_MV
Michael Niedermayer [Wed, 16 Jan 2013 04:54:19 +0000 (05:54 +0100)]
motion_est: Limit motion vector search range to MAX_MV

Fixes out of array reads with videos exceeding MAX_MV

Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegvideo: Increase MAX_MV for HD video
Michael Niedermayer [Wed, 16 Jan 2013 04:51:04 +0000 (05:51 +0100)]
mpegvideo: Increase MAX_MV for HD video

Fixes out of array reads

Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: document h264_set_parameter_from_sps() re-calling behavior
Michael Niedermayer [Wed, 16 Jan 2013 04:22:30 +0000 (05:22 +0100)]
h264: document h264_set_parameter_from_sps() re-calling behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: do not mess up cur_chroma_format_idc during thread update
Michael Niedermayer [Wed, 16 Jan 2013 03:46:20 +0000 (04:46 +0100)]
h264: do not mess up cur_chroma_format_idc during thread update

Fixes out of array reads
Regression probably since allowing pixel format changes or a related commit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: add 3 pixels below for subpixel filter wait position.
Ronald S. Bultje [Tue, 15 Jan 2013 16:38:54 +0000 (08:38 -0800)]
h264: add 3 pixels below for subpixel filter wait position.

If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.

This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoexamples/demuxing: free AVPacket after usage
Angelo Haller [Tue, 15 Jan 2013 22:37:08 +0000 (23:37 +0100)]
examples/demuxing: free AVPacket after usage

Fix leak.

7 years agotools: add plotframes script
Stefano Sabatini [Tue, 8 Jan 2013 22:27:37 +0000 (23:27 +0100)]
tools: add plotframes script

The script is ported from ffprobe/SourceForge and updated to the current
ffprobe version.

7 years agodoc/protocols: document HTTP protocol cookie support
Micah Galizia [Mon, 14 Jan 2013 02:33:20 +0000 (21:33 -0500)]
doc/protocols: document HTTP protocol cookie support

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
7 years agolavf/http: add HTTP protocol cookie support
Micah Galizia [Mon, 14 Jan 2013 02:32:57 +0000 (21:32 -0500)]
lavf/http: add HTTP protocol cookie support

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
7 years agortpdec_mpeg4: Check the return value from malloc
Martin Storsjö [Tue, 15 Jan 2013 13:27:30 +0000 (15:27 +0200)]
rtpdec_mpeg4: Check the return value from malloc

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoconfigure: Make the new srtp protocol depend on the rtp protocol
Martin Storsjö [Tue, 15 Jan 2013 12:21:48 +0000 (14:21 +0200)]
configure: Make the new srtp protocol depend on the rtp protocol

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosrtp: Mark a few variables as uninitialized
Martin Storsjö [Tue, 15 Jan 2013 13:19:55 +0000 (15:19 +0200)]
srtp: Mark a few variables as uninitialized

This squelches false positive warnings (with gcc) about them being
used uninitalized.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavf: Add a fate test for the SRTP functions
Martin Storsjö [Tue, 15 Jan 2013 13:07:44 +0000 (15:07 +0200)]
lavf: Add a fate test for the SRTP functions

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavu: Add a fate test for the HMAC API
Martin Storsjö [Tue, 15 Jan 2013 11:05:12 +0000 (13:05 +0200)]
lavu: Add a fate test for the HMAC API

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoh264: add 3 pixels below for subpixel filter wait position
Ronald S. Bultje [Tue, 15 Jan 2013 16:38:54 +0000 (08:38 -0800)]
h264: add 3 pixels below for subpixel filter wait position

If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.

This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agolavd/v4l2: apply grammar/consistency fixes to options help fields
Stefano Sabatini [Tue, 15 Jan 2013 12:39:34 +0000 (13:39 +0100)]
lavd/v4l2: apply grammar/consistency fixes to options help fields

7 years agolavd/v4l2: return meaningful error code from device_init()
Stefano Sabatini [Tue, 15 Jan 2013 11:01:06 +0000 (12:01 +0100)]
lavd/v4l2: return meaningful error code from device_init()

In particular, propagate errno value in case of device init failure.

7 years agolavd/v4l2: fix misc messages
Stefano Sabatini [Tue, 15 Jan 2013 09:17:08 +0000 (10:17 +0100)]
lavd/v4l2: fix misc messages

7 years agolavd/v4l2: extend error/debug feedback in case of invalid codec/pix_fmt
Stefano Sabatini [Tue, 15 Jan 2013 08:57:50 +0000 (09:57 +0100)]
lavd/v4l2: extend error/debug feedback in case of invalid codec/pix_fmt

7 years agodvdsubdec: Support palette in mkv
Joakim Plate [Tue, 15 Jan 2013 14:53:15 +0000 (15:53 +0100)]
dvdsubdec: Support palette in mkv

Matroska stores palette information as plain text in extradata.

Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agooggdec: Leave treatment of serial changes to the decoder.
Michael Niedermayer [Sun, 13 Jan 2013 20:32:34 +0000 (21:32 +0100)]
oggdec: Leave treatment of serial changes to the decoder.

Attempting to re-parse the headers at demuxer level is a
pandora box the way its done currently.

This allows full reconfiguration of vorbis streams

Fixes Ticket2117
Fixes Ticket2121

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbisdec: handle midstream parameter changes
Michael Niedermayer [Sun, 13 Jan 2013 20:31:17 +0000 (21:31 +0100)]
vorbisdec: handle midstream parameter changes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agooggdec: resync from the last page.
Michael Niedermayer [Sun, 13 Jan 2013 20:23:11 +0000 (21:23 +0100)]
oggdec: resync from the last page.

Previously we re synced from where we where which cam lead
to loosing pages.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbisdec: support freeing partially allocated contexts.
Michael Niedermayer [Sun, 13 Jan 2013 19:44:39 +0000 (20:44 +0100)]
vorbisdec: support freeing partially allocated contexts.

Fixes null pointer derefernces

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agox86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags
Diego Biurrun [Fri, 27 Jul 2012 12:26:09 +0000 (14:26 +0200)]
x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags

7 years agovf_fps: add final flushed frames to the dropped frame count
Justin Ruggles [Mon, 14 Jan 2013 18:43:15 +0000 (13:43 -0500)]
vf_fps: add final flushed frames to the dropped frame count

7 years agortpdec: support CSRC
Michael Niedermayer [Thu, 27 Dec 2012 02:21:43 +0000 (03:21 +0100)]
rtpdec: support CSRC

Untested, due to lack of rtp stream with CSRCs, but the code as
is does not work with multiple CSRCs

Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorv34_parser: Adjust #if for disabling individual parsers
Diego Biurrun [Tue, 15 Jan 2013 15:06:00 +0000 (16:06 +0100)]
rv34_parser: Adjust #if for disabling individual parsers

As CONFIG_ values are always defined, they have to be checked via #if.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 15 Jan 2013 15:16:13 +0000 (16:16 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  x86: ABSB2: port to cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '094a7405e5d8463d7d167d893e04934ec1a84ecd'
Michael Niedermayer [Tue, 15 Jan 2013 15:12:18 +0000 (16:12 +0100)]
Merge commit '094a7405e5d8463d7d167d893e04934ec1a84ecd'

* commit '094a7405e5d8463d7d167d893e04934ec1a84ecd':
  x86: ABSB: port to cpuflags
  sdp: Include SRTP crypto params if using the srtp protocol

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05'
Michael Niedermayer [Tue, 15 Jan 2013 15:05:00 +0000 (16:05 +0100)]
Merge commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05'

* commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05':
  lavf: Add a protocol for SRTP encryption/decryption
  rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)

Conflicts:
libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d'
Michael Niedermayer [Tue, 15 Jan 2013 14:56:12 +0000 (15:56 +0100)]
Merge commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d'

* commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d':
  lavf: Add functions for SRTP decryption/encryption
  lavu: Add an API for calculating HMAC (RFC 2104)

Conflicts:
doc/APIchanges
libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '47812070a267cbdf74164e154d03d99bf8ced100'
Michael Niedermayer [Tue, 15 Jan 2013 14:51:04 +0000 (15:51 +0100)]
Merge commit '47812070a267cbdf74164e154d03d99bf8ced100'

* commit '47812070a267cbdf74164e154d03d99bf8ced100':
  libx264: use the library specific default rc_initial_buffer_occupancy

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'bff3607547fdbb6e32b3830a351e6a33280c1e0d'
Michael Niedermayer [Tue, 15 Jan 2013 14:32:48 +0000 (15:32 +0100)]
Merge commit 'bff3607547fdbb6e32b3830a351e6a33280c1e0d'

* commit 'bff3607547fdbb6e32b3830a351e6a33280c1e0d':
  lavc: set the default rc_initial_buffer_occupancy

Conflicts:
libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'd8c772de53d29afb1bada88afa859fce8489c668'
Michael Niedermayer [Tue, 15 Jan 2013 14:23:20 +0000 (15:23 +0100)]
Merge commit 'd8c772de53d29afb1bada88afa859fce8489c668'

* commit 'd8c772de53d29afb1bada88afa859fce8489c668':
  nutdec: Always return a value from nut_read_timestamp()
  configure: Make warnings from -Wreturn-type fatal errors
  x86: ABS2: port to cpuflags
  vdpau: Remove av_unused attribute from function declaration
  h264: fix ff_generate_sliding_window_mmcos() prototype.

Conflicts:
configure
libavformat/nutdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '5e753ed502d3597077d8675ca1438e1bcade1459'
Michael Niedermayer [Tue, 15 Jan 2013 14:16:45 +0000 (15:16 +0100)]
Merge commit '5e753ed502d3597077d8675ca1438e1bcade1459'

* commit '5e753ed502d3597077d8675ca1438e1bcade1459':
  suncc: Replace more GCC flags by their equivalents in suncc_flags()
  libtheoraenc: fix granularity of video quality
  oggparsetheora: fix comment header parsing
  h264: don't clobber mmco opcode tables for non-first slice headers.

Conflicts:
libavcodec/h264_refs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '3f111804eb5c603a344706b84b7164cbf7b4e0df'
Michael Niedermayer [Tue, 15 Jan 2013 13:57:57 +0000 (14:57 +0100)]
Merge commit '3f111804eb5c603a344706b84b7164cbf7b4e0df'

* commit '3f111804eb5c603a344706b84b7164cbf7b4e0df':
  libvpx: make vp8 and vp9 selectable
  libvpx: support vp9
  nut: support vp9 tag
  mkv: support vp9 tag
  rtpdec: Make variables that should wrap unsigned

Conflicts:
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e'
Michael Niedermayer [Tue, 15 Jan 2013 13:42:20 +0000 (14:42 +0100)]
Merge commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e'

* commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e':
  build: Remove stray Makefile entry for non-existent VCR1 encoder
  rtpdec: Handle more received packets than expected when sending RR

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def'
Michael Niedermayer [Tue, 15 Jan 2013 13:34:23 +0000 (14:34 +0100)]
Merge commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def'

* commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def':
  rtpdec: Simplify insertion into the linked list queue
  rtpdec: Remove a woefully misplaced comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: don't clobber mmco opcode tables for non-first slice headers.
Ronald S. Bultje [Mon, 14 Jan 2013 05:46:44 +0000 (21:46 -0800)]
h264: don't clobber mmco opcode tables for non-first slice headers.

Clobbering these tables will temporarily clobber the template used
as a basis for other threads to start decoding from. If the other
decoding thread updates from the template right at that moment,
subsequent threads will get invalid (or, usually, none at all) mmco
tables. This leads to invalid reference lists and subsequent decode
failures.

Therefore, instead, decode the mmco tables only for the first slice in
a field or frame. For other slices, decode the bits and ensure they
are identical to the mmco tables in the first slice, but don't ever
clobber the context state. This prevents other threads from using a
clobbered/invalid template as starting point for decoding, and thus
fixes decoding in these cases.

This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with
frame-multithreading enabled.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agox86: ABSB2: port to cpuflags
Diego Biurrun [Sun, 15 Jul 2012 16:30:34 +0000 (18:30 +0200)]
x86: ABSB2: port to cpuflags

7 years agox86: ABSB: port to cpuflags
Diego Biurrun [Sun, 15 Jul 2012 16:29:10 +0000 (18:29 +0200)]
x86: ABSB: port to cpuflags

7 years agosdp: Include SRTP crypto params if using the srtp protocol
Martin Storsjö [Wed, 12 Dec 2012 10:59:41 +0000 (12:59 +0200)]
sdp: Include SRTP crypto params if using the srtp protocol

Also print port numbers for this protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavf: Add a protocol for SRTP encryption/decryption
Martin Storsjö [Tue, 11 Dec 2012 22:22:48 +0000 (00:22 +0200)]
lavf: Add a protocol for SRTP encryption/decryption

This is mostly useful for encryption together with the RTP muxer,
but could also be set up as IO towards the peer with the SDP
demuxer with custom IO.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Support decryption of SRTP signalled via RFC 4568 (SDES)
Martin Storsjö [Sat, 20 Oct 2012 20:18:01 +0000 (23:18 +0300)]
rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)

This only takes care of decrypting incoming packets; the outgoing
RTCP packets are not encrypted. This is enough for some use cases,
and signalling crypto keys for use with outgoing RTCP packets
doesn't fit as simply into the API. If the SDP demuxer is hooked
up with custom IO, the return packets can be encrypted e.g. via the
SRTP protocol.

If the SRTP keys aren't available within the SDP, the decryption
can be handled externally as well (when using custom IO).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavf: Add functions for SRTP decryption/encryption
Martin Storsjö [Sat, 20 Oct 2012 22:20:35 +0000 (01:20 +0300)]
lavf: Add functions for SRTP decryption/encryption

This supports the AES_CM_128_HMAC_SHA1_80 and
AES_CM_128_HMAC_SHA1_32 cipher suites (from RFC 4568) at the
moment. The main missing features are replay protection (which can be
added later without changing the internal API), and the F8 and null
ciphers.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavu: Add an API for calculating HMAC (RFC 2104)
Martin Storsjö [Fri, 12 Oct 2012 12:01:06 +0000 (15:01 +0300)]
lavu: Add an API for calculating HMAC (RFC 2104)

This supports HMAC-MD5 and HMAC-SHA1 for now, other hashes are
simple to add.

Signed-off-by: Martin Storsjö <martin@martin.st>