comparison mpegvideo.c @ 1471:dcb784544ec6 libavcodec

scenechange_threshold
author michaelni
date Tue, 16 Sep 2003 11:25:29 +0000
parents 40b69d238beb
children 8657d6800d15
comparison
equal deleted inserted replaced
1470:dc1aebe51742 1471:dcb784544ec6
3414 } 3414 }
3415 } 3415 }
3416 } 3416 }
3417 emms_c(); 3417 emms_c();
3418 3418
3419 if(s->scene_change_score > 0 && s->pict_type == P_TYPE){ 3419 if(s->scene_change_score > s->avctx->scenechange_threshold && s->pict_type == P_TYPE){
3420 s->pict_type= I_TYPE; 3420 s->pict_type= I_TYPE;
3421 memset(s->mb_type , MB_TYPE_INTRA, sizeof(uint8_t)*s->mb_stride*s->mb_height); 3421 memset(s->mb_type , MB_TYPE_INTRA, sizeof(uint8_t)*s->mb_stride*s->mb_height);
3422 //printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); 3422 //printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
3423 } 3423 }
3424 3424