Michael Niedermayer
9bb1af8f36
avcodec/huffyuvdec: use RGB0 for 24bit rgb output instead of BGRA
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
469de4f583
avcodec/huffyuvdec: use the correct height field
...
Fixes Ticket3395
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6369766f01
avcodec/huffyuv: support gbrp9/10/12/14
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7cf8918b0d
avcodec/huffyuv: update years in copyright
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e6c0da70fc
avcodec/huffyuvdec: optimize >8bps VLC reading
...
97479 -> 54891 decicycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
53167ecfdb
avcodec/huffyuv: support AV_PIX_FMT_YUV(A)4XYP16 and GRAY16
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e6d1c66d74
avcodec/x86/lossless_videodsp: disable median optimizations for 16bps
...
They only support upto 15bps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
13c33c8e1f
Move add_hfyu_median_prediction_int16() to losslessviddsp
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
883570e6b7
Move add_hfyu_left_prediction_int16 to losslessviddsp
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f70d7eb20c
Move add/diff_int16 to lossless_videodsp
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
da0684820a
avcodec/dsputil/huffyuv: move diff int16 and add int16 to dsputil
...
This also fixes masking the bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2fd39642c9
avcodec/huffyuv: fix median prediction for >8bps
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3d87927959
avcodec/huffyuv: add YUVA{420,422,444}P{9,10} support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ef0282125c
avcodec/huffyuv: add YUV{420,422,444}P{9,10,12,14} support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b53aab1a58
libavcodec/huffyuv: >8 bit support
...
This adds only yuv420p10, others are trivial to add after this commit
and will be added in a subsequent commit.
Currently the implementation is not optimized, optimizations will be
added later
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
534a89478d
avcodec/huffyuv: add a field that represents the number of symbols
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
13f3092b38
avcodec/huffyuv: add YUVA420P, YUVA422P, YUVA444P, GBRAP, GRAY8A
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
60ab582a4e
avcodec/huffyuv: add GRAY8 support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
22f59a8cbe
avcodec/huffyuv: add GBRP support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4816d63fb7
avcodec/huffyuvdec: optimize decode_plane_bitstream(), use joint tables for new yuv formats
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
27b1e63f32
avcodec/huffyuv: Support more 8bit YUV formats
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
42b6805cc1
avcodec/huffyuvdec: clear remainder of the array on end of input in decode_422_bitstream()
...
Fixes: msan_uninit-mem_7f909423efcd_9923_yuv_predmed.avi
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 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
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
0dfc01c2bb
huffyuvdec: Skip len==0 cases
...
Fixes vlc decoding for hypothetical files that would contain such cases.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4420b41442
huffyuvdec: check for and propagate failures from inside generate_joint_tables()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f67a0d1152
huffyuvdec: Check init_vlc() return codes.
...
Prevents out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
2ca5ca2957
huffyuv: split encoder and decoder into separate files.
12 years ago
Paul B Mahol
4d1912ff4d
huffyuv: return meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4a722a5cab
huffyuv: check for malloc failures
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7f261ac850
huffyuv: make use of av_fast_padded_malloc()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
Michael Niedermayer
6abb9a901f
huffyuvdec: check width more completely, avoid out of array accesses
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
14d3e7ad11
Remove some silly disabled code.
12 years ago
Michael Niedermayer
5a582bd3b5
huffman: add ff_huff_gen_len_table
...
The function will be used by utvideo as well.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Luca Barbato
e0f7a9f6e7
huffyuv: update to current coding style
13 years ago
Michael Niedermayer
3f943fe681
huffman/huffyuv: move lorens huffman table generation code to huffman.c/h
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Michael Niedermayer
4b5c7d4d9a
huffyuv: switch to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
0e465c1a81
huffyuv: remove long time disabled code
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
3a085c6a37
huffyuv: do not decode/encode yuv colorspace with odd width
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e180079c1f
huffyuvenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c743aad557
huffyuv: some more consts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
4ffe5e2aa5
huffyuv: add padding to classic (v1) huffman tables.
...
We slightly overread the input buffer, so we require
padding at the end of the buffer, as is documented in the
get_bits API. Without padding, we'll read uninitialized
data or beyond the end of the .rodata, which may crash.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
3574a85ce5
Replace computations of remaining bits with calls to get_bits_left().
13 years ago