diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-31 01:03:04 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-13 19:49:29 +0100 |
commit | 8b856a9e535de06df96588fb566b8d629e128580 (patch) | |
tree | f6c36863df426c0df98ace61badbf03c96cdc96c | |
parent | 32ce3b71688aa797d9795e7aa0427df02a0da189 (diff) | |
download | ffmpeg-8b856a9e535de06df96588fb566b8d629e128580.tar.gz |
avcodec/motion_est: Constify mv-table parameters where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/motion_est.c | 2 | ||||
-rw-r--r-- | libavcodec/motion_est.h | 6 | ||||
-rw-r--r-- | libavcodec/motion_est_template.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index a191fd06ba..87f197ce8d 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1594,7 +1594,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, } /* find best f_code for ME which do unlimited searches */ -int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type) +int ff_get_best_fcode(MpegEncContext * s, const int16_t (*mv_table)[2], int type) { if (s->motion_est != FF_ME_ZERO) { int score[8]; diff --git a/libavcodec/motion_est.h b/libavcodec/motion_est.h index 5742e51486..d0950bf7e6 100644 --- a/libavcodec/motion_est.h +++ b/libavcodec/motion_est.h @@ -118,14 +118,14 @@ int ff_pre_estimate_p_frame_motion(struct MpegEncContext *s, int ff_epzs_motion_search(struct MpegEncContext *s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, - int16_t (*last_mv)[2], int ref_mv_scale, int size, - int h); + const int16_t (*last_mv)[2], int ref_mv_scale, + int size, int h); int ff_get_mb_score(struct MpegEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate); int ff_get_best_fcode(struct MpegEncContext *s, - int16_t (*mv_table)[2], int type); + const int16_t (*mv_table)[2], int type); void ff_fix_long_p_mvs(struct MpegEncContext *s, int type); void ff_fix_long_mvs(struct MpegEncContext *s, uint8_t *field_select_table, diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 6ab0ea13dc..f3e94b7ebb 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -858,7 +858,7 @@ static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dm optimal mv. */ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr, - int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], + int P[10][2], int src_index, int ref_index, const int16_t (*last_mv)[2], int ref_mv_scale, int flags, int size, int h) { MotionEstContext * const c= &s->me; @@ -976,7 +976,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int //this function is dedicated to the brain damaged gcc int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, - int16_t (*last_mv)[2], int ref_mv_scale, + const int16_t (*last_mv)[2], int ref_mv_scale, int size, int h) { MotionEstContext * const c= &s->me; @@ -992,7 +992,7 @@ int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr, static int epzs_motion_search2(MpegEncContext * s, int *mx_ptr, int *my_ptr, int P[10][2], - int src_index, int ref_index, int16_t (*last_mv)[2], + int src_index, int ref_index, const int16_t (*last_mv)[2], int ref_mv_scale, const int size) { MotionEstContext * const c= &s->me; |