OSDN Git Service

android-x86/external-ffmpeg.git
9 years agoavcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni copy, uni horizontal...
Shivraj Patil [Mon, 4 May 2015 12:21:34 +0000 (17:51 +0530)]
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni copy, uni horizontal and uni vertical mc functions

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoripemd: move ripemd{256, 320} into separate functions
James Almer [Thu, 7 May 2015 04:58:50 +0000 (01:58 -0300)]
ripemd: move ripemd{256, 320} into separate functions

This allows the removal of a few branches.

Before:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:    7.052 +- 0.010

After:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:    6.865 +- 0.015

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/x86/vp9dsp_init: Fix mix of declaration and statement
Michael Niedermayer [Thu, 7 May 2015 11:46:48 +0000 (13:46 +0200)]
avcodec/x86/vp9dsp_init: Fix mix of declaration and statement

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vp9dsp: Replace assert by av_assert0()
Michael Niedermayer [Thu, 7 May 2015 11:44:54 +0000 (13:44 +0200)]
avcodec/vp9dsp: Replace assert by av_assert0()

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge remote-tracking branch 'rbultje/vp9-profile23-wip'
Michael Niedermayer [Thu, 7 May 2015 11:21:59 +0000 (13:21 +0200)]
Merge remote-tracking branch 'rbultje/vp9-profile23-wip'

* rbultje/vp9-profile23-wip:
  libvpxdec: add 440 pixfmts.
  vp9: add profile 2/3 fate tests.
  vp9: add inter-frame profile 2/3 suport.
  vp9: add keyframe profile 2/3 support.
  vp9: parse profile 2/3 bitdepth in frame header.
  vp9: add profile 2/3 to exported profiles.
  fate: add/update reference files for 440 addition.
  swscale: add yuv440p10/12 pixfmts.
  lavc: add yuv440p10/12 formats to aligned pixfmt list.
  lavu: add yuv440p10/12 pixfmts.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolibvpxdec: add 440 pixfmts.
Ronald S. Bultje [Wed, 6 May 2015 19:30:32 +0000 (15:30 -0400)]
libvpxdec: add 440 pixfmts.

9 years agovp9: add profile 2/3 fate tests.
Ronald S. Bultje [Wed, 6 May 2015 15:52:19 +0000 (11:52 -0400)]
vp9: add profile 2/3 fate tests.

9 years agoavcodec/diracdec: Replace default_bsep[] by multiplication
Michael Niedermayer [Thu, 7 May 2015 03:07:55 +0000 (05:07 +0200)]
avcodec/diracdec: Replace default_bsep[] by multiplication

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswscale/x86/hscale_fast_bilinear_simd: Fix variable names in comments
Michael Niedermayer [Thu, 7 May 2015 01:57:21 +0000 (03:57 +0200)]
swscale/x86/hscale_fast_bilinear_simd: Fix variable names in comments

Found-by: Nick Lewycky <nlewycky@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Wed, 6 May 2015 23:59:18 +0000 (01:59 +0200)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  lavf/img2dec: Autodetect qdraw images.
  lavc/qdrw: Also support real-world qdraw images.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavdevice/dshow_capture: avoid #ifdef, use ff_dlog() for dshowdebug()
Michael Niedermayer [Wed, 6 May 2015 23:21:42 +0000 (01:21 +0200)]
avdevice/dshow_capture: avoid #ifdef, use ff_dlog() for dshowdebug()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavf/img2dec: Autodetect qdraw images.
Carl Eugen Hoyos [Wed, 6 May 2015 23:10:45 +0000 (01:10 +0200)]
lavf/img2dec: Autodetect qdraw images.

9 years agolavc/qdrw: Also support real-world qdraw images.
Carl Eugen Hoyos [Wed, 6 May 2015 22:51:28 +0000 (00:51 +0200)]
lavc/qdrw: Also support real-world qdraw images.

9 years agoswresample/dither_template: Do not define macro functions to nothing
Michael Niedermayer [Wed, 6 May 2015 23:07:30 +0000 (01:07 +0200)]
swresample/dither_template: Do not define macro functions to nothing

This avoids potential warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/internal: always check arguments of hex_dump_debug()
Michael Niedermayer [Wed, 6 May 2015 22:56:02 +0000 (00:56 +0200)]
avformat/internal: always check arguments of hex_dump_debug()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/asfdec: do not define print_guid() to nothing
Michael Niedermayer [Wed, 6 May 2015 22:54:06 +0000 (00:54 +0200)]
avformat/asfdec: do not define print_guid() to nothing

This avoid potential warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/tableprint_vlc: Do not define functions to nothing
Michael Niedermayer [Wed, 6 May 2015 22:52:47 +0000 (00:52 +0200)]
avcodec/tableprint_vlc: Do not define functions to nothing

This avoids potential warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'e0010bb91fc0b067be8aefd2f77e6838537da433'
Michael Niedermayer [Wed, 6 May 2015 20:36:34 +0000 (22:36 +0200)]
Merge commit 'e0010bb91fc0b067be8aefd2f77e6838537da433'

* commit 'e0010bb91fc0b067be8aefd2f77e6838537da433':
  mux: Do not leave stale side data pointers in ff_interleave_add_packet()

Conflicts:
libavformat/mux.c

See: bfb3ed1a9d5dafdc185080fdd88d02ff7221d30a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '6c8c7c246280cdcd23e4d99006b95245ae837278'
Michael Niedermayer [Wed, 6 May 2015 20:29:07 +0000 (22:29 +0200)]
Merge commit '6c8c7c246280cdcd23e4d99006b95245ae837278'

* commit '6c8c7c246280cdcd23e4d99006b95245ae837278':
  dump: Print AVAudioServiceType side data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '04070dbca0688ab1e24528ce5c135254a9a79c47'
Michael Niedermayer [Wed, 6 May 2015 19:46:48 +0000 (21:46 +0200)]
Merge commit '04070dbca0688ab1e24528ce5c135254a9a79c47'

* commit '04070dbca0688ab1e24528ce5c135254a9a79c47':
  libx265: Fix 'braces around scalar initializer' warning

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd81fb63d87692765c004c19934b49427df434a07'
Michael Niedermayer [Wed, 6 May 2015 19:21:00 +0000 (21:21 +0200)]
Merge commit 'd81fb63d87692765c004c19934b49427df434a07'

* commit 'd81fb63d87692765c004c19934b49427df434a07':
  fate: Add a PICT test

Conflicts:
tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: add inter-frame profile 2/3 suport.
Ronald S. Bultje [Wed, 6 May 2015 15:52:07 +0000 (11:52 -0400)]
vp9: add inter-frame profile 2/3 suport.

9 years agovp9: add keyframe profile 2/3 support.
Ronald S. Bultje [Wed, 6 May 2015 12:50:43 +0000 (08:50 -0400)]
vp9: add keyframe profile 2/3 support.

9 years agovp9: parse profile 2/3 bitdepth in frame header.
Ronald S. Bultje [Tue, 5 May 2015 13:39:13 +0000 (09:39 -0400)]
vp9: parse profile 2/3 bitdepth in frame header.

9 years agovp9: add profile 2/3 to exported profiles.
Ronald S. Bultje [Tue, 5 May 2015 14:04:12 +0000 (10:04 -0400)]
vp9: add profile 2/3 to exported profiles.

9 years agofate: add/update reference files for 440 addition.
Ronald S. Bultje [Wed, 6 May 2015 19:10:26 +0000 (15:10 -0400)]
fate: add/update reference files for 440 addition.

9 years agoMerge commit '7b734ee55dbb8476d7ad63c7daf55c534cf82d5d'
Michael Niedermayer [Wed, 6 May 2015 18:52:07 +0000 (20:52 +0200)]
Merge commit '7b734ee55dbb8476d7ad63c7daf55c534cf82d5d'

* commit '7b734ee55dbb8476d7ad63c7daf55c534cf82d5d':
  lavf: Open PICT images with Quickdraw

Conflicts:
tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '34efb8a169e4551326e069be47125c6c2cb7ab90'
Michael Niedermayer [Wed, 6 May 2015 18:40:26 +0000 (20:40 +0200)]
Merge commit '34efb8a169e4551326e069be47125c6c2cb7ab90'

* commit '34efb8a169e4551326e069be47125c6c2cb7ab90':
  quickdraw: Support direct pixel blocks

Conflicts:
Changelog
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'bb2cb0a66d86ec4ad9f43a488e8b6ab894c22d2f'
Michael Niedermayer [Wed, 6 May 2015 18:32:52 +0000 (20:32 +0200)]
Merge commit 'bb2cb0a66d86ec4ad9f43a488e8b6ab894c22d2f'

* commit 'bb2cb0a66d86ec4ad9f43a488e8b6ab894c22d2f':
  quickdraw: Switch to greedy parsing

Conflicts:
libavcodec/qdrw.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd00f1e0fc10bb945cdf140a6c320eb0c9cd25162'
Michael Niedermayer [Wed, 6 May 2015 18:23:54 +0000 (20:23 +0200)]
Merge commit 'd00f1e0fc10bb945cdf140a6c320eb0c9cd25162'

* commit 'd00f1e0fc10bb945cdf140a6c320eb0c9cd25162':
  quickdraw: Convert to bytestream2

Conflicts:
libavcodec/qdrw.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '01fdfa51aca9086e04bd354fe3f103a49352c085'
Michael Niedermayer [Wed, 6 May 2015 18:08:32 +0000 (20:08 +0200)]
Merge commit '01fdfa51aca9086e04bd354fe3f103a49352c085'

* commit '01fdfa51aca9086e04bd354fe3f103a49352c085':
  xcbgrab: Accept geometries matching the screen size

See: 7971fa9ce0ead8d2e8a79dbe422e91dcef8222ba
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswscale: add yuv440p10/12 pixfmts.
Ronald S. Bultje [Tue, 5 May 2015 13:38:15 +0000 (09:38 -0400)]
swscale: add yuv440p10/12 pixfmts.

9 years agolavc: add yuv440p10/12 formats to aligned pixfmt list.
Ronald S. Bultje [Wed, 6 May 2015 16:04:14 +0000 (12:04 -0400)]
lavc: add yuv440p10/12 formats to aligned pixfmt list.

9 years agolavu: add yuv440p10/12 pixfmts.
Ronald S. Bultje [Tue, 5 May 2015 13:37:59 +0000 (09:37 -0400)]
lavu: add yuv440p10/12 pixfmts.

9 years agodiracdec: check that block length is valid
Andreas Cadhalpun [Wed, 6 May 2015 13:34:53 +0000 (15:34 +0200)]
diracdec: check that block length is valid

In init_planes p->xblen and p->yblen are set to:
            p->xblen = s->plane[0].xblen >> s->chroma_x_shift;
            p->yblen = s->plane[0].yblen >> s->chroma_y_shift;

These are later used as block_w and block_h arguments of
s->vdsp.emulated_edge_mc. If one of them is 0 it triggers an av_assert2
in emulated_edge_mc:
    av_assert2(start_x < end_x && block_w > 0);
    av_assert2(start_y < end_y && block_h > 0);

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodirac: use and forward error codes
Andreas Cadhalpun [Wed, 6 May 2015 14:54:40 +0000 (16:54 +0200)]
dirac: use and forward error codes

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agotools/cws2fws: Use a similar implementation in dbgprintf() as in ff_dlog()
Michael Niedermayer [Wed, 6 May 2015 14:09:26 +0000 (16:09 +0200)]
tools/cws2fws: Use a similar implementation in dbgprintf() as in ff_dlog()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vp8: Suppress empty body warnings
Michael Niedermayer [Wed, 6 May 2015 14:02:57 +0000 (16:02 +0200)]
avcodec/vp8: Suppress empty body warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomux: Do not leave stale side data pointers in ff_interleave_add_packet()
Michael Niedermayer [Fri, 1 May 2015 22:55:42 +0000 (23:55 +0100)]
mux: Do not leave stale side data pointers in ff_interleave_add_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agodump: Print AVAudioServiceType side data
Vittorio Giovara [Fri, 1 May 2015 14:33:50 +0000 (15:33 +0100)]
dump: Print AVAudioServiceType side data

9 years agoavutil/internal: Suppress empty body warning from emms_c()
Michael Niedermayer [Wed, 6 May 2015 13:46:25 +0000 (15:46 +0200)]
avutil/internal: Suppress empty body warning from emms_c()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolibx265: Fix 'braces around scalar initializer' warning
Vittorio Giovara [Fri, 1 May 2015 14:39:26 +0000 (15:39 +0100)]
libx265: Fix 'braces around scalar initializer' warning

x265 Reordered the x265_picture fields in the commit

https://github.com/videolan/x265/commit/51b1518de2414431f36eac592db15b667c25a7b9#diff-945b5354d8767dfac13334f2d22cf58fR107

Now the first field is an integer and not an array.

9 years agofate: Add a PICT test
Vittorio Giovara [Sat, 18 Apr 2015 16:25:22 +0000 (17:25 +0100)]
fate: Add a PICT test

This stimulates the direct pixel mode in Quickdraw decoder.

9 years agolavf: Open PICT images with Quickdraw
Vittorio Giovara [Sat, 18 Apr 2015 16:25:21 +0000 (17:25 +0100)]
lavf: Open PICT images with Quickdraw

Update the pictor test to use the pictor codec, as both formats share
the .pic file extension.

9 years agoquickdraw: Support direct pixel blocks
Vittorio Giovara [Sat, 18 Apr 2015 16:25:20 +0000 (17:25 +0100)]
quickdraw: Support direct pixel blocks

Data is stored in separated components so rework decode_rle() to support
stepping and offsets.

9 years agoquickdraw: Switch to greedy parsing
Vittorio Giovara [Sat, 18 Apr 2015 16:25:19 +0000 (17:25 +0100)]
quickdraw: Switch to greedy parsing

Quickdraw packs data as a series of codes that the application is supposed
to handle, but it does not define any order in which they might appear.
Since it's unfeasible to support *all* opcodes defined by the spec,
only handle well-known blocks containing video data and ignore any unknown
or unsupported ones.

Move palette loading and rle decoding to separate functions to resue them
in other blocks and drop format initialization in init since it can
support more formats than pal8.

Validate width and height.

9 years agoquickdraw: Convert to bytestream2
Vittorio Giovara [Sat, 18 Apr 2015 16:25:18 +0000 (17:25 +0100)]
quickdraw: Convert to bytestream2

Add appropriate error messages and reduce r, g, b variables scope.
Drop the now redundant line checks in RLE decoding.

9 years agolavd/xcbgrab: fix comparison with screen size.
Nicolas George [Wed, 6 May 2015 09:53:19 +0000 (11:53 +0200)]
lavd/xcbgrab: fix comparison with screen size.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoxcbgrab: Accept geometries matching the screen size
Nicolas George [Wed, 6 May 2015 10:22:52 +0000 (12:22 +0200)]
xcbgrab: Accept geometries matching the screen size

Introduced in e8c4db0d4d077.

9 years agoOS/2:Makedef.cmd cleanup
Dave Yeo [Wed, 6 May 2015 04:07:59 +0000 (21:07 -0700)]
OS/2:Makedef.cmd cleanup

Remove PROTMODE as it doesn't make sense for DLLs. Also fixes a warning with the OpenWatcom linker
Export symbols as names rather then ordinals for better compatibility for minor releases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/diracdec: Fix types and wraparounds in dirac_decode_picture_header()
Michael Niedermayer [Wed, 6 May 2015 00:44:21 +0000 (02:44 +0200)]
avcodec/diracdec: Fix types and wraparounds in dirac_decode_picture_header()

previously various variables had a too small type to support the required 32bit unsigned
range allowed from the spec

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodiracdec: check if reference could not be allocated
Andreas Cadhalpun [Tue, 5 May 2015 21:51:48 +0000 (23:51 +0200)]
diracdec: check if reference could not be allocated

s->ref_pics[i] is later used as ref argument of interpolate_refplane,
where it is dereferenced.

If it is NULL, it causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodiracdec: avoid overflow of bytes*8 in decode_lowdelay
Andreas Cadhalpun [Tue, 5 May 2015 20:10:44 +0000 (22:10 +0200)]
diracdec: avoid overflow of bytes*8 in decode_lowdelay

If bytes is large enough, bytes*8 can overflow and become negative.

In that case 'bufsize -= bytes*8' causes bufsize to increase instead of
decrease.

This leads to a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '3735b5c616770429572f86aabdaec39c6ebb8818'
Michael Niedermayer [Tue, 5 May 2015 21:21:24 +0000 (23:21 +0200)]
Merge commit '3735b5c616770429572f86aabdaec39c6ebb8818'

* commit '3735b5c616770429572f86aabdaec39c6ebb8818':
  Revert "lavfi: always check av_expr_parse_and_eval() return value"

See: 8c9a23833daa88bdf08b7e7fbf3a64ab689ad373
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavf/riff: Add MultiScope II fourcc MSC2 as MJPEG.
Carl Eugen Hoyos [Tue, 5 May 2015 21:51:20 +0000 (23:51 +0200)]
lavf/riff: Add MultiScope II fourcc MSC2 as MJPEG.

9 years agoMerge commit '60f1cc4a1ffcbf24acbb543988ceeaec76b70818'
Michael Niedermayer [Tue, 5 May 2015 20:57:12 +0000 (22:57 +0200)]
Merge commit '60f1cc4a1ffcbf24acbb543988ceeaec76b70818'

* commit '60f1cc4a1ffcbf24acbb543988ceeaec76b70818':
  alsdec: only adapt order for positive max_order

See: 58d605ee9b3277289278dc40e022311f8e083833
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '94bb1ce882a12b6d7a1fa32715a68121b39ee838'
Michael Niedermayer [Tue, 5 May 2015 20:55:45 +0000 (22:55 +0200)]
Merge commit '94bb1ce882a12b6d7a1fa32715a68121b39ee838'

* commit '94bb1ce882a12b6d7a1fa32715a68121b39ee838':
  alsdec: check sample pointer range in revert_channel_correlation

Conflicts:
libavcodec/alsdec.c

See: afc7748d1f6abc4b3b1cc957b0fa6941837db3d0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '110f7f35fb615b97d983b1c6c6a714fddd28bcbe'
Michael Niedermayer [Tue, 5 May 2015 20:45:30 +0000 (22:45 +0200)]
Merge commit '110f7f35fb615b97d983b1c6c6a714fddd28bcbe'

* commit '110f7f35fb615b97d983b1c6c6a714fddd28bcbe':
  aacpsy: correct calculation of minath in psy_3gpp_init

See: ca9849eecdf7db91d652c698018a5b096d8b78c7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'e191aaca44b986816695e3b7ecfae64697fd6631'
Michael Niedermayer [Tue, 5 May 2015 20:32:57 +0000 (22:32 +0200)]
Merge commit 'e191aaca44b986816695e3b7ecfae64697fd6631'

* commit 'e191aaca44b986816695e3b7ecfae64697fd6631':
  alsdec: limit avctx->bits_per_raw_sample to 32

See: 4c2b88678b436f59132386d9be2fc143e3ee480d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '8fc8024ea56e814cd257d5fe27b21a865080782f'
Michael Niedermayer [Tue, 5 May 2015 20:20:02 +0000 (22:20 +0200)]
Merge commit '8fc8024ea56e814cd257d5fe27b21a865080782f'

* commit '8fc8024ea56e814cd257d5fe27b21a865080782f':
  aasc: return correct buffer size from aasc_decode_frame

See: 0be54ad280cf114c02306b7063147e8379f8ed1e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/diracdec: Move buf[] read after size check
Michael Niedermayer [Tue, 5 May 2015 20:01:58 +0000 (22:01 +0200)]
avcodec/diracdec: Move buf[] read after size check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agodiracdec: prevent overflow in data_unit_size check
Andreas Cadhalpun [Tue, 5 May 2015 19:33:08 +0000 (21:33 +0200)]
diracdec: prevent overflow in data_unit_size check

buf_idx + data_unit_size can overflow, causing the '> buf_size' check to
wrongly fail.

This causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: error out if chroma subsampling changes between frames.
Ronald S. Bultje [Tue, 5 May 2015 12:26:50 +0000 (08:26 -0400)]
vp9: error out if chroma subsampling changes between frames.

This can happen after an intra-only frame. For reference, see:
https://groups.google.com/a/webmproject.org/forum/#!msg/webm-discuss/zaoTxREZjq8/v5Enht87AhcJ

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoRevert "lavfi: always check av_expr_parse_and_eval() return value"
Anton Khirnov [Sat, 2 May 2015 07:09:52 +0000 (09:09 +0200)]
Revert "lavfi: always check av_expr_parse_and_eval() return value"

This reverts commit 63be97ec403023fb664798432acedaf6e6922527.

All those calls were unchecked on purpose, as explained in the comments
in the code.

9 years agoalsdec: only adapt order for positive max_order
Andreas Cadhalpun [Wed, 22 Apr 2015 14:03:41 +0000 (16:03 +0200)]
alsdec: only adapt order for positive max_order

For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoalsdec: check sample pointer range in revert_channel_correlation
Andreas Cadhalpun [Tue, 21 Apr 2015 17:28:30 +0000 (19:28 +0200)]
alsdec: check sample pointer range in revert_channel_correlation

Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoavformat/matroskaenc: Use avoid_negative_ts_use_pts if no stream writes dts
Michael Niedermayer [Tue, 5 May 2015 10:57:24 +0000 (12:57 +0200)]
avformat/matroskaenc: Use avoid_negative_ts_use_pts if no stream writes dts

This reduces the number of cases where timestamps need to be shifted

Fixes Ticket4487

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mux: Add avoid_negative_ts_use_pts
Michael Niedermayer [Tue, 5 May 2015 10:44:20 +0000 (12:44 +0200)]
avformat/mux: Add avoid_negative_ts_use_pts

This allows using pts instead of dts for negative TS avoidance

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocmdutils: Add libm.h for round()
Michael Niedermayer [Tue, 5 May 2015 09:49:44 +0000 (11:49 +0200)]
cmdutils: Add libm.h for round()

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoaacpsy: correct calculation of minath in psy_3gpp_init
Andreas Cadhalpun [Tue, 21 Apr 2015 16:43:55 +0000 (18:43 +0200)]
aacpsy: correct calculation of minath in psy_3gpp_init

The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
This patch uses the first order approximation to determine it.

For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
not the one at 3410 (-5.24237967).

CC: libav-stabl@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoalsdec: limit avctx->bits_per_raw_sample to 32
Andreas Cadhalpun [Sat, 18 Apr 2015 18:29:13 +0000 (20:29 +0200)]
alsdec: limit avctx->bits_per_raw_sample to 32

avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoaasc: return correct buffer size from aasc_decode_frame
Andreas Cadhalpun [Thu, 16 Apr 2015 17:12:02 +0000 (19:12 +0200)]
aasc: return correct buffer size from aasc_decode_frame

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agocmdutils: move get_rotation() up in the file
James Almer [Tue, 5 May 2015 05:46:42 +0000 (02:46 -0300)]
cmdutils: move get_rotation() up in the file

Fixes compilation of fftools without libavdevice

Signed-off-by: James Almer <jamrial@gmail.com>
9 years agoavfilter/Makefile: add missing lavfutils.c dependency to cover_rect and find_rect...
James Almer [Tue, 5 May 2015 05:14:10 +0000 (02:14 -0300)]
avfilter/Makefile: add missing lavfutils.c dependency to cover_rect and find_rect filters

Signed-off-by: James Almer <jamrial@gmail.com>
9 years agoavcodec/mpeg12dec: use the correct dimensions for checking SAR
Michael Niedermayer [Tue, 5 May 2015 02:15:31 +0000 (04:15 +0200)]
avcodec/mpeg12dec: use the correct dimensions for checking SAR

Fixes Ticket4533

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/x86/deinterlace: use INIT_MMX like other asm code does too
Michael Niedermayer [Tue, 5 May 2015 00:19:30 +0000 (02:19 +0200)]
avcodec/x86/deinterlace: use INIT_MMX like other asm code does too

9 years agoavformat/avidec: print a warning for negative sample_size
Michael Niedermayer [Mon, 4 May 2015 21:42:24 +0000 (23:42 +0200)]
avformat/avidec: print a warning for negative sample_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavidec: avoid infinite loop due to negative ast->sample_size
Andreas Cadhalpun [Mon, 4 May 2015 21:01:45 +0000 (23:01 +0200)]
avidec: avoid infinite loop due to negative ast->sample_size

If max in clean_index is set to a negative ast->sample_size, the
following loop never ends:
        while (max < 1024)
            max += max;

Thus set ast->sample_size to 0 if it would otherwise be negative.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: add profile names
James Almer [Mon, 4 May 2015 21:37:50 +0000 (18:37 -0300)]
vp9: add profile names

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years agoavfilter/vf_cover_rect: clip rectangle if it is partly outside the input
Michael Niedermayer [Mon, 4 May 2015 20:33:17 +0000 (22:33 +0200)]
avfilter/vf_cover_rect: clip rectangle if it is partly outside the input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavidec: check for valid bit_rate range
Andreas Cadhalpun [Mon, 4 May 2015 19:07:52 +0000 (21:07 +0200)]
avidec: check for valid bit_rate range

If bit_rate is negative, it can trigger an av_assert2 in av_rescale_rnd.

Since av_rescale returns int64_t, but st->codec_bit_rate is int, it can
also overflow into a negative value.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Mon, 4 May 2015 15:59:45 +0000 (17:59 +0200)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  lavfi/cropdetect: Fix cropdetect for > 8 bit input.
  lavf/apngenc: Fix png remuxing by using default extension apng.
  lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavfi/cropdetect: Fix cropdetect for > 8 bit input.
Carl Eugen Hoyos [Mon, 4 May 2015 15:50:16 +0000 (17:50 +0200)]
lavfi/cropdetect: Fix cropdetect for > 8 bit input.

9 years agolavf/apngenc: Fix png remuxing by using default extension apng.
Carl Eugen Hoyos [Mon, 4 May 2015 15:49:36 +0000 (17:49 +0200)]
lavf/apngenc: Fix png remuxing by using default extension apng.

9 years agolavf/mxfenc: Write correct interlaced flag when muxing dnxhd.
Carl Eugen Hoyos [Mon, 4 May 2015 15:44:14 +0000 (17:44 +0200)]
lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.

Reported and early patch version tested by forum user gridtank.
Reviewed-by: Tomas Härdin
9 years agocmdutils: Ask for a sample in case a odd rotation angle is encountered
Michael Niedermayer [Mon, 4 May 2015 15:33:40 +0000 (17:33 +0200)]
cmdutils: Ask for a sample in case a odd rotation angle is encountered

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]
Michael Niedermayer [Mon, 4 May 2015 13:47:54 +0000 (15:47 +0200)]
avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]

The later is not correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomatroskadec: check s->streams[k] before using it
Andreas Cadhalpun [Sun, 3 May 2015 21:55:20 +0000 (23:55 +0200)]
matroskadec: check s->streams[k] before using it

This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/ffv1dec: Check chroma shift parameters
Michael Niedermayer [Mon, 4 May 2015 11:37:26 +0000 (13:37 +0200)]
avcodec/ffv1dec: Check chroma shift parameters

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/ffv1dec: More completely check micro_version
Michael Niedermayer [Mon, 4 May 2015 11:33:16 +0000 (13:33 +0200)]
avcodec/ffv1dec: More completely check micro_version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/ffv1dec: Check quant table symbols more completely
Michael Niedermayer [Mon, 4 May 2015 11:25:31 +0000 (13:25 +0200)]
avcodec/ffv1dec: Check quant table symbols more completely

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomatroskadec: use uint64_t instead of int for index_scale
Andreas Cadhalpun [Sun, 3 May 2015 21:07:20 +0000 (23:07 +0200)]
matroskadec: use uint64_t instead of int for index_scale

index_scale is set to matroska->time_scale of type uint64_t.

When index_scale is int, the assignment can overflow and e.g. result
in index_scale = 0. This causes a floating point exception due to the
division by index_scale.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg_filter: use get_rotation()
Michael Niedermayer [Sun, 3 May 2015 21:53:32 +0000 (23:53 +0200)]
ffmpeg_filter: use get_rotation()

This unifies the rotation extraction code between ffplay and ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffplay&cmdutils:Factor get_rotation() code out
Michael Niedermayer [Sun, 3 May 2015 21:49:16 +0000 (23:49 +0200)]
ffplay&cmdutils:Factor get_rotation() code out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/ccaption_dec: correcting line breaks in cc
Anshul Maheshwari [Sun, 3 May 2015 13:07:40 +0000 (18:37 +0530)]
avcodec/ccaption_dec: correcting line breaks in cc

Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffplay: unify displaymatrix based rotation code
Michael Niedermayer [Sun, 3 May 2015 00:27:54 +0000 (02:27 +0200)]
ffplay: unify displaymatrix based rotation code

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agopngdec: don't use AV_PIX_FMT_MONOBLACK for apng
Andreas Cadhalpun [Sun, 3 May 2015 18:36:20 +0000 (20:36 +0200)]
pngdec: don't use AV_PIX_FMT_MONOBLACK for apng

AV_PIX_FMT_MONOBLACK has the AV_PIX_FMT_FLAG_BITSTREAM flag, i.e.
linesize can be smaller than width.

Since x_offset is only check against the width, this can lead to
x_offset * bpp >= image_linesize.

In this case ptr could be set to a position outside the image_buf in
png_handle_row, leading to memory corruption and thus crashes.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agopngdec: return correct error code from decode_frame_common
Andreas Cadhalpun [Sun, 3 May 2015 15:50:26 +0000 (17:50 +0200)]
pngdec: return correct error code from decode_frame_common

During the loop ret can get changed. Since it is not set on all failure
paths, decode_frame_common can return 0 even though an error occurred.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agopngdec: check s->last_picture.f->data[0] before using it
Andreas Cadhalpun [Sun, 3 May 2015 14:21:39 +0000 (16:21 +0200)]
pngdec: check s->last_picture.f->data[0] before using it

This check was removed in commit 08aec6f6, but
s->last_picture.f->data[0] is still used in handle_p_frame_apng
unconditionally.

This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and...
Michael Niedermayer [Sun, 3 May 2015 13:54:21 +0000 (15:54 +0200)]
avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate

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