ffmpeg.git
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 12 Mar 2012 03:35:06 +0000 (04:35 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dsicinvideo: validate buffer offset before copying pixels.
  cook: error out on quant_index values outside [-63, 63] range.
  mpc: pad mpc_CC/SCF[] tables to allow for negative indices.

Conflicts:
libavcodec/cook.c
libavcodec/dsicinav.c
libavcodec/mpc.c
libavcodec/mpc7.c
libavcodec/mpcdata.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffserver: add missing buffer set after rewrite av_open_input_file to avformat_open_input.
Miroslav Slugeň [Mon, 7 Nov 2011 10:48:43 +0000 (11:48 +0100)]
ffserver: add missing buffer set after rewrite av_open_input_file to avformat_open_input.

Fixes Ticket346

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoRevert "ffserver: remove unused variable."
Michael Niedermayer [Mon, 12 Mar 2012 02:31:44 +0000 (03:31 +0100)]
Revert "ffserver: remove unused variable."

This reverts commit f02f745e4aa070e5fabf1156b75c340171304933.

8 years agodoc: add vf_crop keepaspect documentation
Stefano Sabatini [Sun, 11 Mar 2012 16:47:06 +0000 (17:47 +0100)]
doc: add vf_crop keepaspect documentation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovf_crop: keepaspect support
Baptiste Coudurier [Sat, 10 Mar 2012 03:07:17 +0000 (04:07 +0100)]
vf_crop: keepaspect support

8 years agoFix frame height vs field height confusion in MXF decoding.
Joseph Artsimovich [Tue, 7 Feb 2012 10:48:43 +0000 (10:48 +0000)]
Fix frame height vs field height confusion in MXF decoding.

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Reveiwed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoFATE: add test for cdxl demuxer
Paul B Mahol [Sun, 11 Mar 2012 14:06:09 +0000 (14:06 +0000)]
FATE: add test for cdxl demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoalsdec: Fix out of ltp_gain_values read.
Thilo Borgmann [Sun, 11 Mar 2012 15:56:23 +0000 (16:56 +0100)]
alsdec: Fix out of ltp_gain_values read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoalsdec: pretty print for another log message
Thilo Borgmann [Sun, 11 Mar 2012 15:54:39 +0000 (16:54 +0100)]
alsdec: pretty print for another log message

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodsicinvideo: validate buffer offset before copying pixels.
Ronald S. Bultje [Sun, 11 Mar 2012 14:28:54 +0000 (07:28 -0700)]
dsicinvideo: validate buffer offset before copying pixels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agomxfdec: add timecode to metadata
Matthieu Bouron [Thu, 23 Feb 2012 15:58:01 +0000 (16:58 +0100)]
mxfdec: add timecode to metadata

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agocook: error out on quant_index values outside [-63, 63] range.
Ronald S. Bultje [Sun, 11 Mar 2012 01:51:28 +0000 (17:51 -0800)]
cook: error out on quant_index values outside [-63, 63] range.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 11 Mar 2012 00:12:52 +0000 (01:12 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  cook: expand dither_tab[], and make sure indexes into it don't overflow.
  xxan: reindent xan_unpack_luma().
  xxan: protect against chroma LUT overreads.
  xxan: convert to bytestream2 API.
  xxan: don't read before start of buffer in av_memcpy_backptr().
  vp8: convert mbedge loopfilter x86 assembly to use named arguments.
  vp8: convert inner loopfilter x86 assembly to use named arguments.

Conflicts:
libavcodec/xxan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdd missing requirements to libavdevice.pc if lavfi is enabled.
Carl Eugen Hoyos [Sat, 10 Mar 2012 23:48:36 +0000 (00:48 +0100)]
Add missing requirements to libavdevice.pc if lavfi is enabled.

Fixes ticket #1050.

8 years agompc: pad mpc_CC/SCF[] tables to allow for negative indices.
Ronald S. Bultje [Sat, 10 Mar 2012 22:28:08 +0000 (14:28 -0800)]
mpc: pad mpc_CC/SCF[] tables to allow for negative indices.

MPC8 allows indices of mpc_CC up to -1, and mpc_SCF up to -6, thus pad
the tables by that much on the left end.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agovc1: add missing entries to ff_vc1_fps_nr.
Michael Niedermayer [Sat, 10 Mar 2012 21:43:14 +0000 (22:43 +0100)]
vc1: add missing entries to ff_vc1_fps_nr.

Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompc7: check subband index
Michael Niedermayer [Sat, 10 Mar 2012 21:36:15 +0000 (22:36 +0100)]
mpc7: check subband index

This fixes a overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomjpegb: Detect changing nb of planes in interlaced video.
Michael Niedermayer [Sat, 10 Mar 2012 21:02:46 +0000 (22:02 +0100)]
mjpegb: Detect changing nb of planes in interlaced video.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo3: Fix out of reference reading with NULL blocks.
Michael Niedermayer [Sat, 10 Mar 2012 20:12:41 +0000 (21:12 +0100)]
indeo3: Fix out of reference reading with NULL blocks.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agocook: expand dither_tab[], and make sure indexes into it don't overflow.
Ronald S. Bultje [Fri, 9 Mar 2012 01:09:27 +0000 (17:09 -0800)]
cook: expand dither_tab[], and make sure indexes into it don't overflow.

Fixes overflows in accessing dither_tab[].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoxxan: reindent xan_unpack_luma().
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:49 +0000 (16:32 -0800)]
xxan: reindent xan_unpack_luma().

It used 3-space indent instead of 4-space indent.

8 years agoxxan: protect against chroma LUT overreads.
Ronald S. Bultje [Sat, 10 Mar 2012 19:57:17 +0000 (11:57 -0800)]
xxan: protect against chroma LUT overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoxxan: convert to bytestream2 API.
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:47 +0000 (16:32 -0800)]
xxan: convert to bytestream2 API.

Protects against overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoxxan: don't read before start of buffer in av_memcpy_backptr().
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:46 +0000 (16:32 -0800)]
xxan: don't read before start of buffer in av_memcpy_backptr().

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agovp8: convert mbedge loopfilter x86 assembly to use named arguments.
Ronald S. Bultje [Mon, 5 Mar 2012 04:21:22 +0000 (20:21 -0800)]
vp8: convert mbedge loopfilter x86 assembly to use named arguments.

8 years agovp8: convert inner loopfilter x86 assembly to use named arguments.
Ronald S. Bultje [Mon, 5 Mar 2012 00:17:14 +0000 (16:17 -0800)]
vp8: convert inner loopfilter x86 assembly to use named arguments.

8 years agosnowenc: add no_bitstream option.
Reimar Döffinger [Sat, 10 Mar 2012 18:59:44 +0000 (19:59 +0100)]
snowenc: add no_bitstream option.

This allows making e.g. MPlayer's -vf uspp filter about 20% faster.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agosnowenc: mark some encode_subband arguments const.
Reimar Döffinger [Sat, 10 Mar 2012 18:58:22 +0000 (19:58 +0100)]
snowenc: mark some encode_subband arguments const.

This makes it more obvious that this function only does bitstream
encoding.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agompjpeg: video streaming will no longer break and stop on Firefox
Zalewa PL [Sat, 10 Mar 2012 17:32:02 +0000 (18:32 +0100)]
mpjpeg: video streaming will no longer break and stop on Firefox

mpjpeg video streamings would break and stop on Firefox after 1 - 30
seconds.
In order to fix this, two changes were made:
1. Replaced all occurrences of '\n' character in mjpeg metadata
   with occurences of "\r\n".
2. Added "Content-length: <packet-size>" metadata entry for each
   sent frame.

The change has been tested on Google Chrome 17.0.963.78 and Firefox 10.0.2
on lubuntu 11.10 and the streaming seems to work fine now.

8 years agomxf: Add DNxHD UL
Tomas Härdin [Sat, 10 Mar 2012 16:03:00 +0000 (17:03 +0100)]
mxf: Add DNxHD UL

Note that the old DNxHD UL is actually JPEG 2000 according to RP224. Leaving it
as-is for now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovf_frei0r: set outlinks sample aspect ratio to 1
Baptiste Coudurier [Sat, 10 Mar 2012 02:02:05 +0000 (03:02 +0100)]
vf_frei0r: set outlinks sample aspect ratio to 1

8 years agoDV: Use profile[1] detection hack only for stype 0.
Reimar Döffinger [Tue, 6 Mar 2012 20:36:58 +0000 (21:36 +0100)]
DV: Use profile[1] detection hack only for stype 0.

The two samples both have stype 0.
Without this extra check, the code breaks 4:2:2 dvsd
(stype 4), since that has the same resolution.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoDV demuxer: Stricter check for avio_read result.
Reimar Döffinger [Sun, 4 Mar 2012 18:39:45 +0000 (19:39 +0100)]
DV demuxer: Stricter check for avio_read result.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agocook: tighten the quant_index_table range further.
Michael Niedermayer [Sat, 10 Mar 2012 07:04:34 +0000 (08:04 +0100)]
cook: tighten the quant_index_table range further.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 10 Mar 2012 00:12:08 +0000 (01:12 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  Fix a bunch of common typos.
  build: Skip compiling xvmc.h under the correct condition.
  configure: darwin: Change dylib install names to include major version.
  mpegts: Always honor a registration descriptor if present and there is no other codec information.
  aacdec: Fix SCE parity check.
  aacdec: Fix out of array writes (stack).
  rtsp: Only set the ttl parameter if the server actually gave a value
  udp: Set ttl for read-write streams, too, not only for write-only ones
  udp: Only bind to the multicast address if in read-only mode
  udp: Clarify the comment about binding the multicast address
  udp: Reorder comments

Conflicts:
libavcodec/aacdec.c
tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosnow: reject unsupported chroma shifts.
Michael Niedermayer [Fri, 9 Mar 2012 23:08:32 +0000 (00:08 +0100)]
snow: reject unsupported chroma shifts.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolavfi: remove swapuv libmpcodecs wrapper
Stefano Sabatini [Fri, 9 Mar 2012 22:22:55 +0000 (23:22 +0100)]
lavfi: remove swapuv libmpcodecs wrapper

The filter has been ported to a native libavfilter filter.

8 years agolavfi: port MP swapuv filter
Stefano Sabatini [Thu, 8 Mar 2012 15:18:03 +0000 (16:18 +0100)]
lavfi: port MP swapuv filter

8 years agoimgconvert: add macro pixdesc_has_alpha for checking if a pixel format has an alpha...
Stefano Sabatini [Thu, 8 Mar 2012 13:40:30 +0000 (14:40 +0100)]
imgconvert: add macro pixdesc_has_alpha for checking if a pixel format has an alpha component

Reduce redundancy and simplify.

8 years agompegvideo_probe: Fix misdetection of mpeg4video files.
Michael Niedermayer [Fri, 9 Mar 2012 21:25:32 +0000 (22:25 +0100)]
mpegvideo_probe: Fix misdetection of mpeg4video files.

(issue1210)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoFix a bunch of common typos.
Diego Biurrun [Wed, 25 Jan 2012 11:25:11 +0000 (12:25 +0100)]
Fix a bunch of common typos.

8 years agobuild: Skip compiling xvmc.h under the correct condition.
Diego Biurrun [Thu, 8 Mar 2012 22:53:20 +0000 (23:53 +0100)]
build: Skip compiling xvmc.h under the correct condition.

8 years agoconfigure: darwin: Change dylib install names to include major version.
Gil Pedersen [Wed, 7 Mar 2012 16:03:06 +0000 (17:03 +0100)]
configure: darwin: Change dylib install names to include major version.

This will cause linkers to link against the major lib names, instead of the
base names, allowing multiple major versions of the libraries to co-exist.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agolavf: Add system to seperate relative timestamps from absolute ones.
Michael Niedermayer [Wed, 7 Mar 2012 21:13:39 +0000 (22:13 +0100)]
lavf: Add system to seperate relative timestamps from absolute ones.

With this we can always know if a timestamp is based on added durations
from an unknown origin or if it is based on a correct timestamp (and possibly
added durations)
This should fix some bugs where this distinction was mixed up.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompegts: Always honor a registration descriptor if present and there is no other codec...
Alex Converse [Thu, 8 Mar 2012 21:36:51 +0000 (13:36 -0800)]
mpegts: Always honor a registration descriptor if present and there is no other codec information.

8 years agoaacdec: Fix SCE parity check.
Michael Niedermayer [Wed, 7 Mar 2012 01:30:09 +0000 (17:30 -0800)]
aacdec: Fix SCE parity check.

An unpaired SCE preceding a CPE only makes sense for front SCEs
preceding the first CPE.

Split from FFmpeg commit a8d67efa53dae1d14614e3a7bd4e77e4eab066ab

Signed-off-by: Alex Converse <alex.converse@gmail.com>
8 years agoaacdec: Fix out of array writes (stack).
Michael Niedermayer [Wed, 7 Mar 2012 01:26:29 +0000 (17:26 -0800)]
aacdec: Fix out of array writes (stack).

Set the element to channel vector (e2c_vec) size to be the maximum
number of aac channel elements. This makes it slightly larger than it
needs to be because CCEs are never mapped to output channel locations.

Also add a check that all input tags (legal or not) will fit.

Split from FFmpeg commit a8d67efa53dae1d14614e3a7bd4e77e4eab066ab

Signed-off-by: Alex Converse <alex.converse@gmail.com>
8 years agoCosmetics: Remove superfluous newline.
Carl Eugen Hoyos [Fri, 9 Mar 2012 13:34:10 +0000 (14:34 +0100)]
Cosmetics: Remove superfluous newline.

8 years agortsp: Only set the ttl parameter if the server actually gave a value
Martin Storsjö [Thu, 8 Mar 2012 13:32:39 +0000 (15:32 +0200)]
rtsp: Only set the ttl parameter if the server actually gave a value

Passing ttl=0 to the rtp/udp url contexts makes packets never
leave the host machine.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoudp: Set ttl for read-write streams, too, not only for write-only ones
Martin Storsjö [Thu, 8 Mar 2012 13:31:45 +0000 (15:31 +0200)]
udp: Set ttl for read-write streams, too, not only for write-only ones

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoudp: Only bind to the multicast address if in read-only mode
Martin Storsjö [Thu, 8 Mar 2012 13:17:15 +0000 (15:17 +0200)]
udp: Only bind to the multicast address if in read-only mode

This fixes sending back RTCP RR packets if receiving RTP over
multicast.

If the multicast stream is sent on demand (set up and signalled
via RTSP), the sender might depend on getting RTCP RR packets
knowing that there are listeners, otherwise the stream can be
closed after a certain timeout.

This fixes receiving RTSP streams over multicast on unix, from
certain Axis cameras.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoudp: Clarify the comment about binding the multicast address
Martin Storsjö [Thu, 8 Mar 2012 13:15:11 +0000 (15:15 +0200)]
udp: Clarify the comment about binding the multicast address

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoudp: Reorder comments
Martin Storsjö [Wed, 7 Mar 2012 22:38:02 +0000 (00:38 +0200)]
udp: Reorder comments

When this code was added in 36b532815cb83, the new code was added
between the existing comment and the existing line of code, making
the old comment seem to refer to the new code. This makes it read
correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoFix 32bit sunrast decoding.
Carl Eugen Hoyos [Fri, 9 Mar 2012 08:17:07 +0000 (09:17 +0100)]
Fix 32bit sunrast decoding.

This patch visually breaks the sample from ticket #895,
but decodes it identically as Gimp, ImageMagick and xview.

8 years agoiff: add support for IFF DEEP
Piotr Bandurski [Thu, 8 Mar 2012 22:34:36 +0000 (23:34 +0100)]
iff: add support for IFF DEEP

Fixes trac #1045.

Thanks to Peter Ross for his help with this patch.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosvq1dec: use AV_LOG_ERROR for error message
Piotr Bandurski [Thu, 8 Mar 2012 22:27:17 +0000 (23:27 +0100)]
svq1dec: use AV_LOG_ERROR for error message

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 9 Mar 2012 00:22:31 +0000 (01:22 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ttadec: unbreak playback of matroska files
  vorbisdec: avoid invalid memory access
  Fix uninitialized reads on malformed ogg files.
  huffyuv: add padding to classic (v1) huffman tables.
  png: convert to bytestream2 API.
  dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
  avs: fix infinite loop on end-of-stream.
  tiffdec: Prevent illegal memory access caused by recycled pointers.
  rtpenc: Fix the AVRational used for av_rescale_q_rnd
  wma: fix off-by-one in array bounds check.

Conflicts:
libavcodec/huffyuv.c
libavcodec/pngdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqpeg: remove unused var from decode_frame()
Michael Niedermayer [Thu, 8 Mar 2012 22:05:25 +0000 (23:05 +0100)]
qpeg: remove unused var from decode_frame()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoprores_anatoliy: remove unused variable from prores_encode_frame()
Michael Niedermayer [Thu, 8 Mar 2012 22:04:22 +0000 (23:04 +0100)]
prores_anatoliy: remove unused variable from prores_encode_frame()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoconfigure: enable libutvideo is gpl warning
Lou Logan [Thu, 8 Mar 2012 19:18:13 +0000 (10:18 -0900)]
configure: enable libutvideo is gpl warning

This will warn the user when --enable-gpl is missing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agooggparseogm: Fix order or arguments.
Michael Niedermayer [Thu, 8 Mar 2012 20:11:37 +0000 (21:11 +0100)]
oggparseogm: Fix order or arguments.

Bug introduced by libav in 1bb3990b560e7ff7f46c06c14f959fe432e0b625

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomov: Discard invalid CTTS.
Michael Niedermayer [Thu, 8 Mar 2012 06:10:57 +0000 (07:10 +0100)]
mov: Discard invalid CTTS.

Fixes Ticket385

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agottadec: unbreak playback of matroska files
Paul B Mahol [Tue, 6 Mar 2012 20:26:48 +0000 (20:26 +0000)]
ttadec: unbreak playback of matroska files

Matroska demuxer needs to recreate tta header, so just display
crc error without aborting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agovorbisdec: avoid invalid memory access
Aaron Colwell [Wed, 7 Mar 2012 22:51:00 +0000 (14:51 -0800)]
vorbisdec: avoid invalid memory access

This fixes some invalid memory access caused later in the function
by res_chan[] not being set for all channels. This happens when a
channel doesn't appear a submap. This change simply returns a
decoder error when this situation is detected.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoFix uninitialized reads on malformed ogg files.
Dale Curtis [Wed, 7 Mar 2012 22:26:58 +0000 (14:26 -0800)]
Fix uninitialized reads on malformed ogg files.

The ogg decoder wasn't padding the input buffer with the appropriate
FF_INPUT_BUFFER_PADDING_SIZE bytes. Which led to uninitialized reads in
various pieces of parsing code when they thought they had more data than
they actually did.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agohuffyuv: add padding to classic (v1) huffman tables.
Ronald S. Bultje [Thu, 8 Mar 2012 00:29:23 +0000 (16:29 -0800)]
huffyuv: add padding to classic (v1) huffman tables.

We slightly overread the input buffer, so we require
padding at the end of the buffer, as is documented in the
get_bits API. Without padding, we'll read uninitialized
data or beyond the end of the .rodata, which may crash.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agopng: convert to bytestream2 API.
Ronald S. Bultje [Thu, 8 Mar 2012 00:16:20 +0000 (16:16 -0800)]
png: convert to bytestream2 API.

Protects against overreads in the input buffer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agolavc/utils: fix three const warnings.
Nicolas George [Wed, 7 Mar 2012 19:07:44 +0000 (20:07 +0100)]
lavc/utils: fix three const warnings.

No change in assembly code produced on x86_64.

8 years agoffplay: fix two const warnings.
Nicolas George [Wed, 7 Mar 2012 19:02:51 +0000 (20:02 +0100)]
ffplay: fix two const warnings.

No change in assembly code produced on x86_64.

8 years agovf_pad: keep a reference to the output buffer.
Nicolas George [Wed, 7 Mar 2012 16:10:00 +0000 (17:10 +0100)]
vf_pad: keep a reference to the output buffer.

Once fixed, the end_frame function does exactly what
avfilter_default_end_frame does; therefore, end_frame
can be removed to let avfilter_default_end_frame work.

Fixes ticket #1038.

8 years agodoc/ffmpeg.texi: apply misc fixes to the -map_channel documentation
Stefano Sabatini [Sat, 3 Mar 2012 18:19:40 +0000 (19:19 +0100)]
doc/ffmpeg.texi: apply misc fixes to the -map_channel documentation

8 years agodca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
Kostya Shishkov [Wed, 7 Mar 2012 19:07:17 +0000 (20:07 +0100)]
dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2

8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 8 Mar 2012 01:28:40 +0000 (02:28 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (29 commits)
  sbrdsp.asm: convert all instructions to float/SSE ones.
  dv: cosmetics.
  dv: check buffer size before reading profile.
  Revert "AAC SBR: group some writes."
  udp: Print an error message if bind fails
  cook: extend channel uncoupling tables so the full bit range is covered.
  roqvideo: cosmetics.
  roqvideo: convert to bytestream2 API.
  dca: don't use av_clip_uintp2().
  wmall: fix build with -DDEBUG enabled.
  smc: port to bytestream2 API.
  AAC SBR: group some writes.
  dsputil: remove shift parameter from scalarproduct_int16
  SBR DSP: unroll sum_square
  rv34: remove dead code in intra availability check
  rv34: clean a bit availability checks.
  v4l2: update documentation
  tgq: convert to bytestream2 API.
  parser: remove forward declaration of MpegEncContext
  dca: prevent accessing static arrays with invalid indexes.
  ...

Conflicts:
doc/indevs.texi
libavcodec/Makefile
libavcodec/dca.c
libavcodec/dvdata.c
libavcodec/eatgq.c
libavcodec/mmvideo.c
libavcodec/roqvideodec.c
libavcodec/smc.c
libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavs: fix infinite loop on end-of-stream.
Ronald S. Bultje [Thu, 16 Feb 2012 00:21:34 +0000 (16:21 -0800)]
avs: fix infinite loop on end-of-stream.

The codec would keep returning the last decoded frame if the stream
contains B-frames, since it wouldn't clear that frame from the list of
frames to be returned to the user.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoavformat_new_stream: fix initial last_dts value
Michael Niedermayer [Wed, 7 Mar 2012 20:41:54 +0000 (21:41 +0100)]
avformat_new_stream: fix initial last_dts value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agotiffdec: Prevent illegal memory access caused by recycled pointers.
Alex Converse [Wed, 7 Mar 2012 01:00:29 +0000 (17:00 -0800)]
tiffdec: Prevent illegal memory access caused by recycled pointers.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agomxfdec: Add intra_only flag to MXFTrack
Tomas Härdin [Wed, 7 Mar 2012 09:52:39 +0000 (10:52 +0100)]
mxfdec: Add intra_only flag to MXFTrack

This allows future assumptions to be made without affecting non-intra files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomxfdec: Fix Avid AirSpeed files being misinterpreted as OP1a
Tomas Härdin [Fri, 2 Mar 2012 10:33:28 +0000 (11:33 +0100)]
mxfdec: Fix Avid AirSpeed files being misinterpreted as OP1a

The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file that triggered
that behavior had two ECs, not zero. Hence distinguishing between them is
simple in this case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomxfdec: Truncate packets that extend past the next edit unit
Tomas Härdin [Fri, 2 Mar 2012 10:16:10 +0000 (11:16 +0100)]
mxfdec: Truncate packets that extend past the next edit unit

This fixes rare cases where OPAtom may be treated as OP1a, causing all essence
to be read into RAM.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolibavutil: document av_force_cpu_flags(-1).
Michael Niedermayer [Wed, 7 Mar 2012 04:18:33 +0000 (05:18 +0100)]
libavutil: document av_force_cpu_flags(-1).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agortpenc: Fix the AVRational used for av_rescale_q_rnd
Martin Storsjö [Wed, 7 Mar 2012 22:52:53 +0000 (00:52 +0200)]
rtpenc: Fix the AVRational used for av_rescale_q_rnd

The current one has a zero denominator - this is what was
intended in 14aecc50fae6.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoffmpeg: show fps more accurately when it is small.
Nicolas George [Wed, 7 Mar 2012 22:26:29 +0000 (23:26 +0100)]
ffmpeg: show fps more accurately when it is small.

8 years agoswr: special case for empty channels in rematrix.
Nicolas George [Mon, 20 Feb 2012 22:55:28 +0000 (23:55 +0100)]
swr: special case for empty channels in rematrix.

Speed += 10% overall for pan=stereo:FL=FL+FR from wav to null.

8 years agowma: fix off-by-one in array bounds check.
Ronald S. Bultje [Wed, 7 Mar 2012 22:18:14 +0000 (14:18 -0800)]
wma: fix off-by-one in array bounds check.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agosbrdsp.asm: convert all instructions to float/SSE ones.
Reimar Döffinger [Wed, 7 Mar 2012 20:35:13 +0000 (21:35 +0100)]
sbrdsp.asm: convert all instructions to float/SSE ones.

Since the values are floats, using the float operations
makes sense, improves performance on some CPUs and
makes the code SSE compatible instead of needing SSE2.

Based on suggestion by Jason.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agodv: cosmetics.
Ronald S. Bultje [Wed, 7 Mar 2012 21:49:41 +0000 (13:49 -0800)]
dv: cosmetics.

8 years agodv: check buffer size before reading profile.
Ronald S. Bultje [Wed, 7 Mar 2012 21:48:41 +0000 (13:48 -0800)]
dv: check buffer size before reading profile.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoRevert "AAC SBR: group some writes."
Ronald S. Bultje [Wed, 7 Mar 2012 18:52:09 +0000 (10:52 -0800)]
Revert "AAC SBR: group some writes."

This reverts commit ba36f14e5d34bcca6ecf77ba1c7512d1b51a9740. It
broke decoding on x86-32 on some systems.

8 years agoudp: Print an error message if bind fails
Martin Storsjö [Wed, 7 Mar 2012 19:40:29 +0000 (21:40 +0200)]
udp: Print an error message if bind fails

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agocook: extend channel uncoupling tables so the full bit range is covered.
Ronald S. Bultje [Tue, 6 Mar 2012 21:45:32 +0000 (13:45 -0800)]
cook: extend channel uncoupling tables so the full bit range is covered.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoroqvideo: cosmetics.
Ronald S. Bultje [Wed, 7 Mar 2012 18:59:45 +0000 (10:59 -0800)]
roqvideo: cosmetics.

8 years agoroqvideo: convert to bytestream2 API.
Ronald S. Bultje [Tue, 6 Mar 2012 23:58:35 +0000 (15:58 -0800)]
roqvideo: convert to bytestream2 API.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agodca: don't use av_clip_uintp2().
Ronald S. Bultje [Wed, 7 Mar 2012 19:06:20 +0000 (11:06 -0800)]
dca: don't use av_clip_uintp2().

The argument is not a literal, thus causing the ARM v6 or later
builds to break.

8 years agowmall: fix build with -DDEBUG enabled.
Ronald S. Bultje [Wed, 7 Mar 2012 18:40:15 +0000 (10:40 -0800)]
wmall: fix build with -DDEBUG enabled.

8 years agosmc: port to bytestream2 API.
Ronald S. Bultje [Wed, 29 Feb 2012 22:44:37 +0000 (14:44 -0800)]
smc: port to bytestream2 API.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
8 years agoAAC SBR: group some writes.
Christophe Gisquet [Tue, 28 Feb 2012 10:20:02 +0000 (11:20 +0100)]
AAC SBR: group some writes.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agodsputil: remove shift parameter from scalarproduct_int16
Christophe GISQUET [Sat, 3 Mar 2012 14:09:36 +0000 (15:09 +0100)]
dsputil: remove shift parameter from scalarproduct_int16

There is only one caller, which does not need the shifting. Other use cases
are situations where different roundings would be needed.

The x86 and neon versions are modified accordingly.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoSBR DSP: unroll sum_square
Christophe GISQUET [Wed, 22 Feb 2012 16:48:59 +0000 (17:48 +0100)]
SBR DSP: unroll sum_square

The length is even, so some unrolling can be performed. Timings are for x86:
- 32bits: 102c -> 82c
- 64bits:  82c -> 69c

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agorv34: remove dead code in intra availability check
Christophe GISQUET [Thu, 23 Feb 2012 18:10:32 +0000 (19:10 +0100)]
rv34: remove dead code in intra availability check

This was an incorrect copy-and-paste to a code not needing the original code.
Spotted by Jason in a previous review but forgotten in the commit.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agorv34: clean a bit availability checks.
Christophe GISQUET [Mon, 16 Jan 2012 19:54:26 +0000 (20:54 +0100)]
rv34: clean a bit availability checks.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>