diff --git a/src/video/netvideosource.cpp b/src/video/netvideosource.cpp index 6a38f2811..3b411721b 100644 --- a/src/video/netvideosource.cpp +++ b/src/video/netvideosource.cpp @@ -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) diff --git a/src/video/videoframe.cpp b/src/video/videoframe.cpp index 9d9d09925..7e11e0b57 100644 --- a/src/video/videoframe.cpp +++ b/src/video/videoframe.cpp @@ -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; } } }