summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-07-09 11:23:50 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-07-09 11:53:36 +0200
commitf93bfcfc24b2a5e78c976586da5e07a0d5f696c6 (patch)
tree5a66dca6c80116389455f0741ae0566f815a76f3
parent9d4d90f068ff493a45af79bf17d3ac8efdc92d94 (diff)
downloadandroid_hardware_samsung_slsi_exynos5430-f93bfcfc24b2a5e78c976586da5e07a0d5f696c6.tar.gz
android_hardware_samsung_slsi_exynos5430-f93bfcfc24b2a5e78c976586da5e07a0d5f696c6.tar.xz
android_hardware_samsung_slsi_exynos5430-f93bfcfc24b2a5e78c976586da5e07a0d5f696c6.zip
libhwjpeg: The LL Kernel expects the quality between 0 and 100
-rw-r--r--include/ExynosJpegApi.h9
-rw-r--r--libhwjpeg/ExynosJpegEncoder.cpp11
2 files changed, 1 insertions, 19 deletions
diff --git a/include/ExynosJpegApi.h b/include/ExynosJpegApi.h
index 26f3d08..4ec8c74 100644
--- a/include/ExynosJpegApi.h
+++ b/include/ExynosJpegApi.h
@@ -168,15 +168,6 @@ public:
ExynosJpegEncoder();
virtual ~ExynosJpegEncoder();
- enum QUALITY {
- QUALITY_LEVEL_1 = 0, /* high */
- QUALITY_LEVEL_2,
- QUALITY_LEVEL_3,
- QUALITY_LEVEL_4,
- QUALITY_LEVEL_5,
- QUALITY_LEVEL_6, /* low */
- };
-
int create(void);
int destroy(void);
diff --git a/libhwjpeg/ExynosJpegEncoder.cpp b/libhwjpeg/ExynosJpegEncoder.cpp
index 0d5876f..6c2aaca 100644
--- a/libhwjpeg/ExynosJpegEncoder.cpp
+++ b/libhwjpeg/ExynosJpegEncoder.cpp
@@ -190,16 +190,7 @@ int ExynosJpegEncoder::setQuality(int iV4l2Quality)
if (t_bFlagCreate == false)
return ERROR_JPEG_DEVICE_NOT_CREATE_YET;
- if (iV4l2Quality >= 96)
- t_stJpegConfig.enc_qual = QUALITY_LEVEL_1;
- else if (iV4l2Quality >= 92)
- t_stJpegConfig.enc_qual = QUALITY_LEVEL_2;
- else if (iV4l2Quality >= 38)
- t_stJpegConfig.enc_qual = QUALITY_LEVEL_4;
- else if (iV4l2Quality >= 30)
- t_stJpegConfig.enc_qual = QUALITY_LEVEL_5;
- else
- t_stJpegConfig.enc_qual = QUALITY_LEVEL_6;
+ t_stJpegConfig.enc_qual = iV4l2Quality;
return ERROR_NONE;
}