comparison motion_est.c @ 1011:3b7fcfb9c551 libavcodec

bugs
author michaelni
date Sat, 18 Jan 2003 01:37:42 +0000
parents b2cf2a1d9a51
children 5d4c95f323d0
comparison
equal deleted inserted replaced
1010:3c110cba4b29 1011:3b7fcfb9c551
1 /* 1 /*
2 * Motion estimation 2 * Motion estimation
3 * Copyright (c) 2000,2001 Fabrice Bellard. 3 * Copyright (c) 2000,2001 Fabrice Bellard.
4 * Copyright (c) 2002 Michael Niedermayer 4 * Copyright (c) 2002-2003 Michael Niedermayer
5 * 5 *
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
311 case FF_CMP_SAD: 311 case FF_CMP_SAD:
312 return s->qscale; 312 return s->qscale;
313 case FF_CMP_DCT: 313 case FF_CMP_DCT:
314 case FF_CMP_SATD: 314 case FF_CMP_SATD:
315 case FF_CMP_SSE: 315 case FF_CMP_SSE:
316 case FF_CMP_PSNR:
316 return s->qscale*8; 317 return s->qscale*8;
317 case FF_CMP_BIT: 318 case FF_CMP_BIT:
318 return 1; 319 return 1;
319 case FF_CMP_RD: 320 case FF_CMP_RD:
320 return (s->qscale*s->qscale*105 + 64)>>7; 321 return (s->qscale*s->qscale*105 + 64)>>7;
1028 fprintf(stderr,"\nEarly skip: %d vard: %2d varc: %5d dmin: %d", 1029 fprintf(stderr,"\nEarly skip: %d vard: %2d varc: %5d dmin: %d",
1029 skip, vard, varc, dmin); 1030 skip, vard, varc, dmin);
1030 } 1031 }
1031 #endif 1032 #endif
1032 }else{ 1033 }else{
1033 s->scene_change_score+= 20; 1034 s->scene_change_score+= s->qscale;
1034 mb_type|= MB_TYPE_INTRA; 1035 mb_type|= MB_TYPE_INTRA;
1035 mx = 0; 1036 mx = 0;
1036 my = 0; 1037 my = 0;
1037 } 1038 }
1038 } 1039 }