From f93bfcfc24b2a5e78c976586da5e07a0d5f696c6 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 9 Jul 2015 11:23:50 +0200 Subject: libhwjpeg: The LL Kernel expects the quality between 0 and 100 --- include/ExynosJpegApi.h | 9 --------- libhwjpeg/ExynosJpegEncoder.cpp | 11 +---------- 2 files changed, 1 insertion(+), 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; } -- cgit v1.2.3