Correct the plane naming within the D3D code
Within I420 (as the decoder outputs), the first chroma plane is U and the second is V, and similarly, in NV12, the chroma components are written in the order U, V. This doesn't have any practical effect, it only makes the variable naming while it previously was misleading.
This commit is contained in:
parent
d81f3d5037
commit
29ccdebad9
@ -492,13 +492,13 @@ HRESULT Dump2Surface (void* pDst[3], void* pSurface, int iWidth, int iHeight, in
|
||||
for (int j = 0; j < iHeight; j++)
|
||||
memcpy (pOutY + j * iOutStride, pInY + j * iStride[0], iWidth); //confirmed_safe_unsafe_usage
|
||||
|
||||
unsigned char* pInV = (unsigned char*)pDst[1];
|
||||
unsigned char* pInU = (unsigned char*)pDst[2];
|
||||
unsigned char* pInU = (unsigned char*)pDst[1];
|
||||
unsigned char* pInV = (unsigned char*)pDst[2];
|
||||
unsigned char* pOutC = pOutY + iOutStride * iHeight;
|
||||
for (int i = 0; i < iHeight / 2; i++) {
|
||||
for (int j = 0; j < iWidth; j += 2) {
|
||||
pOutC[i * iOutStride + j ] = pInV[i * iStride[1] + j / 2];
|
||||
pOutC[i * iOutStride + j + 1] = pInU[i * iStride[1] + j / 2];
|
||||
pOutC[i * iOutStride + j ] = pInU[i * iStride[1] + j / 2];
|
||||
pOutC[i * iOutStride + j + 1] = pInV[i * iStride[1] + j / 2];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user