Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: patched-ffmpeg-mt/libswscale/rgb2rgb.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: patched-ffmpeg-mt/libswscale/rgb2rgb.c
===================================================================
--- patched-ffmpeg-mt/libswscale/rgb2rgb.c (revision 41250)
+++ patched-ffmpeg-mt/libswscale/rgb2rgb.c (working copy)
@@ -442,3 +442,23 @@
dst[i] = ((b<<1)&0x07) | ((g&0x07)<<3) | ((r&0x03)<<6);
}
}
+
+#define DEFINE_SHUFFLE_BYTES(a, b, c, d) \
+void shuffle_bytes_##a##b##c##d(const uint8_t *src, uint8_t *dst, long src_size) \
+{ \
+ long i; \
+ \
+ for (i = 0; i < src_size; i+=4) { \
+ dst[i + 0] = src[i + a]; \
+ dst[i + 1] = src[i + b]; \
+ dst[i + 2] = src[i + c]; \
+ dst[i + 3] = src[i + d]; \
+ } \
+}
+
+DEFINE_SHUFFLE_BYTES(0, 3, 2, 1);
+DEFINE_SHUFFLE_BYTES(1, 2, 3, 0);
+DEFINE_SHUFFLE_BYTES(2, 1, 0, 3);
+DEFINE_SHUFFLE_BYTES(3, 0, 1, 2);
+DEFINE_SHUFFLE_BYTES(3, 2, 1, 0);
+

Powered by Google App Engine
This is Rietveld 408576698