⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 worksheet.c

📁 MPEG-4编解码的实现(包括MPEG4视音频编解码)
💻 C
字号:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>


static long long  mpeg3_MMX_601_Y_COEF = 0x0000004000400040;

inline void mpeg3_601_mmx(unsigned long y, 
		unsigned long *output)
{
asm("
/* Output will be 0x00rrggbb */
	movd (%0), %%mm0;          /* Load y   0x00000000000000yy */
/*	pmullw mpeg3_MMX_601_Y_COEF, %%mm0;   // Scale y   0x00000000000000yy */
 	psllw $6, %%mm0;                /* Shift y coeffs 0x0000yyy0yyy0yyy0 */
	movd %%mm0, (%1);          /* Store output */
	"
:
: "r" (&y), "r" (output));
}


int main(int argc, char *argv[])
{
	unsigned char output[1024];

	memset(output, 0, 1024);
	mpeg3_601_mmx(1, (unsigned long*)output);
	printf("%02x%02x\n", *(unsigned char*)&output[1], *(unsigned char*)&output[0]);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -