Commit Graph

32421 Commits

Author SHA1 Message Date
Michael Niedermayer
213f2da46a avcodec/jpeg2000dec: Fix shift for RGB(A)48/64
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 04:19:38 +02:00
Andreas Cadhalpun
58995f647b sonic: set avctx->channels in sonic_decode_init
Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-09 23:21:51 +02:00
Michael Niedermayer
0916938a8d avcodec/jpeg2000dec: Fix gain regression with gray16
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 20:26:38 +02:00
Michael Niedermayer
adbe1d7de4 avcodec/libopenjpegdec: Mark as experimental if <= 1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 18:59:30 +02:00
Michael Niedermayer
dbbb31e5bb avcodec/jpeg2000: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 18:48:39 +02:00
Michael Niedermayer
551813a963 Merge commit '210921722bf828b3b895ebcbc34374e6c4452c6f'
* commit '210921722bf828b3b895ebcbc34374e6c4452c6f':
  imc: add required padding for GetBitContext buffer

Conflicts:
	libavcodec/imc.c

See: 7444cf9a9c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 17:44:13 +02:00
Michael Niedermayer
44327cbc9a avcodec/jpeg2000: Disable special case for JPEG2000_QSTY_SI
The code gave apparently completely wrong values

Fixes Ticket2872

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 16:44:32 +02:00
Michael Niedermayer
45db921806 avcodec/jpeg2000dec: Add placeholder for PLT parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 15:16:46 +02:00
Michael Niedermayer
b6ee1912f9 avcodec/jpeg2000dec: Handle Psot = 0
Fixes Ticket2869

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 14:43:03 +02:00
Janne Grunau
210921722b imc: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.

CC: libav-stable@libav.org
2015-06-09 10:07:04 +02:00
Janne Grunau
09447f2b0f ac3_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-06-09 10:06:59 +02:00
Janne Grunau
fb14730802 aac_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-06-09 10:05:54 +02:00
Michael Niedermayer
e100966575 avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 05:11:09 +02:00
Michael Niedermayer
7c9fcdfabd avcodec/jpeg2000dec: Fix some 5/3 bitexactness issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 02:17:53 +02:00
Michael Niedermayer
074159ed70 avcodec/jpeg2000dec: Fix subsampled decoding
Fixes part of Ticket3619

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:02:05 +02:00
Michael Niedermayer
12ba1b2b4d avcodec/jpeg2000dec: Check that coords match before applying ICT
This avoid potential out of array accesses

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:02:05 +02:00
Michael Niedermayer
028c59c17b avcodec/jpeg2000dec: Fix high bit depth branch sample shift
Fix part of Ticket3619

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:01:01 +02:00
Andreas Cadhalpun
6fdbaa2b7f vp8: change mv_{min,max}.{x,y} type to int
If one of the dimensions is larger than 8176, s->mb_width or
s->mb_height is larger than 511, leading to an int16_t overflow of
s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax.

Changing the type to int avoids the overflow and has no negative
effect, because s->mv_max is only used in clamp_mv for clipping.
Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't
increase the absolute value. The input to av_clip is an int16_t, and
thus the output fits into int16_t as well.

For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range
before use.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-08 23:29:14 +02:00
Michael Niedermayer
83e3516e64 Merge commit '925b80d64029d41962e5998d7d901226c3a9baea'
* commit '925b80d64029d41962e5998d7d901226c3a9baea':
  mpegvideo: Move OutFormat enum to mpegutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 22:05:25 +02:00
Michael Niedermayer
3244a17650 Merge commit '9bb11be0e5a75782c3139ad058c2b571499aa37d'
* commit '9bb11be0e5a75782c3139ad058c2b571499aa37d':
  mpegvideo: Split picture allocation for encoding and decoding

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:49:26 +02:00
Andreas Cadhalpun
b18eac7ff2 vp9: change type of tile_size from unsigned to int64_t
Otherwise the check 'tile_size < size' treats a negative size as
unsigned, causing the check to pass. This subsequently leads to
segmentation faults.

This was originally fixed as part of Libav commit 72ca83, so the
original author is one of the following developers:
        Anton Khirnov <anton@khirnov.net>
        Diego Biurrun <diego@biurrun.de>
        Luca Barbato <lu_zero@gentoo.org>
        Martin Storsjö <martin@martin.st>

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-08 21:43:16 +02:00
Michael Niedermayer
e05fda99f7 Merge commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a'
* commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a':
  mpegvideo: Rework frame_size_alloc function

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:16:36 +02:00
Michael Niedermayer
db8ae37a78 Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'
* commit 'da0c8664b4dc906696803685f7e53ade68594ab8':
  mpegvideo: Move various temporary buffers to a separate context

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/vc1_mc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:05:12 +02:00
Michael Niedermayer
653bf3c5a1 avcodec/hq_hqa: Fix signness of tag
Fixes Ticket4509

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 19:11:27 +02:00
Donny Yang
130a6c04a4 avcodec/apng: Add partial support for blending with PAL8 pixel format
Currently restricted to blending pixels that only contain either
0 or 255 in their alpha components

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 16:27:57 +02:00
Donny Yang
33292c07fe avcodec/apng: Add support for blending with GRAY8A pixel format
Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 16:18:34 +02:00
Donny Yang
0ab1c46fe0 avcodec/apng: Add blending support for non-alpha pixel formats
Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 15:44:22 +02:00
Donny Yang
ed09bb3782 avcodec/apng: Dispose previous frame properly
The spec specifies the dispose operation as how the current (i.e., currently
being rendered) frame should be disposed when the next frame is blended onto it

This is contrary to ffmpeg's current behaviour of interpreting the dispose
operation as how the previous (i.e., already rendered) frame should be disposed

This patch fixes ffmpeg's behaviour to match those of the spec, which involved
a rewrite of the blending function

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 15:32:49 +02:00
Vittorio Giovara
925b80d640 mpegvideo: Move OutFormat enum to mpegutils.h
It is necessary to avoid circular header dependencies.
2015-06-08 12:39:42 +01:00
Vittorio Giovara
9bb11be0e5 mpegvideo: Split picture allocation for encoding and decoding
The main ff_alloc_picture() function is made more generic with all the
parameters necessary as arguments. This will allows to move most of the
related functions to a separate file later.

Right now wrappers are provided to try and minimize the number of
changes in the code.
2015-06-08 12:39:42 +01:00
Vittorio Giovara
f8716a1408 mpegvideo: Rework frame_size_alloc function
Use more generic arguments and remove its static attribute since it will
be moved to a separate file.
2015-06-08 12:39:42 +01:00
Vittorio Giovara
da0c8664b4 mpegvideo: Move various temporary buffers to a separate context 2015-06-08 12:39:42 +01:00
Max Poliakovski
4b343f7c35 atrac3plus: give the phase_shift flag a better name.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 11:45:22 +02:00
Max Poliakovski
d765e07322 atrac3plus: add support for GHA phase inversion.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 04:26:04 +02:00
Michael Niedermayer
990605768c avcodec/aacdec: Do not return a uninitialized value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 02:33:39 +02:00
Michael Niedermayer
153d23ee39 Merge commit 'bc76c46943272515805d7ac48ca39f14826d1fed'
* commit 'bc76c46943272515805d7ac48ca39f14826d1fed':
  aac: Wait to know the channels before allocating frame

Conflicts:
	libavcodec/aacdec.c

See: 676a395ab9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 02:28:44 +02:00
Michael Niedermayer
476692abdb Merge commit 'a188108ebf28ebac9d2b8fc7d5b391aef45698b3'
* commit 'a188108ebf28ebac9d2b8fc7d5b391aef45698b3':
  aac: Support channel configurations 11 and 12

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 01:31:15 +02:00
Michael Niedermayer
8eb2c411c1 Merge commit '677c804aa3a78d61b21e6423165a252846c20f0e'
* commit '677c804aa3a78d61b21e6423165a252846c20f0e':
  aac: correctly map 7.1ch-wide AAC from FDK AAC encoder

Sample: FDK_7.1ch_wide.aac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 01:29:36 +02:00
Michael Niedermayer
4c4c3d5d5a avcodec/libstagefright: Check for pthread_create() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-07 21:20:21 +02:00
Luca Barbato
bc76c46943 aac: Wait to know the channels before allocating frame
The channel configuration can be delivered only by the PCE,
try to parse it first and not try to decode until a channel
configuration is set.

CC: libav-stable@libav.org
2015-06-07 10:14:46 +02:00
Sebastian Dröge
a188108ebf aac: Support channel configurations 11 and 12
These are defined in ISO/IEC 14496-3:2009/PDAM 4 for 6.1 and 7.1.
It also defines another 7.1 layout with configuration 14, that one
is not added here for now.

11: 3/3.1    FC FL+FR BL+BR BC LFE
12: 3/2/2.1  FC FL+FR SiL+SiR BL+BR LFE

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-07 10:14:46 +02:00
nu774
677c804aa3 aac: correctly map 7.1ch-wide AAC from FDK AAC encoder
FDK AAC encoder outputs SCE(front)+CPE(front)+CPE(back)+CPE(back) on
MODE_7_1_REAR_SURROUND configuration.
Since decoder couldn't properly map 4 back channels, decoding failed
unless -request_channel_layout 0x8000000000000000 has been specified.
Now we treat first CPE(back) as CPE(side) on channel mapping.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-07 10:14:45 +02:00
Philip Langdale
cc904353fa avcodec/allcodecs: Re-order nvenc encoders below x264/5.
We shouldn't pick nvenc by default.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-06 20:29:17 -07:00
Michael Niedermayer
46428ea332 avcodec/mpegvideo: Use av_memdup() for allocating thread_context
Also check for allocation failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Michael Niedermayer
7ddedd2362 avcodec/mpegvideo: Clear thread_context array before allocating
This is probably redundant but its safer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Michael Niedermayer
f30a7d9861 avcodec/mpegvideo: Merge thread context initialization loops
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Philip Langdale
7e4661174a avcodec/nvenc: Add 'nvenc_h264' as an alternative name for 'nvenc'
This allows us to offer the same codec name that libav uses. We don't have
a special way to do aliases, so it's all a bit more verbose than you'd want
but such is life.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-06 13:14:14 -07:00
Philip Langdale
e79c40fe72 avcodec/nvenc: Rename nvenc_h265 to nvenc_hevc
For the sake of compatibility, and because pretty much everything else in the
codebase calls it HEVC.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-06 13:14:11 -07:00
Philip Langdale
c10e6bcb43 Revert "avcodec: Rename nvenc.c to nvenc_a.c, to avoid conflict with the other implementation"
This reverts commit d0d0913702.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-06 13:14:07 -07:00
Philip Langdale
d47de79372 Revert "Merge commit 'b08caa87c35a768ec0abb16b1e99c3a85f1df28e'"
This reverts commit d8bbb99c51, reversing
changes made to d0d0913702.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-06 13:14:02 -07:00