Mercurial > libavcodec.hg
comparison motion_est_template.c @ 4313:13c897abcab3 libavcodec
fix special casing of the 0,0 MV for b frames (slight PSNR/bitrate gain)
author | michael |
---|---|
date | Wed, 20 Dec 2006 17:11:54 +0000 |
parents | eb0ae1ce40a5 |
children | 9af83350d4fd |
comparison
equal
deleted
inserted
replaced
4312:eb0ae1ce40a5 | 4313:13c897abcab3 |
---|---|
1021 | 1021 |
1022 assert(cmpf); | 1022 assert(cmpf); |
1023 dmin= cmp(s, 0, 0, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags); | 1023 dmin= cmp(s, 0, 0, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags); |
1024 map[0]= map_generation; | 1024 map[0]= map_generation; |
1025 score_map[0]= dmin; | 1025 score_map[0]= dmin; |
1026 if(s->flags&CODEC_FLAG_MV0) | 1026 |
1027 //FIXME precalc first term below? | |
1028 if((s->pict_type == B_TYPE || s->flags&CODEC_FLAG_MV0) && !(c->flags & FLAG_DIRECT)) | |
1027 dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor; | 1029 dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor; |
1028 | 1030 |
1029 /* first line */ | 1031 /* first line */ |
1030 if (s->first_slice_line) { | 1032 if (s->first_slice_line) { |
1031 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) | 1033 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) |