mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Invert U and V video planes back
We now correctly send YUV420P and not YV12 to keep matching uTox bug-for-bug.
This commit is contained in:
parent
0d4776f5a2
commit
2505c01cdd
|
@ -40,8 +40,8 @@ void NetVideoSource::pushVPXFrame(const vpx_image *image)
|
|||
frame.format = VideoFrame::YUV;
|
||||
|
||||
const uint8_t* yData = image->planes[VPX_PLANE_Y];
|
||||
const uint8_t* uData = image->planes[VPX_PLANE_V];
|
||||
const uint8_t* vData = image->planes[VPX_PLANE_U];
|
||||
const uint8_t* uData = image->planes[VPX_PLANE_U];
|
||||
const uint8_t* vData = image->planes[VPX_PLANE_V];
|
||||
|
||||
// convert from planar to packed
|
||||
for (int y = 0; y < dh; ++y)
|
||||
|
|
|
@ -44,8 +44,8 @@ vpx_image_t VideoFrame::createVpxImage() const
|
|||
const int i = x / (1 << img.x_chroma_shift);
|
||||
const int j = y / (1 << img.y_chroma_shift);
|
||||
|
||||
img.planes[VPX_PLANE_U][i + j * img.stride[VPX_PLANE_U]] = ((112 * r + -94 * g + -18 * b) >> 8) + 128;
|
||||
img.planes[VPX_PLANE_V][i + j * img.stride[VPX_PLANE_V]] = ((-38 * r + -74 * g + 112 * b) >> 8) + 128;
|
||||
img.planes[VPX_PLANE_V][i + j * img.stride[VPX_PLANE_V]] = ((112 * r + -94 * g + -18 * b) >> 8) + 128;
|
||||
img.planes[VPX_PLANE_U][i + j * img.stride[VPX_PLANE_U]] = ((-38 * r + -74 * g + 112 * b) >> 8) + 128;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user