Limin Wang
4b2863ff01
avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ff_mpv_common_init()
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Michael Niedermayer
f670c13f13
avcodec: Rename ff_mpv_decode_mb() to ff_mpv_reconstruct_mb
...
The new name more accuratly describes what the function does
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Alexandra Hájková
2d72219554
h261dec: Convert to the new bitstream reader
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
848e86f74d
mpegvideo: Drop flags and flags2
...
They are just duplicates of AVCodecContext members so use those instead.
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
61aca123fb
avcodec/h261dec: Fix exported MVs for skipped MBs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3bb465245f
h261dec: Fix context initialization sequence
...
ff_mpv_common_init sets s->context_initialized.
This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
Michael Niedermayer
4dee4a4470
avcodec/mpegvideo: Factor ff_mpv_decode_init() out
...
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
e8d0b84e8a
h261dec, ituh263dec: Move condition.
...
Stops compiler from doing incredibly stupid things.
With vsynth1-flv inner loop goes from 3501 to 3275
decicycles.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
36c0043344
h261dec, ituh263dec: ensure CLOSE_READER is done on error paths, too.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
2a00812d82
h261dec, ituh263dec: Avoid unnecessary -1 inside inner loop.
...
3646 -> 3597 decicycles in inner loop when decoding
vsynth1-flv.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
c0d32686dd
h261dec: Optimize new RL_VLC based decoding.
...
Together with the switch to RL_VLC this results in about
10% speedup for this inner loop.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
da0a670b3c
h261, h263 decoders: convert to RL_VLC.
...
Some additional optimizations in following patch.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Diego Biurrun
835f798c7d
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
10 years ago
Michael Niedermayer
6c1ee1a114
avcodec/h261dec: Fix context initialization sequence
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
John Stebbins
552bc42df4
h261dec: Fix order of initialization
...
ff_MPV_common_init requires the frame dimensions which get parsed in
h261_decode_picture_header.
10 years ago
John Stebbins
998c9f15d1
idct: remove call to ff_idctdsp_init from ff_MPV_common_init
...
One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
10 years ago
Diego Biurrun
7b9ef8d701
mpeg: Split error resilience bits off into a separate file
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
Michael Niedermayer
c05065aac0
avcodec/h261: move b_stride/b_xy under the if() where they are used
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4090d5baa8
avcodec/h261dec: fix motion vector vissualization
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Anton Khirnov
66499f34b5
mpegvideo: do not set current_picture_ptr in decoders
...
This code was originally added in
5f1948111a
to h263 to set decoded frame
pts to some random numbers (removed in
a1c5cc429d
) and then cargo culted to other
decoders.
The code is left in h263dec for now, since some part of the decoder
(apparently OBMC) relies on the specific previous frame to be reused.
11 years ago
Anton Khirnov
3b08631727
h26[13]dec: stop using deprecated avcodec_set_dimensions
11 years ago
Michael Niedermayer
711e981276
avcodec/h261dec: Use skip_1stop_8data_bits()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
719dbe86ea
avcodec/h261dec: make while get_bits loop more robust by checking bits left
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
a1c5cc429d
lavc: don't set AVFrame.pts to random numbers in decoders.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Luca Barbato
c59967fa7c
h261: check the mtype index
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Diego Biurrun
088f38a4f9
avcodec: Drop unnecessary ff_ name prefixes from static functions
12 years ago
Diego Biurrun
20429ba96e
h261: Move encoder/decoder shared table init to common code
12 years ago
Diego Biurrun
8a776ad90e
h261: Move shared data tables from a header to a proper C file
12 years ago
Diego Biurrun
52cd84d4d4
h261: Move mvmap table to the only place it is used
12 years ago
Diego Biurrun
0404ec619d
h261: cosmetics: Move functions to avoid forward declarations
12 years ago
Diego Biurrun
b78f81c803
h261: K&R formatting and prettyprinting cosmetics
12 years ago
Diego Biurrun
ae35d91d44
h261: Move ff_h261_rl_table_store declaration to header file
12 years ago
Michael Niedermayer
53fd4f5594
avcodec: fix motion vector vissualization
...
was broken by the buffer ref stuff
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
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Anton Khirnov
54974c6298
error_resilience: decouple ER from MpegEncContext
12 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
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
07732b4f09
h261dec: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 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