Andreas Rheinhardt
d99707b42a
avcodec/mpeg4video: Make initializing RLTable thread-safe
...
Up until now the RLTable ff_mpeg4_rl_intra was initialized by both mpeg4
decoder and encoder (except the VLCs that are only used by the decoder).
This is an obstacle to making these codecs init-threadsafe, so move
initializing this to a single function that is guarded by a dedicated
AVOnce.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
f1ba4d479e
avcodec/mpeg4videodec: Make studio VLCs static
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
3aa81a634a
avcodec/mpeg4video: Make tables used to initialize VLCs smaller
...
Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths()
allows to replace codes which are so long that they need to be stored
in an uint16_t by symbols which fit into an uint8_t; and even these can
be avoided in case of the sprite trajectory VLC.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
3f086a2f66
avcodec/mpeg4videodec: Fix nonsense warning
...
Since db77230894
parsing of
mpeg4-extradata lead to a "Failed to parse extradata" warning, because
ff_mpeg4_decode_picture_header returns AVERROR_INVALIDDATA in case that
no VOP was found. This patch adds a parameter to signify whether a
header (where the absence of a VOP does not raise an error) or not is
parsed. The first mode is of course used for parsing headers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
ba97d75ac6
avcodec/mpeg4video: Detect reference studio streams as studio streams
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Kieran Kunhya
f9d3841ae6
mpeg4video: Add support for MPEG-4 Simple Studio Profile.
...
This is a profile supporting > 8-bit video and has a higher quality DCT
7 years ago
Michael Niedermayer
db77230894
avcodec/mpeg4videodec: Use more specific error codes
...
Forward error codes where possible.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
4b2a186ef0
avcodec/mpeg4videodec: Add support for parsing and exporting video_range
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
29c2d06d67
cosmetics: Drop empty comment lines
9 years ago
Michael Niedermayer
7c97946d61
avcodec/mpeg4video: Check time_incr
...
Fixes assertion failure
Fixes out of memory access
Fixes: test_casex.ivf
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
39de31ccb6
avcodec/mpeg4video: Reorder operations to reduce accesses to err_recognition
...
About 9 cpu cycle faster mpeg4_decode_mb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
9c1db92ad3
mpegvideo: Drop err_recognition
...
It is just a duplicate of an AVCodecContext member so use it instead.
10 years ago
Andreas Cadhalpun
f62880bfb8
mpeg4: use a self-explanatory #define MAX_NVOP_SIZE
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nidhi Makhijani
93f29948e4
mpeg4video: Fix doxygen comment syntax to document correct struct member
...
Also fix some comment typos.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Nidhi Makhijani
ccbf370f20
mpegvideo: move vol_control_parameters to the only place it is used
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
6faf426470
avcodec/mpeg4video: fix 2 more incorrectly associated comments
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
ff7ffe4809
mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
f7d228676c
mpeg4videodec: move intra_dc_threshold from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
e41ff4210a
mpeg4videodec: move use_intra_dc_vlc from MpegEncContext to Mpeg4DecContext
11 years ago
Michael Niedermayer
a235af93bd
avcodec/mpeg4video: fix doxycomments so they are not associated with random unrelated fields
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6c9b82b6a0
avcodec/mpeg4videodec: move bug workaround code into seperate function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
e026ee0446
mpeg4videodec: move sprite_{shift,traj} from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
513d849bb6
mpeg4videodec: move num_sprite_warping_points from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
9ba3fc3e3d
mpeg4videodec: move sprite_brightness_change from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
58c120a929
mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
6e81597d5a
mpeg4videodec: move enhancement_type from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
3b1c0f686d
mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
b1aacd5668
mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
0388907400
mpeg4videodec: move cplx_estimation_* fields from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
43af264de8
mpeg4videodec: move mpeg4-specific bug workaround variables from MpegEncContext to Mpeg4DecContext
11 years ago
Anton Khirnov
e2ceb17642
mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec
11 years ago
Anton Khirnov
48e1394095
mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext.
11 years ago
Anton Khirnov
bc5abfb19e
mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext
11 years ago
Anton Khirnov
1a89025793
mpeg4videodec: move MpegEncContext.vol_sprite_usage to Mpeg4DecContext
11 years ago
Anton Khirnov
e62a43f6b1
mpeg4videodec: move MpegEncContext.time_increment_bits to Mpeg4DecContext
...
The field remains in MpegEncContext for use in the encoder.
11 years ago
Anton Khirnov
ee8af2dd99
mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext
11 years ago
Anton Khirnov
35e0833d41
mpeg4videodec: add a mpeg4-specific private context.
11 years ago
Vittorio Giovara
dc6ea00cd2
mpeg4video: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
c591d4575a
avcodec: Replace local extern declarations for tables with header #includes
11 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Michael Niedermayer
84281d111c
ff_mpeg4videodec_static_init: fix return type
...
Fixes CID743439
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1bd024ec77
mpeg4videodec: split static decoder table init out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
6f13a371ec
mpeg4: Add ff_ prefixes to nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
c9cab022a3
mpeg4dec: restore error concealment functionality after merge
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
58c42af722
doxygen: misc consistency, spelling and wording fixes
13 years ago
Dustin Brody
5b22d6e132
lavc: convert error_recognition to err_recognition.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Diego Biurrun
153382e1b6
multiple inclusion guard cleanup
...
Add missing multiple inclusion guards; clean up #endif comments;
add missing library prefixes; keep guard names consistent.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
6a495e986f
Make inter_rvlc and intra_rvlc static tables.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 84ae8936f6
)
14 years ago