Index: source/row_common.cc |
diff --git a/source/row_common.cc b/source/row_common.cc |
index b810849d9b9a244233dd845892ae3f06de195c46..0b236e72ea5813abfea22a6475afaba0d9f97312 100644 |
--- a/source/row_common.cc |
+++ b/source/row_common.cc |
@@ -1663,6 +1663,30 @@ void NV12ToARGBRow_C(const uint8* src_y, |
} |
} |
+void NV21ToARGBRow_C(const uint8* src_y, |
+ const uint8* src_vu, |
+ uint8* rgb_buf, |
+ struct YuvConstants* yuvconstants, |
+ int width) { |
+ int x; |
+ for (x = 0; x < width - 1; x += 2) { |
+ YuvPixel(src_y[0], src_vu[1], src_vu[0], |
+ rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants); |
+ rgb_buf[3] = 255; |
+ YuvPixel(src_y[1], src_vu[1], src_vu[0], |
+ rgb_buf + 4, rgb_buf + 5, rgb_buf + 6, yuvconstants); |
+ rgb_buf[7] = 255; |
+ src_y += 2; |
+ src_vu += 2; |
+ rgb_buf += 8; // Advance 2 pixels. |
+ } |
+ if (width & 1) { |
+ YuvPixel(src_y[0], src_vu[1], src_vu[0], |
+ rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants); |
+ rgb_buf[3] = 255; |
+ } |
+} |
+ |
void NV12ToRGB565Row_C(const uint8* src_y, |
const uint8* src_uv, |
uint8* dst_rgb565, |