Commit Graph

31352 Commits

Author SHA1 Message Date
James Cowgill
157d6f0d5b mips: port optimizations to mips n64
This mainly consists of replacing all the pointer arithmatic 'addiu'
instructions with PTR_ADDIU which will handle the differences in pointer
sizes when compiled on 64 bit mips systems.

The header asmdefs.h contains the PTR_ macros which expend to the correct mips
instructions to manipulate registers containing pointers.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 14:37:44 +01:00
James Cowgill
eae13eae9d configure, mips: remove MIPS32R2, merging it with MIPSFPU
There are no independant uses of mips32r2 instructions except for the
FPU parts. Due to the heavy use of mips32r2 specifc fpu extensions, I
am guessing the original author intended MIPSFPU to imply MIPS32R2 anyway.

Since these fpu instructions are available on mips64 (non-r2), enable them
there as well.

Also remove the last occurence of HAVE_MIPS32R2 (which is coupled to
HAVE_MIPSFPU anyway).

mips32r2 is left in the list of options form compatability so that using
--disable-mips32r2 doesn't break anything.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 14:01:31 +01:00
James Cowgill
a99de50ec7 mips/aacdec: remove uses of mips32r2 specific ext instructions
Removing these removes the dependency of this code on mips32r2 which would
allow it to be used on processors which have FPU instructions, but not r2
instructions (like the mips64el debian port for instance).

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 13:59:39 +01:00
Claudio Freire
6dbbb981b5 AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate.
Instead, warn that bitrate will be clamped down to the maximum allowed.

Patch is mostly work of Kamendo2 in issue #2686, quite tested within that issue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 13:36:25 +01:00
Michael Niedermayer
39becc949c Merge commit '25c29d32835f38cdc5f0c84fa27dfc489a228770'
* commit '25c29d32835f38cdc5f0c84fa27dfc489a228770':
  libopenh264enc: Add support for building with OpenH264 1.4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 11:31:29 +01:00
Martin Storsjö
25c29d3283 libopenh264enc: Add support for building with OpenH264 1.4
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-06 10:02:47 +02:00
Andreas Cadhalpun
c089e720c1 webp: ensure that each transform is only used once
According to the WebP Lossless Bitstream Specification
"each transform is allowed to be used only once".

If a transform is more than once this can lead to memory
corruption.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 03:45:42 +01:00
Michael Niedermayer
31559723ab Merge commit '66624ed6319cb1a959256fe1a717fec5b748fbfa'
* commit '66624ed6319cb1a959256fe1a717fec5b748fbfa':
  rv10: check size of s->mb_width * s->mb_height

Conflicts:
	libavcodec/rv10enc.c

See: 2578a54618
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 19:43:25 +01:00
Anton Khirnov
ad786dd450 h264: remove a now redundant error check
It was only relevant when data partitioning was in use.
2015-03-05 16:10:11 +01:00
Andreas Cadhalpun
66624ed631 rv10: check size of s->mb_width * s->mb_height
If it doesn't fit into 12 bits it triggers an assertion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-05 14:49:16 +01:00
Andreas Cadhalpun
4f2ee9daee webp: validate the distance prefix code
According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-05 14:49:16 +01:00
Kevin Wheatley
86b59e6a50 avutil: Extract gamma determination from PNG encoder for future use. Adds private avpriv_get_gamma_from_trc() function to libavutil.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 12:26:22 +01:00
Michael Niedermayer
dcf7924f4d Merge commit 'f3b74d944bdef9bbe81f7690f8d837d843ec13a6'
* commit 'f3b74d944bdef9bbe81f7690f8d837d843ec13a6':
  pcxenc: Return more meaningful error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 02:17:01 +01:00
Himangi Saraogi
f3b74d944b pcxenc: Return more meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-03-04 23:44:01 +01:00
Peter Cordes
46235f0e02 libx264: update AQ options help for x264 build 144
Regular autovariance is no longer "experimental", and a version of it with
bias towards dark scenes is now in mainline x264.

Signed-off-by: Peter Cordes <peter@cordes.ca>
2015-03-04 21:58:53 +01:00
Michael Niedermayer
b5ca158935 Merge commit '87e85a133f3ce2f037b90e9c7bbca99951df6c15'
* commit '87e85a133f3ce2f037b90e9c7bbca99951df6c15':
  aac: Relax reserved_bit validation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 19:49:05 +01:00
Michael Niedermayer
87db7e7772 Merge commit '25f613f8be3b51e4396b93cda131e4631ba54302'
* commit '25f613f8be3b51e4396b93cda131e4631ba54302':
  dca: Move syncword definitions to a separate header

Conflicts:
	libavcodec/dca_parser.c
	libavformat/dtsdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 19:28:53 +01:00
Vittorio Giovara
87e85a133f aac: Relax reserved_bit validation
Although the specification mandates this bit to zero, it may happen
that software tools incorrectly flip it to one, invalidating a possibly
valid stream.

Relax this restriction, by failing only when AV_EF_BITSTREAM is set.
This behaviour is similar to aac decoders in Firefox and Quicktime.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-04 16:36:16 +00:00
Diego Biurrun
25f613f8be dca: Move syncword definitions to a separate header 2015-03-04 13:29:33 +01:00
Michael Niedermayer
f6f1e2b3be avcodec/pngenc: Remove outer () from macro
The macro is implemented as a do{}while()
enclosing this is () appears to be a GNU extension (6.1 Statements and Declarations in Expressions)
the () is also unneeded and wrong as the macro returns no
value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 02:06:08 +01:00
Michael Niedermayer
0d20896775 Merge commit 'db5cc75f8b5620e7cd2d05762c3b087ab16d8c24'
* commit 'db5cc75f8b5620e7cd2d05762c3b087ab16d8c24':
  wma.h: #include "avcodec.h"

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 01:23:54 +01:00
Vilius Grigaliūnas
ff6b08141a acvodec/lipopenjpeg: Fix pixel value shift for 12-bit pixel formats
This fixes pixel values not being properly shifted in
libopenjpeg_copyto16 and libopenjpeg_copy_to_packed16 methods.

Pixel formats like xyz12le need to be shifted by AVComponentDescriptor::shift
to get the correct values.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 23:20:51 +01:00
James Cowgill
37ffe7f90a mips/aaccoder: use variables instead of using register names directly
On mips64, the registers t[4-7] do not exist. Instead of using a lot of #ifdef
or defines to handle differing register names, use variables and let GCC
allocate the registers automatically (like in the other mips assembly files).

In get_band_cost_ESC_mips, t4 and t5 were renamed to t6 and t7 to avoid a
variable name conflict.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 21:58:36 +01:00
James Cowgill
de4f59b536 mips: use float* to hold pointer instead of int
This is obviously needed for 64-bit support.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 21:36:33 +01:00
Anton Khirnov
db5cc75f8b wma.h: #include "avcodec.h"
It's required for at least AVCodecContext.

Fixes make checkheaders.
2015-03-03 20:57:56 +01:00
Michael Niedermayer
75dbe4c1fa Merge commit 'e878ec0d47cd6228c367b2f3128b76d7523f7255'
* commit 'e878ec0d47cd6228c367b2f3128b76d7523f7255':
  aic: Fix decoding files with odd dimensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 20:41:44 +01:00
Vittorio Giovara
e878ec0d47 aic: Fix decoding files with odd dimensions
Normally the aic decoder finds the proper slice combination (multiple of
some number less than 32) but in case of odd width, it resorts to the
default values, which were actually swapped.
The number of slices is modified to account for such odd width cases.

CC: libav-stable@libav.org
2015-03-03 15:08:15 +00:00
Claudio Freire
6394acaf36 AAC: Fix M/S stereo encoding
This patch fixes a pointer arithmetic bug in adjust_frame_information that resulted in heavily corrupted audio when using M/S encoding. Also, a backup copy of untransformed coefficients has to be kept around or attempts at re-processing the frame (which happens when hevavily overspending bits during transients) will result in re-encoding of the coefficients and subsequent corruption of the resulting stream.

A/B testing shows the bug as corrected, but still cannot prove that M/S coding is a win at least in numbers. Limited listening tests do show improvement on M/S encoded samples in lower bitrates, but they're hidden among the other artifacts that remain to be corrected in the encoder.

Some of the regressions flagged in the report do show poor stereo image (but not buggy), so M/S encoding is clearly not good enough yet to be defaulted to auto.

In numbers, Patched against Unpatched, stereo_mode auto:

  Files: 114
  Bitrates: 6
  Tests: 683

  Serious Regressions: 0 (0%)
  Regressions: 0 (0%)
  Improvements: 227 (33%)
  Big improvements: 92 (13%)
  Worst regression - mybloodrusts.wv - 256k
    - StdDev: 28.61       pSNR: -0.43     maxdiff: 1372.00
  Best improvement - 60.wv - 384k
    - StdDev: -369.57     pSNR: 45.02     maxdiff: -13322.00
  Average          - StdDev: -80.56       pSNR: 2.49      maxdiff: -8858.00

Patched against Unpatched stereo_mode ms_off shows no difference.

Patched stereo_mode auto vs Unpatched stereo_mode ms_off shows a small average improvement, just not too significant:

  Serious Regressions: 0 (0%)
  Regressions: 10 (1%)
  Improvements: 45 (6%)
  Big improvements: 2 (0%)
  Worst regression - Illinois.wv - 256k
    - StdDev: 33.20       pSNR: -2.03     maxdiff: 477.00
  Best improvement - song_of_circomstances.flac - 384k
    - StdDev: -3.97       pSNR: 7.61      maxdiff: -826.00
  Average          - StdDev: -10.25       pSNR: 0.20      maxdiff: -281.00

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 13:57:42 +01:00
Steve Lhomme
4851db80a4 fix VP9 packet decoder returning 0 instead of the used data size
See https://trac.videolan.org/vlc/ticket/14022#comment:6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 13:48:51 +01:00
Andreas Cadhalpun
2578a54618 avcodec/rv10: check size of s->mb_width * s->mb_height
If it doesn't fit into 12 bits it triggers an assertion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 12:36:36 +01:00
Andreas Cadhalpun
5de2dab12b avcodec/webp: validate the distance prefix code
According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 00:37:36 +01:00
Clément Bœsch
da2a49ac9a avcodec/proresenc_kostya: fix coded_frame handling 2015-03-02 22:52:49 +01:00
Clément Bœsch
546d69eb43 avcodec: use av_frame_free() for coded_frame 2015-03-02 21:27:21 +01:00
Michael Niedermayer
ada512f91d Merge commit 'dbc1163b203b175d246b7454c32ac176f84006d1'
* commit 'dbc1163b203b175d246b7454c32ac176f84006d1':
  prores: Extend the padding check to 16bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 20:01:28 +01:00
Christophe Gisquet
efd3f407e5 hevc/sao: use unaligned copy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 19:32:23 +01:00
Michael Niedermayer
7c9e7bd425 avcodec/pngenc: replace round by lrint()
Avoids passing double to AV_WB32()

Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 15:02:20 +01:00
Claudio Freire
84f4be424d avcodec/aacpsy: Fix AAC Psy PE reduction calculation when multiple iterations are required
This is a small change, but it does have a big impact on bit allocation.

all the regressions marked in the report have no audible
difference (I didn't check them all though), but the improvements can
be heard.

This affects mostly high bit rates. It's related to issue #2686.

In the report, A is the patched version, B is unpatched, all
comparisons show deltas in the form (A-B), so a positive pSNR delta
means a better quality in the patched version, and negative a
regression. Regressions are only considered for pSNR deltas below
-1db, they're considered serious below -6db.

All measurements were done with tiny_psnr.

The summary of the report inline for quick reading:

Files: 58
Bitrates: 6
Tests: 347
Serious Regressions: 0 (0%)
Regressions: 10 (2%)
Improvements: 54 (15%)
Big improvements: 26 (7%)
Worst regression - sine_tester.flac - 384k
  - StdDev: 1.68        pSNR: -3.05     maxdiff: -178.00
Best improvement - 07 - Bound.flac - 384k
  - StdDev: -1700.05    pSNR: 20.64     maxdiff: -29595.00
Average          - StdDev: -55.67       pSNR: 1.20      maxdiff: -1593.00

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 13:31:31 +01:00
Luca Barbato
dbc1163b20 prores: Extend the padding check to 16bit
Some files produced by the official encoder have up to 16bit of
padding instead of the expected padding to the byte.

Use a self-explanatory macro instead of a simple number.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-02 11:27:57 +01:00
Michael Niedermayer
cf729b2489 avcodec/libfdk-aacdec: Change conceal_method to int, its accessed via AVOption as int
This fixes depending on implementation defined behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 04:08:09 +01:00
James Almer
5c8f747085 x86/hevc_sao: use unaligned movs for sao_{band,filter} with width 8
Suggested-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-01 20:02:43 -03:00
Michael Niedermayer
2b4041661a avcodec/mips/Makefile: Build fmtconvert_mips only if CONFIG_FMTCONVERT is set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 03:48:44 +01:00
Michael Niedermayer
7fce8c752d Merge commit '71f1ad37d858b810b71a4af1c25771beaa50b27b'
* commit '71f1ad37d858b810b71a4af1c25771beaa50b27b':
  lavc: do not compile fmtconvert unconditionally

Conflicts:
	configure
	libavcodec/ppc/Makefile
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 00:06:42 +01:00
Michael Niedermayer
5c17377e28 Merge commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca'
* commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca':
  fmtconvert: drop unused functions

Conflicts:
	libavcodec/arm/fmtconvert_vfp_armv6.S
	libavcodec/x86/fmtconvert.asm
	libavcodec/x86/fmtconvert_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:58:29 +01:00
Michael Niedermayer
e82b0e6126 Merge commit 'ee964145b5d229571e00bf6883a44189d02babe2'
* commit 'ee964145b5d229571e00bf6883a44189d02babe2':
  lavc: remove unused traces of fmtconvert usage

Conflicts:
	libavcodec/aac.h
	libavcodec/aacdec.c
	libavcodec/atrac3.c
	libavcodec/vorbisdec.c
	libavcodec/wma.c
	libavcodec/wma.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:41:36 +01:00
Andreas Cadhalpun
732c3ebffa avcodec/utils: use correct printf specifier in ff_set_sar
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 22:40:40 +01:00
Anton Khirnov
71f1ad37d8 lavc: do not compile fmtconvert unconditionally
Only ac3dec and dcadec use it.
2015-02-28 21:51:24 +01:00
Anton Khirnov
d74a8cb7e4 fmtconvert: drop unused functions 2015-02-28 21:51:24 +01:00
Anton Khirnov
ee964145b5 lavc: remove unused traces of fmtconvert usage
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
2015-02-28 21:51:24 +01:00
Andreas Cadhalpun
ea1d0b7ece avcodec/utils: use correct printf specifier in ff_set_sar
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-28 21:51:24 +01:00
Michael Niedermayer
5f1ea0bfc5 avcodec/ppc/fdctdsp: fix const warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 18:40:42 +01:00