comparison mpeg12.c @ 717:6cba3b6196f0 libavcodec

optimization
author michaelni
date Wed, 02 Oct 2002 17:07:39 +0000
parents 2ec5bd9f7116
children 16dab8296293
comparison
equal deleted inserted replaced
716:2ec5bd9f7116 717:6cba3b6196f0
1602 int y, h, offset; 1602 int y, h, offset;
1603 y = s->mb_y * 16; 1603 y = s->mb_y * 16;
1604 h = s->height - y; 1604 h = s->height - y;
1605 if (h > 16) 1605 if (h > 16)
1606 h = 16; 1606 h = 16;
1607 offset = y * s->linesize; 1607 if(s->pict_type==B_TYPE)
1608 offset = 0;
1609 else
1610 offset = y * s->linesize;
1608 if(s->pict_type==B_TYPE || (!s->has_b_frames)){ 1611 if(s->pict_type==B_TYPE || (!s->has_b_frames)){
1609 src_ptr[0] = s->current_picture[0] + offset; 1612 src_ptr[0] = s->current_picture[0] + offset;
1610 src_ptr[1] = s->current_picture[1] + (offset >> 2); 1613 src_ptr[1] = s->current_picture[1] + (offset >> 2);
1611 src_ptr[2] = s->current_picture[2] + (offset >> 2); 1614 src_ptr[2] = s->current_picture[2] + (offset >> 2);
1612 } else { 1615 } else {