Stanislav Dolganov
4edd74bd7c
avcodec/me_cmp: add median SAD compare function
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 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
5b4da8a38a
avcodec/motion_est: Fix mv_penalty table size
...
Fixes out of array read
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
b4f1636a4d
lavc: typo fix cliping -> clipping, saftey -> safety
...
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
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
4b6b1082a7
lavc: Deprecate avctx.me_method
...
This option is extremely codec specific and only a few codecs employ it.
Move it to codec private options instead: mpegenc family supports only 3
values, xavs and x264 use 5, and xvid has a different metric entirely.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
ac78014f0b
avcodec/motion_est: Fix some undefined shifts
...
Fixes: asan_heap-oob_1dd60fd_1049_cov_4200102444_P4250048.MOV
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4eee685a21
avcodec/motion_est: Fix undefined shifts in cmp_inline()
...
Fixes: signal_sigsegv_35eac16_2762_cov_2704249783_missing_frames.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
149fa0b7ac
mpegvideo: Move MotionEstContext and function declarations to a separate header
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
0251c9be5a
motion_est: Fix warning from zero_cmp() assignment
...
warning: incompatible
pointer types assigning to 'me_cmp_func' (aka 'int (*)(struct
MpegEncContext *, uint8_t *, uint8_t *, ptrdiff_t, int)') from 'int
(MpegEncContext *, uint8_t *, uint8_t *, int, int)'
[-Wincompatible-pointer-types]
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Paul B Mahol
021c0c5f52
avcodec/motion_est: remove unneeded #include, there are no assert() only av_assert*
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Michael Niedermayer
b80106169a
avcodec/motion_est: Set subcmp consistently for H261
...
Fixes Ticket3150
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b50e003e1c
avcodec/motion_est: use 2x8x8 for interlaced qpel
...
Fixes out of array read
Fixes Ticket4121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
240b22afe1
motion_est: remove dead code
...
mb_type is initialized to 0 and never updated before the check.
Bug-Id: CID 1238782
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Diego Biurrun
4fbb62a21b
mpegvideo: Move ME_MAP_* defines to the only place they are used
10 years ago
Diego Biurrun
2d60444331
dsputil: Split motion estimation compare bits off into their own context
10 years ago
Diego Biurrun
c166148409
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
11 years ago
Michael Niedermayer
ef8725122d
avcodec/motion_est: Only clip MVs which are used
...
Fixes valgrind mpeg4 failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
368f50359e
dsputil: Split off quarterpel bits into their own context
11 years ago
Anton Khirnov
a2941c8cb2
lavc: move CODEC_FLAG_MV0 to mpegvideo
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
82bb304801
dsputil: Use correct type in me_cmp_func function pointer
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Lukasz Marek
776cda748d
lavc/motion_est: remove unused variable
...
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
088f38a4f9
avcodec: Drop unnecessary ff_ name prefixes from static functions
12 years ago
Ronald S. Bultje
f4fed5a2f9
mpegvideo: Use hpeldsp instead of dsputil for half-pel functions
...
This also converts vc1, since that is mpegvideo-based.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Ronald S. Bultje
4ba5dbc0e4
mpegvideo: use hpeldsp instead of dsputil for half-pel functions.
...
This also converts vc1, since that is mpegvideo-based.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Anton Khirnov
6e7b50b427
mpegvideo_enc: drop support for reusing the input motion vectors.
...
This misfeature is most likely completely useless and conflicts with
removing the mpegvideo-specific fields from AVFrame. In the improbable
case it is actually useful, it should be reimplemented in a better way.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Diego Biurrun
b5b7b75e91
dsputil: Move get_penalty_factor() to the only place it is used.
12 years ago
Diego Biurrun
25841dfe80
Use ptrdiff_t instead of int for {avg, put}_pixels line_size parameter.
...
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.
12 years ago
Anton Khirnov
47318953dd
mpegvideo: remove some unused variables from Picture.
12 years ago
Michael Niedermayer
bbe56bcd6b
motion_est: Limit motion vector search range to MAX_MV
...
Fixes out of array reads with videos exceeding MAX_MV
Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
a0c5917f86
Drop Snow codec
...
Snow is a toy codec with no real-world use and horrible code.
12 years ago
Michael Niedermayer
8328df74f3
motion_est: use av_assert* instead of assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3a48e38ad0
motion_est: more complete SAB diamond size check
...
This makes no difference with the current #defines
Fixes CID732255
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
9734b8ba56
Move avutil tables only used in libavcodec to libavcodec.
12 years ago
Michael Niedermayer
d07940b76d
motion_est: switch asserts to av_asserts
...
note, the asserts where enabled by default before this
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
Mans Rullgard
a34a609fc1
motion_est: fix use of inline on extern functions
...
Inline functions declared without extern do not provide an external
definition in standard C99. This code only works because most
compilers do not implement the inline semantics correctly. With a
stricter compiler, linking fails with unresolved references to these
functions.
Declaring the functions extern inline works correctly with some
compilers while some others still fail to create external definitions.
For maximum portability, create a static inline version with an
externally visible wrapper for ff_get_mb_score. ff_epzs_motion_search
is so large that no sane compiler inlines it anyway, so there the
inline keyword can simply be dropped with no effect.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
717a1876d8
motion_est: switch some asserts to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
0db9eba48c
motion_est: drop inline from sad_hpel_motion_search()
...
This function is only ever called through a function pointer,
so marking it inline makes no sense.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
5bf7bc625b
motion_est: remove unused macros
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
74f82f92a4
motion_est: remove useless no_motion_search() function
...
At both places this function is called, mb_[xy] == s->mb_[xy]
making the call together with following code equivalent to
simply assigning zeros.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago