You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mpegvideo_enc, motion_est: Pre-center fcode_tab
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -843,7 +843,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
|
||||
break;
|
||||
case AV_CODEC_ID_H263P:
|
||||
if(s->umvplus)
|
||||
s->fcode_tab= umv_fcode_tab;
|
||||
s->fcode_tab = umv_fcode_tab + MAX_MV;
|
||||
if(s->modified_quant){
|
||||
s->min_qcoeff= -2047;
|
||||
s->max_qcoeff= 2047;
|
||||
|
@ -1619,8 +1619,7 @@ int ff_get_best_fcode(MpegEncContext * s, const int16_t (*mv_table)[2], int type
|
||||
if(s->mb_type[xy] & type){
|
||||
int mx= mv_table[xy][0];
|
||||
int my= mv_table[xy][1];
|
||||
int fcode= FFMAX(fcode_tab[mx + MAX_MV],
|
||||
fcode_tab[my + MAX_MV]);
|
||||
int fcode = FFMAX(fcode_tab[mx], fcode_tab[my]);
|
||||
int j;
|
||||
|
||||
if (mx >= range || mx < -range ||
|
||||
|
@ -1157,7 +1157,7 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
|
||||
s->c_dc_scale_table = ff_mpeg12_dc_scale_table[s->intra_dc_precision];
|
||||
|
||||
s->me.mv_penalty = mv_penalty;
|
||||
s->fcode_tab = fcode_tab;
|
||||
s->fcode_tab = fcode_tab + MAX_MV;
|
||||
if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
|
||||
s->min_qcoeff = -255;
|
||||
s->max_qcoeff = 255;
|
||||
|
@ -1290,7 +1290,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
|
||||
ff_thread_once(&init_static_once, mpeg4_encode_init_static);
|
||||
|
||||
s->fcode_tab = fcode_tab;
|
||||
s->fcode_tab = fcode_tab + MAX_MV;
|
||||
s->min_qcoeff = -2048;
|
||||
s->max_qcoeff = 2047;
|
||||
s->intra_ac_vlc_length = uni_mpeg4_intra_rl_len;
|
||||
|
@ -286,7 +286,7 @@ static void mpv_encode_defaults(MpegEncContext *s)
|
||||
|
||||
ff_thread_once(&init_static_once, mpv_encode_init_static);
|
||||
|
||||
s->fcode_tab = default_fcode_tab;
|
||||
s->fcode_tab = default_fcode_tab + MAX_MV;
|
||||
|
||||
s->input_picture_number = 0;
|
||||
s->picture_in_gop_number = 0;
|
||||
|
Reference in New Issue
Block a user