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>
4 years ago
Andreas Rheinhardt
d1a1f11712
avcodec/intrax8: Avoid code duplication when initializing VLCs
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
ba69ee8801
avcodec/intrax8: Remove VLC offsets table
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
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>
4 years ago
Andreas Rheinhardt
802baf212d
avcodec/intrax8: Replace always-false check by assert
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
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>
5 years ago
Diego Biurrun
dcc39ee10e
lavc: Remove deprecated XvMC support hacks
...
Deprecated in 11/2013.
8 years ago
Diego Biurrun
ee59f05408
intrax8: Have function signature match across declaration and definition
...
libavcodec/intrax8.c(776) : warning C4028: formal parameter 1 different from declaration
8 years ago
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.
8 years ago
Carl Eugen Hoyos
db8e8c9731
lavc/intrax8: Use correct printf specifier for size_t on Windows.
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Michael Niedermayer
76d0209db4
avcodec/intrax8: Remove duplicated chunk from ba5bcf9612
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
ca8c759173
intrax8: Remove mpegvideo dependency
9 years ago
Diego Biurrun
6ebd06a9b2
intrax8: Drop lots of pointless parentheses
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
9b57995cdd
intrax8: Drop MB emulation code
...
This is already performed in init_context_frame().
9 years ago
Vittorio Giovara
9fa888c028
intrax8: Keep a reference to the decoder blocks
9 years ago
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.
9 years ago
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.
9 years ago
Vittorio Giovara
d0540fd021
intrax8: Pass macroblock size to ff_intrax8_common_init
...
Helps in decoupling this code from mpegvideo.
9 years ago
Vittorio Giovara
159323897f
intrax8: Add a local BlockDSPContext and initialize it
...
Helps in decoupling this code from mpegvideo.
9 years ago
Vittorio Giovara
1eaae7abb8
intrax8: Reference the current AVCodecContext
...
It will be needed to initialize BlockDSP in the next commit.
9 years ago
Vittorio Giovara
8072345e9f
intrax8: Keep a reference to the GetBitContext reader
...
Helps in decoupling this code from mpegvideo.
9 years ago
Vittorio Giovara
65f14128c4
intrax8: Use a constant buffer instead of a ScratchpadContext
...
The size of the block is fixed (8x8 plus padding).
9 years ago
Vittorio Giovara
eaeba6f241
intrax8: Pass the output frame to the decoding function
...
Helps in decoupling this code from mpegvideo.
9 years ago
Vittorio Giovara
577393321c
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
...
Helps in decoupling this code from mpegvideo.
9 years ago
Vittorio Giovara
68127e1bf8
intrax8: Keep a reference to the context idctdsp
...
Use it instead of the embedded mpegvideo one. Update init function
signature to load it directly from the callers.
9 years ago
Vittorio Giovara
65127450ad
intrax8: Make x8_init_block_index not use mpegvideo fields
9 years ago
Vittorio Giovara
922b7e6d86
intrax8: Use local destination buffers
...
These buffers are just a way to store frame pointers and be able to
modify them without touching the original ones.
The two dependent decoders (WMV2 and VC1) do not need special care for
these fields: the former does not seem to use the dest buffers, while
the latter reinits them every time to the current frame data buffers.
So only keep a local copy rather than the one from mpegvideo.
9 years ago
Diego Biurrun
8dead2aaca
Move const qualifier before type name
9 years ago
Vittorio Giovara
0372e73f91
intrax8: Check and propagate errors from ff_intrax8_common_init
...
This allows dropping an afterwards redundant assert.
9 years ago
Vittorio Giovara
ad8aa8e6c6
intrax8: Move documentation from implementation to header file
9 years ago
Vittorio Giovara
2ade1cdafb
intrax8: K&R formatting cosmetics
9 years ago
Diego Biurrun
6f5ff559db
intrax8: Adjust printf conversion specifier for sizeof expression
9 years ago
Vittorio Giovara
42244ce07a
intrax8: Move a comment to the place it corresponds
9 years ago
Vittorio Giovara
750562549c
intrax8: Wrap multiline macros in do{}while(0) clauses
...
These macros are treated like functions, the wrapping simplifies error
checking and avoids deeply nested ifs in the following commit.
9 years ago
Vittorio Giovara
0c6a70873f
intrax8: Move error resilience out of intrax8
...
The intrax8 decoding process does not imply any kind of error
resilience, and the only call present is more related to how mpegvideo
works rather than anything else.
Therefore have the parent decoders carry out er when actually needed.
9 years ago
Vittorio Giovara
da0c8664b4
mpegvideo: Move various temporary buffers to a separate context
10 years ago
Diego Biurrun
835f798c7d
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
10 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Diego Biurrun
e74433a8e6
dsputil: Split clear_block*/fill_block* off into a separate context
11 years ago
wm4
f6774f905f
mpegvideo: operate with pointers to AVFrames instead of whole structs
...
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().
ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.
NULL pointer checks are added to ff_thread_release_buffer() stub function.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Diego Biurrun
c591d4575a
avcodec: Replace local extern declarations for tables with header #includes
11 years ago
Michael Niedermayer
9a0aa8d02a
avcodec/intrax8: fix regression with wmv3
...
This also decreases dependancies between intrax8 and the outside
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
5f401b7b71
Add missing error_resilience includes to files that use ER
12 years ago
Anton Khirnov
1d0feb5d1a
mpegvideo: split ff_draw_horiz_band().
...
Split out dependency on MpegEncContext.
12 years ago
Anton Khirnov
54974c6298
error_resilience: decouple ER from MpegEncContext
12 years ago
Mans Rullgard
15616eb042
intrax8: move functions from dsputil to own context
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
aee675a326
intrax8: asserts cleanup
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5e50a5724b
Revert "removing lowres support"
...
There have been multiple user complaints about loosing this feature
while its not clear the 3% speedloss claims where real or fabricated.
My own testing indicates no statistically significant speed difference
both with mpeg2 and mpeg4, and if at all the code with lowres support
is a tiny bit faster than without.
This reverts commit 92ef4be4ab
, reversing
changes made to 2e07f42957
.
Conflicts:
cmdutils.c
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavutil/arm/Makefile
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago