OSDN Git Service

android-x86/external-ffmpeg.git
12 years agodoc/filters: consistently use '"' for quoting the drawtext arguments in examples
Stefano Sabatini [Thu, 3 May 2012 08:35:24 +0000 (10:35 +0200)]
doc/filters: consistently use '"' for quoting the drawtext arguments in examples

12 years agolavfi/drawtext: give a new alias "timecode_rate" to the the r/rate option
Stefano Sabatini [Tue, 1 May 2012 22:56:30 +0000 (00:56 +0200)]
lavfi/drawtext: give a new alias "timecode_rate" to the the r/rate option

The option is related to the timecode, the new name clearly specifies the
context. Also it allows to list the option close to the other timecode
options.

12 years agodoc/filters: document drawtext draw expression
Stefano Sabatini [Tue, 1 May 2012 11:26:05 +0000 (13:26 +0200)]
doc/filters: document drawtext draw expression

12 years agolavfi/drawtext: rename and document variables d_expr and d_pexpr
Stefano Sabatini [Tue, 1 May 2012 10:57:36 +0000 (12:57 +0200)]
lavfi/drawtext: rename and document variables d_expr and d_pexpr

Use the more expressive names draw_expr and draw_pexpr, also more
consistent.

12 years agodoc/filters: document rand() drawtext expression function
Stefano Sabatini [Tue, 1 May 2012 10:52:16 +0000 (12:52 +0200)]
doc/filters: document rand() drawtext expression function

12 years agodoc/filters: document x and y drawtext expression parameters
Stefano Sabatini [Tue, 1 May 2012 10:26:11 +0000 (12:26 +0200)]
doc/filters: document x and y drawtext expression parameters

12 years agodoc/filters: fix location of "rate" and "timecode" drawtext options
Stefano Sabatini [Tue, 1 May 2012 10:11:11 +0000 (12:11 +0200)]
doc/filters: fix location of "rate" and "timecode" drawtext options

They are options, not expression parameters.

12 years agolavfi/drawtext: alphabetically sort the expression parameters
Stefano Sabatini [Tue, 1 May 2012 09:37:15 +0000 (11:37 +0200)]
lavfi/drawtext: alphabetically sort the expression parameters

12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 2 May 2012 19:12:34 +0000 (21:12 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  arm: intreadwrite: disable inline asm for gcc 4.7 and later
  arm: intreadwrite: fix inline asm constraints for gcc 4.6 and later
  indeo3: fix motion vector validation
  pcm_bluray: set bits_per_raw_sample for > 16-bit
  twinvq: fix out of bounds array access
  lavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type

Conflicts:
doc/APIchanges
libavcodec/indeo3.c
libavcodec/pcm-mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoarm: intreadwrite: disable inline asm for gcc 4.7 and later
Mans Rullgard [Wed, 2 May 2012 14:09:54 +0000 (15:09 +0100)]
arm: intreadwrite: disable inline asm for gcc 4.7 and later

Starting with version 4.7, gcc properly supports unaligned
memory accesses on ARM.  Not using the inline asm with these
compilers results in better code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoarm: intreadwrite: fix inline asm constraints for gcc 4.6 and later
Mans Rullgard [Wed, 2 May 2012 11:46:22 +0000 (12:46 +0100)]
arm: intreadwrite: fix inline asm constraints for gcc 4.6 and later

With a dereferenced type-cast pointer as memory operand, gcc 4.6
and later will sometimes copy the data to a temporary location,
the address of which is used as the operand value, if it thinks
the target address might be misaligned.  Using a pointer to a
packed struct type instead does the right thing.

The 16-bit case is special since the ldrh instruction addressing
modes are limited compared to ldr.  The "Uq" constraint produces a
memory reference suitable for an ldrsb instruction, which supports
the same addressing modes as ldrh.  However, the restrictions appear
to apply only when the operand addresses a single byte.  The memory
reference must thus be split into two operands each targeting one
byte.  Finally, the "Uq" constraint is only available in ARM mode.
The Thumb-2 ldrh instruction supports most addressing modes so the
normal "m" constraint can be used there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agolavfi: remove screenshot libmpcodecs wrapper
Paul B Mahol [Sun, 25 Mar 2012 11:12:04 +0000 (11:12 +0000)]
lavfi: remove screenshot libmpcodecs wrapper

The filter is useless.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: preserve NULL ptrs in get_buffer()
Michael Niedermayer [Wed, 2 May 2012 08:45:21 +0000 (10:45 +0200)]
ffmpeg: preserve NULL ptrs in get_buffer()

Fixes Ticket1260, Ticket1267

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoDon't restrict reverse decorrelation to both coded channels. It is also used for...
Jakub Stachowski [Tue, 1 May 2012 22:33:17 +0000 (00:33 +0200)]
Don't restrict reverse decorrelation to both coded channels. It is also used for mono data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoindeo3: fix motion vector validation
Hendrik Leppkes [Sun, 29 Apr 2012 16:33:41 +0000 (16:33 +0000)]
indeo3: fix motion vector validation

The index of the motion vector has to be checked before being
multiplied by 2 for the array index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agopcm_bluray: set bits_per_raw_sample for > 16-bit
Hendrik Leppkes [Sun, 29 Apr 2012 17:21:55 +0000 (17:21 +0000)]
pcm_bluray: set bits_per_raw_sample for > 16-bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agofate: update mmf seek checksum, change caused by av_get_packet() useage
Michael Niedermayer [Tue, 1 May 2012 23:50:29 +0000 (01:50 +0200)]
fate: update mmf seek checksum, change caused by av_get_packet() useage

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: automatically choose s16/flt/dbl to preserve input precision unless user overrides.
Michael Niedermayer [Tue, 1 May 2012 22:51:06 +0000 (00:51 +0200)]
swr: automatically choose s16/flt/dbl to preserve input precision unless user overrides.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: add double precision support to the rematrix code
Michael Niedermayer [Tue, 1 May 2012 22:50:00 +0000 (00:50 +0200)]
swr: add double precision support to the rematrix code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: update double precision checks for our resampler
Michael Niedermayer [Tue, 1 May 2012 22:48:44 +0000 (00:48 +0200)]
swr: update double precision checks for our resampler

It supports double precision since a while

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: add lfe_mix_level
Justin Ruggles [Tue, 1 May 2012 22:25:57 +0000 (00:25 +0200)]
swr: add lfe_mix_level

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: update side to back mixing.
Justin Ruggles [Tue, 1 May 2012 22:16:04 +0000 (00:16 +0200)]
swr: update side to back mixing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoAPIChanges: add entry for libavresample
Michael Niedermayer [Tue, 1 May 2012 20:17:47 +0000 (22:17 +0200)]
APIChanges: add entry for libavresample

Appears this was forgotten

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoxbmdec: fix decoding when variable name contains an 'x'.
Reimar Döffinger [Sun, 29 Apr 2012 13:56:12 +0000 (15:56 +0200)]
xbmdec: fix decoding when variable name contains an 'x'.

Fixes trac ticket #1142.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoxbmdec: print more details on decode error.
Reimar Döffinger [Sun, 29 Apr 2012 13:37:00 +0000 (15:37 +0200)]
xbmdec: print more details on decode error.

Makes debugging issues easier.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoflvdec: pass on proper error value.
Reimar Döffinger [Tue, 1 May 2012 18:00:30 +0000 (20:00 +0200)]
flvdec: pass on proper error value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoRemove some useless code that duplicates av_get_packet.
Reimar Döffinger [Tue, 1 May 2012 17:59:29 +0000 (19:59 +0200)]
Remove some useless code that duplicates av_get_packet.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoMark truncated packets as corrupt in av_get_packet.
Reimar Döffinger [Mon, 30 Apr 2012 20:58:27 +0000 (22:58 +0200)]
Mark truncated packets as corrupt in av_get_packet.

Manually remove that flag again for formats that read an arbitrary
amount of data and thus truncation is not an error.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 1 May 2012 20:06:55 +0000 (22:06 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avplay: use libavresample for sample format conversion and channel mixing
  Fix compilation with YASM/NASM without AVX support.
  WMAL: do not output last frame again if nothing was decoded in current packet
  WMAL: do not start decoding if frame does not end in current packet
  adpcm-thp: fix invalid array indexing
  ppc: add const where needed in scalarproduct_int16_altivec()
  ppc: remove shift parameter from scalarproduct_int16_altivec()
  ppc: dsputil: do unaligned block accesses correctly
  dvenc: do not call dsputil functions with stride not a multiple of 16
  APIchanges: fill in some dates and commit hashes

Conflicts:
doc/APIchanges
ffplay.c
libavcodec/adpcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agotwinvq: fix out of bounds array access
Mans Rullgard [Tue, 1 May 2012 17:27:19 +0000 (18:27 +0100)]
twinvq: fix out of bounds array access

ModeTab.fmode has only 3 elements, so indexing it with ftype
in the initialier for 'size' is invalid when ftype == FT_PPC.

This fixes crashes with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoswr: add and use function pointers for rematrix
Michael Niedermayer [Tue, 1 May 2012 18:20:21 +0000 (20:20 +0200)]
swr: add and use function pointers for rematrix

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: add native matrix for rematrixing
Michael Niedermayer [Tue, 1 May 2012 18:19:28 +0000 (20:19 +0200)]
swr: add native matrix for rematrixing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: fix type of dither scale.
Michael Niedermayer [Tue, 1 May 2012 18:13:32 +0000 (20:13 +0200)]
ffmpeg: fix type of dither scale.

This allows non integer scales.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: disable 1 stage convert when dither is enabled.
Michael Niedermayer [Tue, 1 May 2012 18:12:31 +0000 (20:12 +0200)]
swr: disable 1 stage convert when dither is enabled.

This combination is not possible easily.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type
Justin Ruggles [Thu, 26 Apr 2012 20:02:37 +0000 (16:02 -0400)]
lavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type

12 years agoavplay: use libavresample for sample format conversion and channel mixing
Justin Ruggles [Wed, 25 Apr 2012 20:46:22 +0000 (16:46 -0400)]
avplay: use libavresample for sample format conversion and channel mixing

SDL only supports s16 sample format and a limited number of channel layouts.
Some versions of SDL on some systems support 4-channel and 6-channel output,
but it's safer overall to downmix any layout with more than 2 channels to
stereo.

12 years agoFix compilation with YASM/NASM without AVX support.
Reimar Döffinger [Sat, 28 Apr 2012 10:51:06 +0000 (12:51 +0200)]
Fix compilation with YASM/NASM without AVX support.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoWMAL: do not output last frame again if nothing was decoded in current packet
Jakub Stachowski [Sat, 28 Apr 2012 18:24:19 +0000 (11:24 -0700)]
WMAL: do not output last frame again if nothing was decoded in current packet

Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years agoWMAL: do not start decoding if frame does not end in current packet
Mashiat Sarker Shakkhar [Mon, 30 Apr 2012 15:56:35 +0000 (08:56 -0700)]
WMAL: do not start decoding if frame does not end in current packet

This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years agoswr-test: allow randomizing mode differently each run.
Michael Niedermayer [Tue, 1 May 2012 11:16:13 +0000 (13:16 +0200)]
swr-test: allow randomizing mode differently each run.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr-test: use uint_rand() for mode too
Michael Niedermayer [Tue, 1 May 2012 11:15:46 +0000 (13:15 +0200)]
swr-test: use uint_rand() for mode too

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr-test: simplify by using uint_rand()
Michael Niedermayer [Tue, 1 May 2012 11:15:15 +0000 (13:15 +0200)]
swr-test: simplify by using uint_rand()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agodoc/filters: use @var{} for denoting parameter reference in drawtext docs
Stefano Sabatini [Tue, 1 May 2012 09:15:18 +0000 (11:15 +0200)]
doc/filters: use @var{} for denoting parameter reference in drawtext docs

12 years agodoc/filters: alphabetically sort drawtext option listing
Stefano Sabatini [Tue, 1 May 2012 09:11:30 +0000 (11:11 +0200)]
doc/filters: alphabetically sort drawtext option listing

12 years agolavfi/lut: remove unused variable
Stefano Sabatini [Mon, 30 Apr 2012 23:24:48 +0000 (01:24 +0200)]
lavfi/lut: remove unused variable

Fix warning:
libavfilter/vf_lut.c: In function ‘draw_slice’:
libavfilter/vf_lut.c:297:15: warning: unused variable ‘k’ [-Wunused-variable]

12 years agoadpcm-thp: fix invalid array indexing
Mans Rullgard [Sun, 29 Apr 2012 00:17:37 +0000 (01:17 +0100)]
adpcm-thp: fix invalid array indexing

Indexing outside array limits is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoppc: add const where needed in scalarproduct_int16_altivec()
Mans Rullgard [Fri, 27 Apr 2012 09:43:08 +0000 (10:43 +0100)]
ppc: add const where needed in scalarproduct_int16_altivec()

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoppc: remove shift parameter from scalarproduct_int16_altivec()
Mans Rullgard [Fri, 27 Apr 2012 09:39:58 +0000 (10:39 +0100)]
ppc: remove shift parameter from scalarproduct_int16_altivec()

The shift parameter was removed from this interface in 7e1ce6a.
This updates the Altivec implementation to match.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoppc: dsputil: do unaligned block accesses correctly
Mans Rullgard [Fri, 27 Apr 2012 01:46:14 +0000 (02:46 +0100)]
ppc: dsputil: do unaligned block accesses correctly

To load unaligned vector data in the usual way, explicit vec_ld()
should be used rather than dereferencing a pointer to a vector type.
When the VSX extension is enabled, gcc may compile vector pointer
dereferences using the VSX lxvw4x instruction instead of the lvx
instruction typically used with Altivec/VMX.  As the behaviour of
these instructions with unaligned addresses differs, it is important
that only lvx is used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agodvenc: do not call dsputil functions with stride not a multiple of 16
Mans Rullgard [Fri, 27 Apr 2012 01:25:42 +0000 (02:25 +0100)]
dvenc: do not call dsputil functions with stride not a multiple of 16

Allowing dsputil functions to assume the stride is a multiple of 16
even for smaller block sizes can simplify their implementation.
This appears to be the only place this guarantee is not met.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoFix parsing of -force_key_frames option.
Reimar Döffinger [Mon, 30 Apr 2012 20:48:42 +0000 (22:48 +0200)]
Fix parsing of -force_key_frames option.

Currently it always exits with an error when more than
one position is specified.
Fixes trac issue #1266.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agolavfi/tinterlace: support symbolic names for the parameter
Stefano Sabatini [Sun, 29 Apr 2012 14:45:35 +0000 (16:45 +0200)]
lavfi/tinterlace: support symbolic names for the parameter

Also deprecate the use of numerical values.

12 years agolavfi/tinterlace: make video as interlaced in mode 6
Stefano Sabatini [Mon, 30 Apr 2012 20:17:15 +0000 (22:17 +0200)]
lavfi/tinterlace: make video as interlaced in mode 6

This is useful for marking progressive video processed by the filter as
interlaced, avoiding the interlaced flag to switch back and forth at each
frame.

12 years agolavfi/tinterlace: add tinterlace mode 6
Stuart Morris [Sun, 29 Apr 2012 13:25:57 +0000 (15:25 +0200)]
lavfi/tinterlace: add tinterlace mode 6

This new mode is useful for generating frames for interlaced video
displays. Typically interlaced video displays have no form of field
synchronisation. This new mode guarantees correct field order without
any requirement for field synchronisation.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years agolavu/opt: clarify error message in set_key_value_pair()
Stefano Sabatini [Wed, 25 Apr 2012 15:44:19 +0000 (17:44 +0200)]
lavu/opt: clarify error message in set_key_value_pair()

12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 30 Apr 2012 20:05:03 +0000 (22:05 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mkv: mark corrupted packets and return them
  mkv: forward EMBL block data error
  avcodec: introduce YCoCg colorspace
  avcodec: cosmetic cleanup on header
  aac sbr: align struct member by 32 byte.

Conflicts:
libavcodec/avcodec.h
libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoAPIchanges: fill in some dates and commit hashes
Justin Ruggles [Thu, 26 Apr 2012 20:43:01 +0000 (16:43 -0400)]
APIchanges: fill in some dates and commit hashes

12 years agoExposing forced flag for DVD and PGS subtitles
hakuya [Mon, 16 Apr 2012 01:58:40 +0000 (21:58 -0400)]
Exposing forced flag for DVD and PGS subtitles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoAdded AVClass for AVSubtitleRect
hakuya [Wed, 18 Apr 2012 06:08:25 +0000 (02:08 -0400)]
Added AVClass for AVSubtitleRect

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffv1: 10l add forgotten avclass
Michael Niedermayer [Mon, 30 Apr 2012 15:55:36 +0000 (17:55 +0200)]
ffv1: 10l add forgotten avclass

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolibavutil: Document the shortcommings of av_parse_cpu_flags()
Michael Niedermayer [Thu, 26 Apr 2012 21:22:53 +0000 (23:22 +0200)]
libavutil: Document the shortcommings of av_parse_cpu_flags()

and suggest that av_parse_cpu_caps() be used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocmdutils/avutil: Move cpu caps parse code into av_parse_cpu_caps()
Michael Niedermayer [Thu, 26 Apr 2012 21:21:43 +0000 (23:21 +0200)]
cmdutils/avutil: Move cpu caps parse code into av_parse_cpu_caps()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolavf: add AVFMT_SEEK_TO_PTS to indicate seeking is per PTS.
Michael Niedermayer [Mon, 30 Apr 2012 13:47:58 +0000 (15:47 +0200)]
lavf: add AVFMT_SEEK_TO_PTS to indicate seeking is per PTS.

See: [FFmpeg-devel] [PATCH] Add documentation that seeking is done by DTS and not PTS

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffv1: add slicecrc option
Michael Niedermayer [Mon, 30 Apr 2012 13:00:10 +0000 (15:00 +0200)]
ffv1: add slicecrc option

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomkv: mark corrupted packets and return them
Luca Barbato [Mon, 30 Apr 2012 00:55:51 +0000 (17:55 -0700)]
mkv: mark corrupted packets and return them

Do return error if memory allocation or I/O fails.

12 years agomkv: forward EMBL block data error
Luca Barbato [Mon, 30 Apr 2012 00:39:31 +0000 (17:39 -0700)]
mkv: forward EMBL block data error

Do not return 0 on error.

12 years agoEC: fix dest index for non 420 chroma.
Michael Niedermayer [Mon, 30 Apr 2012 01:31:58 +0000 (03:31 +0200)]
EC: fix dest index for non 420 chroma.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoisom: remove duplicate line.
Michael Niedermayer [Mon, 30 Apr 2012 00:37:35 +0000 (02:37 +0200)]
isom: remove duplicate line.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoisom: Clarify comment for 'ec-3' fourcc
Derek Buitenhuis [Wed, 25 Apr 2012 19:19:59 +0000 (15:19 -0400)]
isom: Clarify comment for 'ec-3' fourcc

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: add the edge at the correct place in allocating of the buffer.
Michael Niedermayer [Sun, 29 Apr 2012 21:13:06 +0000 (23:13 +0200)]
ffmpeg: add the edge at the correct place in allocating of the buffer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoavcodec: introduce YCoCg colorspace
Hendrik Leppkes [Sun, 29 Apr 2012 20:35:51 +0000 (13:35 -0700)]
avcodec: introduce YCoCg colorspace

Non perceptual color model that aims to have an increase effectiveness
in compression like the normal YCbCr while having near-lossless/lossless
mapping to RGB.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agoavcodec: cosmetic cleanup on header
Luca Barbato [Sun, 29 Apr 2012 20:28:41 +0000 (13:28 -0700)]
avcodec: cosmetic cleanup on header

Apply coding style to the structs.

12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 29 Apr 2012 19:45:41 +0000 (21:45 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  4xm: fix invalid array indexing
  rv34dsp: factorize a multiplication in the noround inverse transform
  rv40: perform bitwise checks in loop filter
  rv34: remove inline keyword from rv34_decode_block().
  rv40: change a logical test into a bitwise one.
  rv34: remove constant parameter
  rv40: don't always do the full prev_type search
  dsputil x86: revert a test back to its previous value
  rv34dsp x86: implement MMX2 inverse transform

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoaac sbr: align struct member by 32 byte.
Ronald S. Bultje [Sun, 29 Apr 2012 16:41:23 +0000 (16:41 +0000)]
aac sbr: align struct member by 32 byte.

Required because it's used in a call to imdct_half(), which is an AVX
function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years agolavfi/buffersink: fix header inclusion guard name
Stefano Sabatini [Sun, 29 Apr 2012 16:43:32 +0000 (18:43 +0200)]
lavfi/buffersink: fix header inclusion guard name

12 years agoSimplify camstudio decoding and fix odd 16bit decoding.
Carl Eugen Hoyos [Sun, 29 Apr 2012 16:35:39 +0000 (18:35 +0200)]
Simplify camstudio decoding and fix odd 16bit decoding.

Fixes ticket #1220.

12 years agoswr: use memcpy when input and output match
Michael Niedermayer [Sun, 29 Apr 2012 13:28:16 +0000 (15:28 +0200)]
swr: use memcpy when input and output match

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: add sample format to AudioData
Michael Niedermayer [Sun, 29 Apr 2012 13:30:07 +0000 (15:30 +0200)]
swr: add sample format to AudioData

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: add set_audiodata_fmt() and use it to simplify code
Michael Niedermayer [Sun, 29 Apr 2012 13:29:28 +0000 (15:29 +0200)]
swr: add set_audiodata_fmt() and use it to simplify code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: int32_to_int16_mmx/sse
Michael Niedermayer [Sun, 29 Apr 2012 12:10:34 +0000 (14:10 +0200)]
swr: int32_to_int16_mmx/sse

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agormenc: more than 2 streams are not currently possible.
Reimar Döffinger [Sat, 28 Apr 2012 22:08:36 +0000 (00:08 +0200)]
rmenc: more than 2 streams are not currently possible.

It is possible that just extending the RMMuxContext.streams
array would avoid it.
It is also possible that two audio streams will fail to mux
correctly as well, though at least it should not crash for
this reason.
I do not feel like checking either of these.
This patch fixes trac issue #1022 (at least it makes it
exit with a proper error message instead of crashing).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agonutdec: minor simplification.
Reimar Döffinger [Sat, 28 Apr 2012 19:14:03 +0000 (21:14 +0200)]
nutdec: minor simplification.

Also fixes an (incorrect) "control reaches end of non-void function"
warning with some compilers.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agonutdec: replace assert with av_assert0.
Reimar Döffinger [Sat, 28 Apr 2012 19:11:38 +0000 (21:11 +0200)]
nutdec: replace assert with av_assert0.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years agoswr: float_to_int16_sse2()
Michael Niedermayer [Sun, 29 Apr 2012 10:18:14 +0000 (12:18 +0200)]
swr: float_to_int16_sse2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswr: float_to_int32_sse2()
Michael Niedermayer [Sun, 29 Apr 2012 09:27:22 +0000 (11:27 +0200)]
swr: float_to_int32_sse2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago4xm: fix invalid array indexing
Mans Rullgard [Sat, 28 Apr 2012 12:05:18 +0000 (13:05 +0100)]
4xm: fix invalid array indexing

Indexing outside arrays is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 28 Apr 2012 18:45:06 +0000 (20:45 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: new assembly version of get_cabac for x86_64 with PIC
  h264: use one table instead of several for cabac functions
  h264: (trivial) remove unneeded macro argument in x86/cabac.h
  libschroedingerdec: check malloc
  segment: reorder seg_write_header allocation
  avio: make avio_close(NULL) a no-op
  mov: Parse EC3SpecificBox (dec3 atom).

Conflicts:
libavcodec/cabac.c
libavcodec/x86/cabac.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolavc: minor bump for the new fields in AVFrame.
Nicolas George [Sat, 28 Apr 2012 18:32:40 +0000 (20:32 +0200)]
lavc: minor bump for the new fields in AVFrame.

12 years agorv34dsp: factorize a multiplication in the noround inverse transform
Christophe GISQUET [Tue, 17 Apr 2012 18:44:43 +0000 (18:44 +0000)]
rv34dsp: factorize a multiplication in the noround inverse transform

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agolavc: add a sample_rate field to AVFrame.
Nicolas George [Sat, 28 Apr 2012 12:07:50 +0000 (14:07 +0200)]
lavc: add a sample_rate field to AVFrame.

The field is filled with the codec context information.

12 years agolavc: add a channel_layout field to AVFrame.
Nicolas George [Sat, 28 Apr 2012 11:02:41 +0000 (13:02 +0200)]
lavc: add a channel_layout field to AVFrame.

The field is filled with the codec context information.

FIXME need a minor version bump.

12 years agorv40: perform bitwise checks in loop filter
Christophe Gisquet [Tue, 17 Apr 2012 18:44:51 +0000 (18:44 +0000)]
rv40: perform bitwise checks in loop filter

Down from 95 kcycles to 93 (including all called functions).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agorv34: remove inline keyword from rv34_decode_block().
Ronald S. Bultje [Sat, 28 Apr 2012 18:10:57 +0000 (11:10 -0700)]
rv34: remove inline keyword from rv34_decode_block().

Force-inlining increases object size by 8kB and causes a 2% slowdown.

12 years agorv40: change a logical test into a bitwise one.
Christophe Gisquet [Tue, 17 Apr 2012 18:44:50 +0000 (18:44 +0000)]
rv40: change a logical test into a bitwise one.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agorv34: remove constant parameter
Christophe Gisquet [Wed, 4 Apr 2012 08:22:28 +0000 (10:22 +0200)]
rv34: remove constant parameter

is_block2 was always 0, so just remove it, and change accordingly the code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agorv40: don't always do the full prev_type search
Christophe Gisquet [Tue, 17 Apr 2012 18:44:48 +0000 (18:44 +0000)]
rv40: don't always do the full prev_type search

120->100 cycles.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoh264: new assembly version of get_cabac for x86_64 with PIC
Roland Scheidegger [Fri, 27 Apr 2012 20:12:20 +0000 (22:12 +0200)]
h264: new assembly version of get_cabac for x86_64 with PIC

This adds a hand-optimized assembly version for get_cabac much like the
existing one, but it works if the table offsets are RIP-relative.
Compared to the non-RIP-relative version this adds 2 lea instructions
and it needs one extra register.
There is a surprisingly large performance improvement over the c version (more
so than the generated assembly seems to suggest) just in get_cabac, I measured
roughly 40% faster for get_cabac on a K8. However, overall the difference is
not that big, I measured roughly 5% on a test clip on a K8 and a Core2.
Hopefully it still compiles on x86 32bit...
Now that only one table is used, there's some chance even darwin as compiles
this (apparently the label arithmetic used previously doesn't work if it
involves symbols defined in a different file, thanks to Ronald S. Bultje for
helping me with this).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoh264: use one table instead of several for cabac functions
Roland Scheidegger [Fri, 27 Apr 2012 20:12:19 +0000 (22:12 +0200)]
h264: use one table instead of several for cabac functions

The reason is this is easier for PIC code (in particular on darwin...).
Keep the old names as pointers (static in cabac_functions.h so gcc
knows these are just immediate offsets) so the c code can nicely stay the same
(alternatively could use offsets directly in the functions needing the
tables). This should produce the same code as before with non-pic and better
code (confirmed) with pic.

The assembly uses the new table but still won't work for PIC case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoh264: (trivial) make ff_h264_lps_state static
Roland Scheidegger [Fri, 27 Apr 2012 20:12:18 +0000 (22:12 +0200)]
h264: (trivial) make ff_h264_lps_state static

not used outside the cabac test functions (which probably means it's
a bad test if it doesn't use the same tables as the real functions?)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoh264: (trivial) remove unneeded macro argument in x86/cabac.h
Roland Scheidegger [Fri, 27 Apr 2012 20:12:17 +0000 (22:12 +0200)]
h264: (trivial) remove unneeded macro argument in x86/cabac.h

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