/* * Copyright (c) 2019 Amlogic, Inc. All rights reserved. * * This source code is subject to the terms and conditions defined in the * file 'LICENSE' which is part of this source code package. * * Description: */ #define LOG_MODULE_TAG "PQ" #define LOG_CLASS_TAG "PqTest" #include #include #include #include #include #include #include #include #include #include "CPQLog.h" #include "pqcmd.h" //#include //#include //using namespace android; class PqTest { public: PqTest() { mpPqClient = PqClient::GetInstance(); } ~PqTest() { } int SendCmd() { printf("%s: cmd is %d\n", __FUNCTION__, cmdID); int ret = -1; switch (cmdID) { case PQ_SET_PICTURE_MODE: ret = mpPqClient->SetPQMode(setValue[0], setValue[1]); break; case PQ_GET_PICTURE_MODE: ret = mpPqClient->GetPQMode(); printf("%s: current pq mode is %d.\n", __FUNCTION__, ret); break; case PQ_GET_LAST_PICTURE_MODE: ret = mpPqClient->GetLastPQMode(); printf("%s: current last pq mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_COLOR_TEMPERATURE_MODE: ret = mpPqClient->SetColorTemperature(setValue[0], setValue[1]); break; case PQ_GET_COLOR_TEMPERATURE_MODE: ret = mpPqClient->GetColorTemperature(); printf("%s: current colortempture mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_BRIGHTNESS: ret = mpPqClient->SetBrightness(setValue[0], setValue[1]); break; case PQ_GET_BRIGHTNESS: ret = mpPqClient->GetBrightness(); printf("%s: current Brightness value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_CONTRAST: ret = mpPqClient->SetContrast(setValue[0], setValue[1]); break; case PQ_GET_CONTRAST: ret = mpPqClient->GetContrast(); printf("%s: current contrast value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_SATURATION: ret = mpPqClient->SetSaturation(setValue[0], setValue[1]); break; case PQ_GET_SATURATION: ret = mpPqClient->GetSaturation(); printf("%s: current saturation value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_HUE: ret = mpPqClient->SetHue(setValue[0], setValue[1]); break; case PQ_GET_HUE: ret = mpPqClient->GetHue(); printf("%s: current hue value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_SHARPNESS: ret = mpPqClient->SetSharpness(setValue[0], setValue[1]); break; case PQ_GET_SHARPNESS: ret = mpPqClient->GetSharpness(); printf("%s: current sharpness value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_NOISE_REDUCTION_MODE: ret = mpPqClient->SetNoiseReductionMode(setValue[0], setValue[1]); break; case PQ_GET_NOISE_REDUCTION_MODE: ret = mpPqClient->GetNoiseReductionMode(); printf("%s: current NoiseReduction value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_EYE_PROTECTION_MODE: ret = mpPqClient->SetEyeProtectionMode(0, setValue[0], 1); break; case PQ_GET_EYE_PROTECTION_MODE: ret = mpPqClient->GetEyeProtectionMode(); printf("%s: current Protection mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_GAMMA: ret = mpPqClient->SetGammaValue(setValue[0], setValue[1]); break; case PQ_GET_GAMMA: ret = mpPqClient->GetGammaValue(); printf("%s: current Gamma is %d.\n", __FUNCTION__, ret); break; case PQ_SET_DISPLAY_MODE: ret = mpPqClient->SetDisplayMode(setValue[0], setValue[1], setValue[2]); break; case PQ_GET_DISPLAY_MODE: ret = mpPqClient->GetDisplayMode(); printf("%s: current Display mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_BACKLIGHT: ret = mpPqClient->SetBacklight(setValue[0], setValue[1]); break; case PQ_GET_BACKLIGHT: ret = mpPqClient->GetBacklight(); printf("%s: current backlight value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_DYNAMICBACKLIGHT: ret = mpPqClient->SetDynamicBacklight(setValue[0], setValue[1]); break; case PQ_GET_DYNAMICBACKLIGHT: ret = mpPqClient->GetDynamicBacklight(); printf("%s: current backlight value is %d.\n", __FUNCTION__, ret); break; case PQ_SET_LOCALCONTRAST: ret = mpPqClient->SetLocalContrastMode(setValue[0], setValue[1]); break; case PQ_GET_LOCALCONTRAST: ret = mpPqClient->GetLocalContrastMode(); printf("%s: current Local contrast mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_CM: ret = mpPqClient->SetColorBaseMode(setValue[0], setValue[1]); break; case PQ_GET_CM: ret = mpPqClient->GetColorBaseMode(); printf("%s: current Color base mode is %d.\n", __FUNCTION__, ret); break; case PQ_SET_SOURCE_CHANNEL: ret = mpPqClient->setCurrentSourceInfo(setValue[0], setValue[1], setValue[2]); break; case PQ_GET_SOURCE_CHANNEL: source_input_param_t source_param; source_param = mpPqClient->getCurrentSourceInfo(); printf("%s: current source info: source_input:%d sig_fmt:%d trans_fmt:%d.\n", __FUNCTION__, source_param.source_input, source_param.sig_fmt, source_param.trans_fmt); break; case PQ_SET_COLORGAMUT: ret = mpPqClient->SetColorGamutMode(setValue[0], setValue[1]); break; case PQ_GET_COLORGAMUT: ret = mpPqClient->GetColorGamutMode(); printf("%s: current Color gamut mode is %d\n", __FUNCTION__, ret); break; case PQ_GET_SOURCE_HDR_TYPE: ret = mpPqClient->GetSourceHDRType(); printf("%s: current HDR type is %d\n", __FUNCTION__, ret); break; case PQ_SET_DYNAMICCONTRAST: ret = mpPqClient->SetDynamicContrastMode(setValue[0], setValue[1]); break; case PQ_GET_DYNAMICCONTRAST: ret = mpPqClient->GetDynamicContrastMode(); printf("%s: current Dynamic contrast mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_RECOVERYPQ: ret = mpPqClient->SSMRecovery(); break; case PQ_SET_MEMCMODE: ret = mpPqClient->SetMemcMode(setValue[0], setValue[1]); break; case PQ_GET_MEMCMODE: ret = mpPqClient->GetMemcMode(); printf("%s: current Memc mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_MEMC_DEBLUR: ret = mpPqClient->SetMemcDeBlurLevel(setValue[0], setValue[1]); break; case PQ_GET_MEMC_DEBLUR: ret = mpPqClient->GetMemcDeBlurLevel(); printf("%s: current Memc DeBlurLevel level is %d\n", __FUNCTION__, ret); break; case PQ_SET_MEMC_DEJUDDER: ret = mpPqClient->SetMemcDeJudderLevel(setValue[0], setValue[1]); break; case PQ_GET_MEMC_DEJUDDER: ret = mpPqClient->GetMemcDeJudderLevel(); printf("%s: current Memc DeJudderLevel level is %d\n", __FUNCTION__, ret); break; case PQ_SET_DECONTOUR: ret = mpPqClient->SetDecontourMode(setValue[0], setValue[1]); break; case PQ_GET_DECONTOUR: ret = mpPqClient->GetDecontourMode(); printf("%s: current Memc Decontour Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_DEBLOCK: ret = mpPqClient->SetDeBlockMode(setValue[0], setValue[1]); break; case PQ_GET_DEBLOCK: ret = mpPqClient->GetDeBlockMode(); printf("%s: current DeBlock Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_DEMOSQUITO: ret = mpPqClient->SetDeMosquitoMode(setValue[0], setValue[1]); break; case PQ_GET_DEMOSQUITO: ret = mpPqClient->GetDeMosquitoMode(); printf("%s: current DeMosquito Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_BLACKSTRETCH: ret = mpPqClient->SetBlackStretch(setValue[0], setValue[1]); break; case PQ_GET_BLACKSTRETCH: ret = mpPqClient->GetBlackStretch(); printf("%s: current BlackStretch Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_WHITESTRETCH: ret = mpPqClient->SetWhiteStretch(setValue[0], setValue[1]); break; case PQ_GET_WHITESTRETCH: ret = mpPqClient->GetWhiteStretch(); printf("%s: current WhiteStretch Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_BLUESTRETCH: ret = mpPqClient->SetBlueStretch(setValue[0], setValue[1]); break; case PQ_GET_BLUESTRETCH: ret = mpPqClient->GetBlueStretch(); printf("%s: current BlueStretch Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_AIPQ: ret = mpPqClient->SetAipqEnable(setValue[0]); break; case PQ_GET_AIPQ: ret = mpPqClient->GetAipqEnable(); printf("%s: current Aipq Enable is %d\n", __FUNCTION__, ret); break; case PQ_SET_AISR: ret = mpPqClient->SetAiSrMode(setValue[0], setValue[1]); break; case PQ_GET_AISR: ret = mpPqClient->GetAiSrMode(); printf("%s: current AiSr mode is %d\n", __FUNCTION__, ret); break; case PQ_GET_AISR_MODE_RANGE: ret = mpPqClient->GetAiSrModeRange(); printf("%s: current AiSr mode range is %d\n", __FUNCTION__, ret); break; case PQ_SET_LDIM: ret = mpPqClient->SetLdim(setValue[0], setValue[1]); break; case PQ_GET_LDIM: ret = mpPqClient->GetLdim(); printf("%s: current LDIM mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_MPEGNR: ret = mpPqClient->SetMpegNr(setValue[0], setValue[1]); break; case PQ_GET_MPEGNR: ret = mpPqClient->GetMpegNr(); printf("%s: current MPEG NR mode is %d\n", __FUNCTION__, ret); break; case PQ_GET_COLORTEMP_USER_PARAM: tvpq_rgb_ogo_t rgbogo; rgbogo = mpPqClient->GetColorTemperatureUserParam(); printf("%s: current RGB GAIN&OFFSET is %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", __FUNCTION__, rgbogo.en, rgbogo.r_pre_offset, rgbogo.g_pre_offset, rgbogo.b_pre_offset, rgbogo.r_gain, rgbogo.g_gain, rgbogo.b_gain, rgbogo.r_post_offset, rgbogo.g_post_offset, rgbogo.b_post_offset); break; case PQ_SET_PICTURE_UI_CLEAR: ret = mpPqClient->ResetPictureUiSetting(); printf("%s: reset picture ui setting result is %d\n", __FUNCTION__, ret); break; case PQ_SET_COLOR_CUSTOMIZE: ret = mpPqClient->SetColorCustomize(setValue[0], setValue[1], setValue[2], setValue[3]); break; case PQ_GET_COLOR_CUSTOMIZE: vpp_single_color_param_cm_t cms_cm; cms_cm = mpPqClient->GetColorCustomize(setValue[0]); printf("%s: current color customize(CMS):%d %d %d\n", __FUNCTION__, cms_cm.sat, cms_cm.hue, cms_cm.luma); break; case PQ_SET_COLOR_CUSTOMIZE_3DLUT: ret = mpPqClient->SetColorCustomizeBy3DLut(setValue[0], setValue[1], setValue[2], setValue[3]); break; case PQ_GET_COLOR_CUSTOMIZE_3DLUT: vpp_single_color_param_3dlut_t cms_3dlut; cms_3dlut = mpPqClient->GetColorCustomizeBy3DLut(setValue[0]); printf("%s: current color customize(3DLUT):%d %d %d\n", __FUNCTION__, cms_3dlut.red, cms_3dlut.green, cms_3dlut.blue); break; case PQ_RESET_COLOR_CUSTOMIZE: ret = mpPqClient->ResetColorCustomize(setValue[0]); break; case PQ_SET_WB_GAMMA_DATA: ret = mpPqClient->SetWhitebalanceGamma(setValue[0], setValue[1], setValue[2]); break; case PQ_GET_WB_GAMMA_DATA: ret = mpPqClient->GetWhitebalanceGamma(setValue[0], setValue[1]); printf("%s: offset is %d\n", __FUNCTION__, ret); break; case PQ_SET_SUPERRESOLUTION: ret = mpPqClient->SetSuperResolution(setValue[0], setValue[1]); break; case PQ_GET_SUPERRESOLUTION: ret = mpPqClient->GetSuperResolution(); printf("%s: current Super Resolution is %d\n", __FUNCTION__, ret); break; case PQ_SET_COLOR_CUSTOMIZE_ENABLE: ret = mpPqClient->SetColorCustomizeEnable(setValue[0]); break; case PQ_GET_COLOR_CUSTOMIZE_ENABLE: ret = mpPqClient->GetColorCustomizeEnable(); printf("%s: current cms enable is %d\n", __FUNCTION__, ret); break; case PQ_GET_DB_VERSION_INFO: tvpq_databaseinfo_t ver_info; memset(&ver_info, 0, sizeof(tvpq_databaseinfo_t)); ver_info = mpPqClient->GetDbVersionInfo(setValue[0], setValue[1]); printf("%s: ver_info.version:%s\n", __FUNCTION__, ver_info.version); break; case PQ_SET_WB_GAMMA_ENABLE: ret = mpPqClient->SetWhitebalanceGammaEnable(setValue[0]); break; case PQ_GET_WB_GAMMA_ENABLE: ret = mpPqClient->GetWhitebalanceGammaEnable(); printf("%s: current Whitebalance Gamma Enableis %d\n", __FUNCTION__, ret); break; case PQ_SET_WB_GAMMA_MODE: ret = mpPqClient->SetWhitebalanceGammaMode(setValue[0]); break; case PQ_GET_WB_GAMMA_MODE: ret = mpPqClient->GetWhitebalanceGammaMode(); printf("%s: current Whitebalance Gamma Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_HDR_TONE_MAPPING_MODE: ret = mpPqClient->SetHdrToneMappingMode(setValue[0], setValue[1]); break; case PQ_GET_HDR_TONE_MAPPING_MODE: ret = mpPqClient->GetHdrToneMappingMode(); printf("%s: current HDR ToneMapping Mode is %d\n", __FUNCTION__, ret); break; case PQ_SET_FILM_MAKER_MODE: ret = mpPqClient->SetFilmMakerMode(setValue[0], setValue[1]); break; case PQ_GET_FILM_MAKER_MODE: ret = mpPqClient->GetFilmMakerMode(); printf("%s: current Film Maker Mode is %d\n", __FUNCTION__, ret); break; case PQ_GET_PQ_CASE_FUNC: ret = mpPqClient->HasPqCaseFunc((pq_case_func_e)setValue[0]); printf("%s: current pq case:%d func is %d.\n", __FUNCTION__, setValue[0], ret); break; case PQ_SET_LOAD_PQ: ret = mpPqClient->SetLoadPq(); printf("%s: SetLoadPq %d.\n", __FUNCTION__, ret); break; case PQ_SET_DEMO_STATE: ret = mpPqClient->SetPQModuleDemoState(setValue[0], setValue[1]); break; case PQ_GET_DEMO_STATE: ret = mpPqClient->GetPQModuleDemoState(setValue[0]); printf("%s: current demo %d state is %d\n", __FUNCTION__, setValue[0], ret); break; case PQ_SET_AISR_DEMO_WIN: ret = mpPqClient->SetPQModuleDemoAisrWin(setValue[0]); break; case PQ_GET_AISR_DEMO_WIN: ret = mpPqClient->GetPQModuleDemoAisrWin(); printf("%s: current aisr demo win is %d\n", __FUNCTION__, ret); break; case PQ_SET_AISR_DEMO_AXIS: ret = mpPqClient->SetPQModuleDemoAisrAxis(setValue[0], setValue[1], setValue[2], setValue[3]); break; case PQ_GET_AISR_DEMO_AXIS: pq_module_demo_aisr_axis_t axis; memset(&axis, 0, sizeof(pq_module_demo_aisr_axis_t)); axis = mpPqClient->GetPQModuleDemoAisrAxis(); printf("%s: current aisr demo axis is %d %d %d %d\n", __FUNCTION__, axis.xstart, axis.ystart, axis.xend, axis.yend); break; case PQ_GET_VDIN_SIG_INFO: vdin_sig_info_t sig_info; sig_info = mpPqClient->GetVdinSigInfo(); printf("%s: current vdin sig info: fps:%d allm_mode:%d it_content:%d cn_type:%d vrr_mode:%d.\n", __FUNCTION__, sig_info.fps, sig_info.allm_mode, sig_info.it_content, sig_info.cn_type, sig_info.vrr_mode); break; //factory API case PQ_FACTORY_RESET_PICTURE_MODE: ret = mpPqClient->FactoryResetPQMode(); break; case PQ_FACTORY_RESET_COLOR_TEMPERATURE_MODE: ret = mpPqClient->FactoryResetColorTemp(); break; case PQ_FACTORY_SET_COLOR_TEMPERATURE_MODE: ret = mpPqClient->FactoryWhiteBalanceSetColorTemperature(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_COLOR_TEMPERATURE_MODE: ret = mpPqClient->FactoryWhiteBalanceGetColorTemperature(); printf("%s: current colortempture mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_BRIGHTNESS: ret = mpPqClient->FactorySetPQMode_Brightness(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_BRIGHTNESS: ret = mpPqClient->FactoryGetPQMode_Brightness(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: current brightness mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_CONTRAST: ret = mpPqClient->FactorySetPQMode_Contrast(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_CONTRAST: ret = mpPqClient->FactoryGetPQMode_Contrast(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: current contrast mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_SATURATION: ret = mpPqClient->FactorySetPQMode_Saturation(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_SATURATION: ret = mpPqClient->FactoryGetPQMode_Saturation(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: current saturation mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_HUE: ret = mpPqClient->FactorySetPQMode_Hue(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_HUE: ret = mpPqClient->FactoryGetPQMode_Hue(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: current hue mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_SHARPNESS: ret = mpPqClient->FactorySetPQMode_Sharpness(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_SHARPNESS: ret = mpPqClient->FactoryGetPQMode_Sharpness(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: current sharpness mode is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_OVERSCAN: tvin_cutwin_t overscanParam; memset(&overscanParam, 0, sizeof(tvin_cutwin_t)); overscanParam.hs = (unsigned short)setValue[4]; overscanParam.he = (unsigned short)setValue[5]; overscanParam.vs = (unsigned short)setValue[6]; overscanParam.ve = (unsigned short)setValue[7]; ret = mpPqClient->FactorySetOverscanParams(setValue[0], setValue[1], setValue[2], setValue[3], overscanParam); break; case PQ_FACTORY_GET_OVERSCAN: tvin_cutwin_t cutwin_t; cutwin_t = mpPqClient->FactoryGetOverscanParams(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: cutwin_t: hs:%d he:%d vs:%d ve:%d.\n", __FUNCTION__, cutwin_t.hs, cutwin_t.he, cutwin_t.vs, cutwin_t.ve); break; case PQ_FACTORY_SET_WB_RED_GAIN: ret = mpPqClient->FactorySetWhiteBalanceRedGain(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_RED_GAIN: ret = mpPqClient->FactoryGetWhiteBalanceRedGain(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: red gain is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_WB_GREEN_GAIN: ret = mpPqClient->FactorySetWhiteBalanceGreenGain(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_GREEN_GAIN: ret = mpPqClient->FactoryGetWhiteBalanceGreenGain(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: green gain is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_WB_BLUE_GAIN: ret = mpPqClient->FactorySetWhiteBalanceBlueGain(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_BLUE_GAIN: ret = mpPqClient->FactoryGetWhiteBalanceBlueGain(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: blue gain is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_WB_RED_OFFSET: ret = mpPqClient->FactorySetWhiteBalanceRedPostOffset(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_RED_OFFSET: ret = mpPqClient->FactoryGetWhiteBalanceRedPostOffset(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: red offset is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_WB_GREEN_OFFSET: ret = mpPqClient->FactorySetWhiteBalanceGreenPostOffset(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_GREEN_OFFSET: ret = mpPqClient->FactoryGetWhiteBalanceGreenPostOffset(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: gree offset is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_WB_BLUE_OFFSET: ret = mpPqClient->FactorySetWhiteBalanceBluePostOffset(setValue[0], setValue[1], setValue[2], setValue[3], setValue[4]); break; case PQ_FACTORY_GET_WB_BLUE_OFFSET: ret = mpPqClient->FactoryGetWhiteBalanceBluePostOffset(setValue[0], setValue[1], setValue[2], setValue[3]); printf("%s: blue offset is %d.\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_COLOR_PARAMS: tvpq_rgb_ogo_t params; memset(¶ms, 0, sizeof(tvpq_rgb_ogo_t)); params.en = setValue[1]; params.r_gain = setValue[2]; params.g_gain = setValue[3]; params.b_gain = setValue[4]; params.r_post_offset = setValue[5]; params.g_post_offset = setValue[6]; params.b_post_offset = setValue[7]; ret = mpPqClient->FactorySetColorParams(setValue[0], params); break; case PQ_FACTORY_GET_COLOR_PARAMS: tvpq_rgb_ogo_t data; memset(&data, 0, sizeof(tvpq_rgb_ogo_t)); ret = mpPqClient->FactoryGetColorParams(setValue[0], &data); printf("%s: en %d\n", __FUNCTION__, data.en); printf("%s: rgain %d\n", __FUNCTION__, data.r_gain); printf("%s: ggai %d\n", __FUNCTION__, data.g_gain); printf("%s: bgain %d\n", __FUNCTION__, data.b_gain); printf("%s: roffset %d\n", __FUNCTION__, data.b_post_offset); printf("%s: goffset %d\n", __FUNCTION__, data.g_post_offset); printf("%s: boffset %d\n", __FUNCTION__, data.b_post_offset); break; case PQ_FACTORY_SET_PQ_ENABLE: ret = mpPqClient->FactorySetPQEn(setValue[0], setValue[1]); break; case PQ_FACTORY_SET_WB_GAMMA_DATA: ret = mpPqClient->FactorySetWhitebalanceGamma(setValue[0], setValue[1], setValue[2], setValue[3]); break; case PQ_FACTORY_GET_WB_GAMMA_DATA: ret = mpPqClient->FactoryGetWhitebalanceGamma(setValue[0], setValue[1], setValue[2]); printf("%s: offset is %d\n", __FUNCTION__, ret); break; case PQ_FACTORY_SET_PICTURE_MODE: ret = mpPqClient->FactorySetPictureMode(setValue[0], setValue[1], setValue[2]); break; case PQ_FACTORY_GET_PICTURE_MODE: ret = mpPqClient->FactoryGetPictureMode(setValue[0], setValue[1]); printf("%s: PICTURE MODE is %d\n", __FUNCTION__, ret); break; case PQ_SAVE_DISPLAY_MODE: ret = mpPqClient->SaveDisplayMode(setValue[0], setValue[1]); if (ret == 0) printf("%s: save display %d success!\n", __FUNCTION__, setValue[1]); else printf("%s: save display %d fail!\n", __FUNCTION__, setValue[1]); break; default: break; } return 0; } int SendCmdExt(int index) { int ret = 0; int i = 0; int node = 256; unsigned int Gammadata[257] = {0}; switch (index) { case 900: tvpq_rgb_ogo_t RGBOGO; memset(&RGBOGO, 0, sizeof(tvpq_rgb_ogo_t)); RGBOGO.en = setValue[0]; RGBOGO.r_gain = setValue[1]; RGBOGO.g_gain = setValue[2]; RGBOGO.b_gain = setValue[3]; RGBOGO.r_post_offset = setValue[4]; RGBOGO.g_post_offset = setValue[5]; RGBOGO.b_post_offset = setValue[6]; ret = mpPqClient->SetColorTemperatureUserParam(&RGBOGO); break; case 901: tvpq_rgb_ogo_t RGBOGO1; memset(&RGBOGO1, 0, sizeof(tvpq_rgb_ogo_t)); RGBOGO1 = mpPqClient->GetColorTemperatureUserParam(); printf("%s: en:%d, rgain:%d,ggain:%d,bgain:%d,roffset:%d,goffset:%d,boffset:%d\n", __FUNCTION__, RGBOGO1.en, RGBOGO1.r_gain,RGBOGO1.g_gain, RGBOGO1.b_gain, RGBOGO1.r_post_offset, RGBOGO1.g_post_offset, RGBOGO1.b_post_offset); break; case 902: ret = mpPqClient->ResetCurrentPictureMode(); break; case 903: ret = mpPqClient->ResetAllPictureSettings(); break; case 904: pq_mode_parameters CurrentParams; memset(&CurrentParams, 0, sizeof(pq_mode_parameters)); CurrentParams = mpPqClient->GetCurrentParameterValues(setValue[0]); printf("%s:\n" "backlight %3d, brightness %3d, contrast %3d, saturation %3d,\n" "sharpness %3d gamma %3d, dynamic_backlight %3d, local_contrast %3d,\n" "super_resolution %3d, color_temperature %3d, hue %3d, eye_protection %3d,\n" "dynamic_contrast %3d, hdr_tone_mapping %3d, color_gamut %3d, display_mode %3d,\n" "noise_reduction %3d, MPEG_noise_reduction %3d, smooth_plus %3d,\n", __FUNCTION__, CurrentParams.backlight, CurrentParams.brightness, CurrentParams.contrast, CurrentParams.saturation, CurrentParams.sharpness, CurrentParams.gamma, CurrentParams.dynamic_backlight,CurrentParams.local_contrast, CurrentParams.super_resolution, CurrentParams.color_temperature, CurrentParams.hue, CurrentParams.eye_protection, CurrentParams.dynamic_contrast, CurrentParams.hdr_tone_mapping, CurrentParams.color_gamut, CurrentParams.display_mode, CurrentParams.noise_reduction, CurrentParams.MPEG_noise_reduction, CurrentParams.smooth_plus); break; case 905: pq_mode_parameters DefaultParams; memset(&DefaultParams, 0, sizeof(pq_mode_parameters)); DefaultParams = mpPqClient->GetDefaultParameterValues(setValue[0]); printf("%s:\n" "backlight %3d, brightness %3d, contrast %3d, saturation %3d,\n" "sharpness %3d gamma %3d, dynamic_backlight %3d, local_contrast %3d,\n" "super_resolution %3d, color_temperature %3d, hue %3d, eye_protection %3d,\n" "dynamic_contrast %3d, hdr_tone_mapping %3d, color_gamut %3d, display_mode %3d,\n" "noise_reduction %3d, MPEG_noise_reduction %3d, smooth_plus %3d,\n", __FUNCTION__, DefaultParams.backlight, DefaultParams.brightness, DefaultParams.contrast,DefaultParams.saturation, DefaultParams.sharpness, DefaultParams.gamma, DefaultParams.dynamic_backlight,DefaultParams.local_contrast, DefaultParams.super_resolution, DefaultParams.color_temperature, DefaultParams.hue, DefaultParams.eye_protection, DefaultParams.dynamic_contrast, DefaultParams.hdr_tone_mapping, DefaultParams.color_gamut, DefaultParams.display_mode, DefaultParams.noise_reduction, DefaultParams.MPEG_noise_reduction, DefaultParams.smooth_plus); break; case 906: all_pq_parameters AllPqParams; memset(&AllPqParams, 0, sizeof(all_pq_parameters)); AllPqParams = mpPqClient->GetALLDefaultPQParameterValues(); printf("%s: =========== PICTURE MODE PARAMS ===========\n", __FUNCTION__); printf("%s:\n" "backlight %3d, brightness %3d, contrast %3d, saturation %3d,\n" "sharpness %3d gamma %3d, dynamic_backlight %3d, local_contrast %3d,\n" "super_resolution %3d, color_temperature %3d, hue %3d, eye_protection %3d,\n" "dynamic_contrast %3d, hdr_tone_mapping %3d, color_gamut %3d, display_mode %3d,\n" "noise_reduction %3d, MPEG_noise_reduction %3d, smooth_plus %3d,\n", __FUNCTION__, AllPqParams.PictureModeData.backlight, AllPqParams.PictureModeData.brightness, AllPqParams.PictureModeData.contrast, AllPqParams.PictureModeData.saturation, AllPqParams.PictureModeData.sharpness, AllPqParams.PictureModeData.gamma, AllPqParams.PictureModeData.dynamic_backlight, AllPqParams.PictureModeData.local_contrast, AllPqParams.PictureModeData.super_resolution, AllPqParams.PictureModeData.color_temperature, AllPqParams.PictureModeData.hue, AllPqParams.PictureModeData.eye_protection, AllPqParams.PictureModeData.dynamic_contrast, AllPqParams.PictureModeData.hdr_tone_mapping, AllPqParams.PictureModeData.color_gamut, AllPqParams.PictureModeData.display_mode, AllPqParams.PictureModeData.noise_reduction, AllPqParams.PictureModeData.MPEG_noise_reduction, AllPqParams.PictureModeData.smooth_plus); printf("%s: =========== WB GAMMA PARAMS ===========\n", __FUNCTION__); for (i = 0; i < MAX_WB_GAMMA_POINT; i++) { printf("%s: R[%d] = %d, G[%d] = %d, B[%d] = %d.\n", __FUNCTION__, i, AllPqParams.WBGammaData.R_OFFSET[i], i, AllPqParams.WBGammaData.G_OFFSET[i], i, AllPqParams.WBGammaData.B_OFFSET[i]); } printf("%s: =========== CMS PARAMS ===========\n", __FUNCTION__); for (i = 0; i < VPP_COLOR_9_MAX; i++) { printf("%s: Sat[%d] = %d, hue[%d] = %d, luma[%d] = %d\n", __FUNCTION__, i, AllPqParams.color_tune.data[i].sat, i, AllPqParams.color_tune.data[i].hue, i, AllPqParams.color_tune.data[i].luma); } break; case 907: ret = mpPqClient->CopyValuesFromPqMode(setValue[0]); break; case 908: ret = mpPqClient->ApplyUserSettingsToAllSources(); break; case 909: node = (setValue[2] == 257) ? 257 : 256; for (i = 0; i < node; i++) { Gammadata[i] = ((i * 4) * setValue[3]) / 1023; if (Gammadata[i] > 1023) { Gammadata[i] = 1023; } } ret = mpPqClient->SetGammaTable(Gammadata, setValue[0], setValue[1], node); break; case 910: ret = mpPqClient->ClearGammaTable(); break; case 911: ret = mpPqClient->SetPQByPassLevel(setValue[0]); break; case 912: ret = mpPqClient->SetGammaPattern(setValue[0], setValue[1], setValue[2], setValue[3]); break; case 913: ret = mpPqClient->GetGammaTable(Gammadata, setValue[0], setValue[1], setValue[2]); if (ret < 0) { printf("%s: GetGammaTable %d %d %d fail\n", __FUNCTION__, setValue[0], setValue[1], setValue[2]); } else { printf("%s: level[%d]:\n", __FUNCTION__, setValue[0]); for (i = 0; i < setValue[2]; i++) { if (setValue[1] == 0) printf("%s: RED CHANNEL[%d] = %d\n", __FUNCTION__, i, Gammadata[i]); else if (setValue[1] == 1) printf("%s: GREEN CHANNEL[%d] = %d\n", __FUNCTION__, i, Gammadata[i]); else if (setValue[1] == 2) printf("%s: BLUE CHANNEL[%d] = %d\n", __FUNCTION__, i, Gammadata[i]); else printf("%s: type: %d out of range\n", __FUNCTION__, setValue[1]); } } break; default: break; } return ret; } PqClient *mpPqClient; pqcmd_t cmdID = PQ_MODULE_CMD_MAX; int setValue[10] = {0}; }; int main(int argc, char **argv) { unsigned char read_buf[256]; memset(read_buf, 0, sizeof(read_buf)); // sp proc(ProcessState::self()); // proc->startThreadPool(); PqTest *test = new PqTest(); int run = 1; printf("#### please select cmd####\n"); printf("#### select 201 to set pq mode ####\n"); printf("#### select 202 to get pq mode ####\n"); printf("#### select 203 to set ColorTemperature mode ####\n"); printf("#### select 204 to get ColorTemperature mode ####\n"); printf("#### select 205 to set Brightness ####\n"); printf("#### select 206 to get Brightness ####\n"); printf("#### select 207 to set Contrast ####\n"); printf("#### select 208 to get Contrast ####\n"); printf("#### select 209 to set Saturatioin ####\n"); printf("#### select 210 to get Saturatioin ####\n"); printf("#### select 211 to set Hue ####\n"); printf("#### select 212 to get Hue ####\n"); printf("#### select 213 to set Sharpness ####\n"); printf("#### select 214 to get Sharpness ####\n"); printf("#### select 215 to set NoiseRedution ####\n"); printf("#### select 216 to get NoiseRedution ####\n"); printf("#### select 217 to set EyeProtection ####\n"); printf("#### select 218 to get EyeProtection ####\n"); printf("#### select 219 to set Gamma ####\n"); printf("#### select 220 to get Gamma ####\n"); printf("#### select 221 to set displaymode ####\n"); printf("#### select 222 to get displaymode ####\n"); printf("#### select 223 to set backlight ####\n"); printf("#### select 224 to get backlight ####\n"); printf("#### select 225 to set DynamicBacklight ####\n"); printf("#### select 226 to get DynamicBacklight ####\n"); printf("#### select 227 to set LocalContrast ####\n"); printf("#### select 228 to get LocalContrast ####\n"); printf("#### select 229 to set CM ####\n"); printf("#### select 230 to get CM ####\n"); printf("#### select 231 to set source channel ####\n"); printf("#### select 232 to get source channel ####\n"); printf("#### select 233 to set ColorGamut ####\n"); printf("#### select 234 to get ColorGamut ####\n"); printf("#### select 235 to get source fmt type ####\n"); printf("#### select 236 to set DynamicContrast ####\n"); printf("#### select 237 to get DynamicContrast ####\n"); printf("#### select 238 to recovery ssm ####\n"); printf("#### select 240 to set Memc ####\n"); printf("#### select 241 to get Memc ####\n"); printf("#### select 242 to set Memc DeBlur ####\n"); printf("#### select 243 to get Memc DeBlur ####\n"); printf("#### select 244 to set Memc DeJudder ####\n"); printf("#### select 245 to get Memc DeJudder ####\n"); printf("#### select 246 to set DeContour ####\n"); printf("#### select 247 to get DeContour ####\n"); printf("#### select 248 to set DeBlock ####\n"); printf("#### select 249 to get DeBlock ####\n"); printf("#### select 250 to set DeMosquito ####\n"); printf("#### select 251 to get DeMosquito ####\n"); printf("#### select 252 to set BlackStretch ####\n"); printf("#### select 253 to get BlackStretch ####\n"); printf("#### select 254 to set BlueStretch ####\n"); printf("#### select 255 to get BlueStretch ####\n"); printf("#### select 257 to set aipq ####\n"); printf("#### select 258 to get aipq ####\n"); printf("#### select 259 to set aisr ####\n"); printf("#### select 260 to get aisr ####\n"); printf("#### select 261 to get aisr mode range ####\n"); printf("#### select 262 to set LocalDimming ####\n"); printf("#### select 263 to get LocalDimming ####\n"); printf("#### select 264 to set MpegNr ####\n"); printf("#### select 265 to get MpegNr ####\n"); printf("#### select 266 to get RGB Gain/Offset ####\n"); printf("#### select 267 to reset picture ui setting ####\n"); printf("#### select 268 to set color customize ####\n"); printf("#### select 269 to get color customize ####\n"); printf("#### select 270 to set color customize by 3dlut ####\n"); printf("#### select 271 to get color customize by 3d lut ####\n"); printf("#### select 272 to reset color customize ####\n"); printf("#### select 273 to set Whitebalance Gamma ####\n"); printf("#### select 274 to get whitebalance Gamma ####\n"); printf("#### select 275 to set SuperResolution ####\n"); printf("#### select 276 to get SuperResolution ####\n"); printf("#### select 277 to get last pq mode ####\n"); printf("#### select 278 to set cms enable ####\n"); printf("#### select 279 to get cms enable ####\n"); printf("#### select 280 to get db version info ####\n"); printf("#### select 281 to set wb gamma enable ####\n"); printf("#### select 282 to get wb gamma enable ####\n"); printf("#### select 283 to set wb gamma mode ####\n"); printf("#### select 284 to get wb gamma mode ####\n"); printf("#### select 285 to set hdr ToneMapping mode ####\n"); printf("#### select 286 to get hdr ToneMapping mode ####\n"); printf("#### select 287 to set film maker mode ####\n"); printf("#### select 288 to get film maker mode ####\n"); printf("#### select 289 to get pq case func support or not ####\n"); printf("#### select 290 to set load pq mode ####\n"); printf("#### select 291 to set pq module demo state ####\n"); printf("#### select 292 to get pq module demo state ####\n"); printf("#### select 293 to set aisr demo win ####\n"); printf("#### select 294 to get aisr demo win ####\n"); printf("#### select 295 to set aisr demo axis ####\n"); printf("#### select 296 to get aisr demo axis ####\n"); printf("#### select 297 to set WhiteStretch ####\n"); printf("#### select 298 to get WhiteStretch ####\n"); printf("#### select 300 to save Display Mode ####\n"); printf("#### select 301 to get vdin sig info ####\n"); printf("#### below is factory cmd####\n"); printf("#### select 301 to reset pq mode ####\n"); printf("#### select 302 to reset ColorTemperature ####\n"); printf("#### select 303 to set ColorTemperature ####\n"); printf("#### select 304 to get ColorTemperature ####\n"); printf("#### select 305 to set Brightness ####\n"); printf("#### select 306 to get Brightness ####\n"); printf("#### select 307 to set Contrast ####\n"); printf("#### select 308 to get Contrast ####\n"); printf("#### select 309 to set Saturatioin ####\n"); printf("#### select 310 to get Saturatioin ####\n"); printf("#### select 311 to set Hue ####\n"); printf("#### select 312 to get Hue ####\n"); printf("#### select 313 to set Sharpness ####\n"); printf("#### select 314 to get Sharpness ####\n"); printf("#### select 315 to set overscan ####\n"); printf("#### select 316 to get overscan ####\n"); printf("#### select 317 to set WB R Gain ####\n"); printf("#### select 318 to get WB R Gain ####\n"); printf("#### select 319 to set WB G Gain ####\n"); printf("#### select 320 to get WB G Gain ####\n"); printf("#### select 321 to set WB B Gain ####\n"); printf("#### select 322 to get WB B Gain ####\n"); printf("#### select 323 to set WB R OFFSET ####\n"); printf("#### select 324 to get WB R OFFSET ####\n"); printf("#### select 325 to set WB G OFFSET ####\n"); printf("#### select 326 to get WB G OFFSET ####\n"); printf("#### select 327 to set WB B OFFSET ####\n"); printf("#### select 328 to get WB B OFFSET ####\n"); printf("#### select 335 to set CRI colortemp params####\n"); printf("#### select 336 to get CRI colortemp params ####\n"); printf("#### select 341 to set PQ enable/disable ####\n"); printf("#### select 342 to get PQ enable/disable ####\n"); printf("#### select 343 to set CRI Whitebalance Gamma ####\n"); printf("#### select 344 to get CRI Whitebalance Gamma ####\n"); printf("#### select 345 to set Factory Picture Mode ####\n"); printf("#### select 346 to get Factory Picture Mode ####\n"); printf("#### below is Ext cmd####\n"); printf("#### select 900 to set COLORTEMPERATURE USER PARAM ####\n"); printf("#### select 901 to get COLORTEMPERATURE USER PARAM ####\n"); printf("#### select 902 to reset PICTURE MODE DATA ####\n"); printf("#### select 903 to reset ALL PICTURE MODE DATA ####\n"); printf("#### select 904 to get PICTURE MODE DATA ####\n"); printf("#### select 905 to get DEFAULT PICTURE MODE DATA ####\n"); printf("#### select 906 to get ALL PQ DEFAULT DATA ####\n"); printf("#### select 907 to get COPY PARAM FROM PQ MODE ####\n"); printf("#### select 908 to get COPY PICTURE MODE PARAM TO ALL SOURCE ####\n"); printf("#### select 909 to set GAMMA DATA TABLE ####\n"); printf("#### select 910 to clear GAMMA DATA TABLE ####\n"); printf("#### select 911 to set PQ BYPASS LEVEL ####\n"); printf("#### select 912 to set GAMMA PATTERN ####\n"); printf("#### select 913 to get GAMMA Table ####\n"); printf("#### select 999 to exit####\n"); printf("##########################\n"); while (run) { char Command[10] = {'\0'}; int command; int mode = 0, is_save = 0; int source = 0, sig_fmt = 0, fmt_3d = 0, pq_mode = 0; int colortemp_mode = 0; int color = 0, type = 0, value = 0; int state = 0; int xstart = 0, ystart = 0, xend = 0, yend = 0; int scanf_ret = 0; int ret = scanf("%9s", Command); fflush(stdin); if (ret <= 0 ) { LOGE("scanf faile\n"); } command = atoi(Command); printf("#### Command: %s %d\n", Command, command); switch (command) { case 399: { test->cmdID = PQ_MODULE_CMD_MAX; run = 0; break; } case 201: { printf("PQ_SET_PICTURE_MODE\n"); printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_PICTURE_MODE; break; } case 202: { printf("PQ_GET_PICTURE_MODE\n"); test->cmdID = PQ_GET_PICTURE_MODE; break; } case 203: { printf("PQ_SET_COLOR_TEMPERATURE_MODE\n"); printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_COLOR_TEMPERATURE_MODE; break; } case 204: { printf("PQ_GET_COLOR_TEMPERATURE_MODE\n"); test->cmdID = PQ_GET_COLOR_TEMPERATURE_MODE; break; } case 205: { printf("PQ_SET_BRIGHTNESS\n"); printf("Brightness value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_BRIGHTNESS; break; } case 206: { printf("PQ_GET_BRIGHTNESS\n"); test->cmdID = PQ_GET_BRIGHTNESS; break; } case 207: { printf("PQ_SET_CONTRAST\n"); printf("Contrast value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_CONTRAST; break; } case 208: { printf("PQ_GET_CONTRAST\n"); test->cmdID = PQ_GET_CONTRAST; break; } case 209: { printf("PQ_SET_SATURATION\n"); printf("Saturatioin value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_SATURATION; break; } case 210: { printf("PQ_GET_SATURATION\n"); test->cmdID = PQ_GET_SATURATION; break; } case 211: { printf("PQ_SET_HUE\n"); printf("Hue value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_HUE; break; } case 212: { printf("PQ_GET_HUE\n"); test->cmdID = PQ_GET_HUE; break; } case 213: { printf("PQ_SET_SHARPNESS\n"); printf("Sharpness value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_SHARPNESS; break; } case 214: { printf("PQ_GET_SHARPNESS\n"); test->cmdID = PQ_GET_SHARPNESS; break; } case 215: { printf("PQ_SET_NOISE_REDUCTION_MODE\n"); printf("NoiseReduction: OFF(0), LOW(1), MID(2), HIGH(3), AUTO(4)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_NOISE_REDUCTION_MODE; break; } case 216: { printf("PQ_GET_NOISE_REDUCTION_MODE\n"); test->cmdID = PQ_GET_NOISE_REDUCTION_MODE; break; } case 217: { printf("PQ_SET_EYE_PROTECTION_MODE\n"); printf("EyeProtection(0: OFF, 1: LOW, 2: MID, 3: HIGH)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_EYE_PROTECTION_MODE; break; } case 218: { printf("PQ_GET_EYE_PROTECTION_MODE\n"); test->cmdID = PQ_GET_EYE_PROTECTION_MODE; break; } case 219: { printf("PQ_SET_GAMMA\n"); printf("Gamma(0:[2.2], 1:[1.7], 2:[1.8], 3:[1.9], 4:[2.0], 5:[2.2], 6:[2.2], 7:[2.3], 8:[2.4], 9:[2.5], 10:[2.6], 11:[2.7], 12:[BT1886])\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_GAMMA; break; } case 220: { printf("PQ_GET_GAMMA\n"); test->cmdID = PQ_GET_GAMMA; break; } case 221: { int is_used = 0; printf("PQ_SET_DISPLAY_MODE\n"); printf("is used:(0 ~ 1)\n"); scanf_ret = scanf("%d", &is_used); test->setValue[0] = is_used; printf("displaymode(0:[16:9], 1:[PERSON], 2:[MOVIE], 3:[CAPTION], 4:[4:3], 5:[FULL], 6:[NORMAL], 7:[NOSCALEUP], 8:[CROP_FULL], 9:[CROP], 10:[ZOOM])\n"); scanf_ret += scanf("%d", &mode); test->setValue[1] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[2] = is_save; if (scanf_ret != 3) break; test->cmdID = PQ_SET_DISPLAY_MODE; break; } case 222: { printf("PQ_GET_DISPLAY_MODE\n"); test->cmdID = PQ_GET_DISPLAY_MODE; break; } case 223: { printf("PQ_SET_BACKLIGHT\n"); printf("backlight value:(0 ~ 100)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_BACKLIGHT; break; } case 224: { printf("PQ_GET_BACKLIGHT\n"); test->cmdID = PQ_GET_BACKLIGHT; break; } case 225: { printf("PQ_SET_DYNAMICBACKLIGHT\n"); printf("DynamicBacklight: OFF(0), LOW(1), HIGH(2)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DYNAMICBACKLIGHT; break; } case 226: { printf("PQ_GET_DYNAMICBACKLIGHT\n"); test->cmdID = PQ_GET_DYNAMICBACKLIGHT; break; } case 227: { printf("PQ_SET_LOCALCONTRAST\n"); printf("LocalContrast: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_LOCALCONTRAST; break; } case 228: { printf("PQ_GET_LOCALCONTRAST\n"); test->cmdID = PQ_GET_LOCALCONTRAST; break; } case 229: { printf("PQ_SET_CM\n"); printf("CM value: OFF(0), 1: OPTIMIZE(1), ENHANCE(2), DEMO(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_CM; break; } case 230: { printf("PQ_GET_CM\n"); test->cmdID = PQ_GET_CM; break; } case 231: { printf("PQ_SET_SOURCE_CHANNEL\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; if (scanf_ret != 3) break; test->cmdID = PQ_SET_SOURCE_CHANNEL; break; } case 232: { printf("PQ_GET_SOURCE_CHANNEL\n"); test->cmdID = PQ_GET_SOURCE_CHANNEL; break; } case 233: { printf("PQ_SET_COLORGAMUT\n"); printf("ColorGamut: AUTO(0), NATIVE(1), SRGB(2), DCI_P3(3), ADOBE_RGB(4), BT2020(5)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_COLORGAMUT; break; } case 234: { printf("PQ_GET_COLORGAMUT\n"); test->cmdID = PQ_GET_COLORGAMUT; break; } case 235: { printf("PQ_GET_SOURCE_HDR_TYPE\n"); test->cmdID = PQ_GET_SOURCE_HDR_TYPE; break; } case 236: { printf("PQ_SET_DYNAMICCONTRAST\n"); printf("DynamicContrast: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DYNAMICCONTRAST; break; } case 237: { printf("PQ_GET_DYNAMICCONTRAST\n"); test->cmdID = PQ_GET_DYNAMICCONTRAST; break; } case 238: { printf("PQ_SET_RECOVERYPQ\n"); test->cmdID = PQ_SET_RECOVERYPQ; break; } case 240: { printf("PQ_SET_MEMCMODE\n"); printf("Memc mode: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_MEMCMODE; break; } case 241: { printf("PQ_GET_MEMCMODE\n"); test->cmdID = PQ_GET_MEMCMODE; break; } case 242: { printf("PQ_SET_MEMC_DEBLUR\n"); printf("DeBlur mode:(0 ~ 10)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_MEMC_DEBLUR; break; } case 243: { printf("PQ_GET_MEMC_DEBLUR\n"); test->cmdID = PQ_GET_MEMC_DEBLUR; break; } case 244: { printf("PQ_SET_MEMC_DEJUDDER\n"); printf("DeJudder mode:(0 ~ 10)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_MEMC_DEJUDDER; break; } case 245: { printf("PQ_GET_MEMC_DEJUDDER\n"); test->cmdID = PQ_GET_MEMC_DEJUDDER; break; } case 246: { printf("PQ_SET_DECONTOUR\n"); printf("DeContour mode: OFF(0), LOW(1), MID(2), HIGH(3) AUTO(4)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DECONTOUR; break; } case 247: { printf("PQ_GET_DECONTOUR\n"); test->cmdID = PQ_GET_DECONTOUR; break; } case 248: { printf("PQ_SET_DEBLOCK\n"); printf("DeBlock: OFF(0), LOW(1), MID(2), HIGH(3), AUTO(4)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DEBLOCK; break; } case 249: { printf("PQ_GET_DEBLOCK\n"); test->cmdID = PQ_GET_DEBLOCK; break; } case 250: { printf("PQ_SET_DEMOSQUITO\n"); printf("DeMosquito: OFF(0), LOW(1), MID(2), HIGH(3), AUTO(4)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DEMOSQUITO; break; } case 251: { printf("PQ_GET_DEMOSQUITO\n"); test->cmdID = PQ_GET_DEMOSQUITO; break; } case 252: { printf("PQ_SET_BLACKSTRETCH\n"); printf("BlackStretch: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_BLACKSTRETCH; break; } case 253: { printf("PQ_GET_BLACKSTRETCH\n"); test->cmdID = PQ_GET_BLACKSTRETCH; break; } case 254: { printf("PQ_SET_BLUESTRETCH\n"); printf("BlueStretch: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_BLUESTRETCH; break; } case 255: { printf("PQ_GET_BLUESTRETCH\n"); test->cmdID = PQ_GET_BLUESTRETCH; break; } case 257: { printf("PQ_SET_AIPQ\n"); printf("AIPQ enable: OFF(0), ON(1)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_AIPQ; break; } case 258: { printf("PQ_GET_AIPQ\n"); test->cmdID = PQ_GET_AIPQ; break; } case 259: { printf("PQ_SET_AISR\n"); printf("AISR mode: OFF(0), LOW/ON(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_AISR; break; } case 260: { printf("PQ_GET_AISR\n"); test->cmdID = PQ_GET_AISR; break; } case 261: { printf("PQ_GET_AISR_MODE_RANGE\n"); test->cmdID = PQ_GET_AISR_MODE_RANGE; break; } case 262: { printf("PQ_SET_LDIM\n"); printf("Ldim mode: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_LDIM; break; } case 263: { printf("PQ_GET_LDIM\n"); test->cmdID = PQ_GET_LDIM; break; } case 264: { printf("PQ_SET_MPEGNR\n"); printf("mpeg nr mode: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_MPEGNR; break; } case 265: { printf("PQ_GET_MPEGNR\n"); test->cmdID = PQ_GET_MPEGNR; break; } case 266: { printf("PQ_GET_COLORTEMP_USER_PARAM\n"); test->cmdID = PQ_GET_COLORTEMP_USER_PARAM; break; } case 267: { printf("PQ_SET_PICTURE_UI_CLEAR\n"); test->cmdID = PQ_SET_PICTURE_UI_CLEAR; break; } case 268: { printf("PQ_SET_COLOR_CUSTOMIZE\n"); printf("color: PURPLE(0), RED(1), SKIN(2), YELLOW(3), YELLOW_GREEN(4), GREEN(5), BLUE_GREEN(6), CYAN(7), BLUE(8)\n"); scanf_ret= scanf("%d", &color); test->setValue[0] = color; printf("type: Saturation(0), Hue(1), Luminance(2)\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; printf("value: -50 ~ 50\n"); scanf_ret += scanf("%d", &value); test->setValue[2] = value; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[3] = is_save; if (scanf_ret != 4) break; test->cmdID = PQ_SET_COLOR_CUSTOMIZE; break; } case 269: { printf("PQ_GET_COLOR_CUSTOMIZE\n"); printf("color: PURPLE(0), RED(1), SKIN(2), YELLOW(3), YELLOW_GREEN(4), GREEN(5), BLUE_GREEN(6), CYAN(7), BLUE(8)\n"); scanf_ret = scanf("%d", &color); test->setValue[0] = color; if (scanf_ret != 1) break; test->cmdID = PQ_GET_COLOR_CUSTOMIZE; break; } case 270: { printf("PQ_SET_COLOR_CUSTOMIZE_3DLUT\n"); printf("color: RED(0), GREEN(1), BLUE(2), CYAN(3), MAGENTA(4), YELLOW(5)\n"); scanf_ret = scanf("%d", &color); test->setValue[0] = color; printf("type: (RED(3), GREEN(4), BLUE(5)\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; printf("value: (-100 ~ 100)\n"); scanf_ret += scanf("%d", &value); test->setValue[2] = value; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[3] = is_save; if (scanf_ret != 4) break; test->cmdID = PQ_SET_COLOR_CUSTOMIZE_3DLUT; break; } case 271: { printf("PQ_GET_COLOR_CUSTOMIZE_3DLUT\n"); printf("color: RED(0), GREEN(1), BLUE(2), CYAN(3), MAGENTA(4), YELLOW(5)\n"); scanf_ret = scanf("%d", &color); test->setValue[0] = color; if (scanf_ret != 1) break; test->cmdID = PQ_GET_COLOR_CUSTOMIZE_3DLUT; break; } case 272: { printf("PQ_RESET_COLOR_CUSTOMIZE\n"); printf("Module: CMS(0), 3DLUT(1)\n"); scanf_ret = scanf("%d", &value); test->setValue[0] = value; if (scanf_ret != 1) break; test->cmdID = PQ_RESET_COLOR_CUSTOMIZE; break; } case 273: { int offset = 0; printf("PQ_SET_WB_GAMMA_DATA\n"); printf("color: RED CHANNEL(0), GREEN CHANNEL(1), BLUE CHANNEL(2)\n"); scanf_ret = scanf("%d", &color); test->setValue[0] = color; printf("point: 10 percent per step(0p(0) ~ 100p(10)\n"); scanf_ret += scanf("%d", &mode); test->setValue[1] = mode; printf("offset: -1023 ~ 1023\n"); scanf_ret += scanf("%d", &offset); test->setValue[2] = offset; if (scanf_ret != 3) break; test->cmdID = PQ_SET_WB_GAMMA_DATA; break; } case 274: { printf("PQ_GET_WB_GAMMA_DATA\n"); printf("color: RED CHANNEL(0), GREEN CHANNEL(1), BLUE CHANNEL(2)\n"); scanf_ret = scanf("%d", &color); test->setValue[0] = color; printf("mode: 10 percent per step(0 percent(0) ~ 100 percent(11)\n"); scanf_ret += scanf("%d", &mode); test->setValue[1] = mode; if (scanf_ret != 2) break; test->cmdID = PQ_GET_WB_GAMMA_DATA; break; } case 275: { printf("PQ_SET_SUPERRESOLUTION\n"); printf("mode: OFF(0), MID(1), HIGH(2)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0 ~ 1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_SUPERRESOLUTION; break; } case 276: { printf("PQ_GET_SUPERRESOLUTION\n"); test->cmdID = PQ_GET_SUPERRESOLUTION; break; } case 277: { printf("PQ_GET_LAST_PICTURE_MODE\n"); test->cmdID = PQ_GET_LAST_PICTURE_MODE; break; } case 278: { printf("PQ_SET_COLOR_CUSTOMIZE_ENABLE\n"); printf("Enable: OFF(0), ON(1)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_COLOR_CUSTOMIZE_ENABLE; break; } case 279: { printf("PQ_GET_COLOR_CUSTOMIZE_ENABLE\n"); test->cmdID = PQ_GET_COLOR_CUSTOMIZE_ENABLE; break; } case 280: { printf("PQ_GET_DB_VERSION_INFO\n"); printf("mode: pq.db(0), overscan.db(1)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("type: tool_ver(0), project_ver(1), generate_time(2), chip_ver(3), db_ver(4)\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; if (scanf_ret != 2) break; test->cmdID = PQ_GET_DB_VERSION_INFO; break; } case 281: { printf("PQ_SET_WB_GAMMA_ENABLE\n"); printf("Enable: OFF(0), ON(1)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_WB_GAMMA_ENABLE; break; } case 282: { printf("PQ_GET_WB_GAMMA_ENABLE\n"); test->cmdID = PQ_GET_WB_GAMMA_ENABLE; break; } case 283: { printf("PQ_SET_WB_GAMMA_MODE\n"); printf("Mode: 2POINT(0), 10POINT(1), 11POINT(2), 21POINT(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_WB_GAMMA_MODE; break; } case 284: { printf("PQ_GET_WB_GAMMA_MODE\n"); test->cmdID = PQ_GET_WB_GAMMA_MODE; break; } case 285: { printf("PQ_SET_HDR_TONE_MAPPING_MODE\n"); printf("Mode: OFF(0), DYNAMIC(1), STATIC(2)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_HDR_TONE_MAPPING_MODE; break; } case 286: { printf("PQ_GET_HDR_TONE_MAPPING_MODE\n"); test->cmdID = PQ_GET_HDR_TONE_MAPPING_MODE; break; } case 287: { printf("PQ_SET_FILM_MAKER_MODE\n"); printf("Mode: Disable(0), Auto(1)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_FILM_MAKER_MODE; break; } case 288: { printf("PQ_GET_FILM_MAKER_MODE\n"); test->cmdID = PQ_GET_FILM_MAKER_MODE; break; } case 289: { printf("PQ_GET_PQ_CASE_FUNC\n"); printf("Type: refer pq_case_func_e\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_GET_PQ_CASE_FUNC; break; } case 290: { printf("PQ_SET_LOAD_PQ\n"); test->cmdID = PQ_SET_LOAD_PQ; break; } case 291: { printf("PQ_SET_DEMO_STATE\n"); printf("module: 0(memc demo), 1(aisr demo)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("state: 0(state off), 1(state on)\n"); scanf_ret += scanf("%d", &state); test->setValue[1] = state; if (scanf_ret != 2) break; test->cmdID = PQ_SET_DEMO_STATE; break; } case 292: { printf("PQ_GET_DEMO_STATE\n"); printf("module: 0(memc demo), 1(aisr demo)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_GET_DEMO_STATE; break; } case 293: { printf("PQ_SET_AISR_DEMO_WIN\n"); printf("mode: 0(win off), 1(win on)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_SET_AISR_DEMO_WIN; break; } case 294: { printf("PQ_GET_AISR_DEMO_WIN\n"); test->cmdID = PQ_GET_AISR_DEMO_WIN; break; } case 295: { printf("PQ_SET_AISR_DEMO_AXIS\n"); printf("xstart/ystart/xend/yend:\n"); scanf_ret = scanf("%d", &xstart); test->setValue[0] = xstart; scanf_ret = scanf("%d", &ystart); test->setValue[1] = ystart; scanf_ret = scanf("%d", &xend); test->setValue[2] = xend; scanf_ret = scanf("%d", ¥d); test->setValue[3] = yend; if (scanf_ret != 4) break; test->cmdID = PQ_SET_AISR_DEMO_AXIS; break; } case 296: { printf("PQ_GET_AISR_DEMO_AXIS\n"); test->cmdID = PQ_GET_AISR_DEMO_AXIS; break; } case 297: { printf("PQ_SET_WHITESTRETCH\n"); printf("WhiteStretch: OFF(0), LOW(1), MID(2), HIGH(3)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("is save:(0~1)\n"); scanf_ret += scanf("%d", &is_save); test->setValue[1] = is_save; if (scanf_ret != 2) break; test->cmdID = PQ_SET_WHITESTRETCH; break; } case 298: { printf("PQ_GET_WHITESTRETCH\n"); test->cmdID = PQ_GET_WHITESTRETCH; break; } case 300: { printf("PQ_SAVE_DISPLAY_MODE\n"); printf("source: DEFAULT(0), TV(1), AV1(2), AV2(3), YPBPR1(4), YPBPR2(5), HDMI1(6), HDMI2(7), HDMI3(8), HDMI4(9), VGA(10), MPEG(11), DTV(12), SVIDEO(13), IPTV(14), DUMMY(15), SPDIF(16), ADTV(17)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("displaymode(0:[16:9], 1:[PERSON], 2:[MOVIE], 3:[CAPTION], 4:[4:3], 5:[FULL], 6:[NORMAL], 7:[NOSCALEUP], 8:[CROP_FULL], 9:[CROP], 10:[ZOOM])\n"); scanf_ret += scanf("%d", &mode); test->setValue[1] = mode; test->cmdID = PQ_SAVE_DISPLAY_MODE; break; } case 301: { printf("PQ_GET_VDIN_SIG_INFO\n"); test->cmdID = PQ_GET_VDIN_SIG_INFO; break; } //factory cmd case 401: { printf("PQ_FACTORY_RESET_PICTURE_MODE\n"); test->cmdID = PQ_FACTORY_RESET_PICTURE_MODE; break; } case 402: { printf("PQ_FACTORY_RESET_COLOR_TEMPERATURE_MODE\n"); test->cmdID = PQ_FACTORY_RESET_COLOR_TEMPERATURE_MODE; break; } case 403: { printf("PQ_FACTORY_SET_COLOR_TEMPERATURE_MODE\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_SET_COLOR_TEMPERATURE_MODE; break; } case 404: { printf("PQ_FACTORY_GET_COLOR_TEMPERATURE_MODE\n"); test->cmdID = PQ_FACTORY_GET_COLOR_TEMPERATURE_MODE; break; } case 405: { printf("PQ_FACTORY_SET_BRIGHTNESS\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; printf("brightness value: 0 ~ 100\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_BRIGHTNESS; break; } case 406: { printf("PQ_FACTORY_GET_BRIGHTNESS\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_BRIGHTNESS; break; } case 407: { printf("PQ_FACTORY_SET_CONTRAST\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; printf("contrast value: 0 ~ 100\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_CONTRAST; break; } case 408: { printf("PQ_FACTORY_GET_CONTRAST\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_CONTRAST; break; } case 409: { printf("PQ_FACTORY_SET_SATURATION\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; printf("Saturation value: 0 ~ 100\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_SATURATION; break; } case 410: { printf("PQ_FACTORY_GET_SATURATION\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_SATURATION; break; } case 411: { printf("PQ_FACTORY_SET_HUE\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; printf("Hue value: 0 ~ 100\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_HUE; break; } case 412: { printf("PQ_FACTORY_GET_HUE\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_HUE; break; } case 413: { printf("PQ_FACTORY_SET_SHARPNESS\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; printf("sharpness value: 0 ~ 100\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_SHARPNESS; break; } case 414: { printf("PQ_FACTORY_GET_SHARPNESS\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[3] = pq_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_SHARPNESS; break; } case 415: { int dmode = 0; int he = 0, hs = 0, ve = 0, vs = 0; printf("PQ_FACTORY_SET_OVERSCAN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("displaymode(0:[16:9], 1:[PERSON], 2:[MOVIE], 3:[CAPTION], 4:[4:3], 5:[FULL], 6:[NORMAL], 7:[NOSCALEUP], 8:[CROP_FULL], 9:[CROP], 10:[ZOOM])\n"); scanf_ret += scanf("%d", &dmode); test->setValue[3] = dmode; printf("hs value: \n"); scanf_ret += scanf("%d", &hs); test->setValue[4] = hs; printf("he value: \n"); scanf_ret += scanf("%d", &he); test->setValue[5] = he; printf("vs value: \n"); scanf_ret += scanf("%d", &vs); test->setValue[6] = vs; printf("ve value: \n"); scanf_ret += scanf("%d", &ve); test->setValue[7] = ve; if (scanf_ret != 8) break; test->cmdID = PQ_FACTORY_SET_OVERSCAN; break; } case 416: { int dmode = 0; printf("PQ_FACTORY_GET_OVERSCAN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("displaymode(0:[16:9], 1:[PERSON], 2:[MOVIE], 3:[CAPTION], 4:[4:3], 5:[FULL], 6:[NORMAL], 7:[NOSCALEUP], 8:[CROP_FULL], 9:[CROP], 10:[ZOOM])\n"); scanf_ret += scanf("%d", &dmode); test->setValue[3] = dmode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_OVERSCAN; break; } case 417: { printf("PQ_FACTORY_SET_WB_RED_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("red gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_RED_GAIN; break; } case 418: { printf("PQ_FACTORY_GET_WB_RED_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_RED_GAIN; break; } case 419: { printf("PQ_FACTORY_SET_WB_GREEN_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("green gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_GREEN_GAIN; break; } case 420: { printf("PQ_FACTORY_GET_WB_GREEN_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_GREEN_GAIN; break; } case 421: { printf("PQ_FACTORY_SET_WB_BLUE_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("blue gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_BLUE_GAIN; break; } case 422: { printf("PQ_FACTORY_GET_WB_BLUE_GAIN\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_BLUE_GAIN; break; } case 423: { printf("PQ_FACTORY_SET_WB_RED_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("red offset: -1024 ~ 1023\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_RED_OFFSET; break; } case 424: { printf("PQ_FACTORY_GET_WB_RED_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_RED_OFFSET; break; } case 425: { printf("PQ_FACTORY_SET_WB_GREEN_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("green offset: -1024 ~ 1023\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_GREEN_OFFSET; break; } case 426: { printf("PQ_FACTORY_GET_WB_GREEN_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_GREEN_OFFSET; break; } case 427: { printf("PQ_FACTORY_SET_WB_BLUE_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; printf("blue offset: -1024 ~ 1023\n"); scanf_ret += scanf("%d", &mode); test->setValue[4] = mode; if (scanf_ret != 5) break; test->cmdID = PQ_FACTORY_SET_WB_BLUE_OFFSET; break; } case 428: { printf("PQ_FACTORY_GET_WB_BLUE_OFFSET\n"); printf("source: INVALID(-1), TV(0), AV1(1), AV2(2), YPBPR1(3), YPBPR2(4), HDMI1(5), HDMI2(6), HDMI3(7), HDMI4(8), VGA(9), MPEG(10), DTV(11), SVIDEO(12), IPTV(13), DUMMY(14), SPDIF(15), ADTV(16)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("sig_fmt: TVIN_SIG_FMT_NULL(0) ~ TVIN_SIG_FMT_MAX(0xc01)\n"); scanf_ret += scanf("%d", &sig_fmt); test->setValue[1] = sig_fmt; printf("fmt_3d: TVIN_TFMT_2D(0) ~ TVIN_TFMT_3D_DET_CHESSBOARD(15)\n"); scanf_ret += scanf("%d", &fmt_3d); test->setValue[2] = fmt_3d; printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret += scanf("%d", &colortemp_mode); test->setValue[3] = colortemp_mode; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_GET_WB_BLUE_OFFSET; break; } case 435: { int en = 0, rgain = 0, ggain = 0, bgain = 0, roffset = 0, goffset = 0, boffset = 0; printf("PQ_FACTORY_SET_COLOR_PARAMS\n"); printf("ColorTemperature mode :(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("en: 0 ~ 1\n"); scanf_ret += scanf("%d", &en); test->setValue[1] = en; printf("rgain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &rgain); test->setValue[2] = rgain; printf("ggain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &ggain); test->setValue[3] = ggain; printf("bgain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &bgain); test->setValue[4] = bgain; printf("roffset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &roffset); test->setValue[5] = roffset; printf("goffset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &goffset); test->setValue[6] = goffset; printf("boffset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &boffset); test->setValue[7] = boffset; if (scanf_ret != 8) break; test->cmdID = PQ_FACTORY_SET_COLOR_PARAMS; break; } case 436: { printf("PQ_FACTORY_GET_COLOR_PARAMS\n"); printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; if (scanf_ret != 1) break; test->cmdID = PQ_FACTORY_GET_COLOR_PARAMS; break; } case 441: { int pq_type = 0; int enable = 0; printf("PQ_FACTORY_SET_PQ_ENABLE\n"); printf("pq_type value: ALL(0), COLOR(1), SHARPNESS_SD(2), SHARPNESS_HD(3), _3D_NR_GAIN(4)," "_2D_NR_GAIN(5), DCI(6), GAMMA(7), FMD(8), CTI_SR0(9)," "CTI_SR1(10), DEJAGGY_SR0(11), DEJAGGY_SR1(12), DRT_SR0(13), DRT_SR1(14), BLACK_STRETCH(15)\n"); scanf_ret = scanf("%d", &pq_type); test->setValue[0] = pq_type; printf("isEnable: disable(0), enable(1)\n"); scanf_ret += scanf("%d", &enable); test->setValue[1] = enable; if (scanf_ret != 2) break; test->cmdID = PQ_FACTORY_SET_PQ_ENABLE; break; } case 442: { int pq_type = 0; printf("PQ_FACTORY_GET_PQ_ENABLE\n"); printf("pq_type value: ALL(0), COLOR(1), SHARPNESS_SD(2), SHARPNESS_HD(3), _3D_NR_GAIN(4)," "_2D_NR_GAIN(5), DCI(6), GAMMA(7), FMD(8), CTI_SR0(9)," "CTI_SR1(10), DEJAGGY_SR0(11), DEJAGGY_SR1(12), DRT_SR0(13), DRT_SR1(14), BLACK_STRETCH(15)\n"); scanf_ret = scanf("%d", &pq_type); test->setValue[0] = pq_type; if (scanf_ret != 1) break; test->cmdID = PQ_FACTORY_GET_PQ_ENABLE; break; } case 443: { int offset = 0; int level = 0; printf("PQ_FACTORY_SET_WB_GAMMA_DATA\n"); printf("ColorTemperature mode value:(0:Sandard, 1:warm, 2:cool, 3:user, 4:warmer, 5:cooler)\n"); scanf_ret = scanf("%d", &level); test->setValue[0] = level; printf("color: RED CHANNEL(0), GREEN CHANNEL(1), BLUE CHANNEL(2)\n"); scanf_ret += scanf("%d", &color); test->setValue[1] = color; printf("mode: 10 percent per step(0 per(0) ~ 100 per(11)\n"); scanf_ret += scanf("%d", &mode); test->setValue[2] = mode; printf("offset: -1023 ~ 1023\n"); scanf_ret += scanf("%d", &offset); test->setValue[3] = offset; if (scanf_ret != 4) break; test->cmdID = PQ_FACTORY_SET_WB_GAMMA_DATA; break; } case 444: { int level = 0; printf("PQ_FACTORY_GET_WB_GAMMA_DATA\n"); printf("ColorTemperature mode value:(0: Sandard, 1: warm, 2: cool, 3: user, 4: warmer, 5: cooler)\n"); scanf_ret = scanf("%d", &level); test->setValue[0] = level; printf("color: RED CHANNEL(0), GREEN CHANNEL(1), BLUE CHANNEL(2)\n"); scanf_ret += scanf("%d", &color); test->setValue[1] = color; printf("mode: 10 percent per step(0 per(0) ~ 100 per(11)\n"); scanf_ret += scanf("%d", &mode); test->setValue[2] = mode; if (scanf_ret != 3) break; test->cmdID = PQ_FACTORY_GET_WB_GAMMA_DATA; break; } case 445: { printf("PQ_FACTORY_SET_PICTURE_MODE\n"); printf("source: DEFAULT(0), TV(1), AV1(2), AV2(3), YPBPR1(4), YPBPR2(5), HDMI1(6), HDMI2(7), HDMI3(8), HDMI4(9), VGA(10), MPEG(11), DTV(12), SVIDEO(13), IPTV(14), DUMMY(15), SPDIF(16), ADTV(17)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("type: DEFAULT(0), SDR(1), HDR(2), HDRP(3), HLG(4), DOLVI(5)\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret += scanf("%d", &pq_mode); test->setValue[2] = pq_mode; if (scanf_ret != 3) break; test->cmdID = PQ_FACTORY_SET_PICTURE_MODE; break; } case 446: { printf("PQ_FACTORY_GET_PICTURE_MODE\n"); printf("source: DEFAULT(0), TV(1), AV1(2), AV2(3), YPBPR1(4), YPBPR2(5), HDMI1(6), HDMI2(7), HDMI3(8), HDMI4(9), VGA(10), MPEG(11), DTV(12), SVIDEO(13), IPTV(14), DUMMY(15), SPDIF(16), ADTV(17)\n"); scanf_ret = scanf("%d", &source); test->setValue[0] = source; printf("type: DEFAULT(0), SDR(1), HDR(2), HDRP(3), HLG(4), DOLVI(5)\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; if (scanf_ret != 2) break; test->cmdID = PQ_FACTORY_GET_PICTURE_MODE; break; } //EXT CMD case 900: { int enable = 0, r_gain = 0, g_gain = 0, b_gain = 0, r_offset = 0, g_offset = 0, b_offset = 0; printf("CMD_PQ_SET_COLORTEMPERATURE_USER_PARAM\n"); printf("enable: 0 ~ 1\n"); scanf_ret = scanf("%d", &enable); test->setValue[0] = enable; printf("r_gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &r_gain); test->setValue[1] = r_gain; printf("g_gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &g_gain); test->setValue[2] = g_gain; printf("b_gain: 0 ~ 2047\n"); scanf_ret += scanf("%d", &b_gain); test->setValue[3] = b_gain; printf("r_offset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &r_offset); test->setValue[4] = r_offset; printf("g_offset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &g_offset); test->setValue[5] = g_offset; printf("b_offset: -1023 ~ 1024\n"); scanf_ret += scanf("%d", &b_offset); test->setValue[6] = b_offset; printf("scanf_ret: %d\n", scanf_ret); break; } case 901: { printf("CMD_PQ_GET_COLORTEMPERATURE_USER_PARAM\n"); break; } case 902: { printf("CMD_PQ_RESET_PICTURE_MODE\n"); break; } case 903: { printf("CMD_PQ_RESET_ALL_PICTURE_MODE\n"); break; } case 904: { printf("CMD_PQ_GET_PICTURE_MODE_PARAM\n"); printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("scanf_ret: %d\n", scanf_ret); break; } case 905: { printf("CMD_PQ_GET_DEFAULT_PICTURE_MODE_PARAM\n"); printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("scanf_ret: %d\n", scanf_ret); break; } case 906: { printf("CMD_PQ_GET_DEFAULT_ALL_PQ_PARAM\n"); break; } case 907: { printf("CMD_PQ_COPY_VALUES_FROM_PICTURE_MODE\n"); printf("pq_mode value: STANDARD(0), BRIGHT(1), SOFT(2), USER(3), MOVIE(4), COLORFUL(5), MONITOR(6), GAME(7), SPORTS(8), SONY(9), SAMSUNG(10), SHARP(11), DV_BRIGHT(12), DV_DARK(13)\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("scanf_ret: %d\n", scanf_ret); break; } case 908: { printf("CMD_PQ_COPY_PICTURE_MODE_PARAM_TO_ALL_SOURCE\n"); break; } case 909: { printf("CMD_PQ_SET_GAMMA_TABLE\n"); printf("level:(Sandard[0], warm[1], cool[2], user[3], warmer[4], cooler[5])\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("type:(R[0], G[1], B[2])\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; printf("len:(256 or 257)\n"); scanf_ret += scanf("%d", &value); test->setValue[2] = value; printf("data: 0 ~ 1023\n"); scanf_ret += scanf("%d", &color); test->setValue[3] = color; printf("scanf_ret: %d\n", scanf_ret); break; } case 910: { printf("CMD_PQ_CLEAR_GAMMA_TABLE\n"); break; } case 911: { printf("CMD_PQ_SET_PQ_BYPASS_LEVEL\n"); printf("level:(no bypass[0], bypass[1]\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("scanf_ret: %d\n", scanf_ret); break; } case 912: { printf("CMD_PQ_SET_GAMMA_PATTERN\n"); printf("enable:(disable[0], enable[1]\n"); scanf_ret = scanf("%d", &mode); test->setValue[0] = mode; printf("R:(0 ~ 255\n"); scanf_ret += scanf("%d", &type); test->setValue[1] = type; printf("G:(0 ~ 255\n"); scanf_ret += scanf("%d", &value); test->setValue[2] = value; printf("B:(0 ~ 255\n"); scanf_ret += scanf("%d", &color); test->setValue[3] = color; printf("scanf_ret: %d\n", scanf_ret); break; } case 913: { printf("CMD_PQ_GET_GAMMA_TABLE\n"); printf("level:(Sandard[0], warm[1], cool[2], user[3], warmer[4], cooler[5])\n"); scanf_ret = scanf("%d", &mode); if (mode < 0 || mode > 5) { printf("level:%d out of range 0 ~ 5!\n", mode); command = -1; break; } test->setValue[0] = mode; printf("type:(R[0], G[1], B[2])\n"); scanf_ret += scanf("%d", &type); if (type < 0 || type > 2) { printf("type:%d out of range 0 ~ 5!\n", type); command = -1; break; } test->setValue[1] = type; printf("len:(256 or 257)\n"); scanf_ret += scanf("%d", &value); if (value != 256 && value != 257) { printf("value:%d out of range 256 or 257!\n", value); command = -1; break; } test->setValue[2] = value; printf("scanf_ret: %d\n", scanf_ret); break; } default: { test->cmdID = PQ_MODULE_CMD_MAX; run = 0; break; } } if (command >= 0 && command < PQ_FACTORY_CMD_MAX) test->SendCmd(); else if (command >= 900) test->SendCmdExt(command); else printf("#### command %d NG ####\n", command); printf("#### please input cmd again####\n"); fflush (stdout); } return 0; }