Andreas Rheinhardt
abf1a4f05c
avcodec/intrax8: Reduce the size of tables used to initialize VLCs
...
By switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() one
can replace an array of codes of type uint16_t with an array of symbols
of type uint8_t, saving space.
Also remove some more code duplication while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
d1a1f11712
avcodec/intrax8: Avoid code duplication when initializing VLCs
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
ba69ee8801
avcodec/intrax8: Remove VLC offsets table
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
b1af617f51
avcodec/intrax8: Make ff_intrax8_common_init() thread-safe
...
In particular, don't reinitialize VLCs every time an IntraX8Context is
initialized.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
Andreas Rheinhardt
802baf212d
avcodec/intrax8: Replace always-false check by assert
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
Michael Niedermayer
0a9ccc2514
avcodec/intrax8: Check for end of bitstream in ff_intrax8_decode_picture()
...
Fixes: Timeout (105sec -> 1sec)
Fixes: 20479/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5769846937878528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-26 18:23:16 +02:00
Clément Bœsch
b76dd6a678
Merge commit ' ee59f05408'
...
* commit 'ee59f05408 ':
intrax8: Have function signature match across declaration and definition
Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-30 10:03:59 +02:00
Clément Bœsch
6eb75e7d59
Merge commit ' 3281d823cd'
...
* commit '3281d823cd ':
intrax8: Change type of array stride parameters to ptrdiff_t
Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 15:13:36 +01:00
Diego Biurrun
ee59f05408
intrax8: Have function signature match across declaration and definition
...
libavcodec/intrax8.c(776) : warning C4028: formal parameter 1 different from declaration
2016-11-03 15:50:48 +01:00
Diego Biurrun
3281d823cd
intrax8: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
Also rename all such parameters to "stride" for consistency.
2016-09-29 14:48:03 +02:00
Carl Eugen Hoyos
db8e8c9731
lavc/intrax8: Use correct printf specifier for size_t on Windows.
2016-07-22 19:23:01 +02:00
Clément Bœsch
8ef57a0d61
Merge commit ' 41ed7ab45f'
...
* commit '41ed7ab45f ':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Derek Buitenhuis
e811ebcd9c
Merge commit ' ca8c759173'
...
* commit 'ca8c759173 ':
intrax8: Remove mpegvideo dependency
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:41:27 +01:00
Derek Buitenhuis
f2c7812839
Merge commit ' 6ebd06a9b2'
...
* commit '6ebd06a9b2 ':
intrax8: Drop lots of pointless parentheses
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:21 +01:00
Derek Buitenhuis
741960e2f3
Merge commit ' 9b57995cdd'
...
* commit '9b57995cdd ':
intrax8: Drop MB emulation code
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:05 +01:00
Derek Buitenhuis
f110c624b1
Merge commit ' 9fa888c028'
...
* commit '9fa888c028 ':
intrax8: Keep a reference to the decoder blocks
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:39:44 +01:00
Derek Buitenhuis
c59c792470
Merge commit ' c2084ffcbf'
...
* commit 'c2084ffcbf ':
intrax8: Use the generic horizband function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:37:32 +01:00
Derek Buitenhuis
123fef54cc
Merge commit ' b1268e0f03'
...
* commit 'b1268e0f03 ':
intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:36:54 +01:00
Derek Buitenhuis
578fb5a27d
Merge commit ' d0540fd021'
...
* commit 'd0540fd021 ':
intrax8: Pass macroblock size to ff_intrax8_common_init
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:35:20 +01:00
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Derek Buitenhuis
896fce8509
Merge commit ' 159323897f'
...
* commit '159323897f ':
intrax8: Add a local BlockDSPContext and initialize it
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:36:23 +01:00
Derek Buitenhuis
52692eed61
Merge commit ' 1eaae7abb8'
...
* commit '1eaae7abb8 ':
intrax8: Reference the current AVCodecContext
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:34:58 +01:00
Derek Buitenhuis
50fa5715bc
Merge commit ' 8072345e9f'
...
* commit '8072345e9f ':
intrax8: Keep a reference to the GetBitContext reader
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:34:16 +01:00
Derek Buitenhuis
93c61c980d
Merge commit ' 65f14128c4'
...
* commit '65f14128c4 ':
intrax8: Use a constant buffer instead of a ScratchpadContext
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:33:07 +01:00
Derek Buitenhuis
36dad14693
Merge commit ' eaeba6f241'
...
* commit 'eaeba6f241 ':
intrax8: Pass the output frame to the decoding function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:32:38 +01:00
Derek Buitenhuis
e5c655b098
Merge commit ' 577393321c'
...
* commit '577393321c ':
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:31:14 +01:00
Derek Buitenhuis
83e0b1b1d7
Merge commit ' 68127e1bf8'
...
* commit '68127e1bf8 ':
intrax8: Keep a reference to the context idctdsp
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:19:53 +01:00
Derek Buitenhuis
627115b3e4
Merge commit ' 65127450ad'
...
* commit '65127450ad ':
intrax8: Make x8_init_block_index not use mpegvideo fields
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:16:16 +01:00
Derek Buitenhuis
1a9ffc59d2
Merge commit ' 922b7e6d86'
...
* commit '922b7e6d86 ':
intrax8: Use local destination buffers
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:08:11 +01:00
Michael Niedermayer
76d0209db4
avcodec/intrax8: Remove duplicated chunk from ba5bcf9612
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-18 00:59:18 +02:00
Derek Buitenhuis
9d4799c247
Merge commit ' 8dead2aaca'
...
* commit '8dead2aaca ':
Move const qualifier before type name
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:35:03 +01:00
Derek Buitenhuis
f64b53f2bf
Merge commit ' 0372e73f91'
...
* commit '0372e73f91 ':
intrax8: Check and propagate errors from ff_intrax8_common_init
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:31:32 +01:00
Derek Buitenhuis
c29ac4abb8
Merge commit ' ad8aa8e6c6'
...
* commit 'ad8aa8e6c6 ':
intrax8: Move documentation from implementation to header file
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:30:01 +01:00
Derek Buitenhuis
ba5bcf9612
Merge commit ' 2ade1cdafb'
...
* commit '2ade1cdafb ':
intrax8: K&R formatting cosmetics
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:27:53 +01:00
Derek Buitenhuis
7120bff0a3
Merge commit ' 6f5ff559db'
...
* commit '6f5ff559db ':
intrax8: Adjust printf conversion specifier for sizeof expression
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:13:30 +01:00
Derek Buitenhuis
2c3e38f44f
Merge commit ' 42244ce07a'
...
* commit '42244ce07a ':
intrax8: Move a comment to the place it corresponds
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:11:43 +01:00
Derek Buitenhuis
e445b80c74
Merge commit ' 750562549c'
...
* commit '750562549c ':
intrax8: Wrap multiline macros in do{}while(0) clauses
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:11:17 +01:00
Derek Buitenhuis
909f5e7100
Merge commit ' 0c6a70873f'
...
* commit '0c6a70873f ':
intrax8: Move error resilience out of intrax8
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:09:12 +01:00
Vittorio Giovara
ca8c759173
intrax8: Remove mpegvideo dependency
2016-03-29 13:41:09 +02:00
Diego Biurrun
6ebd06a9b2
intrax8: Drop lots of pointless parentheses
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-29 13:41:09 +02:00
Vittorio Giovara
9b57995cdd
intrax8: Drop MB emulation code
...
This is already performed in init_context_frame().
2016-03-29 13:41:09 +02:00
Vittorio Giovara
9fa888c028
intrax8: Keep a reference to the decoder blocks
2016-03-29 13:41:09 +02:00
Vittorio Giovara
c2084ffcbf
intrax8: Use the generic horizband function
...
This is assuming that intrax8 has no support for interlacing
Carry over lowdelay value in ff_intrax8_decode_picture.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
b1268e0f03
intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture
...
These values need to be updated with the last macroblock position,
so keep them as pointers.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
d0540fd021
intrax8: Pass macroblock size to ff_intrax8_common_init
...
Helps in decoupling this code from mpegvideo.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
159323897f
intrax8: Add a local BlockDSPContext and initialize it
...
Helps in decoupling this code from mpegvideo.
2016-03-25 15:55:49 -04:00
Vittorio Giovara
1eaae7abb8
intrax8: Reference the current AVCodecContext
...
It will be needed to initialize BlockDSP in the next commit.
2016-03-25 15:55:02 -04:00
Vittorio Giovara
8072345e9f
intrax8: Keep a reference to the GetBitContext reader
...
Helps in decoupling this code from mpegvideo.
2016-03-25 15:54:29 -04:00
Vittorio Giovara
65f14128c4
intrax8: Use a constant buffer instead of a ScratchpadContext
...
The size of the block is fixed (8x8 plus padding).
2016-03-25 15:54:06 -04:00
Vittorio Giovara
eaeba6f241
intrax8: Pass the output frame to the decoding function
...
Helps in decoupling this code from mpegvideo.
2016-03-25 15:53:02 -04:00