Browse Source

1. Let stf_isp_ctrl search the ybn file first in the same path of it.
2. Let the output size of SS0 and SS1 follow the video1.

Signed-off-by: zejian.su <zejian.su@starfivetech.com>

zejian.su 6 months ago
parent
commit
470bd92084

+ 2 - 2
ispsdk/DDKSource/libispsdk/libISPC.a

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:22da68aafd4f0eac6e038ef2d39e9a8cbbdab82bedf9b1da7c131f1b417a2afb
-size 25723584
+oid sha256:09f3f16d65e964d2d2491815529b075cc56dab8c75f2a6db9302ddc16f479e5a
+size 25702800

+ 22 - 7
ispsdk/DDKSource/test_apps/stf_isp_ctrl/src/stf_isp_ctrl.c

@@ -35,7 +35,7 @@
 #include <sys/mman.h>
 #include <sys/ioctl.h>
 #include <asm/types.h>
-#include <jpeglib.h>
+//#include <jpeglib.h>
 #include <libv4l2.h>
 #include <signal.h>
 #include <stdint.h>
@@ -1932,12 +1932,27 @@ static STF_INT IspCtrl(
     // ISP load binary parameters.
     //=========================================================================
     bFileExist = STF_FALSE;
-    sprintf(szIspBinParamFilename, "/root/.isp_setting/IspSetting_%dx%d.ybn",
-        stPipeline.stIspCtx.stImgSize.u16Cx,
-        stPipeline.stIspCtx.stImgSize.u16Cy
-        );
-    bFileExist = (0 == stat(szIspBinParamFilename, &stStat))
-        ? STF_TRUE : STF_FALSE;
+    if(readlink("/proc/self/exe", szIspBinParamFilename, sizeof(szIspBinParamFilename) - 1)) {
+        char * szExe = 0;
+        szExe = strrchr(szIspBinParamFilename, '/');
+        if(szExe) {
+            sprintf(szExe, "/IspSetting_%s_%dx%d.ybn",
+                szSensorName,
+                stPipeline.stIspCtx.stImgSize.u16Cx,
+                stPipeline.stIspCtx.stImgSize.u16Cy
+            );
+            bFileExist = (0 == stat(szIspBinParamFilename, &stStat))
+                ? STF_TRUE : STF_FALSE;
+        }
+    }
+    if (STF_FALSE == bFileExist) {
+        sprintf(szIspBinParamFilename, "/root/.isp_setting/IspSetting_%dx%d.ybn",
+            stPipeline.stIspCtx.stImgSize.u16Cx,
+            stPipeline.stIspCtx.stImgSize.u16Cy
+            );
+        bFileExist = (0 == stat(szIspBinParamFilename, &stStat))
+            ? STF_TRUE : STF_FALSE;
+    }
     if (STF_FALSE == bFileExist) {
         sprintf(szIspBinParamFilename, "/root/ISP/IspSetting_%s_%dx%d.ybn",
             szSensorName,