1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 569f9ca7a8ce923d43956771e8a142a9b31114f1 Mon Sep 17 00:00:00 2001
From: Rob Clark <rob@ti.com>
Date: Mon, 13 Sep 2010 19:05:56 -0500
Subject: [PATCH 20/24] video: fix endianess issue for 16bit RGB formats
---
gst-libs/gst/video/video.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index ef8edcc..a5ec6b7 100644
--- a/gst-libs/gst/video/video.c
+++ b/gst-libs/gst/video/video.c
@@ -625,6 +625,7 @@ gst_video_format_new_caps_simple (GstVideoFormat format, int rowstride,
int depth;
int bpp;
gboolean have_alpha;
+ int endianness = G_BIG_ENDIAN;
unsigned int mask = 0;
switch (format) {
@@ -708,6 +709,7 @@ gst_video_format_new_caps_simple (GstVideoFormat format, int rowstride,
default:
return NULL;
}
+ endianness = G_BYTE_ORDER;
} else if (bpp != 8) {
return NULL;
}
@@ -719,7 +721,7 @@ gst_video_format_new_caps_simple (GstVideoFormat format, int rowstride,
if (bpp != 8) {
gst_structure_set (s,
- "endianness", G_TYPE_INT, G_BIG_ENDIAN,
+ "endianness", G_TYPE_INT, endianness,
"red_mask", G_TYPE_INT, red_mask,
"green_mask", G_TYPE_INT, green_mask,
"blue_mask", G_TYPE_INT, blue_mask, NULL);
--
1.7.0.4
|