Michael Niedermayer
cf52e6d012
avcodec/ffv1dec: Fix skip_alpha
...
Fixes Ticket4322
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d43cd6b08e
avcodec/ffv1dec: Check chroma shift parameters
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
03baa861ea
avcodec/ffv1dec: More completely check micro_version
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3dfbdb328e
avcodec/ffv1dec: Check quant table symbols more completely
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Jérôme Martinez
14605a0b99
ffv1dec: plane_index is 1 in case of version 4 gray+alpha.
...
Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
ba625dd8a1
avcodec: use av_mod_uintp2() where useful
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Diego Biurrun
ca09effb01
ffv1: Drop unnecessary casts and const qualifiers to match function signatures
...
libavcodec/ffv1dec.c:898:36: warning: cast discards ‘const’ qualifier from pointer target type
10 years ago
Reimar Döffinger
8437cc7206
ffv1dec: Avoid unnecessarily large stack usage and copies.
...
Ideally the compiler could figure this out on its own,
but it seems it can't.
An alternative that would avoid the messy explicit memcpy
would be to use a sub-struct for the parts that should
be preserved, which can then simply be assigned.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Michael Niedermayer
da7d839a0d
ffv1dec: check that global parameters do not change in version 0/1
...
Such changes are neither allowed nor supported
Found-by: ami_stuff
Bug-Id: CVE-2013-7020
CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Michael Niedermayer
cc86158173
avcodec/ffv1dec: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
fb0c9d41d6
avutil: remove timer.h include from internal.h
...
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
11 years ago
Michael Niedermayer
0e575c24d6
ffv1.4: use 2 coefficients for calculating the Y plane in the RCT
...
0-0.7% improved compression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7854d2d251
avcodec/ffv1: support adjusting the g vs r + b coefficient in the RCT
...
about 1% better compression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
a6064b12b4
ffv1: use the AVFrame API properly.
11 years ago
Luca Barbato
a90905db2e
ffv1: Assume bitdepth 0 means 8bit
...
CC: libav-stable@libav.org
Reported-by: debian/726189
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Reimar Döffinger
547c2f002a
Make decoding alpha optional for some codecs.
...
For codecs where decoding of a whole plane can simply
be skipped, we should offer applications to not decode
alpha for better performance (ca. 30% less CPU usage
and 40% reduced memory bandwidth).
It also means applications do not need to implement support
(even if it is rather simple) for YUVA formats in order to be
able to play these files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
11 years ago
Paul B Mahol
d1a16564a2
avcodec/ffv1: YUVA(444,422,420) 9, 10 and 16 bit support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
a27227d401
avcodec/ffv1dec: fix format detection
...
Fixes crash with carefuly designed files.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
8393b80b7d
avcodec/ffv1dec: Support decoding planes as raw PCM in 1.4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
21dc3a3cc2
avcodec/ffv1dec: reorganize thread init/update
...
This moves some allocations to init, reducing possible failure modes in update.
Always copies from the previous context instead of just during init
Fixes Ticket2923
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c72cca5a44
avcodec/ffv1dec: move initial_states init to init_thread_copy()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b05cd1ea7e
ffv1dec: Check bits_per_raw_sample and colorspace for equality in ver 0/1 headers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
547d690d67
ffv1dec: check that global parameters dont change in version 0/1
...
Such changes are not allowed nor supported
Fixes Ticket2906
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
20b965a1a4
avcodec/ffv1dec: check global header version
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d9b0b54a5f
ffv1: rename minor to micro version
...
the version is 1.3.4 which makes 4 micro and not minor
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2c1a215ddb
ffv1: update years in header
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c387c45e83
ffv1: fix plane_count at version 1.4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8ec6188263
ffv1dec: support printing information about the global header
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim.Nicholson
ae4c912bce
Forward interlaced field information from mov to ffv1 decoder.
...
Only read the information for old ffv1, level/version 3 saves
the information in the bitstream.
Fixes a part of ticket #2190 .
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
11 years ago
Paul B Mahol
61d900fd0d
lavc: add ONLY_IF_THREADS_ENABLED where it is missing
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
a3264b4ba1
ffv1dec: defuse membomb
...
Fixes Ticket2589
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
12 years ago
Michael Niedermayer
a0c0900e47
ffv1dec: Support frame threading with gop > 1
...
This is about 20-30% faster than slice threading
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
69cfe63a43
ffv1: Switch to ThreadFrame
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
12 years ago
Michael Niedermayer
d4868a960b
ffv1dec: remove redundant error message.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ff0b4c08ca
ffv1dec: add code to support frame threading with gop=1 ffv1
...
CODEC_CAP_FRAME_THREADS is not added yet because that would
unconditionally enable it, breaking gop>1 files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1a392fc550
ffv1: Store a flag in the global header that indicates if all frames are keyframes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
aa96439fae
lavc: remove unused put_bits.h headers
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
d243896987
ffv1: fix calculating slice dimensions for version 2
...
It got broken in 0f13cd3187
.
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Michael Niedermayer
0560b28f12
ffv1dec: remove incorrect assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago