Diego Biurrun
3b50dbc51f
ratecontrol: Use correct function pointer casts instead of void*
...
libavcodec/ratecontrol.c:120:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
libavcodec/ratecontrol.c:121:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
8 years ago
Vittorio Giovara
a1f6a2dfda
ratecontrol: Reorder functions to avoid forward declarations
8 years ago
Vittorio Giovara
d639dcdae0
ratecontrol: Move Xvid-related functions to the place they are actually used
...
This will simplify the de-MpegEncContextualization.
8 years ago
Vittorio Giovara
44972e227d
ratecontrol: Move mpegenc-only function where it is used
8 years ago
Vittorio Giovara
b4bb959383
ratecontrol: Drop commented out cruft
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Clément Bœsch
60532348d2
avcodec/mpegvideo: use constants for rc_strategy
9 years ago
Ganesh Ajjanagadde
f1726ad1b0
avcodec/ratecontrol: use predefined M_E
...
M_E is defined in math.h, or in avutil/mathematics.h for compatibility
hacks. This uses this value instead of an ad-hoc define.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Michael Niedermayer
d9b56895b5
avcodec/mpegvideo: change bit_rate to 64bit
...
32bit is not sufficient for all cases
Fixes: signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
1761ab838c
lavc: Deprecate avctx.rc_strategy
...
Only used by libxvid in ratecontrol module, so move it to a codec
private option.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
42df71d9bb
ratecontrol: Check memory allocation
10 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
be2ebc723d
avcodec/ratecontrol: replace asserts by av_asserts
...
Also remove the now unneeded #include <assert.h>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0898a6d4e4
avcodec/ratecontrol: Check for av_malloc*() failures
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
530c1441fd
lavc: make lmax/lmin into private options of mpegvideo encoders
10 years ago
Anton Khirnov
15ec053c4c
lavc: make border_masking into private options of mpegvideo encoders
10 years ago
Anton Khirnov
66a68ddd1a
lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders
10 years ago
Anton Khirnov
a75c2eb25a
lavc: make rc_eq into private options of mpegvideo encoders
10 years ago
Anton Khirnov
946f95354b
lavc: make rc_qmod_* into private options of mpegvideo encoders
10 years ago
Anton Khirnov
a6e4ce9fd5
lavc: make rc_qsquish a private option of mpegvideo encoders
10 years ago
Michael Niedermayer
1af563b5df
avcodec/ratecontrol: remove unneeded statement
...
Found-by: CSA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
b2c31710c9
lavc: move CODEC_FLAG_NORMALIZE_AQP to mpegvideo
11 years ago
Michael Niedermayer
1fd5c7f1ee
avcodec/ratecontrol: use av_malloc_array()
...
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
b4356c9cc2
avcodec/ratecontrol: make (mc_)mb_var_sum(_last) 64bit
...
This avoids hypothetical integer overflows
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
d8fb170da2
avcodec/ratecontrol: give some trivial tips in case of buffer underflows
...
See Ticket2725
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f099cdaba3
avcodec/ratecontrol: silence "warning: expected_bits may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Diego Biurrun
76b19a3984
Fix a number of incorrect intmath.h #includes.
12 years ago
Luca Barbato
f61272f0ef
ratecontrol: K&R cosmetic formatting
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
12 years ago
Michael Niedermayer
f1470ca685
ratecontrol: Fix assertion failure on mismatching 2pass file.
...
Fixes Ticket582
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
391f323615
rc: fix 10l typo in rc_max_available_vbv_use calculation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
9c6cf7f2c9
avcodec: Drop silly and/or broken printf debug output
12 years ago
Michael Niedermayer
0ea65bbeee
ratecontrol: change a commented printf to av_log
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
50dba71b7d
ratecontrol: fix get_fps() argument
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ce7876cbf4
ratecontrol: Dynamically choose a default for rc_max_available_vbv_use
...
This improves handling of small buffer sizes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a990a30883
ratecontrol: correct predictor in case of stuffing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Ronald S. Bultje
89b81a1c88
mpegvideo: remove VLAs
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
4cc2920dd2
flvdec: remove incomplete, disabled seeking code
13 years ago
Michael Niedermayer
e8c63981e5
ratecontrol: Use ticks_per_frame to calculate fps.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9e34adfc02
RC: Fix initial buffer occupancy.
...
Fixes Ticket880
Regression since bf174a70cd
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9aeaf62903
Fix all GNU %Ld
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago