Diego Biurrun
0b016eb99d
dsputil: Move ff_block_permute to mpegvideo_enc
2013-02-07 22:05:25 +01:00
Daniel Kang
a1d3673034
dsputil: x86: Fix compile error
...
Accidentally prefixed ff_ with cextern.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-07 11:06:16 +02:00
Daniel Kang
659d4ba5af
dsputil: x86: Convert h263 loop filter to yasm
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-06 15:38:27 -08:00
Anton Khirnov
12b54a1f39
mpegvideo: remove an unused function parameter
2013-02-06 21:48:48 +01:00
Anton Khirnov
605b047bcc
rv10: improve buffer size check.
...
Check slice count and input buffer size before constructing a possibly
invalid pointer, not after.
2013-02-06 21:47:57 +01:00
Anton Khirnov
c5fcdb4402
error_resilience: remove a useless if() and FIXME
...
pp_time is never set for h264
2013-02-06 21:46:55 +01:00
Anton Khirnov
9782c778a2
h264: remove silly macros
...
They serve no useful purpose and wreak all kind of havoc when h264.h is
included elsewhere.
2013-02-06 21:45:02 +01:00
Anton Khirnov
ca1fe6c0e6
h263: remove an unused parameter from ff_h263_decode_init_vlc
2013-02-06 21:44:38 +01:00
Tim Walker
9d083d6417
flac: add channel layout masks for streams with 7 or 8 channels.
...
They were added to the latest FLAC specification:
https://git.xiph.org/?p=flac-website.git;a=commit;h=65c199a2
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-06 21:44:06 +01:00
Tim Walker
41244e13d5
flac: don't check the number of channels before setting the channel layout.
...
This is unnecessary, as ff_flac_set_channel_layout can handle any number of channels.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-06 21:43:05 +01:00
Martin Storsjö
a846dccb29
h264chroma: x86: Fix building with yasm disabled
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-06 17:05:33 +02:00
Diego Biurrun
82bd04b170
rv34: Drop now unnecessary dsputil dependencies
2013-02-06 11:30:54 +01:00
Diego Biurrun
79dad2a932
dsputil: Separate h264chroma
2013-02-06 11:30:53 +01:00
Anton Khirnov
293065bdb5
mpegvideo: initialize dummy reference frames.
...
Do not rely on get_buffer initializing them.
Changes yadif tests (off by one in one border pixel), because yadif
reads from those uninitialized lines.
2013-02-06 10:21:52 +01:00
Anton Khirnov
dff6197dfb
nuv: do not rely on get_buffer() initializing the frame.
2013-02-06 10:21:52 +01:00
Anton Khirnov
39a9fdd00f
yop: initialize palette to 0
...
The FATE sample contains some pixels with value 0, but the palette
stored in the file contains only values from 16 up. Because the default
and cmdutils get_buffer() initialize the data to 0x80, they appear as
gray dots.
After this commit they change to black dots, which is probably still
incorrect but less visible and doesn't rely on get_buffer() initializing
the data.
2013-02-06 10:21:52 +01:00
Anton Khirnov
8136f23444
yop: check for input overreads.
...
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Anton Khirnov
06cf597c35
yop: check that extradata is large enough.
...
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Kostya Shishkov
89f11f498b
qtrle: fix the topmost line for 1bit
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Kostya Shishkov
685e6f2e39
xxan: properly handle odd heights.
...
Duplicate the last one or two chroma lines.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Anton Khirnov
2cd4068071
fraps: fix off-by one bug for version 1.
...
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Anton Khirnov
da7baaaae7
aasc: fix output for msrle compression.
...
The bottom line was invalid before.
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Anton Khirnov
9bd6375d5f
msrledec: check bounds before constructing a possibly invalid pointer,
...
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Anton Khirnov
238614de67
cdgraphics: do not rely on get_buffer() initializing the frame.
...
Setting it to zero (instead of 128, as the default get_buffer() does)
also produces more correctly-looking output.
2013-02-06 10:21:52 +01:00
Anton Khirnov
6ed9fc44ba
svq1: replace struct svq1_frame_size with an array.
...
It is used as an array in svq1enc, so this is more correct.
2013-02-06 10:21:52 +01:00
Vladimir Pantelic
77bcb89600
vc1dec: use codec_id instead of codec_tag for VC1IMAGE
...
the rest of the code is using codec_id everywhere already
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-02-06 09:34:32 +01:00
Luca Barbato
b2a722a87e
sh4: drop unused functions
...
{avg,put}_pixels4_c are not used.
2013-02-05 23:24:05 +01:00
Diego Biurrun
620289a20e
sh4: Fix silly type vs. variable name search and replace typo
2013-02-05 22:53:44 +01:00
Diego Biurrun
c9f933b5b6
Add av_cold attributes to arch-specific init functions
2013-02-05 17:01:05 +01:00
Diego Biurrun
25841dfe80
Use ptrdiff_t instead of int for {avg, put}_pixels line_size parameter.
...
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.
2013-02-05 12:59:12 +01:00
Anton Khirnov
d9df93efbf
mpegvideo: simplify REBASE_PICTURE
...
Always evaluate to NULL when the source Picture is not located in the
MpegEncContext.picture array. That will only happen for
next/last_picture_ptr when updating the thread context during h264 frame
threaded decoding, where they will point to elements of ref_list. Since
ref_list is not copied during updating the context and is invalid until
it is constructed for the current slice, there is no point in doing
anything complicated with next/last_picture_ptr, as they will get
updated when the ref_list is filled.
2013-02-04 06:17:15 +01:00
Diego Biurrun
6c1a7d07eb
Use proper "" quotes for local header #includes
2013-02-01 12:51:15 +01:00
Diego Biurrun
4eef2ed707
ppc: fmtconvert: Drop two unused variables.
2013-02-01 12:51:13 +01:00
Anton Khirnov
f2960097e4
bink: fix a check for the first frame.
...
Packet pts is a very unreliable indicator, use
AVCodecContext.frame_number instead.
2013-02-01 12:41:31 +01:00
Diego Biurrun
52acd79165
x86: hpel: Move {avg,put}_pixels16_sse2 to hpeldsp
2013-01-31 11:19:23 +01:00
Martin Storsjö
a65f965c04
mpegvideo: Do REBASE_PICTURE with byte pointers
...
REBASE_PICTURE (more specifically, this half of it) takes a Picture
pointer that points into one larger struct, finds the offset of
that Picture within the struct and finds the corresponding field
within another instance of a similar struct.
The pointer difference "pic - (Picture*)old_ctx" is a value given
in sizeof(Picture) units, and when applied back on
(Picture*)new_ctx gets multiplied back with sizeof(Picture). Many
compilers seem to optimize out this division/multiplication, but
not all do.
GCC 4.2 on OS X doesn't seem to remove the division/multiplication,
therefore the new pointer didn't turn out to point to exactly
the right place in the new struct since it only had sizeof(Picture)
granularity (and the Picture is not aligned on a sizeof(Picture)
boundary within the encompassing struct). This bug has been present
before 47318953d
as well - with H264, pointers to h->ref_list[0][0]
pointed to 88 bytes before h->ref_list[0][0] after the rebase. After
shrinking Picture, the difference ended up even larger, making
writes via such a Picture pointer overwrite other fields at random
in H264Context, ending up in crashes later.
This fixes H264 multithreaded decoding on OS X with GCC 4.2.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-31 10:51:36 +02:00
Ronald S. Bultje
a5ba798c16
dsputil: remove unused functions copy_block{2, 4, 8, 16}.
2013-01-30 14:18:06 +01:00
Luca Barbato
4e0bc996d9
bfin: unbreak compilation
...
Added a missing header file.
2013-01-29 14:59:21 +01:00
Anton Khirnov
76e74e4831
h264: remove obsolete comment.
2013-01-29 07:32:47 +01:00
Anton Khirnov
47318953dd
mpegvideo: remove some unused variables from Picture.
2013-01-29 07:32:36 +01:00
Anton Khirnov
231fd1ed39
utvideoenc/v410enc: do not set AVFrame.reference.
...
That field will be deprecated.
2013-01-29 07:32:21 +01:00
Anton Khirnov
e6b1c3bbe7
pthread: make ff_thread_release_buffer idempotent.
...
I.e. don't do anything on already released frames.
2013-01-29 07:32:10 +01:00
Anton Khirnov
aec50f79e7
rawdec: use AVPALETTE_SIZE instead of magic constants.
2013-01-29 07:31:43 +01:00
Anton Khirnov
e6da5d215b
mimic: remove a pointless cast.
2013-01-29 07:31:24 +01:00
Anton Khirnov
30d62507cd
mdec: return meaningful error codes.
2013-01-29 07:31:15 +01:00
Anton Khirnov
f713411d4c
mdec: cosmetics, reformat
2013-01-29 07:27:36 +01:00
Anton Khirnov
098eed95bc
mdec: merge mdec_common_init() into decode_init().
...
There is no point in keeping those two functions separate.
2013-01-29 07:27:23 +01:00
Anton Khirnov
f1c395944c
eatgv: use fixed-width types where appropriate.
2013-01-29 07:27:08 +01:00
Diego Biurrun
c59211b437
x86: Simplify some arch conditionals
2013-01-29 00:10:53 +01:00
Diego Biurrun
438ea561ad
bfin: Separate VP3 initialization code
2013-01-28 21:03:12 +01:00
Luca Barbato
f550583c00
bfin: update VP3 idct
...
The block must be set to 0.
2013-01-28 21:00:59 +01:00
Michael Niedermayer
834e9fb056
x86: hpeldsp: Fix a typo, use the right register
...
This makes the code actually work.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-28 12:49:37 +02:00
Luca Barbato
4839fbe2d1
shorten: fix array subscript is below array bounds warning
...
Incidentally fixes alpha builds.
2013-01-28 07:24:51 +01:00
Daniel Kang
05b0998f51
dsputil: Fix error by not using redzone and register name
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-28 07:23:20 +01:00
Martin Storsjö
2026eb1408
arm: vp8: Fix the plain-armv6 version of vp8_luma_dc_wht
...
This makes the plain-armv6 version use the same registers as the
armv6t2 version above.
This fixes fate-vp8 on plain-armv6 devices.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-27 13:17:25 +02:00
Daniel Kang
96753bd00d
dsputil: x86: Correct the number of registers used in put_no_rnd_pixels16_l2
...
put_no_rnd_pixels16_l2 allocated 5 instead of 6 registers.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 08:41:48 +01:00
Daniel Kang
0eedf5d74d
dsputil: add missing HAVE_YASM guard
...
Fix compile error under
"--disable-optimizations --disable-yasm --disable-inline-asm"
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 08:41:46 +01:00
Rémi Denis-Courmont
78bc4d69eb
hwaccel: do not offer unsupported pixel formats
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 07:03:22 +01:00
Rémi Denis-Courmont
ec0e92002b
vdpau: add missing pixel format for H.264
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 07:03:22 +01:00
Daniel Kang
71155d7b41
dsputil: x86: Convert mpeg4 qpel and dsputil avg to yasm
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 06:45:31 +01:00
Ronald S. Bultje
f90ff772e7
Move H264/QPEL specific asm from dsputil.asm to h264_qpel_*.asm.
2013-01-26 20:35:42 -08:00
Anton Khirnov
04f4dbc2fa
mpegvideo_enc: fix indentation in load_input_picture()
2013-01-26 13:08:38 +01:00
Anton Khirnov
3f47d316cd
mpegvideo_enc: do not modify the input frame.
2013-01-26 13:08:32 +01:00
Anton Khirnov
7bcaeb408e
mjpegdec: fix indentation
2013-01-26 13:08:07 +01:00
Anton Khirnov
0ce033f888
rawdec: cosmetics, reformat
2013-01-26 13:07:41 +01:00
Anton Khirnov
b965cb906b
mimic: return meaningful error codes.
2013-01-26 13:06:41 +01:00
Anton Khirnov
a0cabd0a27
mimic: cosmetics, reformat
2013-01-26 13:04:15 +01:00
Anton Khirnov
04e1249609
iff: drop ff_ prefix from a static function.
2013-01-26 13:02:33 +01:00
Anton Khirnov
9221c0af77
pngdec: cosmetics, reformat.
...
Also remove a commented out line.
2013-01-26 13:02:19 +01:00
Anton Khirnov
edb2426b75
dxa: return meaningful error codes.
2013-01-26 13:01:14 +01:00
Anton Khirnov
adf0110d87
eatgq: cosmetics, reformat.
2013-01-26 13:00:59 +01:00
Anton Khirnov
f337c29017
eatgq: return meaningful error codes.
2013-01-26 12:56:39 +01:00
Anton Khirnov
4b7598e2fe
eatgv: cosmetics, reformat
2013-01-26 12:56:24 +01:00
Anton Khirnov
ade402804a
eatgv: return meaningful error codes.
2013-01-26 12:54:35 +01:00
Anton Khirnov
0859eaa012
cyuv: return meaningful error codes.
2013-01-26 12:54:23 +01:00
Anton Khirnov
6837bd6e49
txd: return meaningful error codes.
2013-01-26 12:54:07 +01:00
Anton Khirnov
69c25c9284
dnxhdenc: fix invalid reads in dnxhd_mb_var_thread().
...
Do not assume that frame dimensions are mod16 (or that height is mod32
for interlaced).
CC:libav-stable@libav.org
2013-01-26 12:30:08 +01:00
Diego Biurrun
033a86f9bb
x86: h264qpel: Move stray comment to the right spot and clarify it
2013-01-26 11:19:22 +01:00
Michael Karcher
0e3afacd4d
atrac3: use correct loop variable in add_tonal_components()
...
Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
2013-01-25 16:16:24 -05:00
Gavriloaie Eugen-Andrei
29b553c1a6
libx264: introduce -x264-params private option
...
It is a shortcut to set all the params using x264_param_parse,
makes simpler importing settings from other software using x264.
2013-01-25 17:20:03 +01:00
Vittorio Giovara
a84fb6e06f
h264: Allow discarding the cropping information from SPS
...
Some 3D systems overload the meaning of the field for other purposes.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 07:50:35 +01:00
Diego Biurrun
33552a5f7b
arm: Add mathops.h to ARCH_HEADERS list
...
It is an arch-specific header not suitable for standalone compilation.
2013-01-24 20:59:22 +01:00
Janne Grunau
c5c2060cf5
x86: h264qpel: add cpu flag checks for init function
...
The code was copied from per cpu extension init function so the checks
for supported extensions was overlooked.
2013-01-24 19:03:59 +01:00
Janne Grunau
6bdb841b46
h264: copy h264qpel dsp context to slice thread copies
2013-01-24 17:06:52 +01:00
Janne Grunau
8e148b8742
arm: h264qpel: use neon h264 qpel functions only if supported
2013-01-24 17:06:52 +01:00
Mans Rullgard
e9d817351b
dsputil: Separate h264 qpel
...
The sh4 optimizations are removed, because the code is
100% identical to the C code, so it is unlikely to
provide any real practical benefit.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-24 10:44:43 +01:00
Martin Storsjö
57ed8debb9
wmv2: Propagate the wmv2 idct permutation type to the dsputils context
...
This fixes encoding where the idct setting originally was set to
FF_IDCT_AUTO and dsputil chose a default idct with a non-null
permutation - even if the permutation tables were updated,
dct_quantize in x86/mpegvideoenc_template.c also checked the
value of this type variable.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-24 00:32:35 +02:00
Ronald S. Bultje
baf35bb4bc
dsputil: remove one array dimension from avg_no_rnd_pixels_tab.
2013-01-22 18:41:36 -08:00
Ronald S. Bultje
2612c4dc78
dsputil: remove 9/10 bits hpel functions.
...
These are never used.
2013-01-22 18:41:36 -08:00
Ronald S. Bultje
2bef1a83d7
dsputil: remove some never-assigned function pointers from the struct.
2013-01-22 18:41:36 -08:00
Ronald S. Bultje
32ff643228
dsputil: remove avg_no_rnd_pixels8.
...
This is never used.
2013-01-22 18:41:36 -08:00
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2013-01-22 18:32:56 -08:00
Ronald S. Bultje
2e4bb99f4d
vorbisdsp: convert x86 simd functions from inline asm to yasm.
2013-01-22 18:02:24 -08:00
Ronald S. Bultje
0ee8293a77
vp3dsp: don't do aligned reads on input.
...
The input is not guaranteed to be aligned.
2013-01-22 17:32:07 -08:00
Tim Walker
40cf1add12
mlp_parser: cosmetics: re-indent.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker
ed1b01131e
mlp: implement support for AVCodecContext.request_channel_layout.
...
Also wrap usage of AVCodecContext.request_channels in FF_API_REQUEST_CHANNELS directives.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker
b0c7e3ffd0
mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.
...
Allows users to configure the output based on what's actually decoded, rather than the full native layout.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker
1fd2deedcc
mlpdec: set the channel layout.
...
Fixes bug 401.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Tim Walker
3ffcccb4fb
mlpdec: TrueHD: use Libav channel order.
...
Fixes bug 208.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Tim Walker
99ccd2ba10
mlp: store the channel layout for each substream.
...
Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Diego Biurrun
73b704ac60
arm: Add some missing header #includes
2013-01-22 21:24:10 +01:00
Ronald S. Bultje
d56668bd80
floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
...
This makes the aac decoder and all voice codecs independent of dsputil.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
5959bfaca3
floatdsp: move butterflies_float from dsputil to avfloatdsp.
...
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
55aa03b9f8
floatdsp: move vector_fmul_add from dsputil to avfloatdsp.
2013-01-22 11:55:42 -08:00
Michael Smith
0881cbf314
proresdec: support mixed interlaced/non-interlaced content
...
Set interlaced to false if we don't have an interlaced frame
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-22 05:40:57 +01:00
Ronald S. Bultje
4a73fbd9c5
vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.
...
The function is only used in VP3 and VP5, so no need to have it in
DSPContext.
2013-01-21 18:08:55 -08:00
Diego Biurrun
4f56e773fe
x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly
...
CC: libav-stable@libav.org
2013-01-21 23:54:32 +01:00
Luca Barbato
9146e872c6
Revert "fate: Use wmv2 IDCT for wmv2 tests"
...
This reverts commit ce378f0dd0
.
2013-01-21 19:43:53 +01:00
Diego Biurrun
4af5310d29
get_bits/put_bits: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-21 17:03:41 +01:00
Daniel Kang
9f00b1cbab
dsputilenc: x86: Convert pixel inline asm to yasm
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-21 09:54:10 +01:00
Brad Smith
c7df1532e5
libgsm: detect libgsm header path
...
Libgsm header can reside either in the base include dir or in
the gsm subdir.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-21 07:59:35 +01:00
Ronald S. Bultje
ce378f0dd0
fate: Use wmv2 IDCT for wmv2 tests
2013-01-21 07:35:54 +01:00
Ronald S. Bultje
1768e43ceb
vorbisdsp: change block_size type from int to intptr_t.
...
This saves one instruction in the x86-64 assembly.
2013-01-20 22:26:42 -08:00
Ronald S. Bultje
93af2734ee
lavc: put FF_IDCT_{VP3,H264,CAVS,BINK,EA,WMV2} under FF_API_IDCT.
...
This allows us to get rid of them on the next major bump. All of the
above are functionally irrelevant, and most of them are unused, except
the vp3 one, which is used wrongly in the bfin arch optimizations.
2013-01-20 22:15:28 -08:00
Ronald S. Bultje
e6bc38fd49
wmv2: move IDCT to its own DSP context.
...
This allows us to remove FF_IDCT_WMV2, which serves no practical purpose
other than to be able to select the WMV2 IDCT for MPEG (or vice versa)
and get corrupt output.
Fate tests for all wmv2-related tests change, because (for some obscure
reason) they forced use of the MPEG IDCT. You would get the same changes
previously by not using -idct simple in the fate test (or replacing it
with -idct auto).
2013-01-20 22:12:35 -08:00
Ronald S. Bultje
8a4f26206d
dsputil: remove butterflies_float_interleave.
...
The function is unused.
2013-01-20 21:57:35 -08:00
Mathias Rauen
04ea5491a8
ac3dec: fix non-optimal dithering of zero bit mantissas
...
Use a noise range of -0.707 to 0.707 instead of -0.5 to 0.5
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-20 14:20:47 -05:00
Diego Biurrun
d9bf716945
ppc: vorbisdsp: Drop some unnecessary #includes
...
Also fixes compilation with AltiVec disabled.
2013-01-20 17:38:11 +01:00
Martin Storsjö
d160a2fb4c
ppc: Include string.h for memset
...
This fixes build failures on ppc machines with a compiler that
supports -Werror=implicit-function-declaration.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:10:21 +02:00
Janne Grunau
68f18f0351
videodsp_armv5te: remove #if HAVE_ARMV5TE_EXTERNAL
...
libavutil/arm/asm.S sets '.arch' depending on HAVE_ARMV5TE so that
assembling armv5te code will always succeed even if the default -march
flag does not support it. HAVE_ARMV5TE_EXTERNAL tests assembling code
with the default arch.
Fixes the missing symbol ff_prefetch_arm with --cpu= not including
armv5te.
CC: libav-stable@libav.org
2013-01-20 15:20:00 +01:00
Mans Rullgard
0b711ca3f3
dsputil: drop non-compliant "fast" qpel mc functions
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-20 14:50:42 +01:00
Luca Barbato
4603ec85ed
get_bits: change the failure condition in init_get_bits
...
Too much code relies in having init_get_bits fed with a valid
buffer and set its dimension to 0.
Check for NULL buffer instead.
2013-01-20 13:37:56 +01:00
Ronald S. Bultje
0e02b381b4
Remove put_no_rnd_pixels_l2 function pointer for w=16 from dsputil.
...
The function is never used.
2013-01-19 22:37:45 -08:00
Ronald S. Bultje
fef906c77c
Move vorbis_inverse_coupling from dsputil to vorbisdspcontext.
...
Conveniently (together with Justin's earlier patches), this makes
our vorbis decoder entirely independent of dsputil.
2013-01-19 22:21:10 -08:00
Ronald S. Bultje
aeaf268e52
vp3: integrate clear_blocks with idct of previous block.
...
This is identical to what e.g. vp8 does, and prevents the function call
overhead (plus dependency on dsputil for this particular function).
Arm asm updated by Janne Grunau <janne-libav@jannau.net>.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2013-01-19 22:04:55 -08:00
Xi Wang
992b031838
mpegvideo: fix loop condition in draw_line()
...
The loop condition `x = ex' is incorrect. It should be `x <= ex'.
This bug was introduced in commit c65dfac4
"mpegvideo.c: K&R formatting
and cosmetics."
CC:libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-19 22:20:43 +01:00
Clément Bœsch
40976257bc
dvdsubdec: parse the size from the extradata
...
Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-19 15:12:58 +01:00
Diego Biurrun
822b0728f0
x86: dsputil: Drop some unused macro definitions
2013-01-18 22:24:58 +01:00
Anton Khirnov
940b8b5861
h264: avoid pointless copying of ref lists
...
ref_list is constructed from other fields per slice when needed, so do
not copy it for both frame and slice threading.
default_ref_list is constructed per frame and still needs to be copied
to per-slice contexts for slice threading, but a copy is not needed for
frame threading.
2013-01-18 07:56:05 +01:00
Xi Wang
783e37f7ef
rv30: fix masking in rv30_loop_filter()
...
The mask `x && (1 << y)' is incorrect and always yields true.
The correct form should be `x & (1 << y)'.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-17 21:55:27 +01:00
Luca Barbato
80ac87c13d
lavc: support ZenoXVID custom tag
...
Looks like this kind of samples are produced by certain Russian
equipment.
2013-01-17 21:41:18 +01:00
Martin Storsjö
e33db35b4a
theora: Skip zero-sized headers
...
This fixes a regression since d9cf5f51
with theora over RTP
(possibly with other variants of theora as well).
In theora over RTP, the second of the 3 headers turns out to be
0 bytes long, which prior to d9cf5f51
worked just fine. After
d9cf5f51
, reading from the bitstream reader fails (since the reader
wasn't initialized but returned an error if initialized with 0 bits).
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-17 19:06:56 +02:00
Justin Ruggles
e034cc6c60
lavc: Move vector_fmul_window to AVFloatDSPContext
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-16 10:45:45 +01:00
Ronald S. Bultje
fb845ffdd3
h264: add 3 pixels below for subpixel filter wait position
...
If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.
This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 22:00:34 +01:00
Joakim Plate
f924d52975
dvdsubdec: Support palette in mkv
...
Matroska stores palette information as plain text in extradata.
Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 20:51:51 +01:00
Diego Biurrun
dae1d507af
x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags
2013-01-15 17:29:43 +01:00
Diego Biurrun
0b22107d95
rv34_parser: Adjust #if for disabling individual parsers
...
As CONFIG_ values are always defined, they have to be checked via #if.
2013-01-15 16:20:14 +01:00
Luca Barbato
47812070a2
libx264: use the library specific default rc_initial_buffer_occupancy
...
By default libav sets it to 3/4 while x264 sets it to 9/10.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 08:58:51 +01:00
Luca Barbato
bff3607547
lavc: set the default rc_initial_buffer_occupancy
...
rc_buffer_size is not set before.
Solve the initial the rate control underflow issue reported in
bug 222.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 08:58:51 +01:00
Diego Biurrun
51969a652c
x86: ABS2: port to cpuflags
2013-01-14 21:56:55 +01:00
Rémi Denis-Courmont
171f1446f0
vdpau: Remove av_unused attribute from function declaration
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-14 21:56:55 +01:00
Anton Khirnov
ea382767ad
h264: fix ff_generate_sliding_window_mmcos() prototype.
...
It's been returning an error value since
bad446e251
Also check for the errors it returns.
2013-01-14 21:36:08 +01:00
Maximilian Seesslen
055b373080
libtheoraenc: fix granularity of video quality
...
The floating point version of av_clip has to be used when
converting the quality level.
Signed-off-by: Maximilian Seesslen <mes@seesslen.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 20:47:27 +02:00
Ronald S. Bultje
bad446e251
h264: don't clobber mmco opcode tables for non-first slice headers.
...
Clobbering these tables will temporarily clobber the template used
as a basis for other threads to start decoding from. If the other
decoding thread updates from the template right at that moment,
subsequent threads will get invalid (or, usually, none at all) mmco
tables. This leads to invalid reference lists and subsequent decode
failures.
Therefore, instead, decode the mmco tables only for the first slice in
a field or frame. For other slices, decode the bits and ensure they
are identical to the mmco tables in the first slice, but don't ever
clobber the context state. This prevents other threads from using a
clobbered/invalid template as starting point for decoding, and thus
fixes decoding in these cases.
This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with
frame-multithreading enabled.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-14 19:20:47 +01:00
Luca Barbato
3f111804eb
libvpx: make vp8 and vp9 selectable
...
Support older libvpx versions.
2013-01-14 19:20:47 +01:00
Luca Barbato
dab1f543fc
libvpx: support vp9
...
This feature is experimental use at your risk
2013-01-14 19:20:47 +01:00
Tom Finegan
66aabd76a9
mkv: support vp9 tag
2013-01-14 19:20:47 +01:00
Diego Biurrun
ba0c72a9ae
build: Remove stray Makefile entry for non-existent VCR1 encoder
2013-01-14 17:02:04 +01:00
Michael Niedermayer
30aeada3d8
svq1enc: Fix assignments in if()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:12:49 +02:00
Michael Niedermayer
1d7ffd06e4
lavc: Fix assignments in if() when calling ff_af_queue_add
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:12:44 +02:00
Michael Niedermayer
59d5680310
h264: Fix assignments in if()
...
Fixes null pointer dereference later, since if this function failed,
a positive return value was returned to the caller.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:12:38 +02:00
Anton Khirnov
60a42ef44c
truemotion2: cosmetics, reformat
2013-01-14 11:39:57 +01:00
Anton Khirnov
df9036830b
truemotion2: return meaningful error codes.
2013-01-14 11:39:49 +01:00
Anton Khirnov
a4a26f5188
tscc: remove some pointless comments and empty lines.
2013-01-14 11:39:42 +01:00
Anton Khirnov
ac1e93f555
tscc: return meaningful error codes.
2013-01-14 11:39:33 +01:00
Anton Khirnov
b627c3010b
loco: cosmetics, reformat
2013-01-14 11:39:23 +01:00
Anton Khirnov
1a31dff937
loco: return meaningful error codes.
2013-01-14 11:39:15 +01:00
Anton Khirnov
a9d970a019
flicvideo: return meaningful error codes.
2013-01-14 11:38:58 +01:00
Anton Khirnov
6b3a1229bb
vcr1: remove disabled encoder stub
2013-01-14 11:38:45 +01:00
Anton Khirnov
74a9a624c5
vcr1: return a meaningful error code.
2013-01-14 11:38:38 +01:00
Anton Khirnov
e4ca055b3c
rpza: return a meaningful error code.
2013-01-14 11:38:31 +01:00
Anton Khirnov
80cf2ebc59
qdrw: cosmetics, reformat
2013-01-14 11:37:55 +01:00
Anton Khirnov
688b132b88
qdrw: return meaningful error codes.
2013-01-14 11:37:43 +01:00
Anton Khirnov
8f17829455
qtrle: return a meaningful error code.
2013-01-14 11:37:31 +01:00
Anton Khirnov
048ffb9bb2
gifdec: return meaningful error codes.
2013-01-14 11:37:17 +01:00
Anton Khirnov
3d973e461b
interplayvideo: remove a static variable.
2013-01-14 11:36:45 +01:00
Anton Khirnov
089b3d6815
interplayvideo: return meaningful error codes.
2013-01-14 11:36:33 +01:00
Anton Khirnov
14cf33e957
lcldec: return meaningful error codes.
2013-01-14 11:36:22 +01:00
Anton Khirnov
01cbc6f6ad
targa: return meaningful error codes.
2013-01-14 11:36:11 +01:00
Anton Khirnov
62d9655217
qpeg: return a meaningful error code.
2013-01-14 11:35:54 +01:00
Anton Khirnov
3344f5cb74
nuv: return meaningful error codes.
2013-01-14 11:35:17 +01:00
Anton Khirnov
a1c525f7eb
pcx: return meaningful error codes.
2013-01-14 11:35:04 +01:00
Anton Khirnov
6bf70127d1
tmv: return meaningful error codes.
2013-01-14 11:34:53 +01:00
Anton Khirnov
9e6764900a
msrle: return meaningful error codes.
2013-01-14 11:34:18 +01:00
Anton Khirnov
8fd4d1f9b9
cscd: return meaningful error codes.
2013-01-14 11:34:08 +01:00
Luca Barbato
e28ac6e5e2
lavc: introduce the convenience function init_get_bits8
...
Accept the buffer size in bytes and check for overflow before passing
the value in bits to init_get_bits.
2013-01-14 04:49:14 +01:00
Luca Barbato
d9cf5f5169
lavc: check for overflow in init_get_bits
...
Fix an undefined behaviour and make the function return a proper
error in case of overflow.
CC: libav-stable@libav.org
2013-01-14 04:49:14 +01:00
Anton Khirnov
90cfc084e3
avpacket: free side data in av_free_packet().
...
Freeing it in av_destruct_packet(), as is done currently, would mean
that we allow it to be allocated with other means. But that would make
av_packet_new_side_data() unsafe.
Side data is not expected to be large, so copying it if required
shouldn't be a problem.
2013-01-13 16:31:40 +01:00
Rémi Denis-Courmont
7752532789
vdpau: Add VC-1 decoding via hwaccel infrastructure
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:18 +01:00
Rémi Denis-Courmont
51b56a0716
vdpau: Add H.264 decoding via hwaccel infrastructure
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:08 +01:00
Rémi Denis-Courmont
200e8ac920
vdpau: Add MPEG-4 decoding via hwaccel infrastructure
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:02 +01:00
Rémi Denis-Courmont
aaf9d0e8f3
vdpau: Add MPEG-1/2 decoding via hwaccel infrastructure
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:53:47 +01:00
Rémi Denis-Courmont
44e065d56c
vdpau: Add context and common helpers for hwaccel support
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:41:27 +01:00
Luca Barbato
f61272f0ef
ratecontrol: K&R cosmetic formatting
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-12 12:00:49 +01:00
Luca Barbato
c1d1ef4ecd
zmbv: Reset the decoder on keyframe errors
...
Prevent the crash on fuzzed files as reported in bug 63.
2013-01-11 05:07:42 +01:00
Vladimir Pantelic
7b8c5b263b
vc1dec: prevent a crash due missing pred_flag parameter
...
Handle pred_flag parameter not given to get_mvdata_interlaced()
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-11 04:57:41 +01:00
Ronald Bultje
ec86ba5731
vp3: Fix double free in vp3_decode_end()
...
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-10 20:05:42 +01:00
Justin Ruggles
f7bf72a4a1
idcinvideo: correctly set AVFrame defaults
2013-01-09 14:49:06 -05:00
Alexandra Khirnova
d744801f1a
xan: Convert to bytestream2
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-09 09:59:55 +01:00
Diego Biurrun
a0c5917f86
Drop Snow codec
...
Snow is a toy codec with no real-world use and horrible code.
2013-01-06 16:30:02 +01:00
Christophe Gisquet
4f50646697
x86: sbrdsp: Implement SSE qmf_post_shuffle
...
255 to 174 cycles on Arrandale / Win64. Unrolling yields no gain.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-06 13:57:01 +01:00
Christophe Gisquet
44a0036d10
x86: sbrdsp: Implement SSE sum64x5
...
698 to 174 cycles on Arrandale. Unrolling is a 6 cycles gain.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-06 13:57:01 +01:00
Diego Biurrun
5b4dfbffc2
x86: ABS1: port to cpuflags
2013-01-06 13:57:01 +01:00
Anton Khirnov
de16f08e48
v210x: cosmetics, reformat
2013-01-06 13:31:40 +01:00
Anton Khirnov
6689474b91
v210x: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
39039f2405
r210dec: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
4324a3ce75
vb: cosmetics, reformat
2013-01-06 13:31:40 +01:00
Anton Khirnov
9dbbda235d
vb: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
a0ffcee1ee
ptx: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
b2a7b81b9c
tiff: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
26a161a166
vqavideo: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
edfe05ddf1
mss2: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
f0547c9bd0
v210dec: return meaningful error codes
2013-01-06 13:31:40 +01:00
Anton Khirnov
c04c64c08e
indeo2: cosmetics, reformat
2013-01-06 13:31:40 +01:00
Anton Khirnov
7b1fbd4729
indeo2: check decoding errors.
2013-01-06 13:31:40 +01:00
Anton Khirnov
6ea2c9a4cf
indeo2: return meaningful error codes
2013-01-06 13:31:40 +01:00
Anton Khirnov
6781b5315e
rl2: cosmetics, reformat
2013-01-06 13:31:40 +01:00
Anton Khirnov
3c6e5a840c
rl2: use fixed-width integer types where appropriate
2013-01-06 13:31:40 +01:00
Anton Khirnov
126abaaaae
rl2: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
7c8fceef6c
cljr: return a meaningful error code.
2013-01-06 13:31:40 +01:00
Anton Khirnov
80344261aa
fraps: cosmetics, reformat
2013-01-06 13:31:40 +01:00
Anton Khirnov
57d11e5e28
fraps: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
405486c28b
kgv1dec: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
e1a7061d63
kmvc: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
f3fcb1a7b2
wnv1: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
0c19b23bd5
dpx: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
b61e0b99df
truemotion1: return meaningful error codes
2013-01-06 13:31:40 +01:00
Anton Khirnov
380242ca50
pnm: return meaningful error codes.
2013-01-06 13:31:40 +01:00
Anton Khirnov
84f2847de3
xl: return a meaningful error code.
2013-01-06 13:31:40 +01:00
Anton Khirnov
d47dabbac2
xan: return a meaningful error code.
2013-01-06 13:31:40 +01:00
Anton Khirnov
4aebb8d999
xxan: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
aaf208329f
zmbv: return more meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
01b60883ea
yop: use a meaningful error code.
2013-01-06 13:31:39 +01:00
Anton Khirnov
11c3f2047e
c93: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
2b011a43e9
bmv: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
abcc235481
bmp: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
6a97ea65b6
bink: operate with pointers to AVFrames instead of whole structs.
...
This is more correct and avoids breaking extended_data.
2013-01-06 13:31:39 +01:00
Anton Khirnov
86d4e75422
bink: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
86e09b9e60
bfi: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
fc2a94c15e
bethsoftvideo: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
e83c1e2d0b
avs: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
620faee5d1
aura: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
38de3365ca
asvdec: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
b3b17f7800
ansi: return a meaningful error code
2013-01-06 13:31:39 +01:00
Anton Khirnov
b622e2b540
anm: return meaningful error codes
2013-01-06 13:31:39 +01:00
Anton Khirnov
18009e60d2
aasc: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
313da47aa1
8bps: return meaningful error codes.
2013-01-06 13:31:39 +01:00
Anton Khirnov
f7d15d2f42
4xm: operate with pointers to AVFrames instead of whole structs.
...
This is more correct and avoids breaking extended_data.
2013-01-06 13:31:39 +01:00
Anton Khirnov
85383d139a
4xm: eliminate a pointless indirection
2013-01-06 13:31:39 +01:00
Anton Khirnov
aa15afb7ce
4xm: simplify code with FFSWAP
2013-01-06 13:31:39 +01:00
Anton Khirnov
10c26e928a
4xm: return meaningful error codes
2013-01-06 13:31:39 +01:00
Clément Bœsch
3048fae63c
build: Avoid detecting bogus components named 'x'
...
The function find_things() in configure is confused by component
registration calls as part of multiline macros defining combined
component registration. Coalesce those macros into one line to
work around the issue.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-03 15:11:25 +02:00
Janne Grunau
9ac44ad9d0
h264: check SPS entries directly to detect pixel format changes
...
Comparing AVCodecContext.pix_fmt against the get_pixel_format() return
value has the side effect of calling the get_format() callback on each
slice. Users of the callback will probably handle hardware accelerator
initialization in the callback.
2013-01-03 11:09:00 +01:00
Diego Biurrun
117f79de2d
truemotion2: Sanitize tm2_read_header()
...
Also give a variable a more sensible name.
2012-12-31 11:20:45 +01:00
Anton Khirnov
fb0cb11f09
cavsdec: export picture type in the output frame
2012-12-30 18:52:26 +01:00
Anton Khirnov
7d84826400
cavs: deMpegEncContextize
...
It does not use any of the mpegvideo infrastructure, just a few fields
from the context.
Fixes a segfault with the emu edge flag, since emu edge buffer is now
allocated as a part of the frame buffer allocation and cavs calls
ff_get_buffer() directly, it does not use mpegvideo buffer management.
Fixes a memleak of the last frame.
2012-12-30 18:48:11 +01:00
Anton Khirnov
64bb3fa6b7
cavs: cosmetics, reformat top part
2012-12-30 18:47:54 +01:00
Anton Khirnov
185c2ef849
cavsdec: cosmetics, reformat
2012-12-30 18:47:30 +01:00
Diego Biurrun
015da965a6
libavcodec/utils: Add braces to shut up gcc warnings
...
libavcodec/utils.c:1050:5: warning: missing braces around initializer [-Wmissing-braces]
libavcodec/utils.c:1314:5: warning: missing braces around initializer [-Wmissing-braces]
2012-12-30 01:52:04 +01:00
Luca Barbato
d615da60c1
snow: use VideoDSPContext
...
It was left over from the initial conversion.
2012-12-29 18:05:49 +01:00
Diego Biurrun
c73c87b412
cosmetics: Prettyprint codec/format/filter registration files
2012-12-28 19:18:13 +01:00
Janne Grunau
1f4ea4e068
mpegvideo: initialize videodsp with correct pixel depth
...
Fixes decoding of 9/10 bit per pixel h264 videos as reported in
https://bugzilla.libav.org/show_bug.cgi?id=404 .
2012-12-26 00:24:21 +01:00
Anton Khirnov
0a9132b84c
wnv1: cosmetics, reformat
2012-12-24 09:18:19 +01:00
Anton Khirnov
51648da4dc
xan: remove a trivially true if().
...
This function used to be shared with the xxan decoder, but that is not
true anymore.
2012-12-24 09:17:57 +01:00
Anton Khirnov
99e36ddd3e
ansi: do not depend on get_buffer() initializing the frame.
...
The background changes from 128 (used by the default/cmdutils
get_buffer()) to 0. This looks more correct.
2012-12-24 09:17:45 +01:00
Anton Khirnov
261f0b14ed
zerocodec: remove an unused variable.
2012-12-24 09:17:40 +01:00
Anton Khirnov
8adfacff5c
zmbv: remove some pointless comments and empty lines
2012-12-24 09:17:34 +01:00
Anton Khirnov
c6303f8d70
yop: simplify/sanitize the decoding loop
...
Do not overwrite linesize set by get_buffer().
The last frame in the FATE test is not decoded anymore, since the file
is cut and a part of it is missing.
2012-12-24 09:16:51 +01:00
Anton Khirnov
f6e395e132
c93: set palette_has_changed.
2012-12-24 09:16:11 +01:00
Anton Khirnov
3eab600752
bmp: cosmetics, reformat
2012-12-24 09:15:30 +01:00
Martin Storsjö
0940580adb
lavc: Correct the description of pkt_dts
...
The description as updated in 6e5c44b0f made it sound like it is
handled exactly like the pts, which it is not. Clarify that it
is the packet that triggered returning the frame instead of just
the last avpacket (in case of frame threading, it won't be the
dts of the last packet).
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-23 20:52:21 +02:00
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
2012-12-23 18:56:56 +01:00
Anton Khirnov
b6d7d4efae
8bps: cosmetics
...
Remove some pointless comments and empty lines.
2012-12-23 11:17:53 +01:00
Anton Khirnov
c64cf2a37b
aasc: cosmetics, reformat
2012-12-23 11:17:53 +01:00
Anton Khirnov
808b2227d7
ansi: remove an extra return
2012-12-23 11:17:53 +01:00
Anton Khirnov
c3a76c3dec
asvdec: cosmetics, reformat
2012-12-23 11:17:53 +01:00
Anton Khirnov
bdfa24514e
aura: cosmetics, reformat
2012-12-23 11:17:53 +01:00
Anton Khirnov
b047c68783
4xm: don't rely on get_buffer() initializing the frame.
2012-12-23 11:17:53 +01:00
Anton Khirnov
2ca5ca2957
huffyuv: split encoder and decoder into separate files.
2012-12-23 11:17:49 +01:00
Anton Khirnov
6e5c44b043
lavc: make pkt_{p,d}ts doxy less confusing
2012-12-23 10:35:32 +01:00
Anton Khirnov
418693bdc5
lavc: rewrite and extend AVFrame doxy
2012-12-23 10:35:27 +01:00
Justin Ruggles
5778299c7e
ttadec: fix last frame handling when seeking
...
Using a frame count, as is done currently, does not work at all with
seeking. Instead, when the number of samples in the final frame has
been decoded, we check if only the 32-bit CRC is remaining. If so, we
assume that it is the final frame.
There is no longer a need to keep total_frames in TTAContext.
2012-12-22 14:45:35 -05:00
Justin Ruggles
68a04b0cce
alacdec: do not be too strict about the extradata size
...
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.
CC: libav-stable@libav.org
2012-12-22 12:18:41 -05:00
Justin Ruggles
aef5150719
flac: only set channel layout if not previously set or on channel count change
...
Fixes Bug 402
2012-12-22 01:35:28 -05:00
Diego Biurrun
511cf612ac
miscellaneous typo fixes
2012-12-21 00:18:34 +01:00
Luca Barbato
6906b19346
lavc: add missing files for arm
...
Across the many retouches those did not make the main commit.
2012-12-20 14:07:23 +01:00
Ronald S. Bultje
8c53d39e7f
lavc: introduce VideoDSPContext
...
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-20 13:40:45 +01:00
Anton Khirnov
5823686261
mpeg12: do not decode extradata more than once.
...
Fixes CVE-2012-2803.
CC: libav-stable@libav.org
2012-12-19 22:32:54 +01:00
Victor Lopez
1c8bf3bfed
h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles
...
Fixes bug 396.
CC: libav-stable@libav.org
2012-12-19 13:40:48 +01:00
Janne Grunau
45635885e4
mpegvideo: increase edge_emu_buffer size for VC1
...
The VC1 decoder uses edge_emu_buffer simultaneously for luma and chroma
and needs more space. That was not a problem before f1d8763a02
since the size for edge_emu_buffer was always calculated with 2 byte per
pixel since the linesize was not known.
Fixes occasionally fate errors in vc1_sa10143.
2012-12-19 07:57:22 +01:00
Janne Grunau
acb571c89a
avcodec: bump minor for adaptive h264 frame-mt
...
Also adds forgotten Changelog entry.
2012-12-18 20:26:53 +01:00
Janne Grunau
9e696d2e5f
h264: support frame parameter changes during frame-mt
...
Fixes CVE-2012-2782.
2012-12-18 19:55:10 +01:00
Janne Grunau
f1d8763a02
mpegvideo: allocate scratch buffers after linesize is known
...
Since we can't know which stride a custom get_buffer() implementation is
going to use we have to allocate this scratch buffers after the linesize
is known. It was pretty safe for 8 bit per pixel pixel formats since we
always allocated memory for up to 16 bits per pixel. It broke hoever
with cmdutis.c's alloc_buffer() and high pixel bit depth since it
allocated larger edges than mpegvideo expected.
Fixes fuzzed sample nasa-8s2.ts_s244342.
2012-12-18 19:48:30 +01:00
Michael Niedermayer
ed2d7d5868
ff_h264_direct_ref_list_init: fix B slice check.
...
Fixes null pointer dereference.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-12-18 19:44:22 +01:00
Janne Grunau
73ad2c2fa7
h264: increase dist_scale_factor for up to 32 references
...
Compute dist_scale_factor_field only for MBAFF since that is the only
case in which it is used.
2012-12-18 19:36:58 +01:00
Diego Biurrun
523c7bd23c
misc typo, style and wording fixes
2012-12-18 13:36:51 +01:00
Michael Niedermayer
c9aab8a123
h264: use mbaff ref indices in fill_colmap() only for mbaff references
...
Prevents writing beyond array bounds.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-12-18 11:02:23 +01:00
Janne Grunau
61c6eef545
h264: prevent decoding of slice NALs in extradata
...
It is not posible to call get_buffer during frame-mt codec
initialization. Libavformat might pass huge amounts of data as
extradata after parsing broken files. The 'extradata' for the fuzzed
sample sample_varPAR_s5374_r001-02.avi is 2.8M large and contains
multiple slices.
2012-12-18 11:01:14 +01:00
Diego Biurrun
81c7c817a4
cosmetics: Use consistent names for multiple inclusion guards.
2012-12-17 17:02:22 +01:00
Janne Grunau
a421bbfe83
h264: fix memleak on error during SPS parsing
...
Introduced in d7d6efe42b
.
2012-12-15 19:16:39 +01:00
Janne Grunau
27c8337e59
h264-mt: handle NAL_DPAs before calling ff_thread_finish_setup
...
Since a NAL_DPA can start a new frame it has to be handled before
ff_thread_finish_setup is called.
2012-12-15 19:06:37 +01:00
Luca Barbato
f33b5ba63e
vp56: release frames on error
...
Fixes CVE-2012-2783
CC: libav-stable@libav.org
2012-12-14 13:21:59 +01:00
Luca Barbato
bb675d3ac6
vp56: make parse_header return standard error codes
...
Returning 0 for failure is misleading.
CC: libav-stable@libav.org
2012-12-14 13:21:59 +01:00
Anton Khirnov
deabb52ab4
ivi_common: check that scan pattern is set before using it.
...
Fixes CVE-2012-2791.
CC: libav-stable@libav.org
2012-12-14 07:10:53 +01:00
Anton Khirnov
07acdd651d
ivi_common: use proper logging context in ivi_decode_blocks().
2012-12-14 07:10:48 +01:00
Anton Khirnov
8ab42021f2
ivi_common: make some functions and tables static.
2012-12-14 07:08:38 +01:00
Janne Grunau
0eae920c3c
h264: initialize frame-mt context copies properly
2012-12-13 21:02:42 +01:00
Janne Grunau
6a27ae28f9
mpegvideo: treat delayed pictures as used
...
This requires to move the avcodec_default_free_buffers() call to
ff_MPV_common_end() since otherwise delayed pictures would get freed
during a size change.
2012-12-13 21:02:42 +01:00
Janne Grunau
bd255f9feb
lavc: set frame parameters after decoding only if necessary
...
Direct rendering capable decoders call get_buffer() which will set the
frame parameters.
Prevents frames with wrong parameters when a decoder outputs delayed
frames after a resolution or pixel format change.
2012-12-13 21:02:42 +01:00
Janne Grunau
072be3e896
h264: set parameters from SPS whenever it changes
...
Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
alternating bit depths.
2012-12-13 21:02:42 +01:00
Luca Barbato
be75fed975
vp6: properly fail on unsupported feature
...
Interlacing is not supported at all and mismanaged down the normal
codepaths causing possible buffer management issues.
CC: libav-stable@libav.org
2012-12-13 17:05:45 +01:00
Alex Converse
6d5b009267
aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
...
Found-by: pawlkt
CC: libav-stable@libav.org
2012-12-12 13:22:10 -08:00
Martin Storsjö
48238fd00b
svq1: Fix building with -DDEBUG
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:17:52 +02:00
Anton Khirnov
c4182d72c9
svq1: return meaningful error codes.
2012-12-12 10:00:08 +01:00
Anton Khirnov
998fdcff41
lavc: replace some forgotten instances of PixelFormat with AVPixelFormat
2012-12-12 09:59:58 +01:00
Anton Khirnov
84a0806680
svq1: unmacroify macros used only once.
2012-12-12 09:59:41 +01:00
Anton Khirnov
95baf701db
svq1: deMpegEncContextize
...
This decoder is quite simple and none of the MpegEncContext complexity
is actually needed.
2012-12-12 09:57:21 +01:00
Ronald S. Bultje
6f40e9f070
x86inc: support stack mem allocation and re-alignment in PROLOGUE
...
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-12 05:23:46 +01:00
Mans Rullgard
02823f6d71
Make LOCAL_ALIGNED syntactically similar on all systems
...
This changes the LOCAL_ALIGNED definition on systems where
DECLARE_ALIGNED is used so it matches the manual alignment
case, ensuring invalid use will not compile on x86 only to
fail on everything else.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-11 11:59:15 +00:00
Carl Eugen Hoyos
2ddf7c88d1
ZeroCodec: Flip output
...
The initial testing of the VFW binary codec was flawed,
likely due to an AviSynth bug.
Re-testing using VirtualDub and various professional editing
applications has revealed it should have been flipped.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-12-10 11:19:42 -05:00
Mans Rullgard
f9e493c6f5
sh4: dsputil: remove duplicate of ff_gmc_c()
...
This function is an exact duplicate of the generic one.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-10 09:53:58 +00:00
Mans Rullgard
2dd95bd7cf
dsputil: remove unused macro WRAPPER8_16
...
This macro has never been used.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 22:21:04 +00:00
Martin Storsjö
774e6fc9ed
libvpxenc: Support forcing keyframes
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-09 20:28:08 +02:00
Mans Rullgard
ec5da7aee2
ac3dec: decode directly into output buffers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 15:52:01 +00:00
Mans Rullgard
30b3916425
ac3dec: make downmix() take array of pointers to channel data
2012-12-09 15:52:01 +00:00
Mans Rullgard
b8f3ab8e6a
ac3dec: output planar float only
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 15:52:01 +00:00
Janne Grunau
288bb3da16
svq3: make slice type value unsigned to match svq3_get_ue_golomb return type
2012-12-09 15:51:45 +01:00
Diego Biurrun
ba0c898120
cosmetics: Fix dropable --> droppable typo
2012-12-09 13:36:11 +01:00
Janne Grunau
6a1aa5cb26
mjpeg: initialize input padding after unescaped buffer to zero
...
Fixes valgrind --undef-value-errors=yes warnings caused by valid
overreads in the fate vsynth jpegls, cover-art-ape and cover-art-wv
tests.
2012-12-08 17:05:45 +01:00
Ronald S. Bultje
ddd7559ad9
h264: check for invalid zeros_left before writing
...
Prevent an invalid write into coeffs[scantable[-1]] if zeros_left
itself was an invalid VLC code (and thus -1).
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-08 17:04:22 +01:00
Janne Grunau
9a2e79116d
golomb: use unsigned arithmetics in svq3_get_ue_golomb()
...
This prevents undefined behaviour of signed left shift if the coded
value is larger than 2^31. Large values are most likely invalid and
caused errors or by feeding random.
Validate every use of svq3_get_ue_golomb() and changed the place there
the return value was compared with negative numbers. dirac.c was clean,
fixed rv30 and svq3.
2012-12-08 12:55:10 +01:00
Josh Allmann
b3deec3253
takdec: fix initialisation of LOCAL_ALIGNED array
...
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-12-08 00:00:30 +01:00
Mans Rullgard
cd71af90a9
takdec: fix initialisation of LOCAL_ALIGNED array
...
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 22:13:57 +00:00
Paul B Mahol
57231e4d5b
tak: demuxer, parser, and decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer
096abfa150
parser: fix large overreads
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer
41540b36a1
bitstream: add get_bits64() to support reading more than 32 bits at once
...
Also remove a duplicate function in the MPEG-TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Mans Rullgard
b326755989
arm: rename ARMVFP config symbol to VFP
...
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard
a7831d509f
arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation
...
These macros reflect the actual capabilities required here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard
c29d49c1b3
dct-test: arm: indicate required cpu features for optimised funcs
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Anton Khirnov
380232fac3
snow: fix build after 594d4d5df3
2012-12-07 16:35:06 +01:00
Mans Rullgard
92dad6687f
arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
...
When initialising an FFTContext for a plain FFT, mdct_bits is not set
and can contain a garbage value. Since nbits is always valid and for
MDCT operation is mdct_bits - 2 checking this instead avoids using an
uninitialised value while having the same effect.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 13:11:57 +00:00
Martin Storsjö
2c96392277
avpicture: Don't assume a valid pix fmt in avpicture_get_size
...
When called from the v4l2 input device, pix_fmt can be
AV_PIX_FMT_NONE (for jpeg formats). Before 50ba57e0
, this wasn't
an issue for avpicture_get_size, but after that commit, this
lead to crashes.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-07 14:28:47 +02:00
Janne Grunau
a394959bbe
h264: add a pointer for weighted prediction temporary buffer
...
Reusing MpegEncContext's obmc_scratchpad for this becomes a mess with
adaptive frame-mt.
2012-12-07 11:43:28 +01:00
Janne Grunau
d7d6efe42b
h264: check sps.log2_max_frame_num for validity
...
Fixes infinite or long taking loop in frame num gap code in
the fuzzed sample bipbop234.ts_s223302.
CC: libav-stable@libav.org
2012-12-07 11:43:28 +01:00
Janne Grunau
480be07a96
flac: change minimum and default of lpc_passes option to 1
...
Avoid use of uninitialized and uncomputed linear least square models
during ff_lpc_calc_coefs() for FF_LPC_TYPE_CHOLESKY. Fixes running
make fate-flac-16-lpc-cholesk with valgrind --undef-value-errors=yes.
2012-12-07 11:43:28 +01:00
Christophe Gisquet
2aef3d66c9
SBR DSP x86: implement SSE sbr_hf_gen
...
Start and end index are multiple of 2, therefore guaranteeing aligned access.
Also, this allows to generate 4 floats per loop, keeping the alignment all
along.
Timing:
- 32 bits: 326c -> 172c
- 64 bits: 323c -> 156c
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-12-07 11:04:26 +01:00
Christophe Gisquet
9a16359c38
AAC SBR: use AVFloatDSPContext's vector_fmul
...
Around 5% speedup on the code block using 'vector_fmul_add's.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-12-07 10:33:39 +01:00
Janne Grunau
5945c7b35d
h264: slice-mt: check master context for valid current_picture_ptr
...
Fixes errors in slice based multithreading introduced in 0b300daad2
.
CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Janne Grunau
a8cb1746c5
h264: slice-mt: get last_pic_dropable from master context
...
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Justin Ruggles
5e1bbb8c7e
alacenc: add support for multi-channel encoding
2012-12-05 16:13:37 -05:00
Janne Grunau
c15fea7933
mimic: initialize padding of swap_buf through av_fast_padded_malloc
2012-12-05 00:02:44 +01:00
Janne Grunau
42060c7030
eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()
2012-12-05 00:02:44 +01:00
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
2012-12-04 21:45:36 +01:00
Anton Khirnov
387bef95d2
lavc: factorise setting buffer type in avcodec_default_get_buffer().
2012-12-04 21:45:23 +01:00
Anton Khirnov
e57c4706e9
lavc: don't reuse audio buffers
...
Any performance gain from this is negligible and not worth the extra
code.
2012-12-04 21:43:53 +01:00
Anton Khirnov
ff953fecff
lavc: set frame properties in ff_get_buffer().
...
There is no point in duplicating this code in every get_buffer()
implementation.
2012-12-04 21:42:44 +01:00
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
2012-12-04 21:40:22 +01:00
Janne Grunau
0b300daad2
h264: error out on unset current_picture_ptr for h->current_slice > 0
...
Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.
CC: libav-stable@libav.org
2012-12-02 23:24:53 +01:00
Christophe Gisquet
e32bea8eb4
aac: avoid a memcpy in sbr_qmf_analysis
...
Swapping buffer indices allows saving one memcpy that accounts for 1% of the
runtime, according to oprofile.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-02 21:07:48 +01:00
Diego Biurrun
9d46eaec7a
build: The FLAC encoder also depends on the flacdsp code
...
Fixes linking with only the FLAC encoder enabled.
2012-11-29 17:15:57 +01:00
Janne Grunau
c1fcf563b1
h264: check context state before decoding slice data partitions
...
Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656.
Found-by: Mateusz "j00ru" Jurczyk
CC: libav-stable@libav.org
2012-11-29 14:40:05 +01:00
Janne Grunau
3ae69b9166
flashsv: make sure data for zlib priming is available
...
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.
CC: libav-stable@libav.org
2012-11-29 14:15:05 +01:00
Diego Biurrun
9b15c0a9b3
x86: dsputilenc: port to cpuflags
2012-11-28 16:05:44 +01:00
Diego Biurrun
89145fbbfe
x86: h264dsp: Fix linking with yasm and optimizations disabled
...
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
2012-11-28 14:45:28 +01:00
Diego Biurrun
2e89aeed65
x86: h264_idct: port to cpuflags
2012-11-28 00:28:09 +01:00
Piotr Bandurski
f5fa03660d
vble: Do not abort decoding when version is not 1
...
Some combinations of OS, VirtualDub, and VBLE can accidentally
set the version to a value other than 1. Since no other version
of VBLE was ever released, simply warn about it.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-11-27 17:16:04 -05:00
Diego Biurrun
28e1cf19aa
x86: h264_weight: port to cpuflags
2012-11-27 21:10:38 +01:00
Janne Grunau
d5e83122bd
h264: set Picture.owner2 to the current thread
...
This does not seem to have an effect currently. Fate-h264 passes with
THREADS=1..16 and both threading types as before. It fixes however a
segfault during error resilience with my adaptive-frame-mt patchset.
A picture in use during error resilience gets realloced in another
thread in the fuzzed sample sample_varPAR.avi_s226019.
2012-11-27 12:26:33 +01:00
Janne Grunau
6e5cdf2628
h264: check ref_count validity for num_ref_idx_active_override_flag
...
Fixes segfault in the fuzzed sample bipbop234.ts_s226407.
CC: libav-stable@libav.org
2012-11-27 12:26:33 +01:00
Janne Grunau
150b2361ca
h264: add missing new line to log message
2012-11-27 12:26:33 +01:00
Michael Niedermayer
5d47850bbd
dcadec: skip QMF on unused channels
...
When the extra rear channel is present but unused, the
s->channel_order_tab[] value for that channel is -1. The QMF can be
skipped for the extra channel, and doing so avoids an out-of-array read
on s->samples_chanptr[].
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 22:50:37 -05:00
Justin Ruggles
284ea790d8
dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil
2012-11-26 11:29:06 -05:00
Michael Niedermayer
1e27655388
aacenc: use the correct output buffer
...
This fixes segfault caused by 3d3cf6745e
when SingleChannelElement.ret was renamed to SingleChannelElement.ret_buf.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 11:17:17 -05:00
Mans Rullgard
edd80ec7e3
aacdec: fix signed overflows in lcg_random()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-26 13:34:58 +00:00
Janne Grunau
5ae72f5453
flashsv: check for keyframe before using differential coding
...
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.
CC: libav-stable@libav.org
2012-11-26 10:26:01 +01:00
Janne Grunau
706acb558a
h264: enable low delay only if no delayed frames were seen
...
Dropping frames is undesirable but that is the only way by which the
decoder could return to low delay mode. Instead emit a warning and
continue with delayed frames.
Fixes a crash in fuzzed sample nasa-8s2.ts_s20033 caused by a larger
than expected has_b_frames value. Low delay keeps getting re-enabled
from a presumely broken SPS.
CC: libav-stable@libav.org
2012-11-26 10:25:39 +01:00
Diego Biurrun
7ee4071362
x86: fix build without inline asm
...
The qpel functions referenced here are not related to h264 and should
thus never have been under CONFIG_H264QPEL.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-26 01:50:47 +01:00
Justin Ruggles
3d3cf6745e
aacdec: use float planar sample format for output
2012-11-25 19:06:36 -05:00
Justin Ruggles
8e134e5104
lavc: clarify get_buffer() documentation
...
This is needed for the AAC decoder, which may need to call get_buffer()
more than once if the channel configuration changes.
2012-11-25 19:06:36 -05:00
Justin Ruggles
3ffed68c2a
mpegaudiodec: use planar sample format for output unless packed is requested
2012-11-25 19:05:58 -05:00
Justin Ruggles
2d3993ce8c
x86: h264 qpel: use the correct number of utilized xmm regs in cglobal
...
Fixes xmm register clobbering on win64.
2012-11-25 18:48:43 -05:00
Daniel Kang
610e00b359
x86: h264: Convert 8-bit QPEL inline assembly to YASM
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-25 20:38:35 +01:00
Daniel Kang
ad01ba6cea
x86: h264: Remove 3dnow QPEL code
...
The only CPUs that have 3dnow and don't have mmxext are 12 years old.
Moreover, AMD has dropped 3dnow extensions from newer CPUs.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-25 20:32:55 +01:00
Diego Biurrun
28c8e288fa
x86: h264_chromamc: port to cpuflags
2012-11-25 17:25:10 +01:00
Mans Rullgard
5e39bb073a
mpegvideo: simplify dxy calculation in hpel_motion()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:03:54 +00:00
Xi Wang
0d3123666a
cdgraphics: fix incorrect vertical offset mask in cdg_scroll()
...
The vertical offset mask 0x07 is suspicious.
v_off = FFMIN(data[2] & 0x07, CDG_BORDER_HEIGHT - 1);
Note that v_off is up to 11 (CDG_BORDER_HEIGHT - 1), the correct mask
should be 0x0F.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Diego Biurrun
17fecb4a59
flashsv: Drop unused function and struct parameters
2012-11-21 11:49:41 +01:00
Justin Ruggles
00dd9a6d6a
pcm: fix decoding of pcm_s16le_planar on big-endian
...
The sample count is decremented by the DECODE() macro and needs to be reset
in each loop iteration. Also, DECODE() increments the src pointer so that does
not need to be done separately.
2012-11-20 10:52:49 -05:00
Luca Barbato
ae3822bca1
imgconvert: remove PixFmtInfo
...
It is pleonastic and was used in stale functions pending replacement.
2012-11-20 12:45:58 +01:00
Luca Barbato
d1d9efaae6
avcodec: split avpicture from imgconvert
...
All the non deprecated functions are in avpicture.c now.
2012-11-20 12:45:58 +01:00
Justin Ruggles
7c278d2ae4
alacenc: support 24-bit encoding
2012-11-20 00:26:45 -05:00
Justin Ruggles
c9d0f4506f
pcmdec: use planar sample format for pcm_s16le_planar
2012-11-19 23:48:37 -05:00
Justin Ruggles
79b7747556
vorbisdec: use float planar sample format
2012-11-19 23:48:37 -05:00
Diego Biurrun
89923fce70
x86: h264_intrapred: Fix C function names in comments
...
Function names changed after switching to declaration with
PRED4x4/8x8/8x8L/16x16 macros in the C code.
2012-11-18 18:34:05 +01:00
Diego Biurrun
87af05c575
x86: SPLATD: port to cpuflags
2012-11-18 18:34:05 +01:00
John Stebbins
1c5805521c
PGS subtitles: Set AVSubtitle pts value
...
pts should be that of the packet containing the presentation segment.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-18 18:34:05 +01:00
Janne Grunau
e6160bda98
h264: Fix parameters to ff_er_add_slice() call
...
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394 .
CC: libav-stable@libav.org
2012-11-16 13:18:28 +01:00
Janne Grunau
60b6b8c019
h264: always check ref_count for validity
...
Fixes a crash with zuffed files.
2012-11-16 13:18:28 +01:00
Diego Biurrun
8c3849bc76
x86: dsputil: port to cpuflags
2012-11-16 10:38:23 +01:00
Xi Wang
b74dbdd5e9
bgmc: Fix av_malloc checks in ff_bgmc_init()
...
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-14 23:03:36 +01:00
Diego Biurrun
26301caaa1
x86: mmx2 ---> mmxext in asm constructs
2012-11-14 00:58:51 +01:00
Diego Biurrun
da39cac8de
Drop broken and unused CABAC test program.
2012-11-14 00:36:17 +01:00
Diego Biurrun
5e9c6ef8f3
x86: h264_weight_10bit: port to cpuflags
2012-11-13 19:07:09 +01:00
Luca Barbato
83f9ed42ec
libtheoraenc: add missing pixdesc.h header
...
Was left out from c1a02e884a
.
2012-11-13 17:42:13 +01:00
Luca Barbato
cc085993f4
avcodec: remove ff_is_hwaccel_pix_fmt
...
It is used only in one place and is unlikely it would be needed
elsewhere.
2012-11-13 16:21:47 +01:00
Luca Barbato
c1a02e884a
pixdesc: add av_pix_fmt_get_chroma_sub_sample
...
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00
Mans Rullgard
a384f6a7f7
ppc: replace pointer casting with AV_COPY32
...
This removes warnings about strict aliasing violations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Mans Rullgard
031aac9861
ppc: fix some unused variable warnings
...
The third argument of OP_U8_ALTIVEC is evaluated at most once so
there is no need for a potentially unused temporary variable.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Justin Ruggles
faf340f60c
binkaudio: set channel layout
2012-11-12 00:41:02 -05:00
Diego Biurrun
2b479bcab0
build: Drop AVX assembly ifdefs
...
An assembler able to cope with AVX instructions is now required.
2012-11-11 20:43:28 +01:00
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Alberto Delmás
802713c4e7
mss2: prevent potential uninitialized reads
...
The alternative to zeroing on init is setting the corrupted flag in
all cases where pal_pic is not fully written, at the cost of added
complexity.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:50 +01:00
Kostya Shishkov
6d93308c0c
mss2: reindent after last commit
2012-11-11 16:07:42 +01:00
Alberto Delmás
b077eb0780
mss2: fix handling of unmasked implicit WMV9 rectangles
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:36 +01:00
Diego Biurrun
6cd796049d
x86: h264_qpel_10bit: drop unused parameter from MC10/MC20/MC30 macros
2012-11-10 14:49:09 +01:00
Diego Biurrun
4b60fac419
x86: PALIGNR: port to cpuflags
2012-11-09 21:31:31 +01:00
Diego Biurrun
4d1f69f244
x86: h264_qpel_10bit: port to cpuflags
2012-11-09 21:17:05 +01:00
Justin Ruggles
3a2731cbd3
flacenc: ensure the order is within the min/max range in LPC order search
...
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
2012-11-08 13:57:34 -05:00
Diego Biurrun
6ca60d4ddd
x86: h264_intrapred: port to cpuflags
2012-11-08 18:05:23 +01:00
James Zern
12776d5d2a
libvpxenc: Allow enabling constrained quality (CQ) mode
...
The CQ mode was introduced in libvpx 0.9.6.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 00:01:54 +02:00
Martin Storsjö
ad961726dc
libopencore-amr: Check the return value of amr_decode_fix_avctx
...
This allows getting rid of redundant checks later in the codec
specific init functions.
Move the check to before actually initializing the decoder lib,
to simplify error handling.
This fixes a case of returning a value from a void function, present since
d40dab907
.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-07 00:48:50 +02:00
Justin Ruggles
2e76f34387
flacenc: use RICE2 entropy coding mode for 24-bit
2012-11-05 15:32:30 -05:00
Justin Ruggles
13e1ee6c84
flacenc: add 24-bit encoding
2012-11-05 15:32:30 -05:00
Justin Ruggles
799e232490
flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext
...
Also, templatize the functions for 16-bit and 32-bit sample range. This will
be used for 24-bit FLAC encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
5ff998a233
flacenc: use uint64_t for bit counts
...
Needed to avoid integer overflows for 24-bit encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
e783316322
flacenc: remove wasted trailing 0 bits
2012-11-05 15:32:30 -05:00
Justin Ruggles
6a744d2619
flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
...
This is much faster than calculating the MD5 one sample at a time.
2012-11-05 15:32:29 -05:00
Diego Biurrun
930e26a3ea
x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
...
This fixes compilation with --disable-everything and components enabled.
2012-11-05 20:48:43 +01:00
Diego Biurrun
dbb37e7711
x86: PABSW: port to cpuflags
2012-11-05 14:51:10 +01:00
Diego Biurrun
6c104826bd
x86: vc1dsp: port to cpuflags
2012-11-05 14:51:10 +01:00
Diego Biurrun
0a7a94f2e5
x86: Refactor PSWAPD fallback implementations and port to cpuflags
2012-11-02 17:05:29 +01:00
Diego Biurrun
9a07c1332c
parser: Move Doxygen documentation to the header files
2012-11-02 16:44:23 +01:00
John Stebbins
85f67c4865
PGS subtitles: Expose forced flag
...
Useful for detection of subtitles displayed during foreign language
scenes.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-02 16:13:35 +01:00
Diego Biurrun
26f01bd106
x86: PMINUB: port to cpuflags
2012-11-02 15:38:15 +01:00
Diego Biurrun
9ce02e14f0
x86: ac3dsp: port to cpuflags
2012-11-02 15:24:50 +01:00
Anton Khirnov
0876c28080
lavc: add some AVPacket doxy.
2012-11-02 07:58:38 +01:00
Ilkka Ollakka
6d1270a0f9
decode_audio3: initialize AVFrame
...
Same fix and issue as in a25d912dca
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-01 19:43:05 +01:00
Justin Ruggles
5459848b14
ws-snd1: set channel layout
2012-11-01 11:30:04 -04:00
Justin Ruggles
f7b8506573
wmavoice: set channel layout
2012-11-01 11:30:04 -04:00
Justin Ruggles
002097a00b
wmapro: use AVCodecContext.channels instead of keeping a private copy
2012-11-01 11:29:19 -04:00
Justin Ruggles
2ed40608e9
wma: do not keep private copies of some AVCodecContext fields
...
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
2012-11-01 11:29:19 -04:00
Justin Ruggles
50a65e7a54
vmdaudio: set channel layout
2012-11-01 11:29:19 -04:00
Justin Ruggles
b5f628e227
twinvq: validate sample rate code
...
A large invalid value could cause undefined behavior when left-shifted
by 8 later in the function.
2012-11-01 11:29:19 -04:00
Justin Ruggles
335826cf5f
twinvq: set channel layout
2012-11-01 11:29:19 -04:00
Justin Ruggles
8cc72ce5a0
twinvq: validate that channels is not <= 0
...
This could occur due to integer overflow when reading the channel count from
the extradata.
2012-11-01 11:29:19 -04:00
Justin Ruggles
cebea00c8a
truespeech: set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
523734eb6a
sipr: set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
4c53f4aed3
shorten: validate that the channel count in the header is not <= 0
2012-11-01 11:29:18 -04:00
Justin Ruggles
4e13e50432
ra288dec: set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
6159f64364
ra144dec: set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
eb38d8fe92
qdm2: remove unneeded checks for channel count
2012-11-01 11:29:18 -04:00
Justin Ruggles
be2ab8b75a
qdm2: make sure channels is not <= 0 and set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
e3d6ab5704
qcelpdec: set channel layout
2012-11-01 11:29:18 -04:00
Justin Ruggles
d26701ce2f
nellymoserdec: set channels to 1
2012-11-01 11:29:17 -04:00
Justin Ruggles
d40dab907a
libopencore-amr: set channel layout for amr-nb or if not set by the user
2012-11-01 11:29:17 -04:00
Justin Ruggles
30f8da29bf
libilbc: set channel layout
2012-11-01 11:29:17 -04:00
Justin Ruggles
0fd1ddf155
dpcm: use AVCodecContext.channels instead of keeping a private copy
2012-11-01 11:29:17 -04:00
Justin Ruggles
1c7a016153
imc: set channels to 1 instead of validating it
2012-11-01 11:29:17 -04:00