DST,蝶形运算
来源:互联网 发布:怎么更新windows系统 编辑:程序博客网 时间:2024/06/06 01:53
转自:http://blog.csdn.net/tianzhaixing2013/article/details/8723204
/** MxN forward transform (2D)* \param block input data (residual)* \param coeff output data (transform coefficients)* \param iWidth input data (width of transform)* \param iHeight input data (height of transform)*///对帧内预测模式的4x4块进行DST变换,其余的根据块大小分别做蝶形快速变换(4x4,8x8,16x16,32x32)void xTrMxN(Int bitDepth, Short *block,Short *coeff, Int iWidth, Int iHeight, UInt uiMode){ Int shift_1st = g_aucConvertToBit[iWidth] + 1 + bitDepth-8; // log2(iWidth) - 1 + g_bitDepth - 8 Int shift_2nd = g_aucConvertToBit[iHeight] + 8; // log2(iHeight) + 6 Short tmp[ 64 * 64 ]; if( iWidth == 4 && iHeight == 4) { if (uiMode != REG_DCT) {//离散正弦变换DST fastForwardDst(block,tmp,shift_1st); // Forward DST BY FAST ALGORITHM, block input, tmp output fastForwardDst(tmp,coeff,shift_2nd); // Forward DST BY FAST ALGORITHM, tmp input, coeff output } else {//4*4蝶形运算 partialButterfly4(block, tmp, shift_1st, iHeight); partialButterfly4(tmp, coeff, shift_2nd, iWidth); } } else if( iWidth == 8 && iHeight == 8) { //8*8蝶形运算 partialButterfly8( block, tmp, shift_1st, iHeight ); partialButterfly8( tmp, coeff, shift_2nd, iWidth ); } else if( iWidth == 16 && iHeight == 16) { //16*16蝶形运算 partialButterfly16( block, tmp, shift_1st, iHeight ); partialButterfly16( tmp, coeff, shift_2nd, iWidth ); } else if( iWidth == 32 && iHeight == 32) { //32*32蝶形运算 partialButterfly32( block, tmp, shift_1st, iHeight ); partialButterfly32( tmp, coeff, shift_2nd, iWidth ); }}/** MxN inverse transform (2D)反变换针对2D的情况* \param coeff input data (transform coefficients)* \param block output data (residual)* \param iWidth input data (width of transform)* \param iHeight input data (height of transform)*/void xITrMxN(Int bitDepth, Short *coeff,Short *block, Int iWidth, Int iHeight, UInt uiMode){ Int shift_1st = SHIFT_INV_1ST; Int shift_2nd = SHIFT_INV_2ND - (bitDepth-8); Short tmp[ 64*64]; if( iWidth == 4 && iHeight == 4) { if (uiMode != REG_DCT) { fastInverseDst(coeff,tmp,shift_1st); // Inverse DST by FAST Algorithm, coeff input, tmp output fastInverseDst(tmp,block,shift_2nd); // Inverse DST by FAST Algorithm, tmp input, coeff output } else { partialButterflyInverse4(coeff,tmp,shift_1st,iWidth); partialButterflyInverse4(tmp,block,shift_2nd,iHeight); } } else if( iWidth == 8 && iHeight == 8) { partialButterflyInverse8(coeff,tmp,shift_1st,iWidth); partialButterflyInverse8(tmp,block,shift_2nd,iHeight); } else if( iWidth == 16 && iHeight == 16) { partialButterflyInverse16(coeff,tmp,shift_1st,iWidth); partialButterflyInverse16(tmp,block,shift_2nd,iHeight); } else if( iWidth == 32 && iHeight == 32) { partialButterflyInverse32(coeff,tmp,shift_1st,iWidth); partialButterflyInverse32(tmp,block,shift_2nd,iHeight); }}
0 0
- DST,蝶形运算
- DST,蝶形运算
- DCT蝶形运算java实现
- 蝶形变换
- 关于傅里叶变换的理解、快速傅里叶算法的推导以及蝶形运算的c语言实现
- FFT蝶形算法,IFFT
- 蝶形细分的实现笔记
- 蝶形算法(H.264)
- H264___DCT蝶形算法____理解
- 快速傅里叶变换(蝶形算法)
- Cooley-Tukey算法 (蝶形算法)
- GJXH(蝶形引入光缆)产品 说明文档
- 快速傅里叶变换(蝶形算法c++源代码)
- 关于DST--夏令时
- "dst cache overflow" issue.
- dst cache overflow 是什么原因?
- struct dst_entry*dst
- Daylight Savings Time (DST)
- initAdiPattern和predIntraLumaAng
- ps 径向模糊算法(glsl)
- ZFXEngine开发笔记之Shadow Volume
- RoboCup 2D足球仿真team_logo制作方法
- 数列(sequence) 题解
- DST,蝶形运算
- cpufreq
- 递归:打靶10次,求累积和90环的种数/概率
- lua math库
- [SDOI2011]计算器
- DocumentWriter的addDocument方法
- 五大常用算法之一:分治算法(红脸书生)
- C++纯虚函数
- CU分割信息提取(更新续)