[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-501-g5067060
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-06-24 13:52:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5067060d5aa40c9736ae1715af9a30d602db0620 (commit)
from 5f04742b90177c806ef2f8b82b919df7e9af6c0d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5067060d5aa40c9736ae1715af9a30d602db0620
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 24 15:51:54 2010 +0200
[DEMOS] capture: add yuv422_to_greyscale()
-----------------------------------------------------------------------
Summary of changes:
target/demos/camera/capture/capture.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/target/demos/camera/capture/capture.c b/target/demos/camera/capture/capture.c
index dc7e7ba..84862e7 100644
--- a/target/demos/camera/capture/capture.c
+++ b/target/demos/camera/capture/capture.c
@@ -141,6 +141,25 @@ static Uint16 inline YUV2B(int Y, int U, int V)
return B;
}
+static void yuv422_to_greyscale(void *yuv, int size, void *grey)
+{
+ unsigned int Y, Y2, yuv32;
+ int i;
+ Uint8 *dest = (Uint8*) grey;
+ Uint32 *src = (Uint32*) yuv;
+
+ for (i=size/4; i; i--) {
+ yuv32 = *(src++);
+
+ /* takes Ys from YUV422 packed format */
+ Y = (yuv32 & 0x000000ff);
+ Y2 = (yuv32 & 0x00ff0000) >> 16;
+
+ *(dest++) = (Uint8)Y;
+ *(dest++) = (Uint8)Y2;
+ }
+}
+
static void yuv422_to_rgb565(void *yuv, int size, void *rgb)
{
unsigned int Y, Y2, U, V, yuv32, rgb32;
hooks/post-receive
--
armadeus
|