comparison dsputil.c @ 6600:c3213c91124c libavcodec

Add a new IDCT permutation, used in xvid_sse2 and possibly future similar IDCTs.
author astrange
date Wed, 16 Apr 2008 01:34:55 +0000
parents c32be43b52b2
children e88e719b5e77
comparison
equal deleted inserted replaced
6599:e5967b1cc475 6600:c3213c91124c
148 0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F, 148 0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F,
149 0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D, 149 0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D,
150 0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F, 150 0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F,
151 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, 151 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
152 }; 152 };
153
154 static const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7};
153 155
154 void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable){ 156 void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable){
155 int i; 157 int i;
156 int end; 158 int end;
157 159
4474 break; 4476 break;
4475 case FF_PARTTRANS_IDCT_PERM: 4477 case FF_PARTTRANS_IDCT_PERM:
4476 for(i=0; i<64; i++) 4478 for(i=0; i<64; i++)
4477 c->idct_permutation[i]= (i&0x24) | ((i&3)<<3) | ((i>>3)&3); 4479 c->idct_permutation[i]= (i&0x24) | ((i&3)<<3) | ((i>>3)&3);
4478 break; 4480 break;
4481 case FF_SSE2_IDCT_PERM:
4482 for(i=0; i<64; i++)
4483 c->idct_permutation[i]= (i&0x38) | idct_sse2_row_perm[i&7];
4484 break;
4479 default: 4485 default:
4480 av_log(avctx, AV_LOG_ERROR, "Internal error, IDCT permutation not set\n"); 4486 av_log(avctx, AV_LOG_ERROR, "Internal error, IDCT permutation not set\n");
4481 } 4487 }
4482 } 4488 }
4483 4489