**/
#include "basic_prediction.h"
void CopyBlock(unsigned char * Src, unsigned char * Dst, int Stride)
{
int dy;
long *lpSrc = (long *) Src;
long *lpDst = (long *) Dst;
int lpStride = Stride >> 2;
for (dy = 0; dy < 8; dy++) {
lpDst[0] = lpSrc[0];
lpDst[1] = lpSrc[1];
lpSrc += lpStride;
lpDst += lpStride;
}
}
/**/
void CopyBlockHor(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
xor eax, eax
mov ebx, Stride
sub ebx, 7
xor ecx, ecx
mov edx, 8
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again10:
// 0
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 1
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 2
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 3
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 4
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 5
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 6
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 7
mov al, [esi]
mov cl, [esi+1]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
add esi, ebx
add edi, ebx
dec edx
jnz start_again10
}
}
/**/
void CopyBlockVer(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
xor eax, eax
mov ebx, Stride
xor ecx, ecx
mov edx, 8
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again10:
// 0
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 1
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 2
//xor eax, eax
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 3
//xor eax, eax
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 4
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 5
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 6
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc esi
inc edi
// 7
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
add esi, ebx
sub esi, 7
add edi, ebx
sub edi, 7
dec edx
jnz start_again10
}
}
/**/
void CopyBlockHorVer(unsigned char * Src, unsigned char * Dst, int Stride)
{
int dy, dx;
for (dy = 0; dy < 8; dy++) {
for (dx = 0; dx < 8; dx++) {
Dst[dx] = (Src[dx] + Src[dx+1] +
Src[dx+Stride] + Src[dx+Stride+1] +2) >> 2; // horver interpolation with rounding
}
Src += Stride;
Dst += Stride;
}
}
/**/
void CopyBlockHorRound(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
xor eax, eax
mov ebx, Stride
sub ebx, 7
xor ecx, ecx
mov edx, 8
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again1:
// 0
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 1
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 2
//xor eax, eax
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 3
//xor eax, eax
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 4
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 5
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 6
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
shr eax, 1
mov [edi], al
inc edi
// 7
mov al, [esi]
mov cl, [esi+1]
add eax, ecx
shr eax, 1
mov [edi], al
add esi, ebx
add edi, ebx
dec edx
jnz start_again1
}
}
/**/
void CopyBlockVerRound(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
xor eax, eax
mov ebx, Stride
xor ecx, ecx
mov edx, 8
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again1:
// 0
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 1
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 2
//xor eax, eax
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 3
//xor eax, eax
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 4
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 5
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 6
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
inc esi
inc edi
// 7
mov al, [esi]
mov cl, [esi+ebx]
add eax, ecx
shr eax, 1
mov [edi], al
add esi, ebx
sub esi, 7
add edi, ebx
sub edi, 7
dec edx
jnz start_again1
}
}
/**/
void CopyBlockHorVerRound(unsigned char * Src, unsigned char * Dst, int Stride)
{
int dy, dx;
for (dy = 0; dy < 8; dy++) {
for (dx = 0; dx < 8; dx++) {
Dst[dx] = (Src[dx] + Src[dx+1] +
Src[dx+Stride] + Src[dx+Stride+1] +1) >> 2; // horver interpolation with rounding
}
Src += Stride;
Dst += Stride;
}
}
/** *** **/
void CopyMBlock(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
mov ebx, Stride
sub ebx, 12
mov edx, 16
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again:
mov eax, [esi]
mov [edi], eax
add esi, 4
add edi, 4
mov eax, [esi]
mov [edi], eax
add esi, 4
add edi, 4
mov eax, [esi]
mov [edi], eax
add esi, 4
add edi, 4
mov eax, [esi]
mov [edi], eax
add esi, ebx
add edi, ebx
dec edx
jnz start_again
}
}
/**/
void CopyMBlockHor(unsigned char * Src, unsigned char * Dst, int Stride)
{
_asm {
xor eax, eax
mov ebx, Stride
sub ebx, 15
xor ecx, ecx
mov edx, 16
mov esi, dword ptr [Src]
mov edi, dword ptr [Dst]
start_again0:
// 0
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 1
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 2
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 3
//xor eax, eax
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
inc edi
// 4
mov al, [esi]
inc esi
mov cl, [esi]
add eax, ecx
inc eax
shr eax, 1
mov [edi], al
i
没有合适的资源?快使用搜索试试~ 我知道了~
MPEG-4解码技术
共81个文件
c:45个
h:25个
dsp:3个
需积分: 7 21 下载量 144 浏览量
2009-05-18
18:49:20
上传
评论
收藏 132KB RAR 举报
温馨提示
该系统是MPEG-4影片专用的播放器,它整合了一个编码解码器,不再需要Windows的媒体播发器就可以播放,并具有如下功能:网络播放、更换外皮、播放字幕、全屏幕播放和桌面播放等功能。
资源推荐
资源详情
资源评论
收起资源包目录
MPEG-4解码技术.rar (81个子文件)
MPEG-4解码技术
DECORE
SRC
MP4_VARS.C 276B
mp4_predict.c 8KB
mp4_mblock.h 332B
basic_prediction.h 1KB
mp4_header.h 3KB
DEBUG.C 1KB
clearblock.c 301B
MP4_VLD.C 7KB
Yuv2rgb.c 10KB
STORE.H 154B
transferIDCT.c 815B
mp4_recon.c 3KB
TIMER.H 1KB
intel_mmx
clearblock_mmx.c 219B
yuv2rgb_mmx.c 22KB
postprocess
deblock_horiz_DC_on.c 142B
deblock_horiz.c 2KB
deblock_vert_lpf9.c 18KB
deblock_vert_useDC.c 7KB
DO_EMMS.C 84B
deblock_horiz_lpf9.c 6KB
postprocess.c 2KB
deblock_vert_default_filter.c 11KB
deblock_vert.c 3KB
deblock_horiz_useDC.c 5KB
deblock_vert_copy_and_unpack.c 2KB
deblock_horiz_default_filter.c 1KB
deblock_vert_choose_p1p2.c 4KB
postprocess.h 1KB
postprocess_mmx.h 2KB
fast_copy.c 2KB
deblock_vert_DC_on.c 1KB
IDCT_MMX.C 14KB
transferIDCT_mmx.c 9KB
basic_prediction_mmx.c 23KB
postprocess.c 17KB
GETBITS.H 3KB
mp4_block.h 77B
DECORE.C 10KB
PORTAB.H 469B
mp4_picture.c 9KB
GEN_DRAW.H 250B
STORE.C 1KB
IDCT.H 145B
GEN_DRAW.C 3KB
clearblock.h 124B
GETBITS.C 416B
mp4_predict.h 444B
mp4_decoder.c 4KB
MP4_VARS.H 4KB
gen_usetime.c 623B
IDCT.C 3KB
postprocess.h 965B
mp4_header.c 8KB
mp4_tables.c 9KB
mp4_block.c 8KB
basic_prediction.c 5KB
MP4_VLD.H 8KB
gen_usetime.h 197B
mp4_mblock.c 7KB
DEBUG.H 582B
mp4_iquant.h 182B
mp4_decoder.h 442B
YUV2RGB.H 1KB
transferIDCT.h 172B
ATT_MMX
basic_prediction_mmx.c 15KB
DECORE.H 2KB
mp4_iquant.c 912B
GLOBAL.H 1KB
TEST
test_basic_prediction.c 6KB
BUILD
WIN32
TEST
test_basic_prediction.plg 276B
test_basic_prediction.opt 74KB
test_basic_prediction.dsw 566B
test_basic_prediction.ncb 41KB
test_basic_prediction.dsp 4KB
DECORE.DSW 724B
console.plg 248B
DECORE.OPT 103KB
DECORE.DSP 18KB
DECORE.ncb 257KB
console.dsp 7KB
共 81 条
- 1
资源评论
tyglernest
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功