mirror of https://git.ffmpeg.org/ffmpeg.git
Simplify ifs(), 8 cpu cycles faster on pentium dual
Originally committed as revision 16273 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
127a20e3b8
commit
60c6ba7aea
|
@ -135,26 +135,18 @@ static void fill_caches(H264Context *h, int mb_type, int for_deblock){
|
||||||
const int curr_mb_frame_flag = !IS_INTERLACED(mb_type);
|
const int curr_mb_frame_flag = !IS_INTERLACED(mb_type);
|
||||||
const int bottom = (s->mb_y & 1);
|
const int bottom = (s->mb_y & 1);
|
||||||
tprintf(s->avctx, "fill_caches: curr_mb_frame_flag:%d, left_mb_frame_flag:%d, topleft_mb_frame_flag:%d, top_mb_frame_flag:%d, topright_mb_frame_flag:%d\n", curr_mb_frame_flag, left_mb_frame_flag, topleft_mb_frame_flag, top_mb_frame_flag, topright_mb_frame_flag);
|
tprintf(s->avctx, "fill_caches: curr_mb_frame_flag:%d, left_mb_frame_flag:%d, topleft_mb_frame_flag:%d, top_mb_frame_flag:%d, topright_mb_frame_flag:%d\n", curr_mb_frame_flag, left_mb_frame_flag, topleft_mb_frame_flag, top_mb_frame_flag, topright_mb_frame_flag);
|
||||||
if (bottom
|
|
||||||
? !curr_mb_frame_flag // bottom macroblock
|
if (!curr_mb_frame_flag && (bottom || !top_mb_frame_flag)){
|
||||||
: (!curr_mb_frame_flag && !top_mb_frame_flag) // top macroblock
|
|
||||||
) {
|
|
||||||
top_xy -= s->mb_stride;
|
top_xy -= s->mb_stride;
|
||||||
}
|
}
|
||||||
if (bottom
|
if (!curr_mb_frame_flag && (bottom || !topleft_mb_frame_flag)){
|
||||||
? !curr_mb_frame_flag // bottom macroblock
|
|
||||||
: (!curr_mb_frame_flag && !topleft_mb_frame_flag) // top macroblock
|
|
||||||
) {
|
|
||||||
topleft_xy -= s->mb_stride;
|
topleft_xy -= s->mb_stride;
|
||||||
} else if(bottom && curr_mb_frame_flag && !left_mb_frame_flag) {
|
} else if(bottom && curr_mb_frame_flag && !left_mb_frame_flag) {
|
||||||
topleft_xy += s->mb_stride;
|
topleft_xy += s->mb_stride;
|
||||||
// take top left mv from the middle of the mb, as opposed to all other modes which use the bottom right partition
|
// take top left mv from the middle of the mb, as opposed to all other modes which use the bottom right partition
|
||||||
topleft_partition = 0;
|
topleft_partition = 0;
|
||||||
}
|
}
|
||||||
if (bottom
|
if (!curr_mb_frame_flag && (bottom || !topright_mb_frame_flag)){
|
||||||
? !curr_mb_frame_flag // bottom macroblock
|
|
||||||
: (!curr_mb_frame_flag && !topright_mb_frame_flag) // top macroblock
|
|
||||||
) {
|
|
||||||
topright_xy -= s->mb_stride;
|
topright_xy -= s->mb_stride;
|
||||||
}
|
}
|
||||||
if (left_mb_frame_flag != curr_mb_frame_flag) {
|
if (left_mb_frame_flag != curr_mb_frame_flag) {
|
||||||
|
|
Loading…
Reference in New Issue