Home > other >  Novice, I want to pass the two memory addresses to a assembly code. I don't know how to impleme
Novice, I want to pass the two memory addresses to a assembly code. I don't know how to impleme

Time:01-24

This code is MMX decoding YV12 to RGB32, I want to a line or two addresses in it somehow, here is the code,

The __asm {
Pushad
Finit
Xor eax, eax
Mov ebx, height
Mov ecx, width
Mov edx, y
Mov edi, v
Mov esi, u
Mov ebp, RGB//would like to add an address pointer to an external transfer to come in, do not know how to implement, please ask god to help,
Hloop:
Push ebx
Mov ebx, ecx
Wloop:
Push ebx
Xor ebx, ebx
Edi mov, al []
Mov bl, (esi)
Movq mm0, [CoefficientsRGBU + 8 * eax]
Paddw mm0, [CoefficientsRGBV + 8 * ebx]
Mov al, [edx]
Mov bl, [edx + 1]
Movq mm1, [CoefficientsRGBY + 8 * eax]
Movq was, [CoefficientsRGBY + 8 * ebx]
Mov al, [edx + ecx]
Mov bl, [edx + ecx + 1]
Movq mm3, [CoefficientsRGBY + 8 * eax]
Movq mm4, [CoefficientsRGBY + 8 * ebx]
Paddw mm1, mm0
Paddw was, mm0
Paddw mm3, mm0
Paddw mm4, mm0
Psraw mm1, 6
Psraw was, 6
Psraw mm3, 6
Psraw mm4, 6
Packuswb mm1, was
Packuswb mm3, mm4
Movq [ebp], mm1
Movq ecx] [ebp + 4 * and mm3
The add ebp, 8
The add edx, 2
The add edi, 1
The add esi, 1
Pop ebx
Sub ebx, 2
JNZ wloop
Lea ebp, [ebp + 4 * ecx]
The add edx, ecx
Pop ebx
Sub ebx, 2
JNZ hloop
Emms
Popad
}

CodePudding user response:


Mov ebp, RGB//here to join a pass into another pointer


Movq ecx] [ebp + 4 * and mm3//change this sentence to pay value to the new address,

I have never used assembly, please help, thank you.

CodePudding user response:

Mov ebp, RGB//here to join a pass into another pointer
Movq ecx] [ebp + 4 * and mm3//change this sentence to pay value to the new address,
===================================

RGB is clearly here to receive the converted RGB32 data buffer, you want to pass another pointer only need "mov ebp, another pointer", but what you pass in another pointer for is a question