Kostya Shishkov
9652d4fcfc
ape: provide two additional bytes in buffer for old MAC versions
...
Range coder in 3.90-3.95 overread two bytes in the final normalize.
2013-03-15 09:50:42 +01:00
Kostya Shishkov
b164d66e35
ape: make version-dependent decoding functions called via pointers
...
This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.
2013-03-15 09:50:42 +01:00
Kostya Shishkov
b5f536d24b
pnm: add high-bitdepth PGMYUV support for both encoder and decoder
2013-02-23 16:49:22 +01:00
Kostya Shishkov and Anton Khirnov
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 and Anton Khirnov
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
Kostya Shishkov
6d93308c0c
mss2: reindent after last commit
2012-11-11 16:07:42 +01:00
Kostya Shishkov and Diego Biurrun
38fdf72580
swscale: do not forget to swap data in formats with different endianness
...
Otherwise during scaling it will try to interpret input in the wrong way and
that leads to the test results disagreeing on different platforms and with
different optimizations.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-10-31 17:53:57 +01:00
Kostya Shishkov
169514c440
indeo3: do not try to output more lines than we can fit
...
Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.
Also the decoder can be safely switched to direct rendering now.
2012-10-19 07:58:51 +02:00
Kostya Shishkov
8774d58358
bmv: get a new frame on every decode_frame(), so we can use direct rendering
2012-10-19 07:58:51 +02:00
Kostya Shishkov
4dc8c8386e
vc1dec: add flush function for WMV9 and VC-1 decoders
...
CC: libav-stable@libav.org
2012-09-28 07:08:54 +02:00
Kostya Shishkov
04fc5c6bde
g723_1: add comfort noise generation
2012-08-30 18:21:12 +02:00
Kostya Shishkov
7627c35a81
vc1: export some functions
...
This is a preparatory step for the MSS2 decoder which needs to use
the WMV9 decoder to decode some kinds of frames.
From the patch by Alberto Delmás <adelmas@gmail.com >
2012-08-28 07:37:06 +02:00
Kostya Shishkov
0de4a563e4
mss1: move code that will be reused by MSS2 decoder into separate file
2012-08-27 18:12:10 +02:00
Kostya Shishkov
49df339f4b
mss1: merge decode_intra() and decode_inter()
...
They have most of their code in common.
2012-08-27 18:11:50 +02:00
Kostya Shishkov
84f9d78a96
fate: add G.723.1 decoder tests
2012-08-09 19:35:47 +02:00
Kostya Shishkov
e78e6c37ef
g723_1: clip argument for 15-bit version of normalize_bits()
...
It expects maximum value to be 32767 but calculations in scale_vector()
which uses this function can give it ABS(-32768) which leads to wrong
result and thus clipping is needed.
2012-08-08 13:24:19 +02:00
Kostya Shishkov
f86b2f3661
g723_1: use all LPC vectors in formant postfilter
...
Due to some mistake LPC vector for the first subframe was used for all
subframes instead of their own LPC vectors.
2012-08-08 13:23:22 +02:00
Kostya Shishkov
8f2aa89a5d
mpc8: do not leave padding after last frame in buffer for the next decode call
2012-08-08 09:11:38 +02:00
Kostya Shishkov
d3e0766fc0
g723_1: scale output as supposed for the case with postfilter disabled
2012-08-03 07:07:07 +02:00
Kostya Shishkov
94bfdfd6f0
g723_1: increase excitation storage by 4
...
Fixed codebook mode in 5300 rate may write up to SUBFRAME_LEN + 4 and
that is considered normal by the reference decoder. Without that additional
padding it might overwrite first elements of LPC history.
2012-08-03 07:07:07 +02:00
Kostya Shishkov
802bcdcb2f
g723_1: fix upper bound parameter from inverse maximum autocorrelation
2012-08-03 07:07:07 +02:00
Kostya Shishkov
8ddadea171
g723_1: make scale_vector() behave like the reference
2012-08-03 07:07:07 +02:00
Kostya Shishkov
8772d2511a
g723_1: fix off-by-one error in normalize_bits()
2012-08-03 07:07:07 +02:00
Kostya Shishkov
7f92db14f9
g723_1: save/restore excitation with offset to store LPC history
...
The same buffer with saved data is used later in LPC reconstruction, so
it should have some head space for LPC history.
2012-08-03 07:07:06 +02:00
Kostya Shishkov
0cf7d849ff
tscc2: fix typo in array index
2012-07-27 07:34:38 +02:00
Kostya Shishkov
1470ce21ce
Bump libavcodec and libavformat minor versions for G.723.1 decoder and demuxer
2012-07-22 08:43:12 +02:00
Kostya Shishkov
4cfb0d871d
tscc2: do not add/subtract 128 bias during DCT
...
It turns out that the reference decoder subtracts 128 from DC during block
decode but adds it back during reordering block with zigzag pattern.
Transforming block with incorrect DC caused heavy visual artifacts for
many quantisers.
2012-07-18 07:05:59 +02:00
Kostya Shishkov
3c6c19184c
tscc2: fix typo in DCT
2012-07-18 07:05:53 +02:00
Kostya Shishkov
0b40153d20
tscc2: DCT output should not be clipped
...
This fixes decoding some TSCC2 files with large quantisers.
2012-07-17 07:21:24 +02:00
Kostya Shishkov
5b7e3a195d
MS Expression Encoder Screen decoder
2012-07-13 06:59:48 +02:00
Kostya Shishkov
781888da89
TechSmith Screen Codec 2 decoder
2012-07-11 07:29:05 +02:00
Kostya Shishkov
ed219ed366
mss1: fix decoding masked regions in interframes
...
Spotted by Alberto Delmás
2012-07-10 13:58:05 +02:00
Kostya Shishkov
5467742232
mss3: use standard zigzag table
2012-07-09 18:17:51 +02:00
Kostya Shishkov
acfb6b6cf8
mss3: split DSP functions that are used in MTS2(MSS4) into separate file
2012-07-09 18:17:51 +02:00
Kostya Shishkov
1f061da529
mss3: add forgotten 'static' qualifier for private table
2012-07-06 11:37:35 +02:00
Kostya Shishkov
edf35d8342
MS ATC Screen (aka MSS3) decoder
2012-07-02 07:14:44 +02:00
Kostya Shishkov
15358ade15
mss1: validate number of changeable palette entries
2012-06-27 18:05:58 +02:00
Kostya Shishkov
8f5d573a83
mss1: report palette changed when some additional colours were decoded
2012-06-27 18:05:58 +02:00
Kostya Shishkov
005c80b645
MS Screen 1 decoder
2012-06-20 19:08:10 +02:00
Kostya Shishkov
19be0f3ca6
iac: add missing dependency
2012-06-10 06:50:10 +02:00
Kostya Shishkov
cac4760bf4
iac: generate codec tables as they are supposed to be
...
Unlike its predecessor, Indeo Audio codec generates tables depending on
sampling rate. Previously decoder used pre-generated tables for 22050 Hz
which obviously doesn't work with other frequencies.
Many thanks to Maxim Poliakovsky for providing all needed information
for this.
2012-06-09 08:38:51 +02:00
Kostya Shishkov
e1a3fa5d3a
indeo4: handle frame type 1 properly
...
It turns out that this frame type is actually intra and should be used as
a reference for interframes too.
2012-06-09 08:38:31 +02:00
Kostya Shishkov
c6061443f7
Indeo Audio decoder
2012-06-05 18:30:54 +02:00
Kostya Shishkov
34271cabac
imc: make IMDCT support stereo output
...
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
2012-06-05 18:28:44 +02:00
Kostya Shishkov
c45e2da617
imc: move channel-specific data into separate context
...
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
2012-06-05 18:28:44 +02:00
Kostya Shishkov
b56825c40e
mpc8: fix maximum bands handling
...
In Musepack SV8 codec property tell the maximum nonzero band, but every
frame codes maximum band as a limit (i.e. strictly less than given value).
Synthesis also expects maximum nonzero band, so there's a need to convert
frame maximum band limit value.
2012-06-05 06:55:57 +02:00
Kostya Shishkov
96fadfb158
bmv: add stricter checks for invalid decoded length
...
This makes decoder handle random data passed as BMV frame data.
2012-06-03 15:26:11 +02:00
Kostya Shishkov
d073f122ea
imc: some cosmetics
2012-05-25 20:18:02 +02:00
Kostya Shishkov
f05b69a79f
fix typo in comment
2012-05-20 14:15:14 +02:00
Kostya Shishkov
cf61aaaca1
indeo: check for invalid motion vectors
2012-05-20 11:19:48 +02:00
Kostya Shishkov
9603738221
indeo: check that band output buffer exists
2012-05-20 11:19:48 +02:00
Kostya Shishkov
23ba1503f2
indeo: clear allocated band buffers
2012-05-20 11:19:48 +02:00
Kostya Shishkov
a6e4ac40a6
indeo: track tile macroblock size
2012-05-20 11:19:48 +02:00
Kostya Shishkov
fe7a37c36f
indeo: check custom Huffman tables for errors
2012-05-20 11:19:47 +02:00
Kostya Shishkov
aa372cf470
factor out common decoding code for Indeo 4 and Indeo 5
2012-05-20 11:19:30 +02:00
Kostya Shishkov
b37d945dd4
mp3: fix start band index for block type 2 in 8kHz audio
...
In hybrid frames long window part ends at 36 samples for most of the cases
but at 72 for 8kHz case. For some reason decoder assumed it's 48 or even 36
samples, which caused wrong bitstream decoding for such blocks.
l3_25207.mpg from conformance suite demonstrates it the best.
2012-05-20 10:53:21 +02:00
Kostya Shishkov
6de226a2b8
indeo3: validate new frame size before resetting decoder
2012-05-15 19:05:39 +02:00
Kostya Shishkov
bc00da2701
indeo3: when freeing buffers, set pointers referencing them to NULL as well
2012-05-15 19:05:39 +02:00
Kostya Shishkov
81064a8045
indeo3: initialise pixel planes on allocation
...
This prevents decoder from reading garbage from it in case of errors later.
2012-05-15 19:05:39 +02:00
Kostya Shishkov
fc417db3f1
indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
2012-05-15 19:05:39 +02:00
Kostya Shishkov
464e9ab011
lagarith: add YUY2 decoding support
...
Unlike other variants, for YUY2 we need to use different prediction:
* on line 0 for luma we should left predict starting from the second pixel
* on line 1 we should left predict first 4 pixels for luma and 2 for chroma
* median prediction employed here is taken directly from HuffYUV
2012-05-08 07:24:31 +02:00
Kostya Shishkov
fb5c1aaea6
dfa: use more meaningful return codes
2012-05-06 19:18:27 +02:00
Kostya Shishkov
a390aa0ea4
eatgv: check motion vectors
2012-05-06 19:17:32 +02:00
Kostya Shishkov
1fdb5649d9
lagarith: make offset array type unsigned
...
This is logical and also fixes checking for the fourth plane offset.
2012-05-06 09:32:08 +02:00
Kostya Shishkov
8099187e89
dfa: add some checks to ensure that decoder won't write past frame end
2012-05-06 09:31:52 +02:00
Kostya Shishkov
0e23b50821
wmall: fix reconstructing audio with uncoded channels
2012-05-02 18:46:11 +02:00
Kostya Shishkov
83632cbb11
proresenc: multithreaded quantiser search
2012-04-17 07:43:59 +02:00
Kostya Shishkov
a05c41acd1
mp3dec: perform I/S and M/S only when frame mode is joint stereo.
...
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
2012-03-29 19:08:05 +02:00
Kostya Shishkov
f704eb612b
id3v2: add another mimetype for JPEG image
2012-03-29 15:49:06 +02:00
Kostya Shishkov
72dadaa957
utvideo: mark output picture as keyframe.
...
Spotted by Антон.
2012-03-24 20:21:33 +01:00
Kostya Shishkov
494bce6224
ralf: read Huffman code lengths without GetBitContext
...
Those descriptions are stored in nibbles, so they are easy to extract.
And this way we don't need to pad tables for possible bit reader overreads.
2012-03-24 11:53:26 +01:00
Kostya Shishkov
87818103a0
wmall: output packet only if we have decoded some samples
...
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
2012-03-22 07:16:47 +01:00
Kostya Shishkov
1d10afd581
bink: fix typo in FFALIGN() argument
2012-03-20 18:57:51 +01:00
Kostya Shishkov
8ae28ac0f3
bink: align plane width to 8 when calculating bundle sizes
...
This fixes decoding of Bink files with non-multiple-of-16 width.
2012-03-20 16:33:57 +01:00
Kostya Shishkov
18ba94c6f9
fix space type in Changelog
2012-03-19 19:22:18 +01:00
Kostya Shishkov
b8560637d9
RealAudio Lossless decoder
2012-03-19 18:46:34 +01:00
Kostya Shishkov
bb39bd195a
zmbv: check decompress result
...
Changing flush type from Z_FINISH is needed since encoder compresses fixed
amount of data and doesn't care about writing end of stream marker.
2012-03-19 09:21:05 +01:00
Kostya Shishkov
afc2263bcc
zmbv: correct indentation
2012-03-19 09:20:39 +01:00
Kostya Shishkov
6acac061ab
prores: allow user to set fixed quantiser
2012-03-18 08:04:15 +01:00
Kostya Shishkov
681e726865
dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
2012-03-08 07:16:01 +01:00
Kostya Shishkov
4db4b53dc8
proresenc: give user a possibility to alter some encoding parameters
...
This allows user to select quantisation matrix from different profile,
stamp frames with custom vendor string and change target bitrate.
2012-03-04 07:35:00 +01:00
Kostya Shishkov
12b812d2e5
prores: store and retrieve extended colourspace information
...
Based on the patch by Phil Barrett.
2012-02-29 09:29:02 +01:00
Kostya Shishkov
235d693286
prores: handle 444 chroma in right order
...
ProRes codes chroma blocks in 444 mode in different order than luma blocks,
so make both decoder and encoder read/write chroma blocks in right order.
Reported by Phil Barrett
2012-02-29 09:28:34 +01:00
Kostya Shishkov
6d702dc072
proresenc: force bitrate not to exceed given limit
...
Apple ProRes Format Specifications mentions target data size for every frame,
so make sure frame meets it. This also allows encoder to demand much smaller
packet sizes for output.
2012-02-18 18:34:01 +01:00
Kostya Shishkov
5d9ad5425f
prores: initialise encoder and decoder parts only when needed
2012-02-17 14:11:48 +01:00
Kostya Shishkov
17b11ffec7
proresenc: initialise 'sign' variable
2012-02-16 06:48:24 +01:00
Kostya Shishkov
1a265f6187
prores encoder
2012-02-15 07:14:51 +01:00
Kostya Shishkov
8835c2c829
prores: move data shared between decoder and encoder to common file
2012-02-15 07:14:45 +01:00
Kostya Shishkov
3ec623c22f
prores: fix multithreaded decoding case when slice quantisers are not the same
...
Since quantisation matrices are stored in context, decoding slices with
different quantisers in parallel leads to unpredictable content of
aforementioned matrices and wrong output picture thereof.
2012-02-15 07:14:35 +01:00
Kostya Shishkov
e6e7bfc11e
wavpack: fix clipping for 32-bit lossy mode
...
Reference decoder clips data before shifting it to final range and also
forces 32-bit lossy mode to be actually 24-bit lossy mode in order to be
able to perform proper clipping.
2012-01-15 15:27:55 +01:00
Kostya Shishkov
08bab32cf1
indeo4: add some missing static and const qualifiers
...
From the patch by Reimar Döffinger.
2012-01-12 13:54:41 +01:00
Kostya Shishkov
490dcda6b6
utvideo: proper median prediction for interlaced videos
2012-01-03 17:08:49 +01:00
Kostya Shishkov
1fbd3d30ae
indeo4: remove two unused variables
2011-12-29 17:42:31 +01:00
Kostya Shishkov
adfe0c942e
Indeo 4 decoder
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com >
2011-12-28 15:22:18 +01:00
Kostya Shishkov and Anton Khirnov
19341c58e0
Dxtory capture format decoder
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-12-10 11:58:03 +01:00
Kostya Shishkov and Diego Biurrun
1469f943ad
indeo3: cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-11-28 10:01:49 +01:00
Kostya Shishkov and Ronald S. Bultje
498605b4ad
vc1: select interlaced scan table by FCM element
...
Interlaced videos can contain progressive frames too and now wrong scantable
is selected for them.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-11-26 18:14:07 -08:00
Kostya Shishkov and Martin Storsjö
ffc638c283
lagarith: add some RGBA decoding support
...
Signed-off-by: Martin Storsjö <martin@martin.st >
2011-11-16 10:49:51 +02:00
Kostya Shishkov and Martin Storsjö
f545e00677
BMV demuxer and decoder
...
Signed-off-by: Martin Storsjö <martin@martin.st >
2011-11-08 00:36:45 +02:00
Kostya Shishkov and Anton Khirnov
66760b30a3
cosmetics: insert some spaces in explicit enum value assignments
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-11-06 08:13:11 +01:00