Revision 39a64e30

View differences:

libavcodec/avcodec.h
1989 1989
     * - decoding: unused
1990 1990
     */
1991 1991
    int cutoff;
1992

  
1993
    /**
1994
     * multiplied by qscale for each frame and added to scene_change_score
1995
     * - encoding: set by user.
1996
     * - decoding: unused
1997
     */
1998
    int scenechange_factor;
1992 1999
} AVCodecContext;
1993 2000

  
1994 2001
/**
libavcodec/motion_est.c
1179 1179
            if (vard <= 64<<8 || vard < varc) { //FIXME
1180 1180
                c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
1181 1181
            }else{
1182
                c->scene_change_score+= s->qscale;
1182
                c->scene_change_score+= s->qscale * s->avctx->scenechange_factor;
1183 1183
            }
1184 1184
            return;
1185 1185
        }
......
1270 1270
        if (vard <= 64<<8 || vard < varc)
1271 1271
            c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
1272 1272
        else
1273
            c->scene_change_score+= s->qscale;
1273
            c->scene_change_score+= s->qscale * s->avctx->scenechange_factor;
1274 1274

  
1275 1275
        if(mb_type == CANDIDATE_MB_TYPE_INTER){
1276 1276
            c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16);
......
1291 1291
        if (vard <= 64<<8 || vard < varc)
1292 1292
            c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
1293 1293
        else
1294
            c->scene_change_score+= s->qscale;
1294
            c->scene_change_score+= s->qscale * s->avctx->scenechange_factor;
1295 1295

  
1296 1296
        if (vard*2 + 200*256 > varc)
1297 1297
            mb_type|= CANDIDATE_MB_TYPE_INTRA;
......
1397 1397
        if (vard <= 64<<8 || vard < varc) { //FIXME
1398 1398
            c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
1399 1399
        }else{
1400
            c->scene_change_score+= s->qscale;
1400
            c->scene_change_score+= s->qscale * s->avctx->scenechange_factor;
1401 1401
        }
1402 1402
    }
1403 1403

  
......
1843 1843
/*            if (vard <= 64<<8 || vard < varc) {
1844 1844
                c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc);
1845 1845
            }else{
1846
                c->scene_change_score+= s->qscale;
1846
                c->scene_change_score+= s->qscale * s->avctx->scenechange_factor;
1847 1847
            }*/
1848 1848
            return;
1849 1849
        }
libavcodec/utils.c
734 734
{"partp4x4", NULL, 0, FF_OPT_TYPE_CONST, X264_PART_P4X4, INT_MIN, INT_MAX, V|E, "partitions"},
735 735
{"partp8x8", NULL, 0, FF_OPT_TYPE_CONST, X264_PART_P8X8, INT_MIN, INT_MAX, V|E, "partitions"},
736 736
{"partb8x8", NULL, 0, FF_OPT_TYPE_CONST, X264_PART_B8X8, INT_MIN, INT_MAX, V|E, "partitions"},
737
{"sc_factor", NULL, OFFSET(scenechange_factor), FF_OPT_TYPE_INT, 6, 0, INT_MAX, V|E},
737 738
{NULL},
738 739
};
739 740

  

Also available in: Unified diff