Michael Niedermayer
1c7b71a5bd
mpegvideo: Use the current_picture pts
...
The picture slot can be recycled by select_input_picture and
only current_picture is populated with the valid pts.
Unbreak timestamps when in cbr mode.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
66e959682c
avcodec/mpegvideo_enc: override bitrate tolerance when its value is too small
...
Fixes Ticket3257
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
849d40dce6
avcodec/mpegvideo_enc: change some asserts to av_asserts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
e92a78a409
avcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit
...
This avoids a hypothetical integer overflow with very high resolution video
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
Michael Niedermayer
06a3185e38
avcodec/mpegvideo_enc: dont use direct mode for unaligned input
...
Fixes Ticket3456
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
05563ccacc
dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names
...
Also switch from "tbl" to "tab" name suffixes.
11 years ago
Diego Biurrun
9103185bd1
dsputil: Drop ff_check_alignment() function
...
The function is supposed to confirm that the compiler provided enough
alignment, but in practice it is only run in certain code paths and
insufficient alignment problems are restricted to legacy compilers.
11 years ago
Michael Niedermayer
cbcfd7da4d
avcodec: support setting the chroma intra matrix
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Lukasz Marek
3f47e24cbe
lavc/mpegvideo: add missing const
...
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
fb0c9d41d6
avutil: remove timer.h include from internal.h
...
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
11 years ago
Martin Storsjö
cff480e49d
mpegvideo_enc: Don't call ff_h263dsp_init unconditionally
...
This fixes builds with e.g. --disable-decoders --disable-encoders
--enable-encoder=mjpeg.
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Michael Niedermayer
d08dd32863
avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0
...
We currently read a whole 16x16 block from the input at a few places
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0117ba5594
avcodec/mpegvideo_enc: fix custom matrixes with jpeg
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3ca7085ae2
avcodec: make "bitrate tolerance too small for bitrate" error more verbose
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b8ff951ce0
avcodec/mpegvideo_enc: init chroma matrix for mjpeg
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
859d74040e
avcodec/mjpegenc: pass chroma quantization matrix through as well, not just luma
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
ebfe622bb1
mpegvideo: drop support for real (non-emulated) edges
...
Several decoders disable those anyway and they are not measurably faster
on x86. They might be somewhat faster on other platforms due to missing
emu edge SIMD, but the gain is not large enough (and those decoders
relevant enough) to justify the added complexity.
11 years ago
Anton Khirnov
aec25b1c46
mpegvideo: split the encoding-only parts of frame_start() into a separate function
...
This introduces some code duplication. However, much of it should go
away once the decoders stop using MpegEncContext.
11 years ago
Michael Niedermayer
46b06bd894
avcodec/mpegvideo_enc: implement frame skip score normalization
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
34fe125f4b
avcodec/mpegvideo_enc: fix frame skipping with intra only codecs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
241eccd628
avcodec/mpegvideo_enc: fix integer overflow with -skip_exp >= 2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
535af2c222
avcodec/mpegvideo_enc/frame_end(): remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b6e7834ac6
avcodec/mpegvideo_enc: fix linesizes in frame_end()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
24abd806ea
ljpegenc: deMpegEncContextize
...
The encoder uses almost none of the mpegvideo infrastructure, only some
fields from MpegEncContext.
The FATE results change because now an all-zero quant matrix is written
into the file. Since it is not used for anything for ljpeg, this should
not be a problem.
11 years ago
Anton Khirnov
3360ad9955
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()
...
This will allow deMpegEncContextizing the LJPEG encoder.
11 years ago
Anton Khirnov
058d5f2feb
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()
...
This will allow deMpegEncContextizing the LJPEG encoder.
11 years ago
Anton Khirnov
0b0a7a751d
mpegvideo: move encode-only parts of common_end() to encode_end()
11 years ago
Anton Khirnov
381a722562
mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function
11 years ago
Anton Khirnov
1f8eb69079
mpegvideo: move encoding-only initialization from common_init() to encode_init()
11 years ago
Anton Khirnov
bedf952bb8
mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults()
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Michael Niedermayer
331a90cec4
avcodec/h261: trellis quantization support
...
Fixes ticket3143
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
1c01b0253e
mpegvideo_enc: use the AVFrame API properly.
11 years ago
Ronald S. Bultje
458446acfa
lavc: Edge emulation with dst/src linesize
...
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Michael Niedermayer
2925571278
avcodec/mpegvideo_enc: Fix possibly exploitable security issue with -bf
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
aa24122989
lavc: deprecate FF_MAX_B_FRAMES
...
We should not arbitrarily decide the maximum B-frame number for all
encoders supported by Libav, each encoder should be able to set its own
limits.
11 years ago
Anton Khirnov
8941971a8f
lavc: make error_rate a private option of mpegvideo encoders
11 years ago
Diego Biurrun
0338c39698
dsputil: Split off H.263 bits into their own H263DSPContext
11 years ago
Michael Niedermayer
6e87dfb589
mpegvideo: reduce whitespace differences to libav
...
This excludes many changes that worsen readability
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
d4ac3e5934
lavc/mpegvideo_enc: fix typo
11 years ago
Michael Niedermayer
ce55e667fa
avcodec/mpegvideo_enc: check that max_b_frames is not negative
...
Fixes crash found by saste
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ronald S. Bultje
93f305473f
lavc: Convert some remaining strides to ptrdiff_t
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Ronald S. Bultje
face578d56
Rewrite emu_edge functions to have separate src/dst_stride arguments.
...
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Ronald S. Bultje
c341f734e5
Convert multiplier for MV from int to ptrdiff_t.
...
This prevents emulated_edge_mc from not undoing mvy*stride-related
integer overflows.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bb4b041df3
avcodec/mpegvideo_enc: check qmin/qmax
...
Fixes Ticket2990
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
22c879057e
mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Stefano Sabatini
7eb6eb03d8
lavc/mpegvideo_enc: simplify timestamp checks in load_input_picture()
...
Also improve error feedback while at it.
12 years ago