Vittorio Giovara
7d2a682691
huffyuv: Check memory allocation
10 years ago
Vittorio Giovara
43171886e0
huffyuvenc: Mark codec as init-thread-safe and init-cleanup
10 years ago
Christophe Gisquet
6ee7681723
huffyuvenc: write last odd sample
...
If width is odd, last sample wouldn't be written.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
1467780772
huffyuvenc: add a non-deterministic option
...
Not actually used in huffyuvenc, but rather in setting the frame
threading.
Example for some files:
context=0: 851974 27226 1137281
context=1,ND=0: 471819 22604 972351
context=1,ND=1: 472875 22673 972582
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
c67b449beb
dsputil: Split bswap*_buf() off into a separate context
11 years ago
Christophe Gisquet
e7fc5d53a0
huffyuv: change statistics initialization
...
Normally, a Laplace distribution is more typical of the residuals
encoded, but for noisy input, it's both better and simpler to be
safe and use a 1/d^2 distribution. Second hunk could use some
renormalization but it has effectively little impact.
Output size of ffvhuff on various 4:2:0 sequences:
context=0,1/d: 851974 27226 1137281
context=0,1/d²: 619081 25069 1051500
context=0,1/d³: 501983 30454 1290561
context=0,lapl: 500650 31754 1304082
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
334aafe565
avcodec/huffman/ff_huff_gen_len_table: support skiping stat=0 entries
...
This is probably not the simplest solution but as this is needed for a bugfix,
simplification is left for later.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
40a4ab8ba4
rename sub_hfyu_median_prediction_int16 to sub_hfyu_median_pred_int16
...
This makes the naming more consistent with the 8bit variant
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
512f3ffe9b
dsputil: Split off HuffYUV encoding bits into their own context
...
Also shorten HuffYUV context member names to avoid clutter.
11 years ago
Michael Niedermayer
9e58677438
avcodec/huffyuvenc: Make version 3 of ffvhuff non experimental
...
Tested-by: Tim Nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
2f02bbcca0
build: Let the ffvhuff decoder/encoder depend on the huffyuv decoder/encoder
...
Almost all of the code is shared so there is little point in
enabling one decoder/encoder without the other.
11 years ago
Michael Niedermayer
59279bf21f
avcodec/huffyuvenc: only allocate stats_out when it will be used
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bb7a711156
avcodec/huffyuvenc: frame multi-threading support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2a9c50798b
avcodec/huffyuv: dont depend on bitstream_bpp having a specific value for version>2
...
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
599e629f88
avcodec/huffyuvenc: fix end pointer for stats_out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a301bb63f0
avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating
...
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
d9779d648e
Move sub_hfyu_median_prediction_int16() to losslessviddsp
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f9c7b14c04
avcdoec/huffyuvenc: optimize sub_left_prediction()
...
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
6c004e8aad
avcodec/huffyuvenc: init bps from pixel descriptor
...
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
7b41cbac7f
avcodec/huffman: extend ff_huff_gen_len_table() to allow >8bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9d098ea32f
avcodec/huffyuvenc: Factorize store_huffman_tables() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5d4541007f
avcodec/huffyuvenc: fix -context 1 encoding
...
Fixes Ticket3281
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
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
Anton Khirnov
14b35bf065
huffyuv: use the AVFrame API properly.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
55c4cba2a7
huffyuvenc: BGRA support
...
Bug-Id: 452
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Anton Khirnov
2ca5ca2957
huffyuv: split encoder and decoder into separate files.
12 years ago