-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathframeworks_av.patch
500 lines (480 loc) · 19.1 KB
/
frameworks_av.patch
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp
index 75ec676..09fc72b 100644
--- a/camera/CameraParameters.cpp
+++ b/camera/CameraParameters.cpp
@@ -329,6 +329,13 @@
const char CameraParameters::SCENE_MODE_SPORTS[] = "sports";
const char CameraParameters::SCENE_MODE_PARTY[] = "party";
const char CameraParameters::SCENE_MODE_CANDLELIGHT[] = "candlelight";
+#ifdef STE_SAMSUNG_HARDWARE
+const char CameraParameters::SCENE_MODE_AQUA[] = "aqua";
+const char CameraParameters::SCENE_MODE_BACKLIGHT[] = "backlight";
+const char CameraParameters::SCENE_MODE_DUSKDAWN[] = "duskdawn";
+const char CameraParameters::SCENE_MODE_FALLCOLOR[] = "fallcolor";
+const char CameraParameters::SCENE_MODE_TEXT[] = "text";
+#endif
#ifdef QCOM_HARDWARE
#ifdef SAMSUNG_CAMERA_LEGACY
const char CameraParameters::SCENE_MODE_BACKLIGHT[] = "back-light";
@@ -355,6 +362,14 @@
#ifdef QCOM_HARDWARE
const char CameraParameters::PIXEL_FORMAT_YUV420SP_ADRENO[] = "yuv420sp-adreno";
#endif
+#ifdef STE_HARDWARE
+const char CameraParameters::PIXEL_FORMAT_YUV420SPNV12[] = "yuv420spnv12";
+const char CameraParameters::PIXEL_FORMAT_YUV420MB[] = "yuv420mb";
+const char CameraParameters::PIXEL_FORMAT_YVU422SP[] = "yvu422sp";
+const char CameraParameters::PIXEL_FORMAT_YVU422P[] = "yvu422p";
+const char CameraParameters::PIXEL_FORMAT_YVU420SP[] = "yvu420sp";
+const char CameraParameters::PIXEL_FORMAT_YVU420P[] = "yvu420p";
+#endif
const char CameraParameters::PIXEL_FORMAT_YUV422I[] = "yuv422i-yuyv";
const char CameraParameters::PIXEL_FORMAT_YUV420P[] = "yuv420p";
const char CameraParameters::PIXEL_FORMAT_RGB565[] = "rgb565";
@@ -537,6 +552,12 @@ void CameraParameters::setOrientation(int orientation)
const char CameraParameters::LIGHTFX_LOWLIGHT[] = "low-light";
const char CameraParameters::LIGHTFX_HDR[] = "high-dynamic-range";
+#ifdef STE_HARDWARE
+// keys for record stride and sliceheight
+const char CameraParameters::KEY_RECORD_STRIDE[] = "record-stride";
+const char CameraParameters::KEY_RECORD_SLICE_HEIGHT[] = "record-slice-height";
+#endif
+
CameraParameters::CameraParameters()
: mMap()
{
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 2758989..863949b 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -829,6 +829,13 @@ class CameraParameters
static const char SCENE_MODE_SPORTS[];
static const char SCENE_MODE_PARTY[];
static const char SCENE_MODE_CANDLELIGHT[];
+#ifdef STE_SAMSUNG_HARDWARE
+ static const char SCENE_MODE_AQUA[];
+ static const char SCENE_MODE_BACKLIGHT[];
+ static const char SCENE_MODE_DUSKDAWN[];
+ static const char SCENE_MODE_FALLCOLOR[];
+ static const char SCENE_MODE_TEXT[];
+#endif
#ifdef QCOM_HARDWARE
static const char SCENE_MODE_BACKLIGHT[];
static const char SCENE_MODE_FLOWERS[];
@@ -853,6 +860,14 @@ class CameraParameters
#ifdef QCOM_HARDWARE
static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO
#endif
+#ifdef STE_HARDWARE
+ static const char PIXEL_FORMAT_YUV420SPNV12[]; // NV12
+ static const char PIXEL_FORMAT_YVU422SP[];
+ static const char PIXEL_FORMAT_YVU422P[];
+ static const char PIXEL_FORMAT_YVU420SP[];
+ static const char PIXEL_FORMAT_YVU420P[];
+ static const char PIXEL_FORMAT_YUV420MB[];
+#endif
static const char PIXEL_FORMAT_YUV422I[]; // YUY2
static const char PIXEL_FORMAT_YUV420P[]; // YV12
static const char PIXEL_FORMAT_RGB565[];
@@ -1083,6 +1098,12 @@ class CameraParameters
void getSupportedHfrSizes(Vector<Size> &sizes) const;
#endif
+#ifdef STE_HARDWARE
+ // keys for record stride and slice height
+ static const char KEY_RECORD_STRIDE[];
+ static const char KEY_RECORD_SLICE_HEIGHT[];
+#endif
+
private:
DefaultKeyedVector<String8,String8> mMap;
};
diff --git a/include/media/stagefright/ColorConverter.h b/include/media/stagefright/ColorConverter.h
index 85ba920..e34791c 100644
--- a/include/media/stagefright/ColorConverter.h
+++ b/include/media/stagefright/ColorConverter.h
@@ -72,6 +72,11 @@ struct ColorConverter {
status_t convertQCOMYUV420SemiPlanar(
const BitmapParams &src, const BitmapParams &dst);
+
+#ifdef STE_HARDWARE
+ status_t convertSTEYUV420PackedSemiPlanarMB(
+ const BitmapParams &src, const BitmapParams &dst);
+#endif
status_t convertYUV420SemiPlanar(
const BitmapParams &src, const BitmapParams &dst);
diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h
index 170e587..169dec6 100644
--- a/include/media/stagefright/MediaDefs.h
+++ b/include/media/stagefright/MediaDefs.h
@@ -27,8 +27,14 @@
extern const char *MEDIA_MIMETYPE_VIDEO_AVC;
extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4;
extern const char *MEDIA_MIMETYPE_VIDEO_H263;
+#ifdef STE_HARDWARE
+extern const char *MEDIA_MIMETYPE_VIDEO_H263_SW;
+#endif
extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2;
extern const char *MEDIA_MIMETYPE_VIDEO_RAW;
+#ifdef STE_HARDWARE
+extern const char *MEDIA_MIMETYPE_VIDEO_VC1;
+#endif
extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB;
extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB;
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 1247356..90d0822 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -86,6 +86,10 @@ struct OMXCodec : public MediaSource,
// from MediaBufferObserver
virtual void signalBufferReturned(MediaBuffer *buffer);
+#ifdef STE_HARDWARE
+ static uint32_t OmxToHALFormat(OMX_COLOR_FORMATTYPE omxValue);
+#endif
+
enum Quirks {
kNeedsFlushBeforeDisable = 1,
kWantsNALFragments = 2,
@@ -107,6 +111,9 @@ struct OMXCodec : public MediaSource,
kRequiresGlobalFlush = 0x20000000, // 2^29
kRequiresWMAProComponent = 0x40000000, //2^30
#endif
+#ifdef STE_HARDWARE
+ kRequiresStoreMetaDataBeforeIdle = 16384,
+#endif
};
struct CodecNameAndQuirks {
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 0903f68..705ccd9 100755
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -605,8 +605,12 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
mNativeWindow.get(),
def.format.video.nFrameWidth,
def.format.video.nFrameHeight,
+#ifdef STE_HARDWARE
+ OMXCodec::OmxToHALFormat(def.format.video.eColorFormat));
+#else
def.format.video.eColorFormat);
#endif
+#endif
if (err != 0) {
ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index d054a14..1e561d6 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -127,6 +127,12 @@ static int32_t getColorFormat(const char* colorFormat) {
return OMX_TI_COLOR_FormatYUV420PackedSemiPlanar;
}
+#ifdef STE_HARDWARE
+ if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV420MB)) {
+ return OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB;
+ }
+#endif
+
if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_ANDROID_OPAQUE)) {
return OMX_COLOR_FormatAndroidOpaque;
}
@@ -575,13 +581,22 @@ status_t CameraSource::initWithCameraAccess(
// XXX: query camera for the stride and slice height
// when the capability becomes available.
+#ifdef STE_HARDWARE
+ int stride = newCameraParams.getInt(CameraParameters::KEY_RECORD_STRIDE);
+ int sliceHeight = newCameraParams.getInt(CameraParameters::KEY_RECORD_SLICE_HEIGHT);
+#endif
mMeta = new MetaData;
mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
mMeta->setInt32(kKeyColorFormat, mColorFormat);
mMeta->setInt32(kKeyWidth, mVideoSize.width);
mMeta->setInt32(kKeyHeight, mVideoSize.height);
+#ifdef STE_HARDWARE
+ mMeta->setInt32(kKeyStride, stride != -1 ? stride : mVideoSize.width);
+ mMeta->setInt32(kKeySliceHeight, sliceHeight != -1 ? sliceHeight : mVideoSize.height);
+#else
mMeta->setInt32(kKeyStride, mVideoSize.width);
mMeta->setInt32(kKeySliceHeight, mVideoSize.height);
+#endif
mMeta->setInt32(kKeyFrameRate, mVideoFrameRate);
#ifdef QCOM_HARDWARE
diff --git a/media/libstagefright/MediaDefs.cpp b/media/libstagefright/MediaDefs.cpp
index b5d4e44..2eb5c9e 100644
--- a/media/libstagefright/MediaDefs.cpp
+++ b/media/libstagefright/MediaDefs.cpp
@@ -25,8 +25,14 @@
const char *MEDIA_MIMETYPE_VIDEO_AVC = "video/avc";
const char *MEDIA_MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es";
const char *MEDIA_MIMETYPE_VIDEO_H263 = "video/3gpp";
+#ifdef STE_HARDWARE
+const char *MEDIA_MIMETYPE_VIDEO_H263_SW = "video/3gpp-sw";
+#endif
const char *MEDIA_MIMETYPE_VIDEO_MPEG2 = "video/mpeg2";
const char *MEDIA_MIMETYPE_VIDEO_RAW = "video/raw";
+#ifdef STE_HARDWARE
+const char *MEDIA_MIMETYPE_VIDEO_VC1 = "video/vc1";
+#endif
const char *MEDIA_MIMETYPE_AUDIO_AMR_NB = "audio/3gpp";
const char *MEDIA_MIMETYPE_AUDIO_AMR_WB = "audio/amr-wb";
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index a42ea1b..a975104 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -257,6 +257,20 @@ static int CompareSoftwareCodecsFirst(
return 0;
}
+#ifdef STE_HARDWARE
+uint32_t OMXCodec::OmxToHALFormat(OMX_COLOR_FORMATTYPE omxValue) {
+ switch (omxValue) {
+ case OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB:
+ return HAL_PIXEL_FORMAT_YCBCR42XMBN;
+ case OMX_COLOR_FormatYUV420Planar:
+ return HAL_PIXEL_FORMAT_YCbCr_420_P;
+ default:
+ ALOGI("Unknown OMX pixel format (0x%X), passing it on unchanged", omxValue);
+ return omxValue;
+ }
+}
+#endif
+
// static
void OMXCodec::findMatchingCodecs(
const char *mime,
@@ -393,6 +407,12 @@ uint32_t OMXCodec::getComponentQuirks(
quirks |= kInputBufferSizesAreBogus;
}
#endif
+#ifdef STE_HARDWARE
+ if (list->codecHasQuirk(
+ index, "requires-store-metadata-before-idle")) {
+ quirks |= kRequiresStoreMetaDataBeforeIdle;
+ }
+#endif
#ifdef QCOM_HARDWARE
quirks |= ExtendedCodec::getComponentQuirks(list,index);
@@ -966,6 +986,10 @@ static size_t getFrameSize(
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
+#ifdef STE_HARDWARE
+ case OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB:
+#endif
+
/*
* FIXME: For the Opaque color format, the frame size does not
* need to be (w*h*3)/2. It just needs to
@@ -1774,6 +1798,10 @@ void OMXCodec::setComponentRole(
"video_decoder.mpeg4", "video_encoder.mpeg4" },
{ MEDIA_MIMETYPE_VIDEO_H263,
"video_decoder.h263", "video_encoder.h263" },
+#ifdef STE_HARDWARE
+ { MEDIA_MIMETYPE_VIDEO_VC1,
+ "video_decoder.vc1", "video_encoder.vc1" },
+#endif
{ MEDIA_MIMETYPE_VIDEO_VP8,
"video_decoder.vp8", "video_encoder.vp8" },
{ MEDIA_MIMETYPE_VIDEO_VP9,
@@ -1866,6 +1894,16 @@ status_t OMXCodec::init() {
CHECK_EQ((int)mState, (int)LOADED);
status_t err;
+#ifdef STE_HARDWARE
+ if ((mQuirks & kRequiresStoreMetaDataBeforeIdle)
+ && (mFlags & kStoreMetaDataInVideoBuffers)) {
+ err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
+ if (err != OK) {
+ ALOGE("Storing meta data in video buffers is not supported");
+ return err;
+ }
+ }
+#endif
if (!(mQuirks & kRequiresLoadedToIdleAfterAllocation)) {
err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);
CHECK_EQ(err, (status_t)OK);
@@ -1927,7 +1965,12 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
}
status_t err = OK;
+#ifdef STE_HARDWARE
+ if (!(mQuirks & kRequiresStoreMetaDataBeforeIdle)
+ && (mFlags & kStoreMetaDataInVideoBuffers)
+#else
if ((mFlags & kStoreMetaDataInVideoBuffers)
+#endif
&& portIndex == kPortIndexInput) {
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
@@ -2127,7 +2170,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(),
def.format.video.nFrameWidth,
def.format.video.nFrameHeight,
+#ifdef STE_HARDWARE
+ OmxToHALFormat(def.format.video.eColorFormat));
+#else
def.format.video.eColorFormat);
+#endif
#else
OMX_COLOR_FORMATTYPE eColorFormat;
diff --git a/media/libstagefright/colorconversion/ColorConverter.cpp b/media/libstagefright/colorconversion/ColorConverter.cpp
index 597167f..a85ad72 100644
--- a/media/libstagefright/colorconversion/ColorConverter.cpp
+++ b/media/libstagefright/colorconversion/ColorConverter.cpp
@@ -47,6 +47,9 @@ bool ColorConverter::isValid() const {
case OMX_QCOM_COLOR_FormatYVU420SemiPlanar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
+#ifdef STE_HARDWARE
+ case OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB:
+#endif
return true;
default:
@@ -122,6 +125,12 @@ status_t ColorConverter::convert(
err = convertTIYUV420PackedSemiPlanar(src, dst);
break;
+#ifdef STE_HARDWARE
+ case OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB:
+ err = convertSTEYUV420PackedSemiPlanarMB(src, dst);
+ break;
+#endif
+
default:
{
CHECK(!"Should not be here. Unknown color conversion.");
@@ -506,6 +515,142 @@ status_t ColorConverter::convertTIYUV420PackedSemiPlanar(
return OK;
}
+#ifdef STE_HARDWARE
+status_t ColorConverter::convertSTEYUV420PackedSemiPlanarMB(
+ const BitmapParams &src, const BitmapParams &dst) {
+
+ if (!((dst.mWidth & 1) == 0
+ && src.mCropLeft == 0
+ && src.mCropTop == 0
+ && src.cropWidth() == dst.cropWidth()
+ && src.cropHeight() == dst.cropHeight())) {
+ return ERROR_UNSUPPORTED;
+ }
+
+ OMX_U32 mx = src.mWidth / 16;
+ OMX_U32 my = src.mHeight / 16;
+ OMX_U32 lx, ly;
+ OMX_U32 *pChroma, *pLuma = (OMX_U32 *)src.mBits;
+
+ pChroma = (OMX_U32 *)src.mBits + mx * my * 64;
+ for (ly = 0; ly < my; ly++) {
+ for (lx = 0; lx < mx; lx++) {
+ OMX_U32 col, row, lumaWord, chromaWord1 = 0, rgbWord, i;
+ OMX_U8 y[4], cb[4], cr[4], r[4], g[4], b[4];
+ OMX_U32 *dstBuf, *locBuf;
+ OMX_U32 *pBurstLuma = 0, *pBurstChroma = 0;
+ OMX_U32 *pWordLuma = 0, *pWordChroma = 0;
+ OMX_U8 nbOfBlock;
+
+ dstBuf = ((OMX_U32 *)dst.mBits) + (ly * 16) * dst.mWidth / 2;
+ dstBuf += (lx * 16) / 2;
+
+ pBurstLuma = pLuma;
+ pBurstChroma = pChroma;
+
+ for (col = 0; col < 2; col++) {
+ // conversion of a macroblock
+ for (nbOfBlock = 0; nbOfBlock < 2; nbOfBlock++) {
+ locBuf = dstBuf + 4 * col + 2 * nbOfBlock;
+ OMX_U32 dstRowOrigo = ly * 16 * dst.mWidth;
+
+ switch (nbOfBlock) {
+ case 0:
+ pWordLuma = pBurstLuma;
+ pWordChroma = pBurstChroma;
+ break;
+ case 1:
+ pWordLuma = pBurstLuma + 1;
+ pWordChroma = pBurstChroma + 1;
+ break;
+ }
+ for (row = 0; row < 16; row++) {
+ // Check for cropping on the y axis
+ if (ly * 16 + row >= dst.mHeight) {
+ break;
+ }
+
+ lumaWord = *pWordLuma;
+ pWordLuma += 2;
+ if (row % 2 == 0) {
+ chromaWord1 = *pWordChroma;
+ pWordChroma += 2;
+ }
+
+ y[3] = ((lumaWord >> 24) & 0xff);
+ y[2] = ((lumaWord >> 16) & 0xff);
+ y[1] = ((lumaWord >> 8) & 0xff);
+ y[0] = ((lumaWord >> 0) & 0xff);
+
+ cb[0] = cb[1] = ((chromaWord1 >> 0) & 0xff);
+ cb[2] = cb[3] = ((chromaWord1 >> 16) & 0xff);
+ cr[0] = cr[1] = ((chromaWord1 >> 8) & 0xff);
+ cr[2] = cr[3] = ((chromaWord1 >> 24) & 0xff);
+
+ for (i = 0; i < 4; i++) {
+ int32_t rW,gW,bW;
+
+ rW = 298 * y[i] + 408 * cr[i] - 57059;
+ gW = 298 * y[i] - 100 * cb[i] - 208 * cr[i] + 34713;
+ bW = 298 * y[i] + 516 * cb[i] - 70887;
+
+ if (rW < 0) {
+ r[i] = 0;
+ } else if (rW >= 65536) {
+ r[i] = 255;
+ } else {
+ r[i] = (rW >> 8);
+ }
+ if (gW < 0) {
+ g[i] = 0;
+ } else if (gW >= 65536) {
+ g[i] = 255;
+ } else {
+ g[i] = (gW >> 8);
+ }
+ if (bW < 0) {
+ b[i] = 0;
+ } else if (bW >= 65536) {
+ b[i] = 255;
+ } else {
+ b[i] = (bW >> 8);
+ }
+ r[i] >>= 3;
+ g[i] >>= 2;
+ b[i] >>= 3;
+ }
+ for (i = 0; i < 4; i += 2) {
+ // Check for cropping on the x axis
+ OMX_U32 rowPos = (locBuf - (OMX_U32 *)dst.mBits) * 2 - dstRowOrigo;
+ if (rowPos >= dst.mWidth) {
+ locBuf++;
+ continue;
+ }
+
+ rgbWord = (r[i + 1] << 27) +
+ (g[i + 1] << 21) +
+ (b[i + 1] << 16) +
+ (r[i] << 11) +
+ (g[i] << 5) +
+ (b[i] << 0);
+ *locBuf++ = rgbWord;
+ }
+ locBuf += dst.mWidth / 2 - 2;
+ dstRowOrigo += dst.mWidth;
+ } //end of for 16 loop
+ } //end of 2 block loop
+ pBurstLuma += 32;
+ pBurstChroma += 16;
+ } // end of 2 col loop
+ pLuma += 64;
+ pChroma += 32;
+ }
+ }
+
+ return OK;
+}
+#endif
+
uint8_t *ColorConverter::initClip() {
static const signed kClipMin = -278;
static const signed kClipMax = 535;