summaryrefslogtreecommitdiffstats
path: root/media/img_utils/include
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-08-03 11:36:40 -0700
committerRuben Brunk <rubenbrunk@google.com>2015-08-05 16:10:12 -0700
commitbdd368796e7773f0fefb9e238dd16c9242180db5 (patch)
tree84c01a6f8233d4937326bcf58232a23348696d11 /media/img_utils/include
parentd24b430c3fc82e9288e9072971c9a185a18abd89 (diff)
downloadframeworks_av-bdd368796e7773f0fefb9e238dd16c9242180db5.zip
frameworks_av-bdd368796e7773f0fefb9e238dd16c9242180db5.tar.gz
frameworks_av-bdd368796e7773f0fefb9e238dd16c9242180db5.tar.bz2
camera2: Add bad pixel opcode to img_utils.
Bug: 22463079 Change-Id: Ied76bbdcf3f706cea6e249748c6bfd4092ff6d39
Diffstat (limited to 'media/img_utils/include')
-rw-r--r--media/img_utils/include/img_utils/DngUtils.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/media/img_utils/include/img_utils/DngUtils.h b/media/img_utils/include/img_utils/DngUtils.h
index 3dcedc5..1d8df9c 100644
--- a/media/img_utils/include/img_utils/DngUtils.h
+++ b/media/img_utils/include/img_utils/DngUtils.h
@@ -138,6 +138,34 @@ class ANDROID_API OpcodeListBuilder : public LightRefBase<OpcodeListBuilder> {
double opticalCenterY,
const double* kCoeffs);
+
+ /**
+ * Add FixBadPixelsList opcode for the given metadata parameters.
+ *
+ * Returns OK on success, or a negative error code.
+ */
+ virtual status_t addBadPixelListForMetadata(const uint32_t* hotPixels,
+ uint32_t xyPairCount,
+ uint32_t colorFilterArrangement);
+
+ /**
+ * Add FixBadPixelsList opcode.
+ *
+ * bayerPhase - 0=top-left of image is red, 1=top-left of image is green pixel in red row,
+ * 2=top-left of image is green pixel in blue row, 3=top-left of image is
+ * blue.
+ * badPointCount - number of (x,y) pairs of bad pixels are given in badPointRowColPairs.
+ * badRectCount - number of (top, left, bottom, right) tuples are given in
+ * badRectTopLeftBottomRightTuples
+ *
+ * Returns OK on success, or a negative error code.
+ */
+ virtual status_t addBadPixelList(uint32_t bayerPhase,
+ uint32_t badPointCount,
+ uint32_t badRectCount,
+ const uint32_t* badPointRowColPairs,
+ const uint32_t* badRectTopLeftBottomRightTuples);
+
// TODO: Add other Opcode methods
protected:
static const uint32_t FLAG_OPTIONAL = 0x1u;
@@ -146,6 +174,7 @@ class ANDROID_API OpcodeListBuilder : public LightRefBase<OpcodeListBuilder> {
// Opcode IDs
enum {
WARP_RECTILINEAR_ID = 1,
+ FIX_BAD_PIXELS_LIST = 5,
GAIN_MAP_ID = 9,
};
@@ -161,6 +190,8 @@ class ANDROID_API OpcodeListBuilder : public LightRefBase<OpcodeListBuilder> {
ByteArrayOutput mOpList;
EndianOutput mEndianOut;
+ status_t addOpcodePreamble(uint32_t opcodeId);
+
};
} /*namespace img_utils*/