Jeepers, converting from YUV420 to RGB in order to convert back again is just total overkill.
If your source and destination can have the same stride, then you want something likeIf they need different strides, then you want something like
If your source and destination can have the same stride, then you want something like
Code:
std::vector<uint8_t> output(dst_info.height * dst_info.stride);memcpy(output.data(), src, src_info.stride * src_info * height);return output;
Code:
std::vector<uint8_t> output(dst_info.height * dst_info.stride);unsigned int y = 0;uint8_t *dst = output.data();for (; y < dst_info.height; y++, src += src_info.stride, dst += dst_info.stride){memcpy(dst, src, src_info.width);}return output;
Statistics: Posted by 6by9 — Tue Jul 23, 2024 2:04 pm