# HG changeset patch # User romansh # Date 1223394740 0 # Node ID 3ec8f866015246a3abc9badb4de6f4f6bcc08f03 # Parent 4b19d9cbc75b362e2c1aa584028aa2d74cb2a53c unrolling the loops as per Michael's suggestion diff -r 4b19d9cbc75b -r 3ec8f8660152 dv.c --- a/dv.c Tue Oct 07 15:51:29 2008 +0000 +++ b/dv.c Tue Oct 07 15:52:20 2008 +0000 @@ -367,7 +367,7 @@ { int quant, dc, dct_mode, class1, j; int mb_index, mb_x, mb_y, v, last_index; - int y_stride, i; + int y_stride, linesize; DCTELEM *block, *block1; int c_offset; uint8_t *y_ptr; @@ -502,18 +502,22 @@ if ((s->sys->pix_fmt == PIX_FMT_YUV420P) || (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) || (s->sys->height >= 720 && mb_y != 134)) { - y_stride = (s->picture.linesize[0]<<((!is_field_mode[mb_index])*log2_blocksize)) - (2<picture.linesize[0]<<((!is_field_mode[mb_index])*log2_blocksize)); } else { - y_stride = 0; + y_stride = (2<picture.data[0] + ((mb_y * s->picture.linesize[0] + mb_x)<sys->pix_fmt == PIX_FMT_YUV422P && s->sys->width == 720 && i) - y_ptr -= (1<idct_put(y_ptr, s->picture.linesize[0]<picture.linesize[0]<sys->video_stype == 4) { /* SD 422 */ + mb[2].idct_put(y_ptr + (1<>(s->sys->pix_fmt == PIX_FMT_YUV420P)) * s->picture.linesize[1] + @@ -538,8 +542,11 @@ } else { y_stride = (mb_y == 134) ? (1<picture.linesize[j]<<((!is_field_mode[mb_index])*log2_blocksize); - for (i=0; i<(1<<(s->sys->bpm==8)); i++, block += 64, mb++, c_ptr += y_stride) - mb->idct_put(c_ptr, s->picture.linesize[j]<picture.linesize[j]< idct_put(c_ptr , linesize, block); block+=64; + if (s->sys->bpm == 8) { + (mb++)->idct_put(c_ptr + y_stride, linesize, block); block+=64; + } } } }