From 008d3644fda023c6e6c27e9f52f45dca280bdca7 Mon Sep 17 00:00:00 2001 From: Hao Yao Date: Wed, 24 Sep 2025 16:07:29 +0800 Subject: [PATCH] PTL PV release candidate 2 on 2025-09-24 Signed-off-by: Hao Yao --- .../ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin | Bin 351384 -> 351636 bytes .../ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin | Bin 360172 -> 360428 bytes config/linux/ipu75xa/libcamhal_configs.json | 10 +- config/linux/ipu75xa/sensors/isx031-1.json | 439 + config/linux/ipu75xa/sensors/isx031-2.json | 442 + config/linux/ipu75xa/sensors/isx031-3.json | 442 + config/linux/ipu75xa/sensors/isx031-4.json | 1132 ++ config/linux/ipu75xa/sensors/isx031-5.json | 439 + config/linux/ipu75xa/sensors/isx031-6.json | 442 + config/linux/ipu75xa/sensors/isx031-7.json | 442 + config/linux/ipu75xa/sensors/isx031-8.json | 2494 +++ .../linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin | Bin 402812 -> 0 bytes .../ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin | Bin 204196 -> 206244 bytes .../ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin | Bin 497948 -> 508700 bytes .../ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin | Bin 849800 -> 868232 bytes .../ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin | Bin 2430168 -> 2482776 bytes .../linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin | Bin 2228496 -> 2276240 bytes .../ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin | Bin 901240 -> 920696 bytes include/api/ICamera.h | 4 +- include/api/Parameters.h | 2 +- include/utils/ScopedAtrace.h | 9 +- modules/algowrapper/IntelCca.cpp | 2 +- modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp | 1 + .../ipu75xa/FragmentsConfigurator.cpp | 735 + .../ipu_desc/ipu75xa/FragmentsConfigurator.h | 65 + .../ipu75xa/GraphResolutionConfigurator.cpp | 588 +- .../ipu75xa/GraphResolutionConfigurator.h | 33 +- .../GraphResolutionConfiguratorInclude.h | 4 + ...75xaGraphResolutionConfiguratorAutogen.cpp | 48 +- ...pu75xaGraphResolutionConfiguratorAutogen.h | 5 +- .../ipu75xa/Ipu75xaStaticGraphAutogen.cpp | 13874 +++++++++++----- .../ipu75xa/Ipu75xaStaticGraphAutogen.h | 837 +- .../ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h | 6 +- .../Ipu75xaStaticGraphDataPreloadAutogen.c | 5 - .../Ipu75xaStaticGraphDataPreloadAutogen.h | 81 +- .../Ipu75xaStaticGraphReaderAutogen.cpp | 99 + .../ipu75xa/Ipu75xaStaticGraphReaderAutogen.h | 2 +- .../ipu75xa/Ipu75xaStaticGraphTypesAutogen.h | 30 +- .../Ipu75xaTerminalDescriptorAutogen.cpp | 78 + .../Ipu75xaTerminalDescriptorAutogen.h | 25 + .../ipu_desc/ipu7x/FragmentsConfigurator.cpp | 735 + .../ipu_desc/ipu7x/FragmentsConfigurator.h | 65 + .../ipu7x/GraphResolutionConfigurator.cpp | 588 +- .../ipu7x/GraphResolutionConfigurator.h | 33 +- .../GraphResolutionConfiguratorInclude.h | 4 + ...pu7xGraphResolutionConfiguratorAutogen.cpp | 47 +- .../Ipu7xGraphResolutionConfiguratorAutogen.h | 5 +- .../ipu7x/Ipu7xStaticGraphAutogen.cpp | 1249 +- .../ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h | 301 +- .../ipu7x/Ipu7xStaticGraphBinaryAutogen.h | 3 +- .../Ipu7xStaticGraphDataPreloadAutogen.c | 5 - .../Ipu7xStaticGraphDataPreloadAutogen.h | 42 +- .../ipu7x/Ipu7xStaticGraphReaderAutogen.cpp | 22 + .../ipu7x/Ipu7xStaticGraphReaderAutogen.h | 2 +- .../ipu7x/Ipu7xStaticGraphTypesAutogen.h | 24 +- .../ipu7x/Ipu7xTerminalDescriptorAutogen.cpp | 34 +- .../ipu7x/Ipu7xTerminalDescriptorAutogen.h | 9 + modules/v4l2/v4l2_device.h | 4 +- modules/v4l2/v4l2_subdevice.cc | 6 +- modules/v4l2/v4l2_video_node.cc | 2 +- src/3a/AiqCore.cpp | 23 +- src/3a/AiqCore.h | 7 +- src/3a/AiqEngine.cpp | 20 +- src/3a/AiqEngine.h | 15 +- src/3a/AiqResult.h | 5 +- src/3a/AiqResultStorage.h | 11 +- src/3a/AiqSetting.h | 5 +- src/3a/AiqUnit.cpp | 38 +- src/3a/AiqUnit.h | 22 +- src/3a/AiqUtils.cpp | 66 +- src/3a/AiqUtils.h | 5 +- src/3a/I3AControlFactory.h | 5 +- src/3a/LensManager.h | 7 +- src/3a/MakerNote.h | 5 +- src/3a/SensorManager.cpp | 20 +- src/3a/SensorManager.h | 9 +- src/3a/intel3a/Intel3AParameter.cpp | 21 +- src/3a/intel3a/Intel3AParameter.h | 7 +- src/core/BufferInterface.h | 59 + src/core/BufferQueue.cpp | 25 +- src/core/BufferQueue.h | 51 +- src/core/CMakeLists.txt | 9 - src/core/CameraBuffer.cpp | 27 +- src/core/CameraBuffer.h | 8 +- src/core/CameraBufferPool.cpp | 87 - src/core/CameraBufferPool.h | 52 - src/core/CameraContext.cpp | 3 +- src/core/CameraContext.h | 5 +- src/core/CameraDevice.cpp | 42 +- src/core/CameraDevice.h | 23 +- src/core/CameraEvent.h | 5 +- src/core/CameraStream.cpp | 2 +- src/core/CameraStream.h | 9 +- src/core/CaptureUnit.cpp | 45 +- src/core/CaptureUnit.h | 19 +- src/core/CsiMetaDevice.cpp | 2 +- src/core/DeviceBase.cpp | 87 +- src/core/DeviceBase.h | 13 +- src/core/FileSource.cpp | 2 +- src/core/FileSource.h | 27 +- src/core/IProcessingUnitFactory.h | 5 +- src/core/IpuPacAdaptor.cpp | 45 +- src/core/IpuPacAdaptor.h | 2 + src/core/LensHw.h | 5 +- src/core/MockPSysDevice.cpp | 46 +- src/core/MockPSysDevice.h | 9 +- src/core/PSysDevice.cpp | 82 +- src/core/PSysDevice.h | 12 +- src/core/ProcessingUnit.cpp | 49 +- src/core/ProcessingUnit.h | 11 +- src/core/RequestThread.cpp | 30 +- src/core/RequestThread.h | 11 +- src/core/SensorHwCtrl.cpp | 23 +- src/core/SensorHwCtrl.h | 29 +- src/core/SofSource.h | 5 +- src/core/SwImageProcessor.cpp | 4 +- src/core/SwImageProcessor.h | 9 +- src/core/SyncManager.cpp | 190 - src/core/SyncManager.h | 65 - src/core/processingUnit/CBStage.cpp | 2 +- src/core/processingUnit/FaceStage.cpp | 96 +- src/core/processingUnit/FaceStage.h | 7 +- src/core/processingUnit/GPUPostStage.cpp | 2 +- src/core/processingUnit/IPipeManagerFactory.h | 7 +- src/core/processingUnit/PipeLine.cpp | 49 +- src/core/processingUnit/PipeLine.h | 2 + src/core/processingUnit/PipeManager.cpp | 22 +- src/core/processingUnit/PipeManager.h | 4 +- src/core/processingUnit/PipeManagerStub.cpp | 2 +- src/core/processingUnit/PostProcessStage.cpp | 2 +- src/fd/FaceDetection.h | 5 +- src/fd/IFaceDetection.cpp | 7 +- src/fd/facessd/CameraFaceDetection.cpp | 174 + src/fd/facessd/CameraFaceDetection.h | 66 + src/fd/facessd/CommonTypes.h | 170 + src/fd/facessd/FaceSSD.cpp | 78 +- src/fd/facessd/FaceSSD.h | 17 +- src/hal/CameraHal.cpp | 8 - src/hal/MockCameraHal.h | 2 +- src/hal/hal_adaptor/HalAdaptor.cpp | 9 +- src/hal/hal_adaptor/HalAdaptor.h | 5 +- src/icbm/ICBMThread.cpp | 2 +- src/icbm/OPIC2Api.h | 4 +- src/image_process/PostProcessorBase.cpp | 3 + .../chrome/ImageProcessorCore.cpp | 21 +- src/image_process/chrome/ImageProcessorCore.h | 4 - src/image_process/sw/ImageConverter.cpp | 14 +- src/image_process/sw/ImageScalerCore.cpp | 4 +- src/iutils/CameraDump.cpp | 2 +- src/iutils/CameraDump.h | 7 +- src/iutils/CameraLog.cpp | 27 +- src/iutils/CameraLog.h | 10 +- src/iutils/Errors.h | 5 +- src/iutils/LogSink.cpp | 30 +- src/iutils/LogSink.h | 7 +- src/iutils/ModuleTags.cpp | 10 +- src/iutils/ModuleTags.h | 238 +- src/iutils/RWLock.h | 20 +- src/iutils/ScopedAtrace.cpp | 4 +- src/iutils/SwImageConverter.cpp | 2 +- src/iutils/Thread.h | 2 +- src/iutils/Trace.h | 5 +- src/iutils/Utils.cpp | 38 +- src/iutils/Utils.h | 9 +- src/jpeg/CMakeLists.txt | 2 +- src/jpeg/EXIFMaker.cpp | 2 +- src/jpeg/EXIFMaker.h | 4 +- src/jpeg/Exif.h | 2 +- src/jpeg/{ExifCreater.cpp => ExifCreator.cpp} | 30 +- src/jpeg/{ExifCreater.h => ExifCreator.h} | 6 +- src/jpeg/JpegMaker.cpp | 4 +- src/jpeg/sw/SWJpegEncoder.cpp | 9 +- src/meson.build | 1 - src/metadata/CameraMetadata.cpp | 28 +- src/metadata/CameraMetadata.h | 7 +- src/metadata/ParameterHelper.h | 5 +- src/metadata/Parameters.cpp | 30 +- src/metadata/icamera_metadata_base.cpp | 6 +- src/metadata/icamera_metadata_base.h | 5 +- src/metadata/icamera_metadata_tags.h | 2 +- src/platformdata/CameraParserInvoker.cpp | 10 +- src/platformdata/CameraParserInvoker.h | 4 +- src/platformdata/CameraSensorsParser.cpp | 28 +- src/platformdata/CameraTypes.h | 2 +- src/platformdata/PlatformData.cpp | 45 +- src/platformdata/PlatformData.h | 50 +- src/platformdata/PnpDebugControl.cpp | 2 +- src/platformdata/gc/GraphConfig.cpp | 10 +- src/platformdata/gc/GraphConfig.h | 4 +- src/platformdata/gc/GraphConfigManager.h | 2 +- src/platformdata/gc/IGraphType.h | 7 + src/platformdata/gc/StageDescriptor.h | 7 +- src/scheduler/CameraScheduler.cpp | 11 +- src/scheduler/CameraScheduler.h | 8 +- src/v4l2/MediaControl.cpp | 4 + src/v4l2/MediaControl.h | 1 - src/v4l2/V4l2DeviceFactory.cpp | 4 +- src/v4l2/V4l2DeviceFactory.h | 5 +- 198 files changed, 22395 insertions(+), 6676 deletions(-) create mode 100644 config/linux/ipu75xa/sensors/isx031-1.json create mode 100644 config/linux/ipu75xa/sensors/isx031-2.json create mode 100644 config/linux/ipu75xa/sensors/isx031-3.json create mode 100644 config/linux/ipu75xa/sensors/isx031-4.json create mode 100644 config/linux/ipu75xa/sensors/isx031-5.json create mode 100644 config/linux/ipu75xa/sensors/isx031-6.json create mode 100644 config/linux/ipu75xa/sensors/isx031-7.json create mode 100644 config/linux/ipu75xa/sensors/isx031-8.json delete mode 100644 config/linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin create mode 100644 modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp create mode 100644 modules/ipu_desc/ipu75xa/FragmentsConfigurator.h create mode 100644 modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp create mode 100644 modules/ipu_desc/ipu7x/FragmentsConfigurator.h create mode 100644 src/core/BufferInterface.h delete mode 100644 src/core/CameraBufferPool.cpp delete mode 100644 src/core/CameraBufferPool.h delete mode 100644 src/core/SyncManager.cpp delete mode 100644 src/core/SyncManager.h mode change 100644 => 100755 src/core/processingUnit/FaceStage.cpp create mode 100644 src/fd/facessd/CameraFaceDetection.cpp create mode 100644 src/fd/facessd/CameraFaceDetection.h create mode 100644 src/fd/facessd/CommonTypes.h rename src/jpeg/{ExifCreater.cpp => ExifCreator.cpp} (96%) rename src/jpeg/{ExifCreater.h => ExifCreator.h} (98%) diff --git a/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin b/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin index 120faa64f578e2e27f102ae06d531de3781d0e41..4b785e461ff31e3d781c0e079639376043d2e5f2 100644 GIT binary patch delta 3335 zcmZvdYitx%6vun#;m(wyZeO-wsX&PIX*PuLh?Qt;L~NwDt!;_9TaOxPH`yLqNml1WHzwAs0>qP7Dhe|M{*9 z`&^)Vhtt_OI#t7GTvf=6Z@N}%$r5BafmdolO{>WsF2ccV%pMl$K`r9X9*)ByxgvY0 z%Ma>Wn|)yZ7USN0zvd8Zj02U9Z0trjMD}G5*Tx0)2LyoXf^G zj1TJOuoHU&ViV*2nnQ3!K~Rs}b{;pmig9;=Um&b1_k(^tSuABo&PW)DRxOeY5ObbL z0&dW07D)<7GAI&nA?UPAa=S%a_%C4PY*%9 zDv^YNm`{i#10=FUB!M!}d7Trx~+4!NP)Z;ry7oE8FQ zJzkh#=*iceF!lNa(kzX9*MKI{ z4>zItN<313$?c%{zSw*PN9v7u>d664`Y)ohh~-?6nI(ocq~;4s(c*w1DH~n`nI6u zITLd8?3d_^tI<>TZ;)r~ zuT&q3lI}hTX&FK#*z=~rBC2TS0D4>{e{GXDU~iR+4)>$=T5k612VmuB;=GVG&W1`x z{c;#5>P?baD#vi>g$zkZ$U`Szkia_D2X?8YyGx6_Fm(fg@#BUl;Ld(Arl2dyM{)E7+DbVPkfcT|i(=q6U5upJ4 zY8}yJ-jjV@n3rMVJ}>#QUhXNA1ut{MK3Xdat6RN+eL<`=$wpb|)B5xP=V|!95Lo{} zJlz8K%(K;57JA?bd%JeoFQPPhuU|obB#&|EBNk66(r+ zoMGDpHEuk7gPjHRCltPb6h8K_Y4DmsGDYfI3VsVFaRGKE9fdO^qJkAeW4FY_T$O?< e-(TTQP*}G6XG*l@G97PJg<7pld%KpX`Tql`YP3E8 delta 2816 zcmZ|PTWB0r7zgm2-Pz2X%_PlccH6B@YZ|I1%{~MSq~hkXL8)wuMCMeB`VdfYQv+^6 zuwt65q9CclnzM29(1#SPB=$md)b)}!Q4}SOusW$NQZNr*S`CtbLeMn&ow+#Y)M=h_ ze*bg%&Sj_YNo@S1m{I|M<>&ITca+bObmzz;U(zx<5@P@CpeLmE(ZDV`8BlRDR#9PN zBxGScsNy5LU0k*C6~OnpTujMU&o#gm;^Hc5q3f?Hv|DP!i9@`Wk4vL>Npu>5%&-?E zXvh6BZ3wmDHw(O;`&y=X(4{F)TZ&8HBZ=l7lSV7saQ&>8z$|Mr&4M0WQ@DCK6SaRnM`m($pfGs=C$ zY0N<5rGBT82xsuzklkPhtJ%T*ct%z1ZUB&5--N)%V< zf|^mLO{Z_NI)j(5x_wun?_4!eT%q+f8Qiqt#wl5&6E%brR#ojLf*;oc&fPP~flM^< zvI26YgO|Qqg5x?bWe}3#r8`1!{wOcgAPb|OMCliSy);v&Vr9}*w&8po;pBuArAX89 zJ?Gp$tjerLaPC`I*w&W>VWUn4_tNpGif4Xt`>`{aixN)QdaW^n*Vf%WOeR3u>Vp6M zBH)}h6P&$+mmJ9HBrhuUqHznJBMP($ACUgkigh~%6F z8`WA*aQE%JOn?mD?MakIw(I!AUQgg%Z72ATCp@uh-?Kx-tEWF^UfdLNHp`BZ9dJ{ls?^?Q ztC4K{y|TD1g`&ldgGe^g%{@{{FQWN?aiBF;!zCk~EO{dU$=JO@GOt5I-wr}@@nIne z_p>nt36fY=NYX=Wj2>d^yeuRmv_~>76o06_VQr)8j9_e4W8Y_jrA@G7mjq)q7#EfW zo4*dLR|OD{rLcxT_iYi>unIkvK$T&-^>9^jyapwU6Z=u3B()=-lj{*i)AZ2U4+ts* zOY|Wju+P~X@ImcGAA}p>Yo#Nd@0O$~l!u8=-z+gd6_a%HnbNR{#)2j7l8_kI1?tNJ z(zFRnY*A#7{w*Ed1@+;ae#Egk(9jVqLAY~QICWCMTdbg0+70?4dXdV)f zn?uV9iF1o%J_x@}zGCib%~>I_uU5M#qII?UuOeEHfc_((Ra{p@f(@EciC@y0c()Jg zT>^4*P$DGGyX*HsZP*9lyCalfe{!aL&^#|-5xxXxOS!THzgulli0sSOulXR|5Rjk5 U)I$HSL~Hgzz0(KbGl|0g0@DGE(f|Me diff --git a/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin b/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin index e8c8b0a7d73f35124b95da4d4e991b6d3efe4fd1..f0960bc15b29af76b10ef16a64192d59679fad1c 100644 GIT binary patch delta 3994 zcmZ{nac~q@9mlh8_j0@8l5R*sBNDto3`q&$;?NQy!DGZgX@wg+$54fyA~x*^6P-|k zW8X*{~du-^^S z_8&y)Akd=ufUczW34KV1V=EQUh8EJqUf!uhX*Xc2F^q5a0-gqJZwTY|?*mR5aB@0~ zkMwI%Y6DI_8Q_&PzFMb=5;(dqplhk!q0^U28Vs8%MM}?a?=Gb+WUZrJvY^4(@|;hL zD`;jx+QD7mzt=X?UNdH- zDv4LiMx%m`n2?%JQ1@VDGwm#g)Eb3u9CTJWIdMP4_6R+EKg9l%SjJM#YKZL-`ps&H{f=11D)ZG)w@21!1G>Qmp~LFp9|x~}f)NIRN*r1e z26z;zX1fMb^9hDbEQKVV5gIIfL?Y!;cZxed z0pmF&bV#wNNucJap#7d!rf5kf4skCC-7QZy8i)LRif3YV1GQk(RiWKzxbbC*TCA{Z z8D#ZOp&j?MGKKg<%fX&mA*(HMkKD2xlJ_Ylk0mwKK~f7fub z8&-lfZwVbzXBvU#{vjxqi`wH7b*^m_g#AG1uw2L3CP>exxZAOC6_`*S@tWm4V5`7{ zdO>hE>Lx)KrZADs@U*OVb=mXHbH(H#oqnrlarWlz4lP@~?ysf*rH^!IeBubXM6xwI zs>(dfuiRFEA786pBD7{lBOTedjAdq(9v)w>zOB)}T`vChzWutVrlpUJ^AoR-VU_Af zW7(-gSH@W*-9kC`TngiFl^wk zYB|A~-9cLTs)O2gCk6bsnkSB`S0n85B65zASF2ACngH&apuakVC;%) zfjeBIZx`%v#swXS@%(>?eDmDGwoJptxp{?b=lN2#Oma1-j^>jZpI)XuCf2=nLp^?p zK?6B7=^ofgoI&ClmOrSr@%-1+Iq8x*U1ZQji<)~g-2SQtvy%8mf_LxH{uN>SUxXgn z>&X%vKsLXTT;!kYSLJ3o9p_N596wa*m4m8N>e(pYa8~`gWP4CBx461n6zfzLe!(sf z2BX`^o8MILb@6-uE{At|!=N{o`+AJM3Wc%UIg;R+38;)W≤Tw2eXAdN@2fayI@@ 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 z%0D!}r~km62kxvx$H1K>cF_Pv?Sjdh|HXnj=oz@PSgN+$z?}!~tbM5VjYLlc19xVd z+)&)PKCjmM{g+4g&Y$)8d+FZ!u)T6TelPx8i|)mLz4ARd9^HH2wQ=XA{xi;Zo~E~G zpz+#E*GsiMz5eC#pV4|O4edJEQ||G5e&X^I@X{mS>%RkcHjP7<<9ugh55cXJu-=#A z*>&rsgw}<8;LgSxyabCdDv?`u)8U|rJKs}T+gRi{-?`tO)46ZYT&6rRPtUOb2Q5Xr zY1=W4n|lZP*C zvBmIZ&v8~R(n~RNNXf84OLrVLVk3qA6FCt zb7It1qD%V<5s9{JWmH(l@H&oQ(V{>6Xgm7HfwD2#pY6wR^^+mddTw)XcW!epV>Lfc z;CavcKF|9;_dQdeD^v3d_3+=H7v?=VZV_wK*UEVYBCP?1#01hFh>@)JMVZwyci;o%Hcs7ime z-$)stWP(_bHMxg^&~$TPfLh3SFoV|vDr~~P139>lpV?5Kpx2W!ARJUw7{aWQqr8vm z_#Qmah>Dt)OaO;eP5$gddo+Q`kU}k#U&-J?NTr{Ow<@8uWCHkPy(Ul3i%~^Q;Qp{e zEfkl+8JrEPa0R~)=b*yRZ2ciY@L-JKeE0}l9o&W_ui$+ z@n`JO1a6Kh)I#}{43?uReMP*r5KT)afNc$$OplAvi;)C|V+yrUoQ!3#5L4k4eh|yS zm;B6zo)#3({b)eraTR{oL-7WR$?XxG>3kcPUpM|+@N#dnu54)u;>zww>AAPay?SW0 zm5@$~#qNBmo`P>2f_k}qMcP;@mfJ`4@*^+Tr0bV^?{{Eb{-Ob!`-j(<3;hnvUH3HW z+F>Wr$DS8O7YPm?i|ePgNBu79A18QYPZZ}yWh}nB4U_pgOt$#+k)wS9aUzSs|C9gA ziQ0VLzUIu`^NGlPezrCjjsElB{ifWKc;>O}n>4SA;RK>_J#Hx3uho{Mf%? zy>i1G@15ltuCj_BsRLJv8?^5N%`|mXe||*V36~&>rGH4uE~`No7)CE z<+a{y6-?1ZQri3w#F^3wrnT$!D_fkcW!Jhun6EJrbHE#|(0ACZP}7RD!EE|Pn*u(d zs)Cw)K8mFR_-}0q3%w7f&+B%WEt~|==<`8RH9GlC)o8a3zFng0{<4WBo6i;_@(nIs zx&*_<=jFD&Y}Zw1x%>aHz@9d#w kwMAyGIuvntJM-6i74Lx8L4`4oDb>pj7Zo3A^zI@50jJ01g#Z8m delta 2982 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 diff --git a/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin b/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin index 6674f346fc0cd8c96893ac1aa94afc5d7f1dbc2c..a48e24bdeafaa893c6ee0d52fade5a68f9881fc0 100644 GIT binary patch delta 15211 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 QUgv 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 gOgm_yKP=c-VqY+Eq6dklMa-uP1tdlD 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 Dj62PI delta 36743 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 #include @@ -28,9 +27,9 @@ namespace icamera { /** * Following macros PERF_CAMERA_ATRACE_XXX() can be called in the function * we are scoping. Environment variable "camPerf" is need to be set as "16" - * or "128", to enalbe atrace profiling: + * or "128", to enable atrace profiling: * 1. When "16" is set, ATRACE with level of CAMERA_DEBUG_LOG_ATRACE_OS is - * enalbed. + * enabled. * 2. When "128" is set, ATRACE with level of CAMERA_DEBUG_LOG_ATRACE_IMAGING * is enabled. */ @@ -75,5 +74,3 @@ class ScopedAtrace { PERF_LOG_TAG_STR(LOG_TAG), note, value, note2, value2, note3, \ value3); } // namespace icamera - -#endif // SCOPED_ATRACE_H diff --git a/modules/algowrapper/IntelCca.cpp b/modules/algowrapper/IntelCca.cpp index ce362ff..9c8804a 100644 --- a/modules/algowrapper/IntelCca.cpp +++ b/modules/algowrapper/IntelCca.cpp @@ -29,10 +29,10 @@ std::vector IntelCca::sCcaInstance; Mutex IntelCca::sLock; IntelCca* IntelCca::getInstance(int cameraId, TuningMode mode) { + AutoMutex lock(sLock); LOG2("@%s, tuningMode:%d, cca instance size:%zu", cameraId, __func__, mode, sCcaInstance.size()); - AutoMutex lock(sLock); for (auto &it : sCcaInstance) { if (cameraId == it.cameraId) { if (it.ccaHandle.find(mode) == it.ccaHandle.end()) { diff --git a/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp b/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp index f03c7f8..f101e87 100644 --- a/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp +++ b/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp @@ -169,6 +169,7 @@ static const payload_descriptor_t *sLBCBPayloadDescriptors[] = { &lbff_0_descriptors, // TERMINAL_LOAD_ALGO_CACHED &lbff_1_descriptors, // TERMINAL_LOAD_ALGO_FRAG_SEQ &lbff_2_descriptors, // TERMINAL_LOAD_SYSTEM + &lbff_3_descriptors, // DOL, TNR and CAS }; static const payload_descriptor_t *sBBCBPayloadDescriptors[] = { diff --git a/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp new file mode 100644 index 0000000..ab40be6 --- /dev/null +++ b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp @@ -0,0 +1,735 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#include "FragmentsConfigurator.h" + +Ipu8FragmentsConfigurator::Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity) + : _staticGraph(staticGraph), _node(node), _upscalerWidthGranularity(upscalerWidthGranularity) +{ +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configureFragments() +{ + if (_staticGraph == nullptr || _node == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // Reset status + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + _node->fragmentVanishStatus[stripe] = VanishOption::Full; + } + + for (uint32_t j = 0; j < _node->nodeKernels.kernelCount; j++) + { + StaticGraphRunKernel* runKernel = &_node->nodeKernels.kernelList[j].run_kernel; + StaticGraphFragmentDesc* kernelFragments = _node->nodeKernels.kernelList[j].fragment_descs; + + // Take previous kernel as reference, unless we will change it below. + StaticGraphFragmentDesc* prevKernelFragments = j == 0 ? nullptr : _node->nodeKernels.kernelList[j - 1].fragment_descs; + uint32_t prevKernelUuid = j == 0 ? 0 : _node->nodeKernels.kernelList[j - 1].run_kernel.kernel_uuid; + + uint32_t referenceKernel = GraphResolutionConfiguratorHelper::getReferenceKernel(runKernel->kernel_uuid); + + if (referenceKernel != 0) + { + // Special reference kernel + for (uint32_t k = 0; k < _node->nodeKernels.kernelCount; k++) + { + if (_node->nodeKernels.kernelList[k].run_kernel.kernel_uuid == referenceKernel) + { + prevKernelFragments = _node->nodeKernels.kernelList[k].fragment_descs; + prevKernelUuid = referenceKernel; + break; + } + } + } + + // Find the handling function for this kernel + GraphResolutionConfiguratorKernelRole kernelRole = GraphResolutionConfiguratorHelper::getKernelRole(runKernel->kernel_uuid); + + switch (kernelRole) + { + case GraphResolutionConfiguratorKernelRole::DownScaler: + { + configFragmentsDownscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::EspaCropper: + { + configFragmentsCropper(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::UpScaler: + { + configFragmentsUpscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::Output: + { + configFragmentsOutput(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrScaler: + { + configFragmentsTnrScaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrFeederFull: + case GraphResolutionConfiguratorKernelRole::TnrFeederSmall: + { + configFragmentsTnrFeeder(runKernel, kernelFragments, kernelRole); + break; + } + + case GraphResolutionConfiguratorKernelRole::NonRcb: + { + // Before zoom kernels - take prev kernel fragments as-is + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + } + + default: + { + // No action for other kernels + break; + } + } + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->output_width) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right); + auto scaleFactorH = static_cast(resInfo->output_height) / (resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom); + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + int rightCrop = stripe == static_cast(_node->numberOfFragments - 1) ? resInfo->input_crop.right : 0; + + double value = (static_cast(kernelFragments[stripe].fragmentInputWidth - rightCrop) * scaleFactor) / 4; + kernelFragments[stripe].fragmentOutputWidth = static_cast(floor(value)) * 4; + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + value = (scaleFactor * kernelFragments[stripe].fragmentStartX) / 2; + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(value)) * 2; + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption) +{ + _node->fragmentVanishStatus[stripe] = vanishOption; + kernelFragments[stripe] = {}; + _outputStartX[runKerenlUuid][stripe] = 0; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // prev kernel is the downscaler + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + // No cropping in DS, cropping is done by ESPA cropper + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + int32_t leftNonVanishedStripe = 0; + int32_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + std::vector xOffset(_node->numberOfFragments, 0); + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (leftPixel + VANISH_MIN >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (rightPixel <= kernelFragments[stripe].fragmentStartX + VANISH_MIN) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (int32_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = runKernel->resolution_info->input_crop.left > kernelFragments[stripe].fragmentStartX ? + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = runKernel->resolution_info->input_crop.right > (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + runKernel->resolution_info->input_crop.right - (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + // Save for sys api + xOffset[stripe] = static_cast(leftCrop); + + // ESPA crop is after the down scaling and it must output resolution that divides by 8 for tnr scalers. + int32_t stripeZoomCrop = leftCrop + rightCrop; + + int outputWidth = (int)kernelFragments[stripe].fragmentOutputWidth - stripeZoomCrop; + if (outputWidth < 0) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(outputWidth); + + // For start point, we need to remove the left cropping only for stripes 1 and on + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > runKernel->resolution_info->input_crop.left) ? + static_cast(kernelFragments[stripe].fragmentStartX - runKernel->resolution_info->input_crop.left) : 0; + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + + if (kernelFragments[stripe].fragmentOutputWidth % 8 != 0) + { + uint16_t pixelsToCrop = kernelFragments[stripe].fragmentOutputWidth % 8; + + // Additional crop on the right, affects only output width + kernelFragments[stripe].fragmentOutputWidth -= pixelsToCrop; + + if (stripe == rightNonVanishedStripe) + { + // Last stripe - crop from left + _outputStartX[runKernel->kernel_uuid][stripe] += pixelsToCrop; + xOffset[stripe] += pixelsToCrop; + } + } + } + + // Update system API offsets + +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = xOffset[stripe]; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + if (runKernel->resolution_info->input_width == runKernel->resolution_info->output_width && + runKernel->resolution_info->input_height == runKernel->resolution_info->output_height && + runKernel->resolution_info->input_crop.left == 0 && + runKernel->resolution_info->input_crop.right == 0 && + runKernel->resolution_info->input_crop.top == 0 && + runKernel->resolution_info->input_crop.bottom == 0) + { + // Upscaler bypassed + return StaticGraphStatus::SG_OK; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / resInfo->output_width; + auto scaleFactorH = static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + uint32_t upscalerWidthGranularity = _upscalerWidthGranularity; + uint16_t inputUnits = static_cast((resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / upscalerWidthGranularity); + + // We would like to keep upscalerWidthGranularity as large as possible in order to minimize the number of pixels that cannot be used for upscaling + // (upscalerWidthGranularity is divided to stripes, so the larger it is the more accurately we can divide) + while (inputUnits % 2 == 0) + { + inputUnits /= 2; + upscalerWidthGranularity *= 2; + } + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + uint8_t leftNonVanishedStripe = 0; + uint8_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (leftPixel >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (rightPixel <= kernelFragments[stripe].fragmentStartX) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = resInfo->input_crop.left > kernelFragments[stripe].fragmentStartX ? + resInfo->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = resInfo->input_crop.right > (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + resInfo->input_crop.right - (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + int32_t stripeZoomCrop = leftCrop + rightCrop; + + // Calculate the step, proportional to the part of input to upscaler that this stripe is working on + uint16_t inputWidthAfterZoomCrop = static_cast(kernelFragments[stripe].fragmentInputWidth - stripeZoomCrop); + + uint16_t pixelsToCrop = 0; + uint16_t maxInputWidth = static_cast(UPSCALER_MAX_OUTPUT_WIDTH * scaleFactor); + if (inputWidthAfterZoomCrop > maxInputWidth) + { + pixelsToCrop = inputWidthAfterZoomCrop - maxInputWidth; + inputWidthAfterZoomCrop = maxInputWidth; + } + + uint16_t stripeStepW = GRA_ROUND_DOWN(static_cast(static_cast(inputWidthAfterZoomCrop) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) * upscalerWidthGranularity), 2); + uint16_t inputWidthAfterTotalCrop = stripeStepW * inputUnits; + + if (inputWidthAfterTotalCrop < 16) + { + // Too little left after cropping, vanish this stripe + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + pixelsToCrop += (inputWidthAfterZoomCrop - inputWidthAfterTotalCrop); + + kernelFragments[stripe].fragmentOutputWidth = static_cast(GRA_ROUND(static_cast(inputWidthAfterTotalCrop) / scaleFactor)); + + // Validate output width + if (static_cast(inputWidthAfterTotalCrop) / kernelFragments[stripe].fragmentOutputWidth != + static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height) + { + // Output width is not valid, return error + return StaticGraphStatus::SG_ERROR; + } + + if (stripe == leftNonVanishedStripe && stripe != rightNonVanishedStripe) + { + // Crop on the right + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop; + } + else if (stripe == rightNonVanishedStripe && stripe != leftNonVanishedStripe) + { + // Crop on the left + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = pixelsToCrop; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = 0; + } + else + { + // Crop both sides + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = GRA_ROUND_DOWN(static_cast(pixelsToCrop / 2), 2); + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop - kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + } + + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > resInfo->input_crop.left ? + kernelFragments[stripe].fragmentStartX - resInfo->input_crop.left : 0); + + outputStartX += kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + + outputStartX = GRA_ROUND_UP(static_cast(ceil(static_cast(outputStartX) / scaleFactor)), 2); + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + int16_t leftNonVanishedStripe = 0; + int16_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + } + + for (int16_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + } + + // Remove overlaps between stripes + FormatType bufferFormat = GraphResolutionConfiguratorHelper::getFormatForDrainer(runKernel->kernel_uuid); + std::vector newOutputStartX = std::vector(_node->numberOfFragments, 0); + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == leftNonVanishedStripe) // first stripe + { + newOutputStartX[stripe] = 0; + } + else //middle or last stripe + { + newOutputStartX[stripe] = + (_outputStartX[runKernel->kernel_uuid][stripe] + _outputStartX[runKernel->kernel_uuid][stripe-1] + kernelFragments[stripe-1].fragmentOutputWidth) / 4 * 2; + + // Align to format restrictions if TNR drainer & data is 10-bit packed + newOutputStartX[stripe] = alignToFormatRestrictions(newOutputStartX[stripe], bufferFormat); + } + } + + _outputStartX[runKernel->kernel_uuid] = newOutputStartX; + + // Data Width is calculated according to data starts + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == rightNonVanishedStripe) // last stripe + { + kernelFragments[stripe].fragmentOutputWidth = static_cast(runKernel->resolution_info->input_width - _outputStartX[runKernel->kernel_uuid][stripe]); + } + else // first or middle stripe + { + if (_outputStartX[runKernel->kernel_uuid][stripe + 1] <= _outputStartX[runKernel->kernel_uuid][stripe]) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(_outputStartX[runKernel->kernel_uuid][stripe+1] - _outputStartX[runKernel->kernel_uuid][stripe]); + } + } + + // Update system API offsets +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = 0; + + for (uint8_t plane = 0; plane < 3; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = 0; + } + } + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + uint32_t sumOfPrevWidths = 0; + + for (int16_t s = leftNonVanishedStripe; s < stripe; s++) + { + sumOfPrevWidths += kernelFragments[s].fragmentOutputWidth; + } + + // OutputOffsetPerStripe: Sum(prev output widths) + input_crop.left - stripe.startX + systemApi->x_output_offset_per_stripe[stripe] = + sumOfPrevWidths + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX; + + // PlaneOffsetStartAddressPerStripe: Sum(prev output widths) * DataSize + for (uint8_t plane = 0; plane < 2; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = getPlaneStartAddress(sumOfPrevWidths, bufferFormat, plane); + } + } + + return StaticGraphStatus::SG_OK; +} + +uint32_t Ipu8FragmentsConfigurator::getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane) +{ + // Calculate according to format BPP. + uint32_t bitsPerElement = 8; + uint32_t elementsPerCacheLine = 64; + uint8_t numberOfPlanes = 3; + + if (formatType == FormatType::YUV420_8_SP_P) + { + // 8-bit packed (OFS output) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 2; + } + else if (formatType == FormatType::YUV420_10_SP_P) + { + // 10-bit packed (TNR ref) + bitsPerElement = 10; + elementsPerCacheLine = 50; + numberOfPlanes = 2; + } + else if (formatType == FormatType::META_8) + { + // 8-bit meta data (TNR recursice similarity) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 1; + } + else + { + // Format not supported + // Log error + return 0; + } + + if (plane >= numberOfPlanes) + { + // Plane does not exist + return 0; + } + + // Offset is calculated by taking whole cache lines and then adding the remaining pixles and translate to bytes. + uint32_t wholeCacheLines = sumOfPrevWidths / elementsPerCacheLine; + uint32_t remainingPixels = sumOfPrevWidths % elementsPerCacheLine; + + if ((remainingPixels * bitsPerElement) % 8 != 0) + { + // Log error + return 0; + } + + return wholeCacheLines * 64 + (remainingPixels * bitsPerElement) / 8; +} + +uint16_t Ipu8FragmentsConfigurator::alignToFormatRestrictions(uint16_t size, FormatType bufferFormat) +{ + if (bufferFormat != FormatType::YUV420_10_SP_P) + { + return size; + } + + uint16_t elementsPerCacheLine = 50; + + uint16_t remainingPixels = size % elementsPerCacheLine; + uint16_t pixelsToRemove = remainingPixels % 4; + + return size - pixelsToRemove; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactor = static_cast(resInfo->output_width) / (resInfo->input_width); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(kernelFragments[stripe].fragmentInputWidth * scaleFactor); + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(scaleFactor * kernelFragments[stripe].fragmentStartX / 2)) * 2; + } + + // Save stripes for feeder configuration + _tnrScalerFragments = kernelFragments; + _tnrScalerUuid = runKernel->kernel_uuid; + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::AfterStats) + { + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + if (kernelRole == GraphResolutionConfiguratorKernelRole::TnrFeederFull) + { + // TNR Full resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentInputWidth; + kernelFragments[stripe].fragmentStartX = _tnrScalerFragments[stripe].fragmentStartX; + _outputStartX[runKernel->kernel_uuid][stripe] = _tnrScalerFragments[stripe].fragmentStartX; + } + else // GraphResolutionConfiguratorKernelRole::TnrFeederSmall + { + // TNR Small resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentOutputWidth; + kernelFragments[stripe].fragmentStartX = _outputStartX[_tnrScalerUuid][stripe]; + _outputStartX[runKernel->kernel_uuid][stripe] = _outputStartX[_tnrScalerUuid][stripe]; + } + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments) +{ + if (prevKernelFragments == nullptr || kernelFragments == nullptr) + { + return; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + if (_outputStartX.find(prevKernelUuid) == _outputStartX.end()) + { + // This is the main DS, we start from it, no need to copy + return; + } + + for (uint32_t i = 0; i < _node->numberOfFragments; i++) + { + kernelFragments[i].fragmentInputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentOutputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentStartX = _outputStartX[prevKernelUuid][i]; + kernelFragments[i].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[i].upscalerFragDesc.fragmentInputCropRight = 0; + + _outputStartX[runKernel->kernel_uuid][i] = kernelFragments[i].fragmentStartX; + } +} diff --git a/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h new file mode 100644 index 0000000..f3c6c9a --- /dev/null +++ b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h @@ -0,0 +1,65 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#pragma once +#include "GraphResolutionConfiguratorInclude.h" +#include + +class Ipu8FragmentsConfigurator +{ +public: + + static const int32_t VANISH_MIN = 16; + static const int32_t UPSCALER_MAX_OUTPUT_WIDTH = 4672; + Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity); + + StaticGraphStatus configureFragments(); + +private: + // Stripe Actions - each filter will perform one action according to its role + StaticGraphStatus configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole); + + void copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments); + void vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption); + uint32_t getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane); + uint16_t alignToFormatRestrictions(uint16_t size, FormatType bufferFormat); + + OuterNode* _node = nullptr; + IStaticGraphConfig* _staticGraph = nullptr; + + // Fragments binaries do not contain output start x, so we keep them here + std::map> _outputStartX; + uint32_t _upscalerWidthGranularity = 1; + + // Save TNR resolutions for feeder configurations + StaticGraphFragmentDesc* _tnrScalerFragments = nullptr; + uint32_t _tnrScalerUuid = 0; +}; diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp index 49b5b6e..bd5dbb9 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp @@ -30,6 +30,10 @@ #include #include +#if SUPPORT_FRAGMENTS == 1 +#include "FragmentsConfigurator.h" +#endif + #define GRA_CONVERT_TO_RADIANS(degreeAngle) ((double)((degreeAngle)*M_PI/180.0)) /* * External Interfaces @@ -122,10 +126,20 @@ sensorMode->verticalCropOffset - sensorMode->croppedImageHeight; // Input crop to scaler includes sensor, so we need to remove it - _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorHorizontalScaling); - _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorHorizontalScaling); - _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorVerticalScaling); - _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorVerticalScaling); + _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + + _originalCropScalerToOutput.left = static_cast(_originalCropScalerToOutput.left * _sensorHorizontalScaling); + _originalCropScalerToOutput.right = static_cast(_originalCropScalerToOutput.right * _sensorHorizontalScaling); + _originalCropScalerToOutput.top = static_cast(_originalCropScalerToOutput.top * _sensorVerticalScaling); + _originalCropScalerToOutput.bottom = static_cast(_originalCropScalerToOutput.bottom * _sensorVerticalScaling); + + _originalCropScalerToOutput.left -= cropperRunKernel->resolution_info->input_crop.left; + _originalCropScalerToOutput.right -= cropperRunKernel->resolution_info->input_crop.right; + _originalCropScalerToOutput.top -= cropperRunKernel->resolution_info->input_crop.top; + _originalCropScalerToOutput.bottom -= cropperRunKernel->resolution_info->input_crop.bottom; } /* @@ -204,77 +218,79 @@ StaticGraphStatus GraphResolutionConfigurator::updateStaticGraphConfig(const Reg { return StaticGraphStatus::SG_ERROR; } - - // Key resolution index - uint32_t keyResIndex = 0; - if (isCenteredZoom == true) + if (roi.fromInput == false) { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + // Key resolution index + uint32_t keyResIndex = 0; + if (isCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Get key resolution for this ROI - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (userRoi.zoomFactor == 1.0) - { - keyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + // Get key resolution for this ROI + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (userRoi.zoomFactor == 1.0) + { + keyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Update the static configuration according to the key resolution index - // Copy the original kernels configuration a _kernels - if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Update the static configuration according to the key resolution index + // Copy the original kernels configuration a _kernels + if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - else - { - if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + else { - return StaticGraphStatus::SG_ERROR; + if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - // Get key resolution for previous ROI - uint32_t prevKeyResIndex = 0; + // Get key resolution for previous ROI + uint32_t prevKeyResIndex = 0; - if (prevIsCenteredZoom == true) - { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + if (prevIsCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - SensorRoi prevSensorRoi; - if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + SensorRoi prevSensorRoi; + if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (prevUserRoi.zoomFactor == 1.0) - { - prevKeyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (prevUserRoi.zoomFactor == 1.0) + { + prevKeyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } + // Update whether if key resolution has changed + isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; } - // Update whether if key resolution has changed - isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; // // Step #2 Dynamic update according to this ROI // - return updateRunKernelOfScalers(sensorRoi); + return updateRunKernelOfScalers(roi.fromInput,sensorRoi); } #endif @@ -289,14 +305,26 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_ERROR; } - auto outputRunKernel = getRunKernel(_outputRunKernelCoord); - if (userRoi.fromInput == true) { - // Not supported - return StaticGraphStatus::SG_ERROR; + if (userRoi.zoomFactor == 1 && userRoi.panFactor == 0) + { + auto cropRunKernel = getRunKernel(_cropperRunKernelCoord); + sensorRoi.width = cropRunKernel->resolution_info->output_width; + sensorRoi.height = cropRunKernel->resolution_info->output_height; + sensorRoi.cropLeft = cropRunKernel->resolution_info->input_crop.left; + sensorRoi.cropRight = cropRunKernel->resolution_info->input_crop.right; + sensorRoi.cropTop = GRA_ROUND_DOWN(std::min(cropRunKernel->resolution_history->input_height- cropRunKernel->resolution_info->output_height, std::max(0, static_cast(static_cast(cropRunKernel->resolution_history->input_height * userRoi.tiltFactor)))), 2); + sensorRoi.cropBottom = cropRunKernel->resolution_info->input_height - cropRunKernel->resolution_info->output_height - sensorRoi.cropTop; + // Not supported + return StaticGraphStatus::SG_OK; + } + else + { + return StaticGraphStatus::SG_ERROR; + } } - + auto outputRunKernel = getRunKernel(_outputRunKernelCoord); // Calculate ROI on output, using original output since user ROI is relative to full output ROI (not after some zoom was performed) StaticGraphKernelRes* outputRunKernelResolution = outputRunKernel->resolution_info; if (outputRunKernelResolution == nullptr) @@ -331,91 +359,118 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_OK; } -StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(SensorRoi& roi) +StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(bool fromInput, SensorRoi& roi) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - auto downscalerRunKernel = getRunKernel(_downscalerRunKernelCoord); auto upscalerRunKernel = getRunKernel(_upscalerRunKernelCoord); auto cropperRunKernel = getRunKernel(_cropperRunKernelCoord); - uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; - uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; - - uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; - uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; - - StaticGraphKernelResCrop downscalerCropHistory; - downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); - downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); - downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); - downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); - - // If ROI is larger than scaler's output resolution - we downscale - if (roi.width >= outputWidth) + if (fromInput) { - // Only down scaler is active - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + cropperRunKernel->resolution_info->input_crop.top = roi.cropTop; + cropperRunKernel->resolution_info->input_crop.bottom = roi.cropBottom; + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) { - ret = StaticGraphStatus::SG_ERROR; + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } } - - updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); - - // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. - updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); } else { - // Configure downscaler and upscaler according to upscaler constraints - // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. - uint32_t upscalerActualInputWidth; - uint32_t upscalerActualInputHeight; - uint32_t upscalerActualOutputWidth; - uint32_t upscalerActualOutputHeight; - if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, - upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; + uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; + + uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; + uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; + + StaticGraphKernelResCrop downscalerCropHistory; + downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + if (roi.width == outputWidth || roi.height == outputHeight) { - ret = StaticGraphStatus::SG_ERROR; + updateRunKernelPassThrough(downscalerRunKernel, inputWidth, inputHeight); + updateRunKernelPassThrough(upscalerRunKernel, inputWidth, inputHeight); + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, inputWidth, inputHeight, outputWidth, outputHeight); } - - // Update DS cropping and downscale according to the resolution the upscaler requires. - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + // If ROI is larger than scaler's output resolution - we downscale + else if (roi.width > outputWidth) { - ret = StaticGraphStatus::SG_ERROR; + // Only down scaler is active + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + + updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); + + // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. + updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); + } + else + { + // Configure downscaler and upscaler according to upscaler constraints + + // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. + uint32_t upscalerActualInputWidth; + uint32_t upscalerActualInputHeight; + uint32_t upscalerActualOutputWidth; + uint32_t upscalerActualOutputHeight; + if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, + upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler - updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); + // Update DS cropping and downscale according to the resolution the upscaler requires. + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update ESPA crop if required - updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); - } + // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler + updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); - // Update resolution histories according to decisions made above - if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); + } - if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update resolution histories according to decisions made above + if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update resolution history for relevant kernels - for (auto& runKernelForUpdate : _kernelsForUpdate) - { - // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. - StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); - if (updateRunKernelResolutionHistory(runKernelPtr, upscalerRunKernel, false) != StaticGraphStatus::SG_OK) + if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) + { + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + // Anna - I don't know why cropping was ignored. I think it should be after cropping + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } } return ret; @@ -717,11 +772,11 @@ StaticGraphStatus GraphResolutionConfigurator::updateRunKernelFinalCropper(Stati runKernel->resolution_info->output_width = outputWidth; runKernel->resolution_info->output_height = outputHeight; - // Crop on the right & bottom in order not to influence resolution history - runKernel->resolution_info->input_crop.left = 0; - runKernel->resolution_info->input_crop.right = inputWidth - outputWidth; - runKernel->resolution_info->input_crop.top = 0; - runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight; + // Crop symmetrically + runKernel->resolution_info->input_crop.left = GRA_ROUND_DOWN(static_cast((inputWidth - outputWidth) / 2.0), 2); + runKernel->resolution_info->input_crop.right = inputWidth - outputWidth - runKernel->resolution_info->input_crop.left; + runKernel->resolution_info->input_crop.top = GRA_ROUND_DOWN(static_cast((inputHeight - outputHeight) / 2.0), 2); + runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight - runKernel->resolution_info->input_crop.top; return StaticGraphStatus::SG_OK; } @@ -734,6 +789,16 @@ StaticGraphStatus GraphResolutionConfigurator::updateCroppingScaler(StaticGraphR int32_t heightAfterCtop = downscalerRunKernel->resolution_info->input_height - downscalerRunKernel->resolution_info->input_crop.top - downscalerRunKernel->resolution_info->input_crop.bottom; + int32_t extraPixelsWidth = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right)- + downscalerRunKernel->resolution_info->output_width; + + widthAfterCtop -= extraPixelsWidth % 4; + + int32_t extraPixelsHeight = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right) - + downscalerRunKernel->resolution_info->output_width; + + heightAfterCtop -= extraPixelsHeight % 4; + if (widthAfterCtop == downscalerRunKernel->resolution_info->output_width && heightAfterCtop == downscalerRunKernel->resolution_info->output_height) { @@ -1026,8 +1091,8 @@ StaticGraphStatus GraphResolutionConfigurator::undoSensorScaleRipAngle(int32_t& StaticGraphStatus GraphResolutionConfigurator::sensorCropOrScaleExist(bool& sensor_crop_or_scale_exist) { sensor_crop_or_scale_exist = false; - if ((abs(_sensorHorizontalScaling - 1.0F) < 0.01F) || - (abs(_sensorVerticalScaling - 1.0F) < 0.01F) || + if ((abs(_sensorHorizontalScaling - 1.0F) > 0.01F) || + (abs(_sensorVerticalScaling - 1.0F) > 0.01F) || (_sensorHorizontalCropLeft > 0) || (_sensorHorizontalCropRight > 0) || (_sensorVerticalCropTop > 0) || @@ -1056,7 +1121,8 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon initRunKernel(GraphResolutionConfiguratorKernelRole::UpScaler, _upscalerRunKernel) != StaticGraphStatus::SG_OK || initRunKernel(GraphResolutionConfiguratorKernelRole::EspaCropper, _cropperRunKernel) != StaticGraphStatus::SG_OK || initOutputRunKernel() != StaticGraphStatus::SG_OK || - initKernelsForUpdate() != StaticGraphStatus::SG_OK) + initKernelsForUpdate() != StaticGraphStatus::SG_OK || + _node == nullptr) { _staticGraph = nullptr; return; @@ -1079,7 +1145,17 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon _upscalerStepW *= 2; _upscalerStepH *= 2; - // Save original values for kernels that are being updated + // Due to upscaler constraints, we should avoid having too many units. + // Number of pixels that cannot be used when upscaling a stripe may be up to ~ 2*units + // For details: https://hsdes.intel.com/appstore/article-one/#/article/15018342122 + // This affects the number of possible zoom steps, but for large resolutions it is OK to enlarge the step + while (outputWidth / _upscalerStepW > 70) + { + _upscalerStepW *= 2; + _upscalerStepH *= 2; + } + + // Save original values for kernels that are being updated _originalCropOfDownScaler = _downscalerRunKernel->resolution_info->input_crop; _originalCropOfEspaCropper = _cropperRunKernel->resolution_info->input_crop; @@ -1106,12 +1182,36 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon return; } - if (sensorMode->horizontalScalingDenominator) { + if (sensorMode->horizontalScalingDenominator) + { _sensorHorizontalScaling = static_cast(sensorMode->horizontalScalingNumerator) / sensorMode->horizontalScalingDenominator; } - if (sensorMode->verticalScalingDenominator) { + + if (sensorMode->verticalScalingDenominator) + { _sensorVerticalScaling = static_cast(sensorMode->verticalScalingNumerator) / sensorMode->verticalScalingDenominator; } + +#if SUPPORT_FRAGMENTS == 1 + if (_node != nullptr && _node->GetNumberOfFragments() > 1) + { + _fragmentsConfigurator = new Ipu8FragmentsConfigurator(_staticGraph, _node, _upscalerStepW); + } +#endif +} + +Ipu8GraphResolutionConfigurator::~Ipu8GraphResolutionConfigurator() +{ + _kernelsForUpdateAfterCropper.clear(); + _kernelsForUpdateAfterUpscaler.clear(); + +#if SUPPORT_FRAGMENTS == 1 + if (_fragmentsConfigurator != nullptr) + { + delete _fragmentsConfigurator; + _fragmentsConfigurator = nullptr; + } +#endif } StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(GraphResolutionConfiguratorKernelRole role, StaticGraphRunKernel*& runKernel) @@ -1139,6 +1239,10 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(uint32_t kernel if (node->nodeKernels.kernelList[j].run_kernel.kernel_uuid == kernelUuid) { runKernel = &node->nodeKernels.kernelList[j].run_kernel; + if (node->type == NodeTypes::Cb) + { + _node = node; + } return StaticGraphStatus::SG_OK; } } @@ -1216,6 +1320,21 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initKernelsForUpdate() } } + std::vector> smurfUuids; + GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(smurfUuids); + + for (auto& smurfUuid : smurfUuids) + { + StaticGraphRunKernel* runKernel; + StaticGraphRunKernel* deviceRunKernel; + if (initRunKernel(smurfUuid.first, runKernel) == StaticGraphStatus::SG_OK && + initRunKernel(smurfUuid.second, deviceRunKernel) == StaticGraphStatus::SG_OK) + { + std::pair runKernelPair = std::make_pair(runKernel, deviceRunKernel); + _smurfKernels.push_back(runKernelPair); + } + } + return StaticGraphStatus::SG_OK; } @@ -1306,11 +1425,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - //uint32_t fragments = 1; - //auto downscalerFragments = getKernelFragments(_downscalerRunKernelCoord); - //auto upscalerFragments = getKernelFragments(_upscalerRunKernelCoord); - //auto cropperFragments = getKernelFragments(_cropperRunKernelCoord); - uint32_t inputWidth = _downscalerRunKernel->resolution_info->input_width; uint32_t inputHeight = _downscalerRunKernel->resolution_info->input_height; @@ -1323,17 +1437,20 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso if (roi.width >= outputWidth) { // Only down scaler is active - if (updateRunKernelDownScaler(_downscalerRunKernel, roi, outputWidth, outputHeight) != StaticGraphStatus::SG_OK) + uint32_t dsOutputWidth = outputWidth; + uint32_t dsOutputHeight = outputHeight; + + if (updateRunKernelDownScaler(_downscalerRunKernel, roi, dsOutputWidth, dsOutputHeight) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } - // Pass-through. Must call cropper function in order to update the system API. StaticGraphKernelResCrop EmptyCrop = { 0, 0, 0, 0 }; - if (updateRunKernelCropper(_cropperRunKernel, roi, outputWidth, outputHeight, outputWidth, outputHeight, EmptyCrop) != StaticGraphStatus::SG_OK) + if (updateRunKernelCropper(_cropperRunKernel, roi, dsOutputWidth, dsOutputHeight, outputWidth, outputHeight, downscalerCropHist) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + updateRunKernelPassThrough(_upscalerRunKernel, outputWidth, outputHeight); } else @@ -1385,32 +1502,66 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso } } - // :TODO: Striping Support - // Currently we assume one stripe. - //updateKernelFragments(_downscalerRunKernel, downscalerFragments, fragments); - //updateKernelFragments(_upscalerRunKernel, upscalerFragments, fragments); - //updateKernelFragments(_cropperRunKernel, cropperFragments, fragments); + // After resolution history was updated, re-configure SAP devices to get the correct FOV + // We do not change the sap feeders configuration, only update the crop & scale of smurfs + for (auto& runKernelForUpdate : _smurfKernels) + { + if (updateRunKernelSmurf(runKernelForUpdate.first, runKernelForUpdate.second) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } if (ret == StaticGraphStatus::SG_OK) { ret = SanityCheck(); } + if (_fragmentsConfigurator != nullptr) + { + // Configure fragments according to the new zoomed run kernels information + _fragmentsConfigurator->configureFragments(); + } + return ret; } -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, - uint32_t outputWidth, uint32_t outputHeight) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - runKernel->resolution_info->output_width = outputWidth; - runKernel->resolution_info->output_height = outputHeight; + if (_fragmentsConfigurator == nullptr) + { + // No fragments, crop to ROI and downscale to output resolution + runKernel->resolution_info->output_width = outputWidth; + runKernel->resolution_info->output_height = outputHeight; - runKernel->resolution_info->input_crop.left = roi.left; - runKernel->resolution_info->input_crop.right = roi.right; - runKernel->resolution_info->input_crop.top = roi.top; - runKernel->resolution_info->input_crop.bottom = roi.bottom; + runKernel->resolution_info->input_crop.left = roi.left; + runKernel->resolution_info->input_crop.right = roi.right; + runKernel->resolution_info->input_crop.top = roi.top; + runKernel->resolution_info->input_crop.bottom = roi.bottom; + } + else + { + // Fragments, leave the crop to espa crop, configure according to desired scale factor + // Since ESPA can only crop, make sure new output sizes are larger or equal to requested sizes + auto resInfo = runKernel->resolution_info; + + // If we have frgments, downscaler cannot perform left cropping + auto scaleFactorW = static_cast(roi.width) / outputWidth; + auto scaleFactorH = static_cast(roi.height) / outputHeight; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + runKernel->resolution_info->input_crop = _originalCropOfDownScaler; + + runKernel->resolution_info->output_width = std::max(outputWidth, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / scaleFactor)), 4)); + runKernel->resolution_info->output_height = std::max(outputHeight, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / scaleFactor)), 2)); + + outputWidth = runKernel->resolution_info->output_width; + outputHeight = runKernel->resolution_info->output_height; + } return ret; } @@ -1433,23 +1584,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static runKernel->resolution_info->input_crop.bottom = 0; // In certain cases need to adjust negative and/or odd crop values. - if (downscalerCropHist.left < 0) - { - downscalerCropHist.left = 0; - } - if (downscalerCropHist.right < 0) - { - downscalerCropHist.right = 0; - } - if (downscalerCropHist.top < 0) - { - downscalerCropHist.top = 0; - } - if (downscalerCropHist.bottom < 0) - { - downscalerCropHist.bottom = 0; - } - if (downscalerCropHist.left & 1) { downscalerCropHist.left = downscalerCropHist.left - 1; @@ -1470,29 +1604,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalHorizontalCrop = inputWidth - outputWidth; - int32_t originalDsPadding = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + int32_t originalDsCrop = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.left = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.left = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.left = 0; } - originalDsPadding = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.right = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.right = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.right = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.left += GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.right += GRA_ROUND_UP(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.right += (totalHorizontalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2)); if (roi.left < static_cast(runKernel->resolution_info->input_crop.left)) { @@ -1508,29 +1643,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalVerticalCrop = inputHeight - outputHeight; - originalDsPadding = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.top = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.top = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.top = 0; } - originalDsPadding = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.bottom = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.bottom = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.bottom = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.top += GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.bottom += GRA_ROUND_UP(static_cast(static_cast(totalVerticalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.bottom += (totalVerticalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2)); if (roi.top < static_cast(runKernel->resolution_info->input_crop.top)) { @@ -1559,6 +1695,8 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static return StaticGraphStatus::SG_ERROR; } + // The following will update the system API for single stripe. In case there are additional stripes system API will + // be configured by FrgamentsConfigurator. StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); @@ -1591,13 +1729,15 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati uint32_t actualCropW = units * _upscalerStepW; uint32_t actualCropH = units * _upscalerStepH; - uint32_t deltaW = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); - uint32_t deltaH = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaLeft = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); + uint32_t deltaRight = totalCropW - actualCropW - deltaLeft; + uint32_t deltaTop = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaBottom = totalCropH - actualCropH - deltaTop; - runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaW; - runKernel->resolution_info->input_crop.right = actualCropW - runKernel->resolution_info->input_crop.left; - runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaH; - runKernel->resolution_info->input_crop.bottom = actualCropH - runKernel->resolution_info->input_crop.top; + runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaLeft; + runKernel->resolution_info->input_crop.right = roi.right - cropperKernelCrop.right - deltaRight; + runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaTop; + runKernel->resolution_info->input_crop.bottom = roi.bottom - cropperKernelCrop.bottom - deltaBottom; if (runKernel->resolution_info->input_crop.left < 0) { @@ -1623,34 +1763,36 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati return ret; } -StaticGraphFragmentDesc* Ipu8GraphResolutionConfigurator::getKernelFragments(RunKernelCoords& coord) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel) { - GraphTopology* graphTopology = nullptr; - StaticGraphStatus status = _staticGraph->getGraphTopology(&graphTopology); + StaticGraphStatus ret = StaticGraphStatus::SG_OK; - if (status != StaticGraphStatus::SG_OK) { - return nullptr; + auto resInfo = smurfRunKernel->resolution_info; + if (resInfo->input_width == 0 || resInfo->input_height == 0) + { + return StaticGraphStatus::SG_OK; } - auto node = graphTopology->links[coord.nodeInd]->destNode; - return node->nodeKernels.kernelList[coord.kernelInd].fragment_descs; -} + // We need to reach new history for device, without the crop already done by feeder. + // The hist of the smurf is the crop already being done by feeder, mutliplied by segmap factor (without smurf factor which changes) + StaticGraphKernelResCrop smurfNewCrop; + smurfNewCrop.left = deviceRunKernel->resolution_history->input_crop.left - smurfRunKernel->resolution_history->input_crop.left; + smurfNewCrop.right = deviceRunKernel->resolution_history->input_crop.right - smurfRunKernel->resolution_history->input_crop.right; + smurfNewCrop.top = deviceRunKernel->resolution_history->input_crop.top - smurfRunKernel->resolution_history->input_crop.top; + smurfNewCrop.bottom = deviceRunKernel->resolution_history->input_crop.bottom - smurfRunKernel->resolution_history->input_crop.bottom; -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments) -{ - if (runKernel == nullptr || fragmentsDesc == nullptr) - { - return StaticGraphStatus::SG_ERROR; - } + // Now calculate how much is left for the smurf to crop + // Translate from history units to device units + double newInputToDeviceFactor = static_cast(deviceRunKernel->resolution_history->input_width - deviceRunKernel->resolution_history->input_crop.left - deviceRunKernel->resolution_history->input_crop.right) / + deviceRunKernel->resolution_history->output_width; - if (fragments == 1) - { - // Nothing to do - return StaticGraphStatus::SG_OK; - } + // Now translate from history units to smurf output (device) + smurfRunKernel->resolution_info->output_crop.left = static_cast(smurfNewCrop.left / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.right = static_cast(smurfNewCrop.right / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.top = static_cast(smurfNewCrop.top / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.bottom = static_cast(smurfNewCrop.bottom / newInputToDeviceFactor); - // Add support here - return StaticGraphStatus::SG_OK; + return ret; } StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() @@ -1691,12 +1833,12 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() int32_t widthAfterCrop = _downscalerRunKernel->resolution_info->input_width - _downscalerRunKernel->resolution_info->input_crop.left - _downscalerRunKernel->resolution_info->input_crop.right; int32_t heightAfterCrop = _downscalerRunKernel->resolution_info->input_height - _downscalerRunKernel->resolution_info->input_crop.top - _downscalerRunKernel->resolution_info->input_crop.bottom; - if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || - heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || - static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) - { - return StaticGraphStatus::SG_ERROR; - } + if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || + heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || + static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) + { + return StaticGraphStatus::SG_ERROR; + } // Make sure US is actually up scaling widthAfterCrop = _upscalerRunKernel->resolution_info->input_width - _upscalerRunKernel->resolution_info->input_crop.left - _upscalerRunKernel->resolution_info->input_crop.right; @@ -1852,4 +1994,4 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::getStatsRoiFromSensorRoi(cons return StaticGraphStatus::SG_OK; } -#endif +#endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h index 12d7f6d..21ddfb1 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h @@ -26,10 +26,13 @@ */ #pragma once #include +#include +#include #define _USE_MATH_DEFINES #define GRA_ROUND_UP(a,b) (((a) + ((b)-1)) / (b) * (b)) #define GRA_ROUND_DOWN(a,b) ((a) / (b) * (b)) +#define GRA_ROUND(a) (((double)(a) > 0.0) ? floor((double)(a) + 0.5) : ceil((double)(a) - 0.5)) // ROI in user level class RegionOfInterest @@ -73,7 +76,13 @@ enum class GraphResolutionConfiguratorKernelRole : uint8_t { UpScaler, DownScaler, - EspaCropper + EspaCropper, + NonRcb, + Output, + TnrScaler, + TnrFeederFull, + TnrFeederSmall, + None }; class RunKernelCoords @@ -138,7 +147,7 @@ class GraphResolutionConfigurator #if SUPPORT_KEY_RESOLUTIONS == 1 StaticGraphStatus getZoomKeyResolutionIndex(ZoomKeyResolutions* zoomKeyResolutions, SensorRoi sensorRoi, uint32_t& selectedIndex); #endif - StaticGraphStatus updateRunKernelOfScalers(SensorRoi& roi); + StaticGraphStatus updateRunKernelOfScalers(bool fromInput, SensorRoi& roi); StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, SensorRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop* originalScalerCrop); @@ -161,15 +170,13 @@ class GraphResolutionConfigurator StaticGraphKernelResCrop _originalCropScalerToOutput = { 0,0,0,0 }; }; +class Ipu8FragmentsConfigurator; + class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator { public: Ipu8GraphResolutionConfigurator(IStaticGraphConfig* staticGraph); - ~Ipu8GraphResolutionConfigurator() - { - _kernelsForUpdateAfterCropper.clear(); - _kernelsForUpdateAfterUpscaler.clear(); - } + ~Ipu8GraphResolutionConfigurator(); StaticGraphStatus updateStaticGraphConfig(const RegionOfInterest& roi, bool isCenteredZoom); @@ -185,18 +192,16 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphStatus initOutputRunKernel(); StaticGraphStatus initKernelsForUpdate(); - StaticGraphFragmentDesc* getKernelFragments(RunKernelCoords& coord); - // Calculate ROI in dimensions of pipe downscaler input. StaticGraphStatus getDownscalerInputRoi(const RegionOfInterest& userRoi, ResolutionRoi& pipeInputRoi); StaticGraphStatus updateRunKernelOfScalers(ResolutionRoi& roi); - StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t outputWidth, uint32_t outputHeight); + StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight); StaticGraphStatus updateRunKernelUpScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, StaticGraphKernelResCrop& cropperKernelCrop, uint32_t outputWidth, uint32_t outputHeight); StaticGraphStatus updateRunKernelCropper(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop& downscalerCropHist); - StaticGraphStatus updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments); + StaticGraphStatus updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel); StaticGraphStatus SanityCheck(); StaticGraphStatus SanityCheckCrop(StaticGraphKernelResCrop* crop); @@ -215,5 +220,9 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphRunKernel* _outputRunKernel; std::vector _kernelsForUpdateAfterCropper; std::vector _kernelsForUpdateAfterUpscaler; -}; + std::vector> _smurfKernels; + // For striping + OuterNode* _node = nullptr; + Ipu8FragmentsConfigurator* _fragmentsConfigurator = nullptr; +}; diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h b/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h index 1eceba9..30bb063 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h @@ -39,6 +39,10 @@ #include "Ipu8StaticGraphAutogen.h" #include "Ipu8StaticGraphTypesAutogen.h" #include "Ipu8GraphResolutionConfiguratorAutogen.h" +#elif defined(GRC_IPU9) +#include "Ipu9StaticGraphAutogen.h" +#include "Ipu9StaticGraphTypesAutogen.h" +#include "Ipu9GraphResolutionConfiguratorAutogen.h" #else #include "StaticGraphAutogen.h" #include "StaticGraphTypesAutogen.h" diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp index 3922a6f..c0e8dd2 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp @@ -58,12 +58,27 @@ uint32_t GraphResolutionConfiguratorHelper::getRunKernelUuidOfOutput(HwSink hwSi case 100039: // RgbIr_NoPdaf_WithDvs_WithTnr case 100040: // Dol2Inputs_WithDvs_WithTnr case 100041: // Dol3Inputs_WithDvs_WithTnr + case 100056: // Dol2Inputs_WithDvs_WithTnr + case 100057: // Dol3Inputs_WithDvs_WithTnr return 5637; // gdc7_1 case 100005: // Bayer_NoPdaf_WithNntm_WithTnr + case 100031: // Dol2Inputs_NoDvs_NoTnr + case 100032: // Dol2Inputs_NoDvs_WithTnr + case 100033: // Dol3Inputs_NoDvs_NoTnr + case 100034: // Dol3Inputs_NoDvs_WithTnr case 100042: // Bayer_WithPdaf3_WithNntm_WithTnr + case 100052: // Dol2Inputs_NoDvs_NoTnr + case 100053: // Dol2Inputs_NoDvs_WithTnr + case 100054: // Dol3Inputs_NoDvs_NoTnr + case 100055: // Dol3Inputs_NoDvs_WithTnr return 46539; // nntm_1_0 + case 100044: // Bayer_NoPdaf_NoDvs_WithTnr_WithNntm_WithImv + case 100050: // Bayer_NoPdaf_WithRemosaic_NoDvs_WithTnr + case 100051: // Bayer_NoPdaf_WithB2b_WithNntm_WithTnr + return 33331; // imv } break; + case HwSink::ProcessedSecondarySink: return 19706; // sw_scaler case HwSink::AeOutSink: return 55073; // aestatistics_2_1 } @@ -76,6 +91,7 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto // Must take only one from each resolution history index, since in static graph they all share the same // resolution history instance + kernelUuids.push_back(38648); // odr_output_ps_1_3 kernelUuids.push_back(59680); // odr_output_me_1_3 kernelUuids.push_back(6907); // slim_tnr_spatial_bifd_yuvn_regs_1_3 @@ -92,11 +108,41 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto kernelUuids.push_back(57803); // tnr_sp_bc_bifd_yuv4n_regs_1_3 kernelUuids.push_back(26536); // slim_tnr_fp_blend_bifd_yuvnm1_regs_1_3 kernelUuids.push_back(5637); // gdc7_1 + kernelUuids.push_back(19706); // sw_scaler kernelUuids.push_back(46539); // nntm_1_0 + kernelUuids.push_back(33331); // imv return StaticGraphStatus::SG_OK; } uint32_t GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid() { return 47358; -} \ No newline at end of file +} + +GraphResolutionConfiguratorKernelRole GraphResolutionConfiguratorHelper::getKernelRole(uint32_t kernelUuid) +{ + (void) kernelUuid; + return GraphResolutionConfiguratorKernelRole::NonRcb; +} + +uint32_t GraphResolutionConfiguratorHelper::getReferenceKernel(uint32_t kernelUuid) +{ + (void) kernelUuid; + return 0; +} + +FormatType GraphResolutionConfiguratorHelper::getFormatForDrainer(uint32_t kernelUuid) +{ + (void) kernelUuid; + return FormatType::YUV420_8_SP_P; +} + +StaticGraphStatus GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(std::vector>& kernelUuids) +{ + kernelUuids.clear(); + + std::pair smurfPair; + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h index 0428ff3..02823ee 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h @@ -33,10 +33,13 @@ class GraphResolutionConfiguratorHelper { public: - GraphResolutionConfiguratorHelper(); static uint32_t getRunKernelUuid(GraphResolutionConfiguratorKernelRole role); static uint32_t getRunKernelUuidOfOutput(HwSink hwSink, int32_t graphId, GraphLink** links); static StaticGraphStatus getRunKernelUuidForResHistoryUpdate(std::vector& kernelUuids); static uint32_t getRunKernelIoBufferSystemApiUuid(); + static GraphResolutionConfiguratorKernelRole getKernelRole(uint32_t kernelUuid); + static uint32_t getReferenceKernel(uint32_t kernelUuid); + static FormatType getFormatForDrainer(uint32_t kernelUuid); + static StaticGraphStatus getSmurfRunKernelUuid(std::vector>& kernelUuids); }; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp index 5597209..cf3dfdb 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp @@ -328,7 +328,7 @@ void LbffBayerOuterNode::Init(LbffBayerOuterNodeConfiguration** selectedGraphCon uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -376,7 +376,7 @@ void LbffBayerWithGmvOuterNode::Init(LbffBayerWithGmvOuterNodeConfiguration** se uint64_t kernelsRcbBitmap = 0x113FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], gmv_statistics_1_0[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_gmv_1_3}[13], {gmv_statistics_1_0}[14], {odr_gmv_match_1_3}[15], {odr_gmv_feature_1_3}[16] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -437,6 +437,27 @@ void SwGdcOuterNode::Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurati setInnerNode(None); } +void SwScalerOuterNode::Init(SwScalerOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(4, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void SwNntmOuterNode::Init(SwNntmOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(5, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -466,7 +487,7 @@ void LbffRgbIrOuterNode::Init(LbffRgbIrOuterNodeConfiguration** selectedGraphCon uint64_t kernelsRcbBitmap = 0xFF800071; // { ifd_pipe_1_3[0], rgbs_grid_1_1[4], rgb_ir_2_0[5], odr_ir_1_3[6], ccm_3a_2_0[23], fr_grid_1_0[24], b2i_ds_1_1[25], upscaler_1_0[26], lbff_crop_espa_1_3[27], tnr_scale_lb[28], odr_output_ps_1_3[29], odr_output_me_1_3[30], aestatistics_2_1[31] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3DC000FC2; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, gd_dpc_2_2, rgbs_grid_1_1, rgb_ir_2_0}[1], {odr_ir_1_3}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {ifd_lsc_1_3}[6], {lsc_1_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[7], {upscaler_1_0}[8], {lbff_crop_espa_1_3}[9], {tnr_scale_lb, odr_output_ps_1_3}[10], {odr_output_me_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -493,7 +514,7 @@ void LbffIrNoGmvIrStreamOuterNode::Init(LbffIrNoGmvIrStreamOuterNodeConfiguratio uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -541,7 +562,7 @@ void LbffBayerBurstOutNo3AOuterNode::Init(LbffBayerBurstOutNo3AOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x137F0001; // { ifd_pipe_1_3[0], odr_burst_isp_1_3[16], b2i_ds_1_1[17], upscaler_1_0[18], lbff_crop_espa_1_3[19], tnr_scale_lb[20], odr_output_ps_1_3[21], odr_output_me_1_3[22], pext_1_0[24], pafstatistics_1_2[25], gmv_statistics_1_0[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EDC0002; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, odr_burst_isp_1_3, b2i_ds_1_1}[1], {upscaler_1_0}[2], {lbff_crop_espa_1_3}[3], {tnr_scale_lb, odr_output_ps_1_3}[4], {odr_output_me_1_3}[5], {ifd_pdaf_1_3, pext_1_0}[6], {pafstatistics_1_2}[7], {odr_pdaf_1_3}[8], {ifd_gmv_1_3}[9], {gmv_statistics_1_0}[10], {odr_gmv_match_1_3}[11], {odr_gmv_feature_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 156 /*odr_burst_isp_1_3*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 156 /*odr_burst_isp_1_3*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -589,7 +610,7 @@ void LbffIrNoGmvOuterNode::Init(LbffIrNoGmvOuterNodeConfiguration** selectedGrap uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -631,7 +652,7 @@ void LbffBayerPdaf2OuterNode::Init(LbffBayerPdaf2OuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x313FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], pext_1_0[32], pafstatistics_1_2[33] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x6FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_pdaf_1_3, pext_1_0}[13], {pafstatistics_1_2}[14], {odr_pdaf_1_3}[15] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -658,7 +679,7 @@ void LbffBayerPdaf3OuterNode::Init(LbffBayerPdaf3OuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x127FE0001; // { ifd_pipe_1_3[0], pext_1_0[17], rgbs_grid_1_1[18], ccm_3a_2_0[19], fr_grid_1_0[20], b2i_ds_1_1[21], upscaler_1_0[22], lbff_crop_espa_1_3[23], tnr_scale_lb[24], odr_output_ps_1_3[25], odr_output_me_1_3[26], aestatistics_2_1[29], pafstatistics_1_2[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FDC0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, pext_1_0, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {pafstatistics_1_2}[13], {odr_pdaf_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -706,7 +727,7 @@ void LbffDol2InputsOuterNode::Init(LbffDol2InputsOuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x1FC000463; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[5], ccm_3a_2_0[6], aestatistics_2_1[10], fr_grid_1_0[26], b2i_ds_1_1[27], upscaler_1_0[28], lbff_crop_espa_1_3[29], tnr_scale_lb[30], odr_output_ps_1_3[31], odr_output_me_1_3[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x370003F86; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {aestatistics_2_1}[6], {odr_ae_1_3}[7], {ifd_lsc_1_3}[8], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[9], {upscaler_1_0}[10], {lbff_crop_espa_1_3}[11], {tnr_scale_lb, odr_output_ps_1_3}[12], {odr_output_me_1_3}[13], {odr_af_std_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -760,7 +781,7 @@ void LbffDol3InputsOuterNode::Init(LbffDol3InputsOuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x3F80008C7; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[6], ccm_3a_2_0[7], aestatistics_2_1[11], fr_grid_1_0[27], b2i_ds_1_1[28], upscaler_1_0[29], lbff_crop_espa_1_3[30], tnr_scale_lb[31], odr_output_ps_1_3[32], odr_output_me_1_3[33] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x6E0007F0E; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[3], {odr_awb_std_1_3}[4], {odr_awb_sve_1_3}[5], {odr_awb_sat_1_3}[6], {aestatistics_2_1}[7], {odr_ae_1_3}[8], {ifd_lsc_1_3}[9], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[10], {upscaler_1_0}[11], {lbff_crop_espa_1_3}[12], {tnr_scale_lb, odr_output_ps_1_3}[13], {odr_output_me_1_3}[14], {odr_af_std_1_3}[15] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -787,7 +808,7 @@ void LbffBayerPdaf2WithGmvOuterNode::Init(LbffBayerPdaf2WithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x1313FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], pext_1_0[32], pafstatistics_1_2[33], gmv_statistics_1_0[36] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EFEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_pdaf_1_3, pext_1_0}[13], {pafstatistics_1_2}[14], {odr_pdaf_1_3}[15], {ifd_gmv_1_3}[16], {gmv_statistics_1_0}[17], {odr_gmv_match_1_3}[18], {odr_gmv_feature_1_3}[19] } - uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -814,7 +835,7 @@ void LbffBayerPdaf3WithGmvOuterNode::Init(LbffBayerPdaf3WithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x927FE0001; // { ifd_pipe_1_3[0], pext_1_0[17], rgbs_grid_1_1[18], ccm_3a_2_0[19], fr_grid_1_0[20], b2i_ds_1_1[21], upscaler_1_0[22], lbff_crop_espa_1_3[23], tnr_scale_lb[24], odr_output_ps_1_3[25], odr_output_me_1_3[26], aestatistics_2_1[29], pafstatistics_1_2[32], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FFDC0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, pext_1_0, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {pafstatistics_1_2}[13], {odr_pdaf_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -841,7 +862,7 @@ void LbffRgbIrWithGmvOuterNode::Init(LbffRgbIrWithGmvOuterNodeConfiguration** se uint64_t kernelsRcbBitmap = 0x8FF800071; // { ifd_pipe_1_3[0], rgbs_grid_1_1[4], rgb_ir_2_0[5], odr_ir_1_3[6], ccm_3a_2_0[23], fr_grid_1_0[24], b2i_ds_1_1[25], upscaler_1_0[26], lbff_crop_espa_1_3[27], tnr_scale_lb[28], odr_output_ps_1_3[29], odr_output_me_1_3[30], aestatistics_2_1[31], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FDC000FC2; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, gd_dpc_2_2, rgbs_grid_1_1, rgb_ir_2_0}[1], {odr_ir_1_3}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {ifd_lsc_1_3}[6], {lsc_1_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[7], {upscaler_1_0}[8], {lbff_crop_espa_1_3}[9], {tnr_scale_lb, odr_output_ps_1_3}[10], {odr_output_me_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -868,7 +889,7 @@ void LbffIrWithGmvIrStreamOuterNode::Init(LbffIrWithGmvIrStreamOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x113FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], gmv_statistics_1_0[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_gmv_1_3}[13], {gmv_statistics_1_0}[14], {odr_gmv_match_1_3}[15], {odr_gmv_feature_1_3}[16] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -895,7 +916,7 @@ void LbffDol2InputsWithGmvOuterNode::Init(LbffDol2InputsWithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x9FC000463; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[5], ccm_3a_2_0[6], aestatistics_2_1[10], fr_grid_1_0[26], b2i_ds_1_1[27], upscaler_1_0[28], lbff_crop_espa_1_3[29], tnr_scale_lb[30], odr_output_ps_1_3[31], odr_output_me_1_3[32], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3F70003F86; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {aestatistics_2_1}[6], {odr_ae_1_3}[7], {ifd_lsc_1_3}[8], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[9], {upscaler_1_0}[10], {lbff_crop_espa_1_3}[11], {tnr_scale_lb, odr_output_ps_1_3}[12], {odr_output_me_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -922,7 +943,7 @@ void LbffDol3InputsWithGmvOuterNode::Init(LbffDol3InputsWithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x13F80008C7; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[6], ccm_3a_2_0[7], aestatistics_2_1[11], fr_grid_1_0[27], b2i_ds_1_1[28], upscaler_1_0[29], lbff_crop_espa_1_3[30], tnr_scale_lb[31], odr_output_ps_1_3[32], odr_output_me_1_3[33], gmv_statistics_1_0[36] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0007F0E; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[3], {odr_awb_std_1_3}[4], {odr_awb_sve_1_3}[5], {odr_awb_sat_1_3}[6], {aestatistics_2_1}[7], {odr_ae_1_3}[8], {ifd_lsc_1_3}[9], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[10], {upscaler_1_0}[11], {lbff_crop_espa_1_3}[12], {tnr_scale_lb, odr_output_ps_1_3}[13], {odr_output_me_1_3}[14], {odr_af_std_1_3}[15], {ifd_gmv_1_3}[16], {gmv_statistics_1_0}[17], {odr_gmv_match_1_3}[18], {odr_gmv_feature_1_3}[19] } - uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -941,6 +962,150 @@ void LbffDol3InputsWithGmvOuterNode::Init(LbffDol3InputsWithGmvOuterNodeConfigur setInnerNode(None); } +void SwB2bOuterNode::Init(SwB2bOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(7, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {45372 /*b2b*/}; + uint64_t kernelsRcbBitmap = 0x0; // { } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{b2b}[0] } + + uint8_t systemApisSizes[1] = {0 /*b2b*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, nullptr, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, nullptr); + } + + // set default inner Node + setInnerNode(None); +} + +void SwImvOuterNode::Init(SwImvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(6, NodeTypes::Sw, 2, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[2] = {33331 /*imv*/, 19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x3; // { imv[0], sw_scaler[1] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x2; // {{imv}[0], {sw_scaler}[1] } + + uint8_t systemApisSizes[2] = {0 /*imv*/, 5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void SwRemosaicOuterNode::Init(SwRemosaicOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(8, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol2InputsBayerStatOuterNode::Init(LbffDol2InputsBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 34, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[34] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/}; + uint64_t kernelsRcbBitmap = 0x8FF80003; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[19], ccm_3a_2_0[20], fr_grid_1_0[21], b2i_ds_1_1[22], upscaler_1_0[23], lbff_crop_espa_1_3[24], tnr_scale_lb[25], odr_output_ps_1_3[26], odr_output_me_1_3[27], aestatistics_2_1[31] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FB800066; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0}[2], {ifd_lsc_1_3}[3], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[4], {upscaler_1_0}[5], {lbff_crop_espa_1_3}[6], {tnr_scale_lb, odr_output_ps_1_3}[7], {odr_output_me_1_3}[8], {odr_awb_std_1_3}[9], {odr_awb_sve_1_3}[10], {odr_awb_sat_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14] } + + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][9].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol3InputsBayerStatOuterNode::Init(LbffDol3InputsBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 35, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[35] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 49695 /*ifd_pipe_short_smth_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/}; + uint64_t kernelsRcbBitmap = 0x11FF00007; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[20], ccm_3a_2_0[21], fr_grid_1_0[22], b2i_ds_1_1[23], upscaler_1_0[24], lbff_crop_espa_1_3[25], tnr_scale_lb[26], odr_output_ps_1_3[27], odr_output_me_1_3[28], aestatistics_2_1[32] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x7F70000CE; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0}[3], {ifd_lsc_1_3}[4], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[5], {upscaler_1_0}[6], {lbff_crop_espa_1_3}[7], {tnr_scale_lb, odr_output_ps_1_3}[8], {odr_output_me_1_3}[9], {odr_awb_std_1_3}[10], {odr_awb_sve_1_3}[11], {odr_awb_sat_1_3}[12], {aestatistics_2_1}[13], {odr_ae_1_3}[14], {odr_af_std_1_3}[15] } + + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][10].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol2InputsWithGmvBayerStatOuterNode::Init(LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 38, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[38] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/, 62409 /*ifd_gmv_1_3*/, 61146 /*gmv_statistics_1_0*/, 32160 /*odr_gmv_match_1_3*/, 55924 /*odr_gmv_feature_1_3*/}; + uint64_t kernelsRcbBitmap = 0x88FF80003; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[19], ccm_3a_2_0[20], fr_grid_1_0[21], b2i_ds_1_1[22], upscaler_1_0[23], lbff_crop_espa_1_3[24], tnr_scale_lb[25], odr_output_ps_1_3[26], odr_output_me_1_3[27], aestatistics_2_1[31], gmv_statistics_1_0[35] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FFB800066; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0}[2], {ifd_lsc_1_3}[3], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[4], {upscaler_1_0}[5], {lbff_crop_espa_1_3}[6], {tnr_scale_lb, odr_output_ps_1_3}[7], {odr_output_me_1_3}[8], {odr_awb_std_1_3}[9], {odr_awb_sve_1_3}[10], {odr_awb_sat_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } + + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][9].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + /* * Inner Nodes Setters */ @@ -1169,6 +1334,7 @@ void LbffBayerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1247,6 +1413,7 @@ void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1679,6 +1846,7 @@ void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1770,6 +1938,7 @@ void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1779,6 +1948,13 @@ void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwScalerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + void SwNntmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { @@ -2230,6 +2406,7 @@ void LbffRgbIrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2458,6 +2635,7 @@ void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerO } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2549,6 +2727,7 @@ void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3352,6 +3531,7 @@ void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3430,6 +3610,7 @@ void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3655,6 +3836,7 @@ void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4125,6 +4307,7 @@ void LbffBayerPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4575,6 +4758,7 @@ void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4811,6 +4995,7 @@ void LbffDol2InputsOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDolSmoothOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5065,6 +5250,7 @@ void LbffDol3InputsOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5984,6 +6170,7 @@ void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -6882,6 +7069,7 @@ void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -7768,6 +7956,7 @@ void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8208,6 +8397,7 @@ void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDol2InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8653,6 +8843,7 @@ void LbffDol2InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDol3InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -9099,609 +9290,4262 @@ void LbffDol3InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); -} -/* - * Graph 100000 - */ -StaticGraph100000::StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100000, selectedSettingsId, zoomKeyResolutions), +} - _imageSubGraph(_sinkMappingConfiguration) +void SwB2bOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100000[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; - } - - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + // No inner nodes + (void)nodeInnerOptions; +} - // Use default configuration - updateConfiguration(0); +void SwImvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; + // No inner nodes + (void)nodeInnerOptions; +} - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; +void SwRemosaicOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + // No inner nodes + (void)nodeInnerOptions; +} - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; +void LbffDol2InputsBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 34; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + // Pass-through kernels + kernelListOptions[j][8].run_kernel.enable = 0; // wb_1_1 + } - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C016F + bitmaps.teb[0] = 0xC016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 10; ++i) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F0380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243D6F + bitmaps.teb[0] = 0x243D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x4000000; } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x000000000004016F + bitmaps.teb[0] = 0x4016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; - // Apply a default inner nodes configuration for the selected sub graph - SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; - if(_selectedGraphTopology != nullptr) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F4380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) { - _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283D6F + bitmaps.teb[0] = 0x283D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xA000000; } -} + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x000000000008016F + bitmaps.teb[0] = 0x8016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; -StaticGraphStatus StaticGraph100000::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FA380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) { - return res; + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FB + bitmaps.deb[0] = 0x1FF1FB; + // TEB - 0x0000000000203D6F + bitmaps.teb[0] = 0x203D6F; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; + + // Kernels disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xFC7FF00; } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) { - return res; + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 dol_lite_1_1- inner node disablement + // 3 bxt_blc- inner node disablement + // 4 linearization2_0- inner node disablement + // 5 ifd_lsc_1_3- inner node disablement + // 6 lsc_1_2- inner node disablement + // 7 gd_dpc_2_2- inner node disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFFFF; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + else // default inner node { - return res; + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3D6F + bitmaps.teb[0] = 0x2C3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; } - return StaticGraphStatus::SG_OK; -} -StaticGraph100000::~StaticGraph100000() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; + SetDisabledKernels(disabledRunKernelsBitmap); + } -StaticGraphStatus imageSubGraphTopology100000::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +void LbffDol3InputsBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 35; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - - /* - * Setting Node lbffBayer initial inner node configuration - */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffBayerInnerOptions |= (noLbOutputMe); + // Pass-through kernels + kernelListOptions[j][9].run_kernel.enable = 0; // wb_1_1 + } - /* - * Setting Node bbpsNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping - if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && - true) + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) { - bbpsNoTnrInnerOptions |= noMp; + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C01EF + bitmaps.teb[0] = 0xC01EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7E0700000; } - if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && - true) + else if (nodeRelevantInnerOptions == (noLbOutputPs)) { - bbpsNoTnrInnerOptions |= noDp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243DEF + bitmaps.teb[0] = 0x243DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - - /* - * Link enablement by private inner options - */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + // Kernels disablement + // 27 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x8000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x00000000000401EF + bitmaps.teb[0] = 0x401EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 10; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7E8700000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283DEF + bitmaps.teb[0] = 0x283DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - return StaticGraphStatus::SG_OK; -} + // Kernels disablement + // 26 tnr_scale_lb- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0x14000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x00000000000801EF + bitmaps.teb[0] = 0x801EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; -/* - * Graph 100001 - */ -StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100001, selectedSettingsId, zoomKeyResolutions), + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7F4700000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FF + bitmaps.deb[0] = 0x1FF1FF; + // TEB - 0x0000000000203DEF + bitmaps.teb[0] = 0x203DEF; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; - _imageSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100001[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + // Kernels disablement + // 9 wb_1_1- inner node disablement + // 10 bnlm_3_3- inner node disablement + // 11 bxt_demosaic- inner node disablement + // 12 vcsc_2_0_b- inner node disablement + // 13 gltm_2_0- inner node disablement + // 14 xnr_5_2- inner node disablement + // 15 vcr_3_1- inner node disablement + // 16 glim_2_0- inner node disablement + // 17 acm_1_1- inner node disablement + // 18 gammatm_v4- inner node disablement + // 19 csc_1_1- inner node disablement + // 23 b2i_ds_1_1- inner node disablement + // 24 upscaler_1_0- inner node disablement + // 25 lbff_crop_espa_1_3- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0x1F8FFE00; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 ifd_pipe_short_smth_1_3- inner node disablement + // 3 dol_lite_1_1- inner node disablement + // 4 bxt_blc- inner node disablement + // 5 linearization2_0- inner node disablement + // 6 ifd_lsc_1_3- inner node disablement + // 7 lsc_1_2- inner node disablement + // 8 gd_dpc_2_2- inner node disablement + // 9 wb_1_1- inner node disablement + // 10 bnlm_3_3- inner node disablement + // 11 bxt_demosaic- inner node disablement + // 12 vcsc_2_0_b- inner node disablement + // 13 gltm_2_0- inner node disablement + // 14 xnr_5_2- inner node disablement + // 15 vcr_3_1- inner node disablement + // 16 glim_2_0- inner node disablement + // 17 acm_1_1- inner node disablement + // 18 gammatm_v4- inner node disablement + // 19 csc_1_1- inner node disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 23 b2i_ds_1_1- inner node disablement + // 24 upscaler_1_0- inner node disablement + // 25 lbff_crop_espa_1_3- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7FFFFFFFF; + } + else // default inner node { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3DEF + bitmaps.teb[0] = 0x2C3DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + SetDisabledKernels(disabledRunKernelsBitmap); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; +} - // Use default configuration - updateConfiguration(0); +void LbffDol2InputsWithGmvBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 38; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; + // Pass-through kernels + kernelListOptions[j][8].run_kernel.enable = 0; // wb_1_1 + } - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe | noGmv); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x00000000000000000000003EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x3E; + // DEB - 0x00000000000000000001FFFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFFF; + // TEB - 0x00000000019C016F + bitmaps.teb[0] = 0x19C016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F0380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000036A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x36; + // DEB - 0x00000000000000000001F7FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1F7FF; + // TEB - 0x0000000001B43D6F + bitmaps.teb[0] = 0x1B43D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x4000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000036A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x36; + // DEB - 0x00000000000000000001F7FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1F7FF; + // TEB - 0x000000000194016F + bitmaps.teb[0] = 0x194016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F4380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000002EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x2E; + // DEB - 0x00000000000000000001EBFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1EBFF; + // TEB - 0x0000000001B83D6F + bitmaps.teb[0] = 0x1B83D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xA000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000002EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x2E; + // DEB - 0x00000000000000000001EBFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1EBFF; + // TEB - 0x000000000198016F + bitmaps.teb[0] = 0x198016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FA380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000026A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x26; + // DEB - 0x00000000000000000001E3FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1E3FF; + // TEB - 0x0000000001B03D6F + bitmaps.teb[0] = 0x1B03D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xE000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000026A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x26; + // DEB - 0x00000000000000000001E3FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1E3FF; + // TEB - 0x000000000190016F + bitmaps.teb[0] = 0x190016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FE380000; + } + else if (nodeRelevantInnerOptions == (noGmv)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3D6F + bitmaps.teb[0] = 0x2C3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C00000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C016F + bitmaps.teb[0] = 0xC016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FF0380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243D6F + bitmaps.teb[0] = 0x243D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C04000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x000000000004016F + bitmaps.teb[0] = 0x4016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FF4380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283D6F + bitmaps.teb[0] = 0x283D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C0A000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x000000000008016F + bitmaps.teb[0] = 0x8016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFA380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FB + bitmaps.deb[0] = 0x1FF1FB; + // TEB - 0x0000000000203D6F + bitmaps.teb[0] = 0x203D6F; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; + + // Kernels disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C0FC7FF00; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 dol_lite_1_1- inner node disablement + // 3 bxt_blc- inner node disablement + // 4 linearization2_0- inner node disablement + // 5 ifd_lsc_1_3- inner node disablement + // 6 lsc_1_2- inner node disablement + // 7 gd_dpc_2_2- inner node disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFFFFF; + } + else // default inner node + { + // RBM - 0x00000000000000000000003EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x3E; + // DEB - 0x00000000000000000001FFFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFFF; + // TEB - 0x0000000001BC3D6F + bitmaps.teb[0] = 0x1BC3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + } + + SetDisabledKernels(disabledRunKernelsBitmap); + +} + +/* + * Graph 100000 + */ +StaticGraph100000::StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100000, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100000[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 10; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100000::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100000::~StaticGraph100000() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100000::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffBayerInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 10; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100001 + */ +StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100001, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100001[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 22; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100001::~StaticGraph100001() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 22; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100002 + */ +StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100002, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100002[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 15; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100002::~StaticGraph100002() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 15; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100003 + */ +StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100003, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100003[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100003::~StaticGraph100003() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 20; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100005 + */ +StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100005, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100005[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100005::~StaticGraph100005() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 20; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100006 + */ +StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100006, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100006[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; + bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; + + link = &_graphLinks[2]; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[3]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _imageSubGraph.links[8] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _imageSubGraph.links[9] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[11] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _imageSubGraph.links[12] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[13] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[14] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[15] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::IrAeOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[18] = link; + + link = &_graphLinks[19]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::IrAfStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[19] = link; + + link = &_graphLinks[20]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::IrAwbStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[20] = link; + + link = &_graphLinks[21]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::IrAwbSatOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[21] = link; + + link = &_graphLinks[22]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[22] = link; + + link = &_graphLinks[23]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[23] = link; + + link = &_graphLinks[24]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[16] = link; + _image_irSubGraph.links[24] = link; + + link = &_graphLinks[25]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[17] = link; + _image_irSubGraph.links[25] = link; + + link = &_graphLinks[26]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _irSubGraph.links[18] = link; + _image_irSubGraph.links[26] = link; + + link = &_graphLinks[27]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[19] = link; + _image_irSubGraph.links[27] = link; + + link = &_graphLinks[28]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[20] = link; + _image_irSubGraph.links[28] = link; + + for (uint8_t i = 0; i < 29; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + + // choose the selected sub graph + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; + _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 4; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100006::~StaticGraph100006() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noIr); + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 16; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[20]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[16]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; + // combine inner options for the node common sub graphs + lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[28]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[19]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[20]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[21]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[28]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[17]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[22]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[23]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 29; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[24]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[25]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[26]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[27]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100007 + */ +StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100007, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100007[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerBurstOutNo3AOuterNodeConfiguration** lbffBayerBurstOutNo3AOuterNodeConfigurationOptions = new LbffBayerBurstOutNo3AOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerBurstOutNo3AOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerBurstOutNo3AOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerBurstOutNo3AOuterNode.Init(lbffBayerBurstOutNo3AOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerBurstOutNo3AOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerBurstOutNo3A; + link->destNode = &_lbffBayerBurstOutNo3AOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::LbffBayerBurstOutNo3A; + link->srcNode = &_lbffBayerBurstOutNo3AOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 3; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerBurstOutNo3AOuterNode = &_lbffBayerBurstOutNo3AOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerBurstOutNo3AOuterNode->contextId = 1; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerBurstOutNo3AOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100007::~StaticGraph100007() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerBurstOutNo3A initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerBurstOutNo3AInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerBurstOutNo3AInnerOptions |= (no3A | noGmv | noIr | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffBayerBurstOutNo3AInnerOptions |= (noLbOutputPs | noLbOutputMe | noPdaf); + // active private inner options according to links + if ( + subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + true) + { + lbffBayerBurstOutNo3AInnerOptions |= noBurstCapture; + } + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerBurstOutNo3AOuterNode->setInnerNode(lbffBayerBurstOutNo3AInnerOptions); + + /* + * Link enablement by private inner options + */ + subGraphLinks[2]->isActive = !(lbffBayerBurstOutNo3AInnerOptions & noBurstCapture); // lbff_Bayer_BurstOut_No3A:terminal_connect_burst_isp_output -> image_mp + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 3; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100008 + */ +StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100008, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100008[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrNoTnrOuterNodeConfiguration** bbpsIrNoTnrOuterNodeConfigurationOptions = new BbpsIrNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; + bbpsIrNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrNoTnrOuterNode.Init(bbpsIrNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; + + link = &_graphLinks[2]; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[3]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _imageSubGraph.links[8] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[9] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::IrAeOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::IrAfStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::IrAwbStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::IrAwbSatOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsIrNoTnr; + link->destNode = &_bbpsIrNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsIrNoTnr; + link->srcNode = &_bbpsIrNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[18] = link; + + for (uint8_t i = 0; i < 19; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _image_irSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; + + // choose the selected sub graph + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrNoTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _image_irSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; + _image_irSubGraph.bbpsIrNoTnrOuterNode->contextId = 4; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; +StaticGraph100008::~StaticGraph100008() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; +StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noIr | noLbOutputMe); - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; + /* + * Link enablement by private inner options + */ + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 11; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; + return StaticGraphStatus::SG_OK; +} - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; +StaticGraphStatus irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); - link = &_graphLinks[19]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - for (uint8_t i = 0; i < 20; ++i) + /* + * Setting Node bbpsIrNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrNoTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; + bbpsIrNoTnrInnerOptions |= noMp; } - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[15]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp - // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; - // Apply a default inner nodes configuration for the selected sub graph - SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; - if(_selectedGraphTopology != nullptr) - { - _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); - } -} + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 16; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } -StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100001::~StaticGraph100001() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} - -StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffBayerWithGmv initial inner node configuration + * Setting Node lbffRgbIr initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputMe); + // combine inner options for the node common sub graphs + lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsIrNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrNoTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsIrNoTnrInnerOptions |= noMp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[16]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[18]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp /* * Link enablement by private inner options */ - subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[17]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 19; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9709,47 +13553,34 @@ StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100002 + * Graph 100015 */ -StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100002, selectedSettingsId, zoomKeyResolutions), +StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100015, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100002[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100015[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9805,80 +13636,23 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[10]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 15; ++i) + for (uint8_t i = 0; i < 9; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9900,7 +13674,6 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9908,7 +13681,6 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9917,7 +13689,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon } } -StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -9930,21 +13702,16 @@ StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100002::~StaticGraph100002() +StaticGraph100015::~StaticGraph100015() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -9959,36 +13726,24 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod // always active public inner options lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - - /* - * Setting Node bbpsWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping + // active private inner options according to links if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[7]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + lbffBayerInnerOptions |= noLbOutputPs; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + lbffBayerInnerOptions |= noLbOutputMe; } - /* - * Configuring inner nodes according to the selected inner options - */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - /* * Set the selected inner nodes to the outer nodes */ lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options @@ -9997,20 +13752,18 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> image_mp + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> image_dp /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 15; i++) + for (uint32_t i = 0; i < 9; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10018,50 +13771,190 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod } } + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100016 + */ +StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100016, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100016[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[2]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 3; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 0; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100016::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100016::~StaticGraph100016() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + /* - * Link enablement by inner options combinations + * Init sub graphs inner nodes configuration base on user request */ - subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[1]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Set the selected inner nodes to the outer nodes + */ + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[1]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[2]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 3; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } return StaticGraphStatus::SG_OK; } /* - * Graph 100003 + * Graph 100025 */ -StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100003, selectedSettingsId, zoomKeyResolutions), +StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100025, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100003[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100025[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvOuterNodeConfiguration** lbffIrNoGmvOuterNodeConfigurationOptions = new LbffIrNoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + lbffIrNoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvOuterNode.Init(lbffIrNoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10077,8 +13970,8 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; + link->dest = GraphElementType::LbffIrNoGmv; + link->destNode = &_lbffIrNoGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -10086,153 +13979,63 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; + link->dest = GraphElementType::LbffIrNoGmv; + link->destNode = &_lbffIrNoGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[19]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 20; ++i) + for (uint8_t i = 0; i < 10; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10253,18 +14056,16 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.lbffIrNoGmvOuterNode = &_lbffIrNoGmvOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.lbffIrNoGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10273,7 +14074,7 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon } } -StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -10281,17 +14082,12 @@ StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffIrNoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -10299,13 +14095,13 @@ StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100003::~StaticGraph100003() +StaticGraph100025::~StaticGraph100025() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -10314,70 +14110,64 @@ StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerWithGmv initial inner node configuration + * Setting Node lbffIrNoGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffIrNoGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffIrNoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrNoGmvOuterNode->setInnerNode(lbffIrNoGmvInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffIrNoGmvInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 10; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10385,51 +14175,124 @@ StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100026 + */ +StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100026, selectedSettingsId, zoomKeyResolutions), + + _rawSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100026[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::RawIsys; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 2; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _rawSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _rawSubGraph.isysOuterNode = &_isysOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_rawSubGraph; + // logical node IDs + _rawSubGraph.isysOuterNode->contextId = 0; +} + +StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } +StaticGraph100026::~StaticGraph100026() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} /* - * Graph 100005 + * Graph 100027 */ -StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100005, selectedSettingsId, zoomKeyResolutions), +StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100027, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100005[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100027[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swNntmOuterNodeConfigurationOptions; + delete[] isysPdaf2OuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10438,152 +14301,102 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[17]; - link->src = GraphElementType::SwNntm; - link->srcNode = &_swNntmOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 18; ++i) + for (uint8_t i = 0; i < 13; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10603,19 +14416,17 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; + _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.isysPdaf2OuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10624,25 +14435,20 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon } } -StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -10650,13 +14456,13 @@ StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100005::~StaticGraph100005() +StaticGraph100027::~StaticGraph100027() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -10665,68 +14471,65 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayer initial inner node configuration + * Setting Node lbffBayerPdaf2 initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); // active public options according to sink mapping + // always active private inner options + lbffBayerPdaf2InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 13; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10734,56 +14537,38 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100006 + * Graph 100028 */ -StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100006, selectedSettingsId, zoomKeyResolutions), +StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100028, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100006[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100028[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; - bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10795,305 +14580,83 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon link->dest = GraphElementType::Isys; link->destNode = &_isysOuterNode; link->destTerminalId = 0; - link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; - - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; - - link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; - - link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - _imageSubGraph.links[8] = link; - _image_irSubGraph.links[8] = link; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _imageSubGraph.links[9] = link; - _image_irSubGraph.links[9] = link; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[11] = link; - _image_irSubGraph.links[11] = link; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _imageSubGraph.links[12] = link; - _image_irSubGraph.links[12] = link; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[13] = link; - _image_irSubGraph.links[13] = link; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[14] = link; - _image_irSubGraph.links[14] = link; + link->type = LinkType::Source2Node; - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[15] = link; - _image_irSubGraph.links[15] = link; + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; - link = &_graphLinks[17]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[17] = link; - link = &_graphLinks[18]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[18] = link; - link = &_graphLinks[19]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[19] = link; - link = &_graphLinks[20]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[20] = link; - link = &_graphLinks[21]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; + link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[21] = link; - link = &_graphLinks[22]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[22] = link; - - link = &_graphLinks[23]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[23] = link; - - link = &_graphLinks[24]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[16] = link; - _image_irSubGraph.links[24] = link; - - link = &_graphLinks[25]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[17] = link; - _image_irSubGraph.links[25] = link; - - link = &_graphLinks[26]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _irSubGraph.links[18] = link; - _image_irSubGraph.links[26] = link; - - link = &_graphLinks[27]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[19] = link; - _image_irSubGraph.links[27] = link; - link = &_graphLinks[28]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _irSubGraph.links[20] = link; - _image_irSubGraph.links[28] = link; - for (uint8_t i = 0; i < 29; ++i) + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 11; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11108,96 +14671,22 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } - - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - - // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; - - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; - _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 4; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -11206,7 +14695,7 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon } } -StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -11214,22 +14703,12 @@ StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -11237,13 +14716,13 @@ StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100006::~StaticGraph100006() +StaticGraph100028::~StaticGraph100028() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -11252,67 +14731,65 @@ StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); // active public options according to sink mapping // always active private inner options - lbffRgbIrInnerOptions |= (noIr); + lbffBayerPdaf3InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 11; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11320,131 +14797,270 @@ StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } -StaticGraphStatus irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +/* + * Graph 100029 + */ +StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100029, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) { + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100029[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + } - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + delete[] isysPdaf2OuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[20]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; - /* - * Link enablement by private inner options - */ - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 21; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + for (uint8_t i = 0; i < 18; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) { - subGraphLinks[i]->isActive = false; + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } } - } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - /* - * Link enablement by inner options combinations - */ - subGraphLinks[16]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[17]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; + _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysPdaf2OuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} +StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraph100029::~StaticGraph100029() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration + * Setting Node lbffBayerPdaf2 initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; - // combine inner options for the node common sub graphs - lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr); + // active public options according to sink mapping /* * Setting Node bbpsWithTnr initial inner node configuration @@ -11452,87 +15068,52 @@ StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInner InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; } - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping - - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[28]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } - /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[19]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[20]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[21]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[28]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[17]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[22]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[23]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 29; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11543,43 +15124,43 @@ StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInner /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - subGraphLinks[24]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[25]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[26]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[27]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100007 + * Graph 100030 */ -StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100007, selectedSettingsId, zoomKeyResolutions), +StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100030, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100007[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100030[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerBurstOutNo3AOuterNodeConfiguration** lbffBayerBurstOutNo3AOuterNodeConfigurationOptions = new LbffBayerBurstOutNo3AOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerBurstOutNo3AOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerBurstOutNo3AOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerBurstOutNo3AOuterNode.Init(lbffBayerBurstOutNo3AOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerBurstOutNo3AOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -11593,23 +15174,129 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Source2Node; - link = &_graphLinks[1]; + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerBurstOutNo3A; - link->destNode = &_lbffBayerBurstOutNo3AOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::LbffBayerBurstOutNo3A; - link->srcNode = &_lbffBayerBurstOutNo3AOuterNode; - link->srcTerminalId = 16; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 3; ++i) + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 16; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11630,14 +15317,16 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerBurstOutNo3AOuterNode = &_lbffBayerBurstOutNo3AOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerBurstOutNo3AOuterNode->contextId = 1; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -11646,7 +15335,7 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon } } -StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -11654,7 +15343,12 @@ StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerBurstOutNo3AOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -11662,13 +15356,13 @@ StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100007::~StaticGraph100007() +StaticGraph100030::~StaticGraph100030() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -11677,37 +15371,65 @@ StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerBurstOutNo3A initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerBurstOutNo3AInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerBurstOutNo3AInnerOptions |= (no3A | noGmv | noIr | noLbOutputPs | noLbOutputMe | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping - // always active private inner options - lbffBayerBurstOutNo3AInnerOptions |= (noLbOutputPs | noLbOutputMe | noPdaf); - // active private inner options according to links if ( - subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerBurstOutNo3AInnerOptions |= noBurstCapture; + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ - lbffBayerBurstOutNo3AOuterNode->setInnerNode(lbffBayerBurstOutNo3AInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[2]->isActive = !(lbffBayerBurstOutNo3AInnerOptions & noBurstCapture); // lbff_Bayer_BurstOut_No3A:terminal_connect_burst_isp_output -> image_mp + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 3; i++) + for (uint32_t i = 0; i < 16; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11715,48 +15437,54 @@ StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100008 + * Graph 100031 */ -StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100008, selectedSettingsId, zoomKeyResolutions), +StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100031, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100008[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100031[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrNoTnrOuterNodeConfiguration** bbpsIrNoTnrOuterNodeConfigurationOptions = new BbpsIrNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; - lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; - bbpsIrNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrNoTnrOuterNode.Init(bbpsIrNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsOuterNodeConfigurationOptions; delete[] bbpsNoTnrOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -11765,192 +15493,143 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[11] = link; link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsNoTnr; link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _imageSubGraph.links[8] = link; - _image_irSubGraph.links[8] = link; - link = &_graphLinks[10]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _imageSubGraph.links[9] = link; - _image_irSubGraph.links[9] = link; - link = &_graphLinks[11]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[12] = link; link = &_graphLinks[13]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[13] = link; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[14]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[14] = link; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[15]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[15] = link; link = &_graphLinks[16]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[17]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrNoTnr; - link->destNode = &_bbpsIrNoTnrOuterNode; - link->destTerminalId = 9; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[17] = link; - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsIrNoTnr; - link->srcNode = &_bbpsIrNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[18] = link; - for (uint8_t i = 0; i < 19; ++i) + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11965,96 +15644,26 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _image_irSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; - - // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrNoTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; - - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _image_irSubGraph.bbpsNoTnrOuterNode->contextId = 2; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; - _image_irSubGraph.bbpsIrNoTnrOuterNode->contextId = 4; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12063,15 +15672,15 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon } } -StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12081,12 +15690,12 @@ StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsIrNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12094,13 +15703,13 @@ StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100008::~StaticGraph100008() +StaticGraph100031::~StaticGraph100031() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12109,183 +15718,14 @@ StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noIr | noLbOutputMe); - - /* - * Setting Node bbpsNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping - if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsNoTnrInnerOptions |= noMp; - } - if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsNoTnrInnerOptions |= noDp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - - /* - * Link enablement by private inner options - */ - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 11; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } - - return StaticGraphStatus::SG_OK; -} - -StaticGraphStatus irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) -{ - - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); - - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - - /* - * Setting Node bbpsIrNoTnr initial inner node configuration + * Setting Node lbffDol2Inputs initial inner node configuration */ - InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - bbpsIrNoTnrInnerOptions |= (noDp); + lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping - if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrNoTnrInnerOptions |= noMp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[15]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp - - /* - * Link enablement by private inner options - */ - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd - - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 16; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } - - return StaticGraphStatus::SG_OK; -} - -StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) -{ - - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputMe); - // combine inner options for the node common sub graphs - lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + lbffDol2InputsInnerOptions |= (noLbOutputMe); /* * Setting Node bbpsNoTnr initial inner node configuration @@ -12293,85 +15733,54 @@ StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInner InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; } - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - - /* - * Setting Node bbpsIrNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrNoTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrNoTnrInnerOptions |= noMp; - } - /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[16]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[18]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + */ + lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[17]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12383,30 +15792,42 @@ StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInner } /* - * Graph 100015 + * Graph 100032 */ -StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100015, selectedSettingsId, zoomKeyResolutions), +StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100032, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100015[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100032[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12415,70 +15836,191 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 9; ++i) + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12498,15 +16040,21 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12515,15 +16063,30 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon } } -StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12531,13 +16094,13 @@ StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100015::~StaticGraph100015() +StaticGraph100032::~StaticGraph100032() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12546,50 +16109,69 @@ StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayer initial inner node configuration + * Setting Node lbffDol2Inputs initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping - // active private inner options according to links if ( - subGraphLinks[7]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerInnerOptions |= noLbOutputPs; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerInnerOptions |= noLbOutputMe; + bbpsWithTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> image_mp - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> image_dp + subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputMe); // lbff_Dol2Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 9; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12597,30 +16179,58 @@ StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100016 + * Graph 100033 */ -StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100016, selectedSettingsId, zoomKeyResolutions), +StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100033, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100016[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100033[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsOuterNodeConfigurationOptions; delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12629,26 +16239,161 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 19; link->dest = GraphElementType::BbpsNoTnr; link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; - link->type = LinkType::Source2Node; + link->type = LinkType::Node2Node; - link = &_graphLinks[1]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[2]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 3; ++i) + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12668,13 +16413,23 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon } // add nodes for sub graph + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 0; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12683,24 +16438,49 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon } } -StaticGraphStatus StaticGraph100016::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100016::~StaticGraph100016() +StaticGraph100033::~StaticGraph100033() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12708,40 +16488,70 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + /* + * Setting Node lbffDol3Inputs initial inner node configuration + */ + InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffDol3InputsInnerOptions |= (noLbOutputMe); + /* * Setting Node bbpsNoTnr initial inner node configuration */ InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[1]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ + lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[1]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[2]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 3; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12753,34 +16563,46 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod } /* - * Graph 100025 + * Graph 100034 */ -StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100025, selectedSettingsId, zoomKeyResolutions), +StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100034, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100025[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvOuterNodeConfiguration** lbffIrNoGmvOuterNodeConfigurationOptions = new LbffIrNoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100034[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffIrNoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvOuterNode.Init(lbffIrNoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12789,79 +16611,209 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffIrNoGmv; - link->destNode = &_lbffIrNoGmvOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffIrNoGmv; - link->destNode = &_lbffIrNoGmvOuterNode; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[8]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[23]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 10; ++i) + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12881,17 +16833,23 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffIrNoGmvOuterNode = &_lbffIrNoGmvOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffIrNoGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12900,20 +16858,35 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon } } -StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffIrNoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12921,13 +16894,13 @@ StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100025::~StaticGraph100025() +StaticGraph100034::~StaticGraph100034() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12936,64 +16909,69 @@ StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffIrNoGmv initial inner node configuration + * Setting Node lbffDol3Inputs initial inner node configuration */ - InnerNodeOptionsFlags lbffIrNoGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffIrNoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffIrNoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffIrNoGmvOuterNode->setInnerNode(lbffIrNoGmvInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffIrNoGmvInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputMe); // lbff_Dol3Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 10; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13001,30 +16979,38 @@ StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100026 + * Graph 100035 */ -StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100026, selectedSettingsId, zoomKeyResolutions), +StaticGraph100035::StaticGraph100035(GraphConfiguration100035** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100035, selectedSettingsId, zoomKeyResolutions), _rawSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100026[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100035[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13033,19 +17019,133 @@ StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::RawIsys; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::RawIsysDolLong; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 4; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _rawSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _rawSubGraph.isysDolOuterNode = &_isysDolOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_rawSubGraph; + + // logical node IDs + _rawSubGraph.isysDolOuterNode->contextId = 0; +} + +StaticGraphStatus StaticGraph100035::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100035::~StaticGraph100035() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} +/* + * Graph 100036 + */ +StaticGraph100036::StaticGraph100036(GraphConfiguration100036** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100036, selectedSettingsId, zoomKeyResolutions), + + _rawSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100036[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + } + + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysPdaf2OuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::RawIsys; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 2; ++i) + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::RawIsysPdaf; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 4; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13065,19 +17165,19 @@ StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphCon } // add nodes for sub graph - _rawSubGraph.isysOuterNode = &_isysOuterNode; + _rawSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; // choose the selected sub graph _selectedGraphTopology = &_rawSubGraph; // logical node IDs - _rawSubGraph.isysOuterNode->contextId = 0; + _rawSubGraph.isysPdaf2OuterNode->contextId = 0; } -StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100036::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13085,40 +17185,44 @@ StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100026::~StaticGraph100026() +StaticGraph100036::~StaticGraph100036() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } /* - * Graph 100027 + * Graph 100037 */ -StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100027, selectedSettingsId, zoomKeyResolutions), +StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100037, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100027[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100037[kernelConfigurationsOptionsCount]; IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2WithGmvOuterNodeConfiguration** lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf2WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2WithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2WithGmvOuterNode.Init(lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13134,8 +17238,8 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -13150,8 +17254,8 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link->src = GraphElementType::IsysPdaf2; link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -13159,70 +17263,160 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link->src = GraphElementType::IsysPdaf2; link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 13; ++i) + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13243,16 +17437,18 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode = &_lbffBayerPdaf2WithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13261,7 +17457,7 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon } } -StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -13269,12 +17465,17 @@ StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf2WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13282,13 +17483,13 @@ StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100027::~StaticGraph100027() +StaticGraph100037::~StaticGraph100037() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13297,65 +17498,71 @@ StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2 initial inner node configuration + * Setting Node lbffBayerPdaf2WithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2WithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); + lbffBayerPdaf2WithGmvInnerOptions |= (noBurstCapture | noIr); // active public options according to sink mapping - // always active private inner options - lbffBayerPdaf2InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerPdaf2WithGmvOuterNode->setInnerNode(lbffBayerPdaf2WithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[12]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 13; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13363,38 +17570,51 @@ StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (lbffBayerPdaf2WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100028 + * Graph 100038 */ -StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100028, selectedSettingsId, zoomKeyResolutions), +StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100038, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100028[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100038[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3WithGmvOuterNodeConfiguration** lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf3WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3WithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3WithGmvOuterNode.Init(lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13410,8 +17630,8 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -13419,70 +17639,160 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 11; ++i) + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13503,16 +17813,18 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode = &_lbffBayerPdaf3WithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13521,7 +17833,7 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon } } -StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -13529,12 +17841,17 @@ StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13542,13 +17859,13 @@ StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100028::~StaticGraph100028() +StaticGraph100038::~StaticGraph100038() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13557,65 +17874,71 @@ StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffBayerPdaf3WithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3WithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); + lbffBayerPdaf3WithGmvInnerOptions |= (noBurstCapture | noIr); // active public options according to sink mapping - // always active private inner options - lbffBayerPdaf3InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerPdaf3WithGmvOuterNode->setInnerNode(lbffBayerPdaf3WithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[10]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 11; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13623,38 +17946,61 @@ StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[8]->isActive = (lbffBayerPdaf3WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100029 + * Graph 100039 */ -StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100029, selectedSettingsId, zoomKeyResolutions), +StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100039, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100029[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100039[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrWithGmvOuterNodeConfiguration** lbffRgbIrWithGmvOuterNodeConfigurationOptions = new LbffRgbIrWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrWithGmvIrStreamOuterNodeConfiguration** lbffIrWithGmvIrStreamOuterNodeConfigurationOptions = new LbffIrWithGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + lbffIrWithGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrWithGmvIrStreamOuterNodeConfiguration; + bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrWithGmvOuterNode.Init(lbffRgbIrWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrWithGmvIrStreamOuterNode.Init(lbffIrWithGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] lbffIrWithGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13663,150 +18009,362 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrWithGmvIrStream; + link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->destTerminalId = 8; link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[21] = link; link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[8] = link; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[9] = link; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _imageSubGraph.links[11] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[12] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[13] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _imageSubGraph.links[14] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[15] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[16] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[17] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[19]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrWithGmvIrStream; + link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[22] = link; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[20]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; + link->dest = GraphElementType::IrAeOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[23] = link; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[21]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; + link->dest = GraphElementType::IrAfStdOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[24] = link; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[22]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; + link->dest = GraphElementType::IrAwbStdOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[25] = link; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[23]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link->dest = GraphElementType::IrAwbSatOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[26] = link; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[24]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; + _irSubGraph.links[16] = link; + _image_irSubGraph.links[27] = link; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[25]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; + _irSubGraph.links[17] = link; + _image_irSubGraph.links[28] = link; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[26]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 10; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[18] = link; + _image_irSubGraph.links[29] = link; - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[27]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[19] = link; + _image_irSubGraph.links[30] = link; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[28]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 11; link->type = LinkType::Node2Self; + _irSubGraph.links[20] = link; + _image_irSubGraph.links[31] = link; - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[29]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[21] = link; + _image_irSubGraph.links[32] = link; - link = &_graphLinks[16]; + link = &_graphLinks[30]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[22] = link; + _image_irSubGraph.links[33] = link; + + link = &_graphLinks[31]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + _imageSubGraph.links[18] = link; + _image_irSubGraph.links[18] = link; - link = &_graphLinks[17]; + link = &_graphLinks[32]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + _imageSubGraph.links[19] = link; + _image_irSubGraph.links[19] = link; + + link = &_graphLinks[33]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; + _imageSubGraph.links[20] = link; + _image_irSubGraph.links[20] = link; - for (uint8_t i = 0; i < 18; ++i) + for (uint8_t i = 0; i < 34; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13821,22 +18379,100 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; + _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _image_irSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; - // logical node IDs - _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _image_irSubGraph.swGdcOuterNode->contextId = 3; + _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 4; + _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 5; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13845,15 +18481,15 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon } } -StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffRgbIrWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13863,16 +18499,31 @@ StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _lbffIrWithGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100029::~StaticGraph100029() +StaticGraph100039::~StaticGraph100039() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13881,12 +18532,14 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2 initial inner node configuration + * Setting Node lbffRgbIrWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffRgbIrWithGmvInnerOptions |= (noIr); /* * Setting Node bbpsWithTnr initial inner node configuration @@ -13895,12 +18548,14 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -13909,37 +18564,271 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf2InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIrWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrWithGmvInnerOptions |= (noLbOutputPs | noLbOutputMe); + + /* + * Setting Node lbffIrWithGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[12]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[13]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[14]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[15]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[22]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[16]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[17]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 23; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[20]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[21]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIrWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = None; + // combine inner options for the node common sub graphs + lbffRgbIrWithGmvInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrWithGmvInnerOptions |= irPublicInnerNodeConfiguration; + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrWithGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[33]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[23]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[24]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[25]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[26]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[33]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[22]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[27]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[28]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 34; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13950,43 +18839,52 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ + subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[29]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[30]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[31]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[32]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100030 + * Graph 100040 */ -StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100030, selectedSettingsId, zoomKeyResolutions), +StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100040, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100030[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100040[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsWithGmvOuterNodeConfiguration** lbffDol2InputsWithGmvOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsWithGmvOuterNode.Init(lbffDol2InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13995,81 +18893,114 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -14079,7 +19010,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[11]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -14089,7 +19020,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[12]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14098,7 +19029,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[13]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14108,21 +19039,46 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 16; ++i) + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14142,17 +19098,19 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsWithGmvOuterNode = &_lbffDol2InputsWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsWithGmvOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14161,15 +19119,15 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon } } -StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14179,16 +19137,21 @@ StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100030::~StaticGraph100030() +StaticGraph100040::~StaticGraph100040() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14197,11 +19160,11 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffDol2InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffDol2InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -14210,13 +19173,15 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -14225,37 +19190,41 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + lbffDol2InputsWithGmvOuterNode->setInnerNode(lbffDol2InputsWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14266,43 +19235,52 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100031 + * Graph 100041 */ -StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100031, selectedSettingsId, zoomKeyResolutions), +StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100041, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100031[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100041[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14324,18 +19302,20 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -14343,70 +19323,176 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 21; link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 13; ++i) + link = &_graphLinks[22]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[23]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14427,16 +19513,20 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swGdcOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14445,7 +19535,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon } } -StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -14453,12 +19543,22 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14466,13 +19566,13 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100031::~StaticGraph100031() +StaticGraph100041::~StaticGraph100041() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14481,65 +19581,71 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2Inputs initial inner node configuration + * Setting Node lbffDol3InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffDol2InputsInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 13; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14547,38 +19653,55 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100032 + * Graph 100042 */ -StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100032, selectedSettingsId, zoomKeyResolutions), +StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100032[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14587,97 +19710,81 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[12]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -14687,7 +19794,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[13]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -14697,7 +19804,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14706,7 +19813,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[15]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14716,21 +19823,62 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 18; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14750,17 +19898,21 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14769,15 +19921,15 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon } } -StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14787,16 +19939,26 @@ StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100032::~StaticGraph100032() +StaticGraph100042::~StaticGraph100042() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14805,11 +19967,11 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2Inputs initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); // active public options according to sink mapping /* @@ -14818,12 +19980,14 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { @@ -14833,37 +19997,39 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol2InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputMe); // lbff_Dol2Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14874,47 +20040,55 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100033 + * Graph 100044 */ -StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100033, selectedSettingsId, zoomKeyResolutions), +StaticGraph100044::StaticGraph100044(GraphConfiguration100044** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100044, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100033[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100044[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwB2bOuterNodeConfiguration** swB2bOuterNodeConfigurationOptions = new SwB2bOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + swB2bOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swB2bOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swB2bOuterNode.Init(swB2bOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] swB2bOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14923,120 +20097,186 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwB2b; + link->destNode = &_swB2bOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::SwB2b; + link->srcNode = &_swB2bOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 6; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; - link->destTerminalId = 9; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link = &_graphLinks[21]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 15; ++i) + for (uint8_t i = 0; i < 22; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -15056,19 +20296,23 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.swB2bOuterNode = &_swB2bOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.swB2bOuterNode->contextId = 1; + _imageSubGraph.lbffBayerOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swImvOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -15077,25 +20321,35 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon } } -StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100044::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swB2bOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -15103,13 +20357,13 @@ StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100033::~StaticGraph100033() +StaticGraph100044::~StaticGraph100044() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100044::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -15118,65 +20372,68 @@ StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3Inputs initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffDol3InputsInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 15; i++) + for (uint32_t i = 0; i < 22; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -15184,42 +20441,54 @@ StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100034 + * Graph 100050 */ -StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100034, selectedSettingsId, zoomKeyResolutions), +StaticGraph100050::StaticGraph100050(GraphConfiguration100050** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100050, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100034[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100050[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwRemosaicOuterNodeConfiguration** swRemosaicOuterNodeConfigurationOptions = new SwRemosaicOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + swRemosaicOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swRemosaicOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swRemosaicOuterNode.Init(swRemosaicOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] swRemosaicOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -15228,115 +20497,83 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; - link->destTerminalId = 5; + link->dest = GraphElementType::SwRemosaic; + link->destNode = &_swRemosaicOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::SwRemosaic; + link->srcNode = &_swRemosaicOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[14]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -15346,7 +20583,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[15]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -15356,7 +20593,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15365,7 +20602,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[17]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15375,20 +20612,52 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[19]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size @@ -15409,19 +20678,21 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.swRemosaicOuterNode = &_swRemosaicOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.swRemosaicOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swImvOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -15430,20 +20701,20 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon } } -StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100050::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swRemosaicOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -15453,16 +20724,21 @@ StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100034::~StaticGraph100034() +StaticGraph100050::~StaticGraph100050() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100050::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -15471,11 +20747,11 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3Inputs initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -15484,13 +20760,15 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -15499,31 +20777,32 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol3InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_imv:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputMe); // lbff_Dol3Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size @@ -15540,247 +20819,51 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - - return StaticGraphStatus::SG_OK; -} - -/* - * Graph 100035 - */ -StaticGraph100035::StaticGraph100035(GraphConfiguration100035** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100035, selectedSettingsId, zoomKeyResolutions), - - _rawSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100035[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - } - - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - - delete[] isysDolOuterNodeConfigurationOptions; - - // Use default configuration - updateConfiguration(0); - - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; - - link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::RawIsys; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::RawIsysDolLong; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 4; ++i) - { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _rawSubGraph.links[i] = &_graphLinks[i]; - } - - // add nodes for sub graph - _rawSubGraph.isysDolOuterNode = &_isysDolOuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_rawSubGraph; - - // logical node IDs - _rawSubGraph.isysDolOuterNode->contextId = 0; -} - -StaticGraphStatus StaticGraph100035::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - return StaticGraphStatus::SG_OK; -} - -StaticGraph100035::~StaticGraph100035() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} -/* - * Graph 100036 - */ -StaticGraph100036::StaticGraph100036(GraphConfiguration100036** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100036, selectedSettingsId, zoomKeyResolutions), - - _rawSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100036[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - } - - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - - delete[] isysPdaf2OuterNodeConfigurationOptions; - - // Use default configuration - updateConfiguration(0); - - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; - - link = &_graphLinks[1]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::RawIsys; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::RawIsysPdaf; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 4; ++i) - { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _rawSubGraph.links[i] = &_graphLinks[i]; - } - - // add nodes for sub graph - _rawSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_rawSubGraph; - - // logical node IDs - _rawSubGraph.isysPdaf2OuterNode->contextId = 0; -} + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd -StaticGraphStatus StaticGraph100036::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100036::~StaticGraph100036() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} /* - * Graph 100037 + * Graph 100051 */ -StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100037, selectedSettingsId, zoomKeyResolutions), +StaticGraph100051::StaticGraph100051(GraphConfiguration100051** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100051, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100037[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2WithGmvOuterNodeConfiguration** lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf2WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100051[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2WithGmvOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2WithGmvOuterNode.Init(lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -15789,114 +20872,74 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; - link->type = LinkType::Source2Node; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[4]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[14]; + link = &_graphLinks[9]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -15906,7 +20949,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[15]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -15916,7 +20959,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15925,7 +20968,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[17]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15935,46 +20978,62 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[19]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[20]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[21]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[22]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 23; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -15994,19 +21053,21 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode = &_lbffBayerPdaf2WithGmvOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode->contextId = 1; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swImvOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -16015,15 +21076,15 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon } } -StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100051::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf2WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16033,7 +21094,12 @@ StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16041,13 +21107,13 @@ StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100037::~StaticGraph100037() +StaticGraph100051::~StaticGraph100051() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100051::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -16056,11 +21122,11 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2WithGmv initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2WithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2WithGmvInnerOptions |= (noBurstCapture | noIr); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -16069,15 +21135,15 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && - subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -16086,41 +21152,38 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2WithGmvOuterNode->setInnerNode(lbffBayerPdaf2WithGmvInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 23; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16131,48 +21194,51 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (lbffBayerPdaf2WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100038 + * Graph 100052 */ -StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100038, selectedSettingsId, zoomKeyResolutions), +StaticGraph100052::StaticGraph100052(GraphConfiguration100052** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100052, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100038[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3WithGmvOuterNodeConfiguration** lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf3WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100052[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsBayerStatOuterNodeConfiguration** lbffDol2InputsBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3WithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsBayerStatOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3WithGmvOuterNode.Init(lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsBayerStatOuterNode.Init(lbffDol2InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsBayerStatOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16181,176 +21247,143 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[19]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[20]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 21; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16370,19 +21403,21 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode = &_lbffBayerPdaf3WithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode = &_lbffDol2InputsBayerStatOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -16391,25 +21426,30 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon } } -StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100052::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16417,13 +21457,13 @@ StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100038::~StaticGraph100038() +StaticGraph100052::~StaticGraph100052() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100052::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -16432,71 +21472,69 @@ StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3WithGmv initial inner node configuration + * Setting Node lbffDol2InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3WithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3WithGmvInnerOptions |= (noBurstCapture | noIr); + lbffDol2InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffDol2InputsBayerStatInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffBayerPdaf3WithGmvOuterNode->setInnerNode(lbffBayerPdaf3WithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + * Set the selected inner nodes to the outer nodes + */ + lbffDol2InputsBayerStatOuterNode->setInnerNode(lbffDol2InputsBayerStatInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[5]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[10]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_BayerStat:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16504,61 +21542,46 @@ StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[8]->isActive = (lbffBayerPdaf3WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100039 + * Graph 100053 */ -StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100039, selectedSettingsId, zoomKeyResolutions), +StaticGraph100053::StaticGraph100053(GraphConfiguration100053** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100053, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100039[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrWithGmvOuterNodeConfiguration** lbffRgbIrWithGmvOuterNodeConfigurationOptions = new LbffRgbIrWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100053[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsBayerStatOuterNodeConfiguration** lbffDol2InputsBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrWithGmvIrStreamOuterNodeConfiguration** lbffIrWithGmvIrStreamOuterNodeConfigurationOptions = new LbffIrWithGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrWithGmvOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - lbffIrWithGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrWithGmvIrStreamOuterNodeConfiguration; - bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrWithGmvOuterNode.Init(lbffRgbIrWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsBayerStatOuterNode.Init(lbffDol2InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrWithGmvIrStreamOuterNode.Init(lbffIrWithGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrWithGmvOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] lbffIrWithGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16567,362 +21590,191 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrWithGmvIrStream; - link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[21] = link; link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[8] = link; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[8] = link; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[9] = link; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[9] = link; - - link = &_graphLinks[11]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _imageSubGraph.links[11] = link; - _image_irSubGraph.links[11] = link; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[12] = link; - _image_irSubGraph.links[12] = link; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[13] = link; - _image_irSubGraph.links[13] = link; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _imageSubGraph.links[14] = link; - _image_irSubGraph.links[14] = link; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[15] = link; - _image_irSubGraph.links[15] = link; - - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[16] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[17] = link; - _image_irSubGraph.links[17] = link; - - link = &_graphLinks[19]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrWithGmvIrStream; - link->destNode = &_lbffIrWithGmvIrStreamOuterNode; - link->destTerminalId = 5; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; + link->destTerminalId = 6; link->type = LinkType::Node2Node; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[22] = link; - link = &_graphLinks[20]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[23] = link; - link = &_graphLinks[21]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[24] = link; - link = &_graphLinks[22]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[25] = link; - link = &_graphLinks[23]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; + link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[26] = link; - link = &_graphLinks[24]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _irSubGraph.links[16] = link; - _image_irSubGraph.links[27] = link; - link = &_graphLinks[25]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - _irSubGraph.links[17] = link; - _image_irSubGraph.links[28] = link; - link = &_graphLinks[26]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 10; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[18] = link; - _image_irSubGraph.links[29] = link; - link = &_graphLinks[27]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[19] = link; - _image_irSubGraph.links[30] = link; - link = &_graphLinks[28]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 11; link->type = LinkType::Node2Self; - _irSubGraph.links[20] = link; - _image_irSubGraph.links[31] = link; - link = &_graphLinks[29]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[21] = link; - _image_irSubGraph.links[32] = link; - link = &_graphLinks[30]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _irSubGraph.links[22] = link; - _image_irSubGraph.links[33] = link; - link = &_graphLinks[31]; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - _imageSubGraph.links[18] = link; - _image_irSubGraph.links[18] = link; - link = &_graphLinks[32]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - _imageSubGraph.links[19] = link; - _image_irSubGraph.links[19] = link; - link = &_graphLinks[33]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[20]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - _imageSubGraph.links[20] = link; - _image_irSubGraph.links[20] = link; - for (uint8_t i = 0; i < 34; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16937,100 +21789,26 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode = &_lbffDol2InputsBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; - _irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; - _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; - _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _image_irSubGraph.swGdcOuterNode = &_swGdcOuterNode; - _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; + _selectedGraphTopology = &_imageSubGraph; - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _image_irSubGraph.swGdcOuterNode->contextId = 3; - _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 4; - _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 5; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17039,15 +21817,15 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon } } -StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100053::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffRgbIrWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17057,17 +21835,12 @@ StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffIrWithGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17075,13 +21848,13 @@ StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100039::~StaticGraph100039() +StaticGraph100053::~StaticGraph100053() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100053::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -17090,14 +21863,12 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration + * Setting Node lbffDol2InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol2InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffRgbIrWithGmvInnerOptions |= (noIr); /* * Setting Node bbpsWithTnr initial inner node configuration @@ -17122,41 +21893,39 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + lbffDol2InputsBayerStatOuterNode->setInnerNode(lbffDol2InputsBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[5]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17167,7 +21936,6 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd @@ -17176,217 +21944,368 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } -StaticGraphStatus irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +/* + * Graph 100054 + */ +StaticGraph100054::StaticGraph100054(GraphConfiguration100054** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100054, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) { + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100054[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsBayerStatOuterNodeConfiguration** lbffDol3InputsBayerStatOuterNodeConfigurationOptions = new LbffDol3InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsBayerStatOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } - /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrWithGmvInnerOptions |= (noLbOutputPs | noLbOutputMe); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsBayerStatOuterNode.Init(lbffDol3InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - /* - * Setting Node lbffIrWithGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsBayerStatOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } + // Use default configuration + updateConfiguration(0); - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); - lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[12]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[13]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[14]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[15]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[22]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; - /* - * Link enablement by private inner options - */ - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[16]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[17]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 23; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) { - subGraphLinks[i]->isActive = false; + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } } - } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - /* - * Link enablement by inner options combinations - */ - subGraphLinks[9]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[20]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[21]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode = &_lbffDol3InputsBayerStatOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode->contextId = 2; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} +StaticGraphStatus StaticGraph100054::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraph100054::~StaticGraph100054() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100054::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration + * Setting Node lbffDol3InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = None; - // combine inner options for the node common sub graphs - lbffRgbIrWithGmvInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrWithGmvInnerOptions |= irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffDol3InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffDol3InputsBayerStatInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsWithTnrInnerOptions |= noMp; - } - if ( - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noMp; } - - /* - * Setting Node lbffIrWithGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping - - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping if ( - subGraphLinks[33]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { - bbpsIrWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); - lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + lbffDol3InputsBayerStatOuterNode->setInnerNode(lbffDol3InputsBayerStatInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[23]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[24]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[25]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[26]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[33]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + subGraphLinks[7]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[22]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[27]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[28]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_BayerStat:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 34; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17394,55 +22313,50 @@ StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInner } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - subGraphLinks[29]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[30]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[31]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[32]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100040 + * Graph 100055 */ -StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100040, selectedSettingsId, zoomKeyResolutions), +StaticGraph100055::StaticGraph100055(GraphConfiguration100055** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100055, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100040[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100055[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsWithGmvOuterNodeConfiguration** lbffDol2InputsWithGmvOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsBayerStatOuterNodeConfiguration** lbffDol3InputsBayerStatOuterNodeConfigurationOptions = new LbffDol3InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsWithGmvOuterNode.Init(lbffDol2InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsBayerStatOuterNode.Init(lbffDol3InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsWithGmvOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -17464,18 +22378,20 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -17483,66 +22399,65 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; @@ -17550,8 +22465,8 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->type = LinkType::Node2Node; link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; @@ -17615,8 +22530,8 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; @@ -17624,19 +22539,35 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; link = &_graphLinks[22]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 23; ++i) + link = &_graphLinks[23]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -17657,18 +22588,22 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsWithGmvOuterNode = &_lbffDol2InputsWithGmvOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode = &_lbffDol3InputsBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17677,7 +22612,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon } } -StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100055::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -17685,7 +22620,12 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDol2InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17695,7 +22635,12 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17703,13 +22648,13 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100040::~StaticGraph100040() +StaticGraph100055::~StaticGraph100055() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100055::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -17718,11 +22663,11 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2InputsWithGmv initial inner node configuration + * Setting Node lbffDol3InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol3InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -17748,41 +22693,39 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol2InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsWithGmvOuterNode->setInnerNode(lbffDol2InputsWithGmvInnerOptions); + lbffDol3InputsBayerStatOuterNode->setInnerNode(lbffDol3InputsBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[7]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 23; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17793,7 +22736,6 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd @@ -17803,18 +22745,17 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod } /* - * Graph 100041 + * Graph 100056 */ -StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100041, selectedSettingsId, zoomKeyResolutions), +StaticGraph100056::StaticGraph100056(GraphConfiguration100056** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100056, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100041[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100056[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; @@ -17822,21 +22763,18 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; + lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsWithGmvBayerStatOuterNode.Init(lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; + delete[] lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; @@ -17860,20 +22798,18 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -17881,98 +22817,82 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 21; link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 24; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 20; link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 23; link->dest = GraphElementType::GmvMatchOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[15]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[16]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -17982,7 +22902,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[17]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -17992,7 +22912,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18001,7 +22921,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[19]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18011,21 +22931,21 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[20]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[21]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[22]; + link = &_graphLinks[20]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; @@ -18034,7 +22954,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[23]; + link = &_graphLinks[21]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; @@ -18043,14 +22963,14 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[24]; + link = &_graphLinks[22]; link->src = GraphElementType::SwGdc; link->srcNode = &_swGdcOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 25; ++i) + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -18071,8 +22991,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; + _imageSubGraph.lbffDol2InputsWithGmvBayerStatOuterNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; @@ -18081,10 +23000,9 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; - _imageSubGraph.swGdcOuterNode->contextId = 4; + _imageSubGraph.lbffDol2InputsWithGmvBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -18093,7 +23011,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon } } -StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100056::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -18101,12 +23019,7 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsWithGmvBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18124,13 +23037,13 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100041::~StaticGraph100041() +StaticGraph100056::~StaticGraph100056() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100056::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -18139,11 +23052,11 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3InputsWithGmv initial inner node configuration + * Setting Node lbffDol2InputsWithGmvBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsWithGmvBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol2InputsWithGmvBayerStatInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -18152,15 +23065,15 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && subGraphLinks[21]->linkConfiguration->bufferSize == 0 && - subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -18169,41 +23082,41 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); + lbffDol2InputsWithGmvBayerStatOuterNode->setInnerNode(lbffDol2InputsWithGmvBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 25; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -18214,48 +23127,52 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvBayerStatInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100042 + * Graph 100057 */ -StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), +StaticGraph100057::StaticGraph100057(GraphConfiguration100057** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100057, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100057[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swNntmOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -18264,81 +23181,132 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -18348,7 +23316,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[11]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -18358,7 +23326,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[12]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18367,7 +23335,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[13]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18377,46 +23345,46 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[20]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; + link = &_graphLinks[21]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[16]; + link = &_graphLinks[22]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[17]; + link = &_graphLinks[23]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[18]; - link->src = GraphElementType::SwNntm; - link->srcNode = &_swNntmOuterNode; + link = &_graphLinks[24]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -18436,19 +23404,21 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swGdcOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -18457,15 +23427,20 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon } } -StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100057::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18475,7 +23450,7 @@ StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18483,13 +23458,13 @@ StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100042::~StaticGraph100042() +StaticGraph100057::~StaticGraph100057() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100057::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -18498,11 +23473,11 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffDol3InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -18511,15 +23486,15 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -18528,39 +23503,41 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -18571,10 +23548,11 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h index f0dbaff..c7dc265 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h @@ -36,6 +36,8 @@ #define SUPPORT_KEY_RESOLUTIONS 1 +#define SUPPORT_FRAGMENTS 0 + enum InnerNodeOption { None = 0, @@ -63,18 +65,18 @@ class OuterNode { /** * \brief resourceId - represents the physical ID of the node, e.g. cb_id for CB node. */ - uint8_t resourceId; + uint8_t resourceId = 0; /** * \brief contextId - represents the logical Id of the node according to the use-case. * Same physical nodes in given graph topology will have a different contextId */ uint8_t contextId = 0; - NodeTypes type; + NodeTypes type = NodeTypes::Cb; HwBitmaps bitmaps; - StaticGraphNodeKernels nodeKernels; + StaticGraphNodeKernels nodeKernels = {}; - uint8_t numberOfFragments; + uint8_t numberOfFragments = 0; OuterNode() {} ~OuterNode(); @@ -181,7 +183,7 @@ struct LbffBayerOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct BbpsNoTnrOuterNodeConfiguration @@ -201,7 +203,7 @@ struct LbffBayerWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[17]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2000]; + uint8_t systemApiConfiguration[2005]; }; struct BbpsWithTnrOuterNodeConfiguration @@ -223,6 +225,16 @@ struct SwGdcOuterNodeConfiguration StaticGraphKernelBppConfiguration bppInfos[1]; }; +struct SwScalerOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + struct SwNntmOuterNodeConfiguration { uint32_t streamId = 0; @@ -239,7 +251,7 @@ struct LbffRgbIrOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1844]; + uint8_t systemApiConfiguration[1849]; }; struct LbffIrNoGmvIrStreamOuterNodeConfiguration @@ -249,7 +261,7 @@ struct LbffIrNoGmvIrStreamOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct BbpsIrWithTnrOuterNodeConfiguration @@ -269,7 +281,7 @@ struct LbffBayerBurstOutNo3AOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1647]; + uint8_t systemApiConfiguration[1652]; }; struct BbpsIrNoTnrOuterNodeConfiguration @@ -289,7 +301,7 @@ struct LbffIrNoGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct IsysPdaf2OuterNodeConfiguration @@ -308,7 +320,7 @@ struct LbffBayerPdaf2OuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[16]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[1876]; + uint8_t systemApiConfiguration[1881]; }; struct LbffBayerPdaf3OuterNodeConfiguration @@ -318,7 +330,7 @@ struct LbffBayerPdaf3OuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1720]; + uint8_t systemApiConfiguration[1725]; }; struct IsysDolOuterNodeConfiguration @@ -337,7 +349,7 @@ struct LbffDol2InputsOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1849]; + uint8_t systemApiConfiguration[1854]; }; struct LbffDolSmoothOuterNodeConfiguration @@ -357,7 +369,7 @@ struct LbffDol3InputsOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[16]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2005]; + uint8_t systemApiConfiguration[2010]; }; struct LbffBayerPdaf2WithGmvOuterNodeConfiguration @@ -367,7 +379,7 @@ struct LbffBayerPdaf2WithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[20]; StaticGraphKernelBppConfiguration bppInfos[39]; - uint8_t systemApiConfiguration[2344]; + uint8_t systemApiConfiguration[2349]; }; struct LbffBayerPdaf3WithGmvOuterNodeConfiguration @@ -377,7 +389,7 @@ struct LbffBayerPdaf3WithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2188]; + uint8_t systemApiConfiguration[2193]; }; struct LbffRgbIrWithGmvOuterNodeConfiguration @@ -387,7 +399,7 @@ struct LbffRgbIrWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2312]; + uint8_t systemApiConfiguration[2317]; }; struct LbffIrWithGmvIrStreamOuterNodeConfiguration @@ -397,7 +409,7 @@ struct LbffIrWithGmvIrStreamOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[17]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2000]; + uint8_t systemApiConfiguration[2005]; }; struct LbffDol2InputsWithGmvOuterNodeConfiguration @@ -407,7 +419,7 @@ struct LbffDol2InputsWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2317]; + uint8_t systemApiConfiguration[2322]; }; struct LbffDol3InputsWithGmvOuterNodeConfiguration @@ -417,7 +429,65 @@ struct LbffDol3InputsWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[20]; StaticGraphKernelBppConfiguration bppInfos[39]; - uint8_t systemApiConfiguration[2473]; + uint8_t systemApiConfiguration[2478]; +}; + +struct SwB2bOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; +}; + +struct SwImvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[2]; + StaticGraphKernelRes resolutionHistories[2]; + StaticGraphKernelBppConfiguration bppInfos[2]; + uint8_t systemApiConfiguration[5]; +}; + +struct SwRemosaicOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + +struct LbffDol2InputsBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[12]; + StaticGraphKernelRes resolutionHistories[15]; + StaticGraphKernelBppConfiguration bppInfos[34]; + uint8_t systemApiConfiguration[1854]; +}; + +struct LbffDol3InputsBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[13]; + StaticGraphKernelRes resolutionHistories[16]; + StaticGraphKernelBppConfiguration bppInfos[35]; + uint8_t systemApiConfiguration[2010]; +}; + +struct LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[13]; + StaticGraphKernelRes resolutionHistories[19]; + StaticGraphKernelBppConfiguration bppInfos[38]; + uint8_t systemApiConfiguration[2322]; }; struct GraphConfiguration100000 @@ -436,7 +506,8 @@ struct GraphConfiguration100001 LbffBayerWithGmvOuterNodeConfiguration lbffBayerWithGmvOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[22]; }; struct GraphConfiguration100002 @@ -465,7 +536,8 @@ struct GraphConfiguration100005 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[18]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; }; struct GraphConfiguration100006 @@ -571,7 +643,9 @@ struct GraphConfiguration100031 IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; LbffDol2InputsOuterNodeConfiguration lbffDol2InputsOuterNodeConfiguration; BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[13]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; }; struct GraphConfiguration100032 @@ -580,7 +654,9 @@ struct GraphConfiguration100032 IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; LbffDol2InputsOuterNodeConfiguration lbffDol2InputsOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[18]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100033 @@ -590,7 +666,9 @@ struct GraphConfiguration100033 LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; LbffDol3InputsOuterNodeConfiguration lbffDol3InputsOuterNodeConfiguration; BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[15]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; }; struct GraphConfiguration100034 @@ -600,7 +678,9 @@ struct GraphConfiguration100034 LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; LbffDol3InputsOuterNodeConfiguration lbffDol3InputsOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; }; struct GraphConfiguration100035 @@ -677,7 +757,109 @@ struct GraphConfiguration100042 LbffBayerPdaf3OuterNodeConfiguration lbffBayerPdaf3OuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; +}; + +struct GraphConfiguration100044 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + SwB2bOuterNodeConfiguration swB2bOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[22]; +}; + +struct GraphConfiguration100050 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + SwRemosaicOuterNodeConfiguration swRemosaicOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100051 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100052 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsBayerStatOuterNodeConfiguration lbffDol2InputsBayerStatOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; +}; + +struct GraphConfiguration100053 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsBayerStatOuterNodeConfiguration lbffDol2InputsBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; +}; + +struct GraphConfiguration100054 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsBayerStatOuterNodeConfiguration lbffDol3InputsBayerStatOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100055 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsBayerStatOuterNodeConfiguration lbffDol3InputsBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; +}; + +struct GraphConfiguration100056 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration lbffDol2InputsWithGmvBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; +}; + +struct GraphConfiguration100057 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsWithGmvOuterNodeConfiguration lbffDol3InputsWithGmvOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; }; #pragma pack(pop) @@ -688,6 +870,7 @@ class IsysOuterNode : public OuterNode void Init(IsysOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerOuterNode : public OuterNode { @@ -696,6 +879,7 @@ class LbffBayerOuterNode : public OuterNode void Init(LbffBayerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsNoTnrOuterNode : public OuterNode { @@ -704,6 +888,7 @@ class BbpsNoTnrOuterNode : public OuterNode void Init(BbpsNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerWithGmvOuterNode : public OuterNode { @@ -712,6 +897,7 @@ class LbffBayerWithGmvOuterNode : public OuterNode void Init(LbffBayerWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsWithTnrOuterNode : public OuterNode { @@ -720,6 +906,7 @@ class BbpsWithTnrOuterNode : public OuterNode void Init(BbpsWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGdcOuterNode : public OuterNode { @@ -728,6 +915,16 @@ class SwGdcOuterNode : public OuterNode void Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwScalerOuterNode : public OuterNode +{ +public: + SwScalerOuterNode(): OuterNode(){} + void Init(SwScalerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwNntmOuterNode : public OuterNode { @@ -736,6 +933,7 @@ class SwNntmOuterNode : public OuterNode void Init(SwNntmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrOuterNode : public OuterNode { @@ -744,6 +942,7 @@ class LbffRgbIrOuterNode : public OuterNode void Init(LbffRgbIrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvIrStreamOuterNode : public OuterNode { @@ -752,6 +951,7 @@ class LbffIrNoGmvIrStreamOuterNode : public OuterNode void Init(LbffIrNoGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrWithTnrOuterNode : public OuterNode { @@ -760,6 +960,7 @@ class BbpsIrWithTnrOuterNode : public OuterNode void Init(BbpsIrWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerBurstOutNo3AOuterNode : public OuterNode { @@ -768,6 +969,7 @@ class LbffBayerBurstOutNo3AOuterNode : public OuterNode void Init(LbffBayerBurstOutNo3AOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrNoTnrOuterNode : public OuterNode { @@ -776,6 +978,7 @@ class BbpsIrNoTnrOuterNode : public OuterNode void Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvOuterNode : public OuterNode { @@ -784,6 +987,7 @@ class LbffIrNoGmvOuterNode : public OuterNode void Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysPdaf2OuterNode : public OuterNode { @@ -792,6 +996,7 @@ class IsysPdaf2OuterNode : public OuterNode void Init(IsysPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2OuterNode : public OuterNode { @@ -800,6 +1005,7 @@ class LbffBayerPdaf2OuterNode : public OuterNode void Init(LbffBayerPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3OuterNode : public OuterNode { @@ -808,6 +1014,7 @@ class LbffBayerPdaf3OuterNode : public OuterNode void Init(LbffBayerPdaf3OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysDolOuterNode : public OuterNode { @@ -816,6 +1023,7 @@ class IsysDolOuterNode : public OuterNode void Init(IsysDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol2InputsOuterNode : public OuterNode { @@ -824,6 +1032,7 @@ class LbffDol2InputsOuterNode : public OuterNode void Init(LbffDol2InputsOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDolSmoothOuterNode : public OuterNode { @@ -832,6 +1041,7 @@ class LbffDolSmoothOuterNode : public OuterNode void Init(LbffDolSmoothOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol3InputsOuterNode : public OuterNode { @@ -840,6 +1050,7 @@ class LbffDol3InputsOuterNode : public OuterNode void Init(LbffDol3InputsOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2WithGmvOuterNode : public OuterNode { @@ -848,6 +1059,7 @@ class LbffBayerPdaf2WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf2WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3WithGmvOuterNode : public OuterNode { @@ -856,6 +1068,7 @@ class LbffBayerPdaf3WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf3WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrWithGmvOuterNode : public OuterNode { @@ -864,6 +1077,7 @@ class LbffRgbIrWithGmvOuterNode : public OuterNode void Init(LbffRgbIrWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrWithGmvIrStreamOuterNode : public OuterNode { @@ -872,6 +1086,7 @@ class LbffIrWithGmvIrStreamOuterNode : public OuterNode void Init(LbffIrWithGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol2InputsWithGmvOuterNode : public OuterNode { @@ -880,6 +1095,7 @@ class LbffDol2InputsWithGmvOuterNode : public OuterNode void Init(LbffDol2InputsWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol3InputsWithGmvOuterNode : public OuterNode { @@ -888,6 +1104,61 @@ class LbffDol3InputsWithGmvOuterNode : public OuterNode void Init(LbffDol3InputsWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwB2bOuterNode : public OuterNode +{ +public: + SwB2bOuterNode(): OuterNode(){} + void Init(SwB2bOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwImvOuterNode : public OuterNode +{ +public: + SwImvOuterNode(): OuterNode(){} + void Init(SwImvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwRemosaicOuterNode : public OuterNode +{ +public: + SwRemosaicOuterNode(): OuterNode(){} + void Init(SwRemosaicOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol2InputsBayerStatOuterNode : public OuterNode +{ +public: + LbffDol2InputsBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol2InputsBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol3InputsBayerStatOuterNode : public OuterNode +{ +public: + LbffDol3InputsBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol3InputsBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol2InputsWithGmvBayerStatOuterNode : public OuterNode +{ +public: + LbffDol2InputsWithGmvBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class imageSubGraphTopology100000 : public GraphTopology { @@ -909,7 +1180,7 @@ class StaticGraph100000 : public IStaticGraphConfig StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100000(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 254442951; // autogenerated + static const uint32_t hashCode = 2191290611; // autogenerated private: // Configuration @@ -933,14 +1204,15 @@ class StaticGraph100000 : public IStaticGraphConfig class imageSubGraphTopology100001 : public GraphTopology { public: - imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 22, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerWithGmvOuterNode* lbffBayerWithGmvOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[22]; }; @@ -950,7 +1222,7 @@ class StaticGraph100001 : public IStaticGraphConfig StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100001(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1895591893; // autogenerated + static const uint32_t hashCode = 911553637; // autogenerated private: // Configuration @@ -961,6 +1233,7 @@ class StaticGraph100001 : public IStaticGraphConfig LbffBayerWithGmvOuterNode _lbffBayerWithGmvOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -969,7 +1242,7 @@ class StaticGraph100001 : public IStaticGraphConfig imageSubGraphTopology100001 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[22]; }; class imageSubGraphTopology100002 : public GraphTopology { @@ -991,7 +1264,7 @@ class StaticGraph100002 : public IStaticGraphConfig StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100002(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3344665139; // autogenerated + static const uint32_t hashCode = 2257098455; // autogenerated private: // Configuration @@ -1032,7 +1305,7 @@ class StaticGraph100003 : public IStaticGraphConfig StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100003(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1895591893; // autogenerated + static const uint32_t hashCode = 835453801; // autogenerated private: // Configuration @@ -1057,14 +1330,15 @@ class StaticGraph100003 : public IStaticGraphConfig class imageSubGraphTopology100005 : public GraphTopology { public: - imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[18]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; }; @@ -1074,7 +1348,7 @@ class StaticGraph100005 : public IStaticGraphConfig StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100005(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1332843761; // autogenerated + static const uint32_t hashCode = 149312985; // autogenerated private: // Configuration @@ -1085,6 +1359,7 @@ class StaticGraph100005 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1093,7 +1368,7 @@ class StaticGraph100005 : public IStaticGraphConfig imageSubGraphTopology100005 _imageSubGraph; // All graph links - GraphLink _graphLinks[18]; + GraphLink _graphLinks[20]; }; class imageSubGraphTopology100006 : public GraphTopology { @@ -1144,7 +1419,7 @@ class StaticGraph100006 : public IStaticGraphConfig StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100006(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 936158723; // autogenerated + static const uint32_t hashCode = 2296144571; // autogenerated private: // Configuration @@ -1187,7 +1462,7 @@ class StaticGraph100007 : public IStaticGraphConfig StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100007(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 274832429; // autogenerated + static const uint32_t hashCode = 1987263145; // autogenerated private: // Configuration @@ -1255,7 +1530,7 @@ class StaticGraph100008 : public IStaticGraphConfig StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100008(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3117872339; // autogenerated + static const uint32_t hashCode = 4070369259; // autogenerated private: // Configuration @@ -1298,7 +1573,7 @@ class StaticGraph100015 : public IStaticGraphConfig StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100015(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1370545417; // autogenerated + static const uint32_t hashCode = 3321236285; // autogenerated private: // Configuration @@ -1373,7 +1648,7 @@ class StaticGraph100025 : public IStaticGraphConfig StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100025(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 254442951; // autogenerated + static const uint32_t hashCode = 2191290611; // autogenerated private: // Configuration @@ -1447,7 +1722,7 @@ class StaticGraph100027 : public IStaticGraphConfig StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100027(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 58414011; // autogenerated + static const uint32_t hashCode = 2863511927; // autogenerated private: // Configuration @@ -1487,7 +1762,7 @@ class StaticGraph100028 : public IStaticGraphConfig StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100028(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 690933501; // autogenerated + static const uint32_t hashCode = 297092049; // autogenerated private: // Configuration @@ -1527,7 +1802,7 @@ class StaticGraph100029 : public IStaticGraphConfig StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100029(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1083135791; // autogenerated + static const uint32_t hashCode = 1956517507; // autogenerated private: // Configuration @@ -1567,7 +1842,7 @@ class StaticGraph100030 : public IStaticGraphConfig StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100030(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 802205825; // autogenerated + static const uint32_t hashCode = 2435910845; // autogenerated private: // Configuration @@ -1591,13 +1866,15 @@ class StaticGraph100030 : public IStaticGraphConfig class imageSubGraphTopology100031 : public GraphTopology { public: - imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 13, sinkMappingConfiguration) {} + imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDol2InputsOuterNode* lbffDol2InputsOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; - GraphLink* subGraphLinks[13]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; }; @@ -1607,7 +1884,7 @@ class StaticGraph100031 : public IStaticGraphConfig StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100031(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4143670381; // autogenerated + static const uint32_t hashCode = 1681200543; // autogenerated private: // Configuration @@ -1617,6 +1894,8 @@ class StaticGraph100031 : public IStaticGraphConfig IsysDolOuterNode _isysDolOuterNode; LbffDol2InputsOuterNode _lbffDol2InputsOuterNode; BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1625,19 +1904,21 @@ class StaticGraph100031 : public IStaticGraphConfig imageSubGraphTopology100031 _imageSubGraph; // All graph links - GraphLink _graphLinks[13]; + GraphLink _graphLinks[18]; }; class imageSubGraphTopology100032 : public GraphTopology { public: - imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDol2InputsOuterNode* lbffDol2InputsOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[18]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; }; @@ -1647,7 +1928,7 @@ class StaticGraph100032 : public IStaticGraphConfig StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100032(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3009898001; // autogenerated + static const uint32_t hashCode = 611075083; // autogenerated private: // Configuration @@ -1657,6 +1938,8 @@ class StaticGraph100032 : public IStaticGraphConfig IsysDolOuterNode _isysDolOuterNode; LbffDol2InputsOuterNode _lbffDol2InputsOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1665,20 +1948,22 @@ class StaticGraph100032 : public IStaticGraphConfig imageSubGraphTopology100032 _imageSubGraph; // All graph links - GraphLink _graphLinks[18]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100033 : public GraphTopology { public: - imageSubGraphTopology100033(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 15, sinkMappingConfiguration) {} + imageSubGraphTopology100033(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; LbffDol3InputsOuterNode* lbffDol3InputsOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; - GraphLink* subGraphLinks[15]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; }; @@ -1688,7 +1973,7 @@ class StaticGraph100033 : public IStaticGraphConfig StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100033(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 321930163; // autogenerated + static const uint32_t hashCode = 1734304817; // autogenerated private: // Configuration @@ -1699,6 +1984,8 @@ class StaticGraph100033 : public IStaticGraphConfig LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; LbffDol3InputsOuterNode _lbffDol3InputsOuterNode; BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1707,20 +1994,22 @@ class StaticGraph100033 : public IStaticGraphConfig imageSubGraphTopology100033 _imageSubGraph; // All graph links - GraphLink _graphLinks[15]; + GraphLink _graphLinks[20]; }; class imageSubGraphTopology100034 : public GraphTopology { public: - imageSubGraphTopology100034(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100034(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; LbffDol3InputsOuterNode* lbffDol3InputsOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[25]; }; @@ -1730,7 +2019,7 @@ class StaticGraph100034 : public IStaticGraphConfig StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100034(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1183344631; // autogenerated + static const uint32_t hashCode = 1995162237; // autogenerated private: // Configuration @@ -1741,6 +2030,8 @@ class StaticGraph100034 : public IStaticGraphConfig LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; LbffDol3InputsOuterNode _lbffDol3InputsOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1749,7 +2040,7 @@ class StaticGraph100034 : public IStaticGraphConfig imageSubGraphTopology100034 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[25]; }; class rawSubGraphTopology100035 : public GraphTopology { @@ -1840,7 +2131,7 @@ class StaticGraph100037 : public IStaticGraphConfig StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100037(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 2658466969; // autogenerated + static const uint32_t hashCode = 2427208877; // autogenerated private: // Configuration @@ -1882,7 +2173,7 @@ class StaticGraph100038 : public IStaticGraphConfig StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100038(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1409639831; // autogenerated + static const uint32_t hashCode = 1204583923; // autogenerated private: // Configuration @@ -1954,7 +2245,7 @@ class StaticGraph100039 : public IStaticGraphConfig StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100039(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3095922915; // autogenerated + static const uint32_t hashCode = 3381848299; // autogenerated private: // Configuration @@ -2000,7 +2291,7 @@ class StaticGraph100040 : public IStaticGraphConfig StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100040(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 2936873815; // autogenerated + static const uint32_t hashCode = 288441259; // autogenerated private: // Configuration @@ -2043,7 +2334,7 @@ class StaticGraph100041 : public IStaticGraphConfig StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100041(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1123654281; // autogenerated + static const uint32_t hashCode = 4095848493; // autogenerated private: // Configuration @@ -2069,14 +2360,15 @@ class StaticGraph100041 : public IStaticGraphConfig class imageSubGraphTopology100042 : public GraphTopology { public: - imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerPdaf3OuterNode* lbffBayerPdaf3OuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -2086,7 +2378,7 @@ class StaticGraph100042 : public IStaticGraphConfig StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100042(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3444052875; // autogenerated + static const uint32_t hashCode = 2207768899; // autogenerated private: // Configuration @@ -2097,6 +2389,7 @@ class StaticGraph100042 : public IStaticGraphConfig LbffBayerPdaf3OuterNode _lbffBayerPdaf3OuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -2105,7 +2398,407 @@ class StaticGraph100042 : public IStaticGraphConfig imageSubGraphTopology100042 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; +}; + +class imageSubGraphTopology100044 : public GraphTopology { + +public: + imageSubGraphTopology100044(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 22, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + SwB2bOuterNode* swB2bOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[22]; + +}; + +class StaticGraph100044 : public IStaticGraphConfig +{ +public: + StaticGraph100044(GraphConfiguration100044** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100044(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 2798404829; // autogenerated + +private: + // Configuration + GraphConfiguration100044* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + SwB2bOuterNode _swB2bOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100044 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[22]; +}; + +class imageSubGraphTopology100050 : public GraphTopology { + +public: + imageSubGraphTopology100050(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + SwRemosaicOuterNode* swRemosaicOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100050 : public IStaticGraphConfig +{ +public: + StaticGraph100050(GraphConfiguration100050** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100050(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 3442380973; // autogenerated + +private: + // Configuration + GraphConfiguration100050* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + SwRemosaicOuterNode _swRemosaicOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100050 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100051 : public GraphTopology { + +public: + imageSubGraphTopology100051(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100051 : public IStaticGraphConfig +{ +public: + StaticGraph100051(GraphConfiguration100051** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100051(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 2326634835; // autogenerated + +private: + // Configuration + GraphConfiguration100051* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100051 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100052 : public GraphTopology { + +public: + imageSubGraphTopology100052(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsBayerStatOuterNode* lbffDol2InputsBayerStatOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; + +}; + +class StaticGraph100052 : public IStaticGraphConfig +{ +public: + StaticGraph100052(GraphConfiguration100052** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100052(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1681200543; // autogenerated + +private: + // Configuration + GraphConfiguration100052* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsBayerStatOuterNode _lbffDol2InputsBayerStatOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100052 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[18]; +}; + +class imageSubGraphTopology100053 : public GraphTopology { + +public: + imageSubGraphTopology100053(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsBayerStatOuterNode* lbffDol2InputsBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; + +}; + +class StaticGraph100053 : public IStaticGraphConfig +{ +public: + StaticGraph100053(GraphConfiguration100053** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100053(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 611075083; // autogenerated + +private: + // Configuration + GraphConfiguration100053* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsBayerStatOuterNode _lbffDol2InputsBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100053 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[23]; +}; + +class imageSubGraphTopology100054 : public GraphTopology { + +public: + imageSubGraphTopology100054(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsBayerStatOuterNode* lbffDol3InputsBayerStatOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100054 : public IStaticGraphConfig +{ +public: + StaticGraph100054(GraphConfiguration100054** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100054(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1734304817; // autogenerated + +private: + // Configuration + GraphConfiguration100054* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsBayerStatOuterNode _lbffDol3InputsBayerStatOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100054 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100055 : public GraphTopology { + +public: + imageSubGraphTopology100055(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsBayerStatOuterNode* lbffDol3InputsBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[25]; + +}; + +class StaticGraph100055 : public IStaticGraphConfig +{ +public: + StaticGraph100055(GraphConfiguration100055** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100055(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1995162237; // autogenerated + +private: + // Configuration + GraphConfiguration100055* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsBayerStatOuterNode _lbffDol3InputsBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100055 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[25]; +}; + +class imageSubGraphTopology100056 : public GraphTopology { + +public: + imageSubGraphTopology100056(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsWithGmvBayerStatOuterNode* lbffDol2InputsWithGmvBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwGdcOuterNode* swGdcOuterNode = nullptr; + GraphLink* subGraphLinks[23]; + +}; + +class StaticGraph100056 : public IStaticGraphConfig +{ +public: + StaticGraph100056(GraphConfiguration100056** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100056(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 288441259; // autogenerated + +private: + // Configuration + GraphConfiguration100056* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsWithGmvBayerStatOuterNode _lbffDol2InputsWithGmvBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwGdcOuterNode _swGdcOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100056 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[23]; +}; + +class imageSubGraphTopology100057 : public GraphTopology { + +public: + imageSubGraphTopology100057(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsWithGmvOuterNode* lbffDol3InputsWithGmvOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwGdcOuterNode* swGdcOuterNode = nullptr; + GraphLink* subGraphLinks[25]; + +}; + +class StaticGraph100057 : public IStaticGraphConfig +{ +public: + StaticGraph100057(GraphConfiguration100057** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100057(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 4095848493; // autogenerated + +private: + // Configuration + GraphConfiguration100057* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsWithGmvOuterNode _lbffDol3InputsWithGmvOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwGdcOuterNode _swGdcOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100057 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[25]; }; #endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h index 5fdd079..f950a50 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h @@ -65,6 +65,10 @@ enum class GraphConfigurationKeyAttributes : uint32_t DvsActive = 0x00000020, PipelineLowLight = 0x00000040, PipelineNormalLight = 0x00000080, + NFov = 0x00000100, + WFov = 0x00000200, + DocScan = 0x00000400, + StillsModeCpHdr = 0x00000800, }; struct GraphConfigurationKey { @@ -89,7 +93,7 @@ struct GraphConfigurationHeader { }; struct BinaryHeader { - uint32_t isSapEnable = 0; + uint32_t sapAttributes = 0; uint32_t binaryCommonHashCode = 0; uint32_t numberOfResolutions = 0; uint32_t numberOfSensorModes = 0; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c index 5b6adf8..e380537 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c @@ -27,11 +27,6 @@ #include "Ipu75xaStaticGraphDataPreloadAutogen.h" -int isSapEnable(char* binaryData) -{ - return ((BinaryHeader*)binaryData)->isSapEnable; -} - void parseTable(char* binaryData, GraphHashCodesTable* table) { char* fileOffset = binaryData; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h index a15163c..57b34dc 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h @@ -67,7 +67,7 @@ typedef enum typedef struct { - uint32_t isSapEnable; + uint32_t sapAttributes; uint32_t binaryCommonHashCode; uint32_t numberOfResolutions; uint32_t numberOfSensorModes; @@ -96,38 +96,47 @@ typedef struct DataRange }DataRange; -static int distinctGraphsCount = 28; +static int distinctGraphsCount = 37; static GraphHashCode hashCodeLookup[] = { - {0, 0x159079D0}, - {100000, 0xF2A7DC7}, - {100001, 0x70FC6FD5}, - {100002, 0xC75B8A33}, - {100003, 0x70FC6FD5}, - {100005, 0x4F7194F1}, - {100006, 0x37CCA603}, - {100007, 0x10619C2D}, - {100008, 0xB9D6F4D3}, - {100015, 0x51B0DD09}, + {0, 0x327EB4A8}, + {100000, 0x829C70F3}, + {100001, 0x36553465}, + {100002, 0x868896D7}, + {100003, 0x31CC0369}, + {100005, 0x8E655D9}, + {100006, 0x88DC62BB}, + {100007, 0x76733AA9}, + {100008, 0xF29CE7EB}, + {100015, 0xC5F60B3D}, {100016, 0xD089033F}, - {100025, 0xF2A7DC7}, + {100025, 0x829C70F3}, {100026, 0xF9C17401}, - {100027, 0x37B53BB}, - {100028, 0x292ECEFD}, - {100029, 0x408F572F}, - {100030, 0x2FD0B081}, - {100031, 0xF6FB646D}, - {100032, 0xB3676611}, - {100033, 0x133043B3}, - {100034, 0x468867F7}, + {100027, 0xAAADB977}, + {100028, 0x11B543D1}, + {100029, 0x749E1683}, + {100030, 0x91310CBD}, + {100031, 0x6435159F}, + {100032, 0x246C440B}, + {100033, 0x675F6431}, + {100034, 0x76EBC27D}, {100035, 0x5B0632C3}, {100036, 0x5B0632C3}, - {100037, 0x9E74FC99}, - {100038, 0x54056597}, - {100039, 0xB88808E3}, - {100040, 0xAF0D2357}, - {100041, 0x42F99A89}, - {100042, 0xCD48138B} + {100037, 0x90AC44AD}, + {100038, 0x47CC7DF3}, + {100039, 0xC992E8EB}, + {100040, 0x113143AB}, + {100041, 0xF421B02D}, + {100042, 0x8397E143}, + {100044, 0xA6CC44DD}, + {100050, 0xCD2E90AD}, + {100051, 0x8AADA153}, + {100052, 0x6435159F}, + {100053, 0x246C440B}, + {100054, 0x675F6431}, + {100055, 0x76EBC27D}, + {100056, 0x113143AB}, + {100057, 0xF421B02D} }; static FrameFormatDesc formatsDB[] = { @@ -310,7 +319,23 @@ static FrameFormatDesc formatsDB[] = { {"IGIG_GRGB_IGIG_GBGRP", "IGP0", 0x30504749, 8}, {"IGIG_GRGB_IGIG_GBGRP", "IGP1", 0x31504749, 10}, {"IGIG_GRGB_IGIG_GBGRP", "IGP2", 0x32504749, 12}, - {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16} + {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16}, + {"RGGBPD", "RG0B", 0x42304752, 8}, + {"RGGBPD", "RG1B", 0x42314752, 10}, + {"RGGBPD", "RG2B", 0x42324752, 12}, + {"RGGBPD", "RG3B", 0x42334752, 16}, + {"BGGRPD", "BG0B", 0x42304742, 8}, + {"BGGRPD", "BG1B", 0x42314742, 10}, + {"BGGRPD", "BG2B", 0x42324742, 12}, + {"BGGRPD", "BG3B", 0x42334742, 16}, + {"GBRGPD", "GB0B", 0x42304247, 8}, + {"GBRGPD", "GB1B", 0x42314247, 10}, + {"GBRGPD", "GB2B", 0x42324247, 12}, + {"GBRGPD", "GB3B", 0x42334247, 16}, + {"GRBGPD", "GR0B", 0x42305247, 8}, + {"GRBGPD", "GR1B", 0x42315247, 10}, + {"GRBGPD", "GR2B", 0x42325247, 12}, + {"GRBGPD", "GR3B", 0x42335247, 16} }; #endif/*DATA_RANGE_H_*/ diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp index 1bf3301..6665bf4 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp @@ -492,6 +492,105 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100042( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100044: + if (StaticGraph100044::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100044( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100050: + if (StaticGraph100050::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100050( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100051: + if (StaticGraph100051::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100051( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100052: + if (StaticGraph100052::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100052( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100053: + if (StaticGraph100053::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100053( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100054: + if (StaticGraph100054::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100054( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100055: + if (StaticGraph100055::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100055( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100056: + if (StaticGraph100056::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100056( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100057: + if (StaticGraph100057::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100057( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; default: delete[] selectedConfigurationData; delete[] selectedGraphConfigurationHeaders; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h index 25403b5..20e328d 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h @@ -82,7 +82,7 @@ class StaticGraphReader StaticGraphStatus Init(StaticReaderBinaryData& binaryGraphSettings); StaticGraphStatus GetStaticGraphConfig(GraphConfigurationKey& settingsKey, IStaticGraphConfig** graph); std::pair GetGraphConfigurationHeaders() const; - static const uint32_t staticGraphCommonHashCode = 361789904; // autogenerated + static const uint32_t staticGraphCommonHashCode = 847164584; // autogenerated private: void GetSinkMappingConfiguration(GraphConfigurationHeader* baseGraphConfigurationHeader, VirtualSinkMapping* baseSinkMappingConfiguration, GraphConfigurationHeader* selectedGraphConfigurationHeader, VirtualSinkMapping* selectedSinkMappingConfiguration); diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h index 7a1ee0a..0bcc4c5 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h @@ -34,6 +34,7 @@ typedef aic::ImagingKernelGroup StaticGraphNodeKernels; typedef aic::ia_pac_kernel_info StaticGraphPacRunKernel; typedef aic::IaAicFragmentDesc StaticGraphFragmentDesc; +typedef aic::IaAicUpscalerFragDesc StaticGraphUpscalerFragmentDesc; #endif #ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES @@ -60,7 +61,11 @@ enum class NodeResourceId : uint8_t { Bbps = 1, SwIsys = 2, SwGdc = 3, + SwScaler = 4, SwNntm = 5, + SwImv = 6, + SwB2b = 7, + SwRemosaic = 8, }; enum class StaticGraphStatus : uint8_t @@ -94,6 +99,7 @@ enum class HwSink : uint8_t ImageDpSink, GmvMatchOutSink, ProcessedMainSink, + ProcessedSecondarySink, AwbSveOutSink, IrAeOutSink, IrAfStdOutSink, @@ -137,6 +143,7 @@ struct StaticGraphKernelRes { // We add only the fields that are used by tests struct StaticGraphKernelSystemApiIoBuffer1_4 { uint32_t x_output_offset_per_stripe[4]; + uint32_t plane_start_address_per_stripe[12]; }; #endif @@ -227,10 +234,19 @@ struct StaticGraphRunKernel { #ifndef STATIC_GRAPH_USE_IA_AIC_TYPES +struct StaticGraphUpscalerFragmentDesc { + uint16_t fragmentInputCropLeft = 0; + uint16_t fragmentInputCropRight = 0; +}; + struct StaticGraphFragmentDesc { - uint16_t inputWidth = 0; - uint16_t outputWidth = 0; - uint16_t left = 0; + uint16_t fragmentInputWidth = 0; + uint16_t fragmentOutputWidth = 0; + uint16_t fragmentStartX = 0; + union + { + StaticGraphUpscalerFragmentDesc upscalerFragDesc; + }; }; // ia_pac_kernel_info @@ -279,6 +295,7 @@ enum class GraphElementType : uint8_t { ImageDp, GmvMatchOut, ProcessedMain, + ProcessedSecondary, AwbSveOut, IrAeOut, IrAfStdOut, @@ -296,6 +313,7 @@ enum class GraphElementType : uint8_t { LbffBayerWithGmv, BbpsWithTnr, SwGdc, + SwScaler, SwNntm, LbffRgbIr, LbffIrNoGmvIrStream, @@ -316,6 +334,12 @@ enum class GraphElementType : uint8_t { LbffIrWithGmvIrStream, LbffDol2InputsWithGmv, LbffDol3InputsWithGmv, + SwB2b, + SwImv, + SwRemosaic, + LbffDol2InputsBayerStat, + LbffDol3InputsBayerStat, + LbffDol2InputsWithGmvBayerStat, }; enum class LinkType : uint8_t { diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp index bd095af..a4ddb33 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp @@ -546,9 +546,87 @@ TerminalDescriptor SW_NNTMTerminalDesc[] = }, }; +TerminalDescriptor SW_IMVTerminalDesc[] = +{ + { + SW_IMV_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 33331, // imv + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_1", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_2", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 19706, // sw_scaler + }, +}; + +TerminalDescriptor SW_B2BTerminalDesc[] = +{ + { + SW_B2B_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 45372, // b2b + }, + { + SW_B2B_TERMINAL_CONNECT_OUTPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 45372, // b2b + }, +}; + +TerminalDescriptor SW_REMOSAICTerminalDesc[] = +{ + { + SW_REMOSAIC_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 19706, // sw_scaler + }, + { + SW_REMOSAIC_TERMINAL_CONNECT_OUTPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 19706, // sw_scaler + }, +}; + int CountOfSW_ISYSTerminalDesc = sizeof(SW_ISYSTerminalDesc) / sizeof(SW_ISYSTerminalDesc[0]); int CountOfLBFFTerminalDesc = sizeof(LBFFTerminalDesc) / sizeof(LBFFTerminalDesc[0]); int CountOfBBPSTerminalDesc = sizeof(BBPSTerminalDesc) / sizeof(BBPSTerminalDesc[0]); int CountOfSW_GDCTerminalDesc = sizeof(SW_GDCTerminalDesc) / sizeof(SW_GDCTerminalDesc[0]); int CountOfSW_SCALERTerminalDesc = sizeof(SW_SCALERTerminalDesc) / sizeof(SW_SCALERTerminalDesc[0]); int CountOfSW_NNTMTerminalDesc = sizeof(SW_NNTMTerminalDesc) / sizeof(SW_NNTMTerminalDesc[0]); +int CountOfSW_IMVTerminalDesc = sizeof(SW_IMVTerminalDesc) / sizeof(SW_IMVTerminalDesc[0]); +int CountOfSW_B2BTerminalDesc = sizeof(SW_B2BTerminalDesc) / sizeof(SW_B2BTerminalDesc[0]); +int CountOfSW_REMOSAICTerminalDesc = sizeof(SW_REMOSAICTerminalDesc) / sizeof(SW_REMOSAICTerminalDesc[0]); diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h index 384d6bc..ad9cf96 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h @@ -153,12 +153,34 @@ enum SW_NNTMTerminalID SW_NNTM_TERMINAL_CONNECT_OUTPUT_2, }; +enum SW_IMVTerminalID +{ + SW_IMV_TERMINAL_CONNECT_INPUT, + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, +}; + +enum SW_B2BTerminalID +{ + SW_B2B_TERMINAL_CONNECT_INPUT, + SW_B2B_TERMINAL_CONNECT_OUTPUT, +}; + +enum SW_REMOSAICTerminalID +{ + SW_REMOSAIC_TERMINAL_CONNECT_INPUT, + SW_REMOSAIC_TERMINAL_CONNECT_OUTPUT, +}; + extern TerminalDescriptor SW_ISYSTerminalDesc[]; extern TerminalDescriptor LBFFTerminalDesc[]; extern TerminalDescriptor BBPSTerminalDesc[]; extern TerminalDescriptor SW_GDCTerminalDesc[]; extern TerminalDescriptor SW_SCALERTerminalDesc[]; extern TerminalDescriptor SW_NNTMTerminalDesc[]; +extern TerminalDescriptor SW_IMVTerminalDesc[]; +extern TerminalDescriptor SW_B2BTerminalDesc[]; +extern TerminalDescriptor SW_REMOSAICTerminalDesc[]; extern int CountOfSW_ISYSTerminalDesc; extern int CountOfLBFFTerminalDesc; @@ -166,3 +188,6 @@ extern int CountOfBBPSTerminalDesc; extern int CountOfSW_GDCTerminalDesc; extern int CountOfSW_SCALERTerminalDesc; extern int CountOfSW_NNTMTerminalDesc; +extern int CountOfSW_IMVTerminalDesc; +extern int CountOfSW_B2BTerminalDesc; +extern int CountOfSW_REMOSAICTerminalDesc; diff --git a/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp b/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp new file mode 100644 index 0000000..ab40be6 --- /dev/null +++ b/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp @@ -0,0 +1,735 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#include "FragmentsConfigurator.h" + +Ipu8FragmentsConfigurator::Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity) + : _staticGraph(staticGraph), _node(node), _upscalerWidthGranularity(upscalerWidthGranularity) +{ +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configureFragments() +{ + if (_staticGraph == nullptr || _node == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // Reset status + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + _node->fragmentVanishStatus[stripe] = VanishOption::Full; + } + + for (uint32_t j = 0; j < _node->nodeKernels.kernelCount; j++) + { + StaticGraphRunKernel* runKernel = &_node->nodeKernels.kernelList[j].run_kernel; + StaticGraphFragmentDesc* kernelFragments = _node->nodeKernels.kernelList[j].fragment_descs; + + // Take previous kernel as reference, unless we will change it below. + StaticGraphFragmentDesc* prevKernelFragments = j == 0 ? nullptr : _node->nodeKernels.kernelList[j - 1].fragment_descs; + uint32_t prevKernelUuid = j == 0 ? 0 : _node->nodeKernels.kernelList[j - 1].run_kernel.kernel_uuid; + + uint32_t referenceKernel = GraphResolutionConfiguratorHelper::getReferenceKernel(runKernel->kernel_uuid); + + if (referenceKernel != 0) + { + // Special reference kernel + for (uint32_t k = 0; k < _node->nodeKernels.kernelCount; k++) + { + if (_node->nodeKernels.kernelList[k].run_kernel.kernel_uuid == referenceKernel) + { + prevKernelFragments = _node->nodeKernels.kernelList[k].fragment_descs; + prevKernelUuid = referenceKernel; + break; + } + } + } + + // Find the handling function for this kernel + GraphResolutionConfiguratorKernelRole kernelRole = GraphResolutionConfiguratorHelper::getKernelRole(runKernel->kernel_uuid); + + switch (kernelRole) + { + case GraphResolutionConfiguratorKernelRole::DownScaler: + { + configFragmentsDownscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::EspaCropper: + { + configFragmentsCropper(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::UpScaler: + { + configFragmentsUpscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::Output: + { + configFragmentsOutput(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrScaler: + { + configFragmentsTnrScaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrFeederFull: + case GraphResolutionConfiguratorKernelRole::TnrFeederSmall: + { + configFragmentsTnrFeeder(runKernel, kernelFragments, kernelRole); + break; + } + + case GraphResolutionConfiguratorKernelRole::NonRcb: + { + // Before zoom kernels - take prev kernel fragments as-is + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + } + + default: + { + // No action for other kernels + break; + } + } + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->output_width) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right); + auto scaleFactorH = static_cast(resInfo->output_height) / (resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom); + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + int rightCrop = stripe == static_cast(_node->numberOfFragments - 1) ? resInfo->input_crop.right : 0; + + double value = (static_cast(kernelFragments[stripe].fragmentInputWidth - rightCrop) * scaleFactor) / 4; + kernelFragments[stripe].fragmentOutputWidth = static_cast(floor(value)) * 4; + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + value = (scaleFactor * kernelFragments[stripe].fragmentStartX) / 2; + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(value)) * 2; + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption) +{ + _node->fragmentVanishStatus[stripe] = vanishOption; + kernelFragments[stripe] = {}; + _outputStartX[runKerenlUuid][stripe] = 0; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // prev kernel is the downscaler + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + // No cropping in DS, cropping is done by ESPA cropper + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + int32_t leftNonVanishedStripe = 0; + int32_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + std::vector xOffset(_node->numberOfFragments, 0); + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (leftPixel + VANISH_MIN >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (rightPixel <= kernelFragments[stripe].fragmentStartX + VANISH_MIN) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (int32_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = runKernel->resolution_info->input_crop.left > kernelFragments[stripe].fragmentStartX ? + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = runKernel->resolution_info->input_crop.right > (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + runKernel->resolution_info->input_crop.right - (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + // Save for sys api + xOffset[stripe] = static_cast(leftCrop); + + // ESPA crop is after the down scaling and it must output resolution that divides by 8 for tnr scalers. + int32_t stripeZoomCrop = leftCrop + rightCrop; + + int outputWidth = (int)kernelFragments[stripe].fragmentOutputWidth - stripeZoomCrop; + if (outputWidth < 0) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(outputWidth); + + // For start point, we need to remove the left cropping only for stripes 1 and on + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > runKernel->resolution_info->input_crop.left) ? + static_cast(kernelFragments[stripe].fragmentStartX - runKernel->resolution_info->input_crop.left) : 0; + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + + if (kernelFragments[stripe].fragmentOutputWidth % 8 != 0) + { + uint16_t pixelsToCrop = kernelFragments[stripe].fragmentOutputWidth % 8; + + // Additional crop on the right, affects only output width + kernelFragments[stripe].fragmentOutputWidth -= pixelsToCrop; + + if (stripe == rightNonVanishedStripe) + { + // Last stripe - crop from left + _outputStartX[runKernel->kernel_uuid][stripe] += pixelsToCrop; + xOffset[stripe] += pixelsToCrop; + } + } + } + + // Update system API offsets + +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = xOffset[stripe]; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + if (runKernel->resolution_info->input_width == runKernel->resolution_info->output_width && + runKernel->resolution_info->input_height == runKernel->resolution_info->output_height && + runKernel->resolution_info->input_crop.left == 0 && + runKernel->resolution_info->input_crop.right == 0 && + runKernel->resolution_info->input_crop.top == 0 && + runKernel->resolution_info->input_crop.bottom == 0) + { + // Upscaler bypassed + return StaticGraphStatus::SG_OK; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / resInfo->output_width; + auto scaleFactorH = static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + uint32_t upscalerWidthGranularity = _upscalerWidthGranularity; + uint16_t inputUnits = static_cast((resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / upscalerWidthGranularity); + + // We would like to keep upscalerWidthGranularity as large as possible in order to minimize the number of pixels that cannot be used for upscaling + // (upscalerWidthGranularity is divided to stripes, so the larger it is the more accurately we can divide) + while (inputUnits % 2 == 0) + { + inputUnits /= 2; + upscalerWidthGranularity *= 2; + } + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + uint8_t leftNonVanishedStripe = 0; + uint8_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (leftPixel >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (rightPixel <= kernelFragments[stripe].fragmentStartX) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = resInfo->input_crop.left > kernelFragments[stripe].fragmentStartX ? + resInfo->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = resInfo->input_crop.right > (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + resInfo->input_crop.right - (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + int32_t stripeZoomCrop = leftCrop + rightCrop; + + // Calculate the step, proportional to the part of input to upscaler that this stripe is working on + uint16_t inputWidthAfterZoomCrop = static_cast(kernelFragments[stripe].fragmentInputWidth - stripeZoomCrop); + + uint16_t pixelsToCrop = 0; + uint16_t maxInputWidth = static_cast(UPSCALER_MAX_OUTPUT_WIDTH * scaleFactor); + if (inputWidthAfterZoomCrop > maxInputWidth) + { + pixelsToCrop = inputWidthAfterZoomCrop - maxInputWidth; + inputWidthAfterZoomCrop = maxInputWidth; + } + + uint16_t stripeStepW = GRA_ROUND_DOWN(static_cast(static_cast(inputWidthAfterZoomCrop) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) * upscalerWidthGranularity), 2); + uint16_t inputWidthAfterTotalCrop = stripeStepW * inputUnits; + + if (inputWidthAfterTotalCrop < 16) + { + // Too little left after cropping, vanish this stripe + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + pixelsToCrop += (inputWidthAfterZoomCrop - inputWidthAfterTotalCrop); + + kernelFragments[stripe].fragmentOutputWidth = static_cast(GRA_ROUND(static_cast(inputWidthAfterTotalCrop) / scaleFactor)); + + // Validate output width + if (static_cast(inputWidthAfterTotalCrop) / kernelFragments[stripe].fragmentOutputWidth != + static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height) + { + // Output width is not valid, return error + return StaticGraphStatus::SG_ERROR; + } + + if (stripe == leftNonVanishedStripe && stripe != rightNonVanishedStripe) + { + // Crop on the right + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop; + } + else if (stripe == rightNonVanishedStripe && stripe != leftNonVanishedStripe) + { + // Crop on the left + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = pixelsToCrop; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = 0; + } + else + { + // Crop both sides + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = GRA_ROUND_DOWN(static_cast(pixelsToCrop / 2), 2); + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop - kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + } + + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > resInfo->input_crop.left ? + kernelFragments[stripe].fragmentStartX - resInfo->input_crop.left : 0); + + outputStartX += kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + + outputStartX = GRA_ROUND_UP(static_cast(ceil(static_cast(outputStartX) / scaleFactor)), 2); + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + int16_t leftNonVanishedStripe = 0; + int16_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + } + + for (int16_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + } + + // Remove overlaps between stripes + FormatType bufferFormat = GraphResolutionConfiguratorHelper::getFormatForDrainer(runKernel->kernel_uuid); + std::vector newOutputStartX = std::vector(_node->numberOfFragments, 0); + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == leftNonVanishedStripe) // first stripe + { + newOutputStartX[stripe] = 0; + } + else //middle or last stripe + { + newOutputStartX[stripe] = + (_outputStartX[runKernel->kernel_uuid][stripe] + _outputStartX[runKernel->kernel_uuid][stripe-1] + kernelFragments[stripe-1].fragmentOutputWidth) / 4 * 2; + + // Align to format restrictions if TNR drainer & data is 10-bit packed + newOutputStartX[stripe] = alignToFormatRestrictions(newOutputStartX[stripe], bufferFormat); + } + } + + _outputStartX[runKernel->kernel_uuid] = newOutputStartX; + + // Data Width is calculated according to data starts + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == rightNonVanishedStripe) // last stripe + { + kernelFragments[stripe].fragmentOutputWidth = static_cast(runKernel->resolution_info->input_width - _outputStartX[runKernel->kernel_uuid][stripe]); + } + else // first or middle stripe + { + if (_outputStartX[runKernel->kernel_uuid][stripe + 1] <= _outputStartX[runKernel->kernel_uuid][stripe]) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(_outputStartX[runKernel->kernel_uuid][stripe+1] - _outputStartX[runKernel->kernel_uuid][stripe]); + } + } + + // Update system API offsets +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = 0; + + for (uint8_t plane = 0; plane < 3; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = 0; + } + } + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + uint32_t sumOfPrevWidths = 0; + + for (int16_t s = leftNonVanishedStripe; s < stripe; s++) + { + sumOfPrevWidths += kernelFragments[s].fragmentOutputWidth; + } + + // OutputOffsetPerStripe: Sum(prev output widths) + input_crop.left - stripe.startX + systemApi->x_output_offset_per_stripe[stripe] = + sumOfPrevWidths + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX; + + // PlaneOffsetStartAddressPerStripe: Sum(prev output widths) * DataSize + for (uint8_t plane = 0; plane < 2; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = getPlaneStartAddress(sumOfPrevWidths, bufferFormat, plane); + } + } + + return StaticGraphStatus::SG_OK; +} + +uint32_t Ipu8FragmentsConfigurator::getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane) +{ + // Calculate according to format BPP. + uint32_t bitsPerElement = 8; + uint32_t elementsPerCacheLine = 64; + uint8_t numberOfPlanes = 3; + + if (formatType == FormatType::YUV420_8_SP_P) + { + // 8-bit packed (OFS output) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 2; + } + else if (formatType == FormatType::YUV420_10_SP_P) + { + // 10-bit packed (TNR ref) + bitsPerElement = 10; + elementsPerCacheLine = 50; + numberOfPlanes = 2; + } + else if (formatType == FormatType::META_8) + { + // 8-bit meta data (TNR recursice similarity) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 1; + } + else + { + // Format not supported + // Log error + return 0; + } + + if (plane >= numberOfPlanes) + { + // Plane does not exist + return 0; + } + + // Offset is calculated by taking whole cache lines and then adding the remaining pixles and translate to bytes. + uint32_t wholeCacheLines = sumOfPrevWidths / elementsPerCacheLine; + uint32_t remainingPixels = sumOfPrevWidths % elementsPerCacheLine; + + if ((remainingPixels * bitsPerElement) % 8 != 0) + { + // Log error + return 0; + } + + return wholeCacheLines * 64 + (remainingPixels * bitsPerElement) / 8; +} + +uint16_t Ipu8FragmentsConfigurator::alignToFormatRestrictions(uint16_t size, FormatType bufferFormat) +{ + if (bufferFormat != FormatType::YUV420_10_SP_P) + { + return size; + } + + uint16_t elementsPerCacheLine = 50; + + uint16_t remainingPixels = size % elementsPerCacheLine; + uint16_t pixelsToRemove = remainingPixels % 4; + + return size - pixelsToRemove; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactor = static_cast(resInfo->output_width) / (resInfo->input_width); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(kernelFragments[stripe].fragmentInputWidth * scaleFactor); + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(scaleFactor * kernelFragments[stripe].fragmentStartX / 2)) * 2; + } + + // Save stripes for feeder configuration + _tnrScalerFragments = kernelFragments; + _tnrScalerUuid = runKernel->kernel_uuid; + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::AfterStats) + { + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + if (kernelRole == GraphResolutionConfiguratorKernelRole::TnrFeederFull) + { + // TNR Full resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentInputWidth; + kernelFragments[stripe].fragmentStartX = _tnrScalerFragments[stripe].fragmentStartX; + _outputStartX[runKernel->kernel_uuid][stripe] = _tnrScalerFragments[stripe].fragmentStartX; + } + else // GraphResolutionConfiguratorKernelRole::TnrFeederSmall + { + // TNR Small resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentOutputWidth; + kernelFragments[stripe].fragmentStartX = _outputStartX[_tnrScalerUuid][stripe]; + _outputStartX[runKernel->kernel_uuid][stripe] = _outputStartX[_tnrScalerUuid][stripe]; + } + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments) +{ + if (prevKernelFragments == nullptr || kernelFragments == nullptr) + { + return; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + if (_outputStartX.find(prevKernelUuid) == _outputStartX.end()) + { + // This is the main DS, we start from it, no need to copy + return; + } + + for (uint32_t i = 0; i < _node->numberOfFragments; i++) + { + kernelFragments[i].fragmentInputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentOutputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentStartX = _outputStartX[prevKernelUuid][i]; + kernelFragments[i].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[i].upscalerFragDesc.fragmentInputCropRight = 0; + + _outputStartX[runKernel->kernel_uuid][i] = kernelFragments[i].fragmentStartX; + } +} diff --git a/modules/ipu_desc/ipu7x/FragmentsConfigurator.h b/modules/ipu_desc/ipu7x/FragmentsConfigurator.h new file mode 100644 index 0000000..f3c6c9a --- /dev/null +++ b/modules/ipu_desc/ipu7x/FragmentsConfigurator.h @@ -0,0 +1,65 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#pragma once +#include "GraphResolutionConfiguratorInclude.h" +#include + +class Ipu8FragmentsConfigurator +{ +public: + + static const int32_t VANISH_MIN = 16; + static const int32_t UPSCALER_MAX_OUTPUT_WIDTH = 4672; + Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity); + + StaticGraphStatus configureFragments(); + +private: + // Stripe Actions - each filter will perform one action according to its role + StaticGraphStatus configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole); + + void copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments); + void vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption); + uint32_t getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane); + uint16_t alignToFormatRestrictions(uint16_t size, FormatType bufferFormat); + + OuterNode* _node = nullptr; + IStaticGraphConfig* _staticGraph = nullptr; + + // Fragments binaries do not contain output start x, so we keep them here + std::map> _outputStartX; + uint32_t _upscalerWidthGranularity = 1; + + // Save TNR resolutions for feeder configurations + StaticGraphFragmentDesc* _tnrScalerFragments = nullptr; + uint32_t _tnrScalerUuid = 0; +}; diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp index 49b5b6e..bd5dbb9 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp @@ -30,6 +30,10 @@ #include #include +#if SUPPORT_FRAGMENTS == 1 +#include "FragmentsConfigurator.h" +#endif + #define GRA_CONVERT_TO_RADIANS(degreeAngle) ((double)((degreeAngle)*M_PI/180.0)) /* * External Interfaces @@ -122,10 +126,20 @@ sensorMode->verticalCropOffset - sensorMode->croppedImageHeight; // Input crop to scaler includes sensor, so we need to remove it - _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorHorizontalScaling); - _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorHorizontalScaling); - _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorVerticalScaling); - _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorVerticalScaling); + _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + + _originalCropScalerToOutput.left = static_cast(_originalCropScalerToOutput.left * _sensorHorizontalScaling); + _originalCropScalerToOutput.right = static_cast(_originalCropScalerToOutput.right * _sensorHorizontalScaling); + _originalCropScalerToOutput.top = static_cast(_originalCropScalerToOutput.top * _sensorVerticalScaling); + _originalCropScalerToOutput.bottom = static_cast(_originalCropScalerToOutput.bottom * _sensorVerticalScaling); + + _originalCropScalerToOutput.left -= cropperRunKernel->resolution_info->input_crop.left; + _originalCropScalerToOutput.right -= cropperRunKernel->resolution_info->input_crop.right; + _originalCropScalerToOutput.top -= cropperRunKernel->resolution_info->input_crop.top; + _originalCropScalerToOutput.bottom -= cropperRunKernel->resolution_info->input_crop.bottom; } /* @@ -204,77 +218,79 @@ StaticGraphStatus GraphResolutionConfigurator::updateStaticGraphConfig(const Reg { return StaticGraphStatus::SG_ERROR; } - - // Key resolution index - uint32_t keyResIndex = 0; - if (isCenteredZoom == true) + if (roi.fromInput == false) { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + // Key resolution index + uint32_t keyResIndex = 0; + if (isCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Get key resolution for this ROI - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (userRoi.zoomFactor == 1.0) - { - keyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + // Get key resolution for this ROI + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (userRoi.zoomFactor == 1.0) + { + keyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Update the static configuration according to the key resolution index - // Copy the original kernels configuration a _kernels - if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Update the static configuration according to the key resolution index + // Copy the original kernels configuration a _kernels + if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - else - { - if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + else { - return StaticGraphStatus::SG_ERROR; + if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - // Get key resolution for previous ROI - uint32_t prevKeyResIndex = 0; + // Get key resolution for previous ROI + uint32_t prevKeyResIndex = 0; - if (prevIsCenteredZoom == true) - { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + if (prevIsCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - SensorRoi prevSensorRoi; - if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + SensorRoi prevSensorRoi; + if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (prevUserRoi.zoomFactor == 1.0) - { - prevKeyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (prevUserRoi.zoomFactor == 1.0) + { + prevKeyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } + // Update whether if key resolution has changed + isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; } - // Update whether if key resolution has changed - isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; // // Step #2 Dynamic update according to this ROI // - return updateRunKernelOfScalers(sensorRoi); + return updateRunKernelOfScalers(roi.fromInput,sensorRoi); } #endif @@ -289,14 +305,26 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_ERROR; } - auto outputRunKernel = getRunKernel(_outputRunKernelCoord); - if (userRoi.fromInput == true) { - // Not supported - return StaticGraphStatus::SG_ERROR; + if (userRoi.zoomFactor == 1 && userRoi.panFactor == 0) + { + auto cropRunKernel = getRunKernel(_cropperRunKernelCoord); + sensorRoi.width = cropRunKernel->resolution_info->output_width; + sensorRoi.height = cropRunKernel->resolution_info->output_height; + sensorRoi.cropLeft = cropRunKernel->resolution_info->input_crop.left; + sensorRoi.cropRight = cropRunKernel->resolution_info->input_crop.right; + sensorRoi.cropTop = GRA_ROUND_DOWN(std::min(cropRunKernel->resolution_history->input_height- cropRunKernel->resolution_info->output_height, std::max(0, static_cast(static_cast(cropRunKernel->resolution_history->input_height * userRoi.tiltFactor)))), 2); + sensorRoi.cropBottom = cropRunKernel->resolution_info->input_height - cropRunKernel->resolution_info->output_height - sensorRoi.cropTop; + // Not supported + return StaticGraphStatus::SG_OK; + } + else + { + return StaticGraphStatus::SG_ERROR; + } } - + auto outputRunKernel = getRunKernel(_outputRunKernelCoord); // Calculate ROI on output, using original output since user ROI is relative to full output ROI (not after some zoom was performed) StaticGraphKernelRes* outputRunKernelResolution = outputRunKernel->resolution_info; if (outputRunKernelResolution == nullptr) @@ -331,91 +359,118 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_OK; } -StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(SensorRoi& roi) +StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(bool fromInput, SensorRoi& roi) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - auto downscalerRunKernel = getRunKernel(_downscalerRunKernelCoord); auto upscalerRunKernel = getRunKernel(_upscalerRunKernelCoord); auto cropperRunKernel = getRunKernel(_cropperRunKernelCoord); - uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; - uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; - - uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; - uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; - - StaticGraphKernelResCrop downscalerCropHistory; - downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); - downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); - downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); - downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); - - // If ROI is larger than scaler's output resolution - we downscale - if (roi.width >= outputWidth) + if (fromInput) { - // Only down scaler is active - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + cropperRunKernel->resolution_info->input_crop.top = roi.cropTop; + cropperRunKernel->resolution_info->input_crop.bottom = roi.cropBottom; + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) { - ret = StaticGraphStatus::SG_ERROR; + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } } - - updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); - - // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. - updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); } else { - // Configure downscaler and upscaler according to upscaler constraints - // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. - uint32_t upscalerActualInputWidth; - uint32_t upscalerActualInputHeight; - uint32_t upscalerActualOutputWidth; - uint32_t upscalerActualOutputHeight; - if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, - upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; + uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; + + uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; + uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; + + StaticGraphKernelResCrop downscalerCropHistory; + downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + if (roi.width == outputWidth || roi.height == outputHeight) { - ret = StaticGraphStatus::SG_ERROR; + updateRunKernelPassThrough(downscalerRunKernel, inputWidth, inputHeight); + updateRunKernelPassThrough(upscalerRunKernel, inputWidth, inputHeight); + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, inputWidth, inputHeight, outputWidth, outputHeight); } - - // Update DS cropping and downscale according to the resolution the upscaler requires. - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + // If ROI is larger than scaler's output resolution - we downscale + else if (roi.width > outputWidth) { - ret = StaticGraphStatus::SG_ERROR; + // Only down scaler is active + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + + updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); + + // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. + updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); + } + else + { + // Configure downscaler and upscaler according to upscaler constraints + + // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. + uint32_t upscalerActualInputWidth; + uint32_t upscalerActualInputHeight; + uint32_t upscalerActualOutputWidth; + uint32_t upscalerActualOutputHeight; + if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, + upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler - updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); + // Update DS cropping and downscale according to the resolution the upscaler requires. + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update ESPA crop if required - updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); - } + // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler + updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); - // Update resolution histories according to decisions made above - if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); + } - if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update resolution histories according to decisions made above + if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update resolution history for relevant kernels - for (auto& runKernelForUpdate : _kernelsForUpdate) - { - // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. - StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); - if (updateRunKernelResolutionHistory(runKernelPtr, upscalerRunKernel, false) != StaticGraphStatus::SG_OK) + if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) + { + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + // Anna - I don't know why cropping was ignored. I think it should be after cropping + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } } return ret; @@ -717,11 +772,11 @@ StaticGraphStatus GraphResolutionConfigurator::updateRunKernelFinalCropper(Stati runKernel->resolution_info->output_width = outputWidth; runKernel->resolution_info->output_height = outputHeight; - // Crop on the right & bottom in order not to influence resolution history - runKernel->resolution_info->input_crop.left = 0; - runKernel->resolution_info->input_crop.right = inputWidth - outputWidth; - runKernel->resolution_info->input_crop.top = 0; - runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight; + // Crop symmetrically + runKernel->resolution_info->input_crop.left = GRA_ROUND_DOWN(static_cast((inputWidth - outputWidth) / 2.0), 2); + runKernel->resolution_info->input_crop.right = inputWidth - outputWidth - runKernel->resolution_info->input_crop.left; + runKernel->resolution_info->input_crop.top = GRA_ROUND_DOWN(static_cast((inputHeight - outputHeight) / 2.0), 2); + runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight - runKernel->resolution_info->input_crop.top; return StaticGraphStatus::SG_OK; } @@ -734,6 +789,16 @@ StaticGraphStatus GraphResolutionConfigurator::updateCroppingScaler(StaticGraphR int32_t heightAfterCtop = downscalerRunKernel->resolution_info->input_height - downscalerRunKernel->resolution_info->input_crop.top - downscalerRunKernel->resolution_info->input_crop.bottom; + int32_t extraPixelsWidth = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right)- + downscalerRunKernel->resolution_info->output_width; + + widthAfterCtop -= extraPixelsWidth % 4; + + int32_t extraPixelsHeight = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right) - + downscalerRunKernel->resolution_info->output_width; + + heightAfterCtop -= extraPixelsHeight % 4; + if (widthAfterCtop == downscalerRunKernel->resolution_info->output_width && heightAfterCtop == downscalerRunKernel->resolution_info->output_height) { @@ -1026,8 +1091,8 @@ StaticGraphStatus GraphResolutionConfigurator::undoSensorScaleRipAngle(int32_t& StaticGraphStatus GraphResolutionConfigurator::sensorCropOrScaleExist(bool& sensor_crop_or_scale_exist) { sensor_crop_or_scale_exist = false; - if ((abs(_sensorHorizontalScaling - 1.0F) < 0.01F) || - (abs(_sensorVerticalScaling - 1.0F) < 0.01F) || + if ((abs(_sensorHorizontalScaling - 1.0F) > 0.01F) || + (abs(_sensorVerticalScaling - 1.0F) > 0.01F) || (_sensorHorizontalCropLeft > 0) || (_sensorHorizontalCropRight > 0) || (_sensorVerticalCropTop > 0) || @@ -1056,7 +1121,8 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon initRunKernel(GraphResolutionConfiguratorKernelRole::UpScaler, _upscalerRunKernel) != StaticGraphStatus::SG_OK || initRunKernel(GraphResolutionConfiguratorKernelRole::EspaCropper, _cropperRunKernel) != StaticGraphStatus::SG_OK || initOutputRunKernel() != StaticGraphStatus::SG_OK || - initKernelsForUpdate() != StaticGraphStatus::SG_OK) + initKernelsForUpdate() != StaticGraphStatus::SG_OK || + _node == nullptr) { _staticGraph = nullptr; return; @@ -1079,7 +1145,17 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon _upscalerStepW *= 2; _upscalerStepH *= 2; - // Save original values for kernels that are being updated + // Due to upscaler constraints, we should avoid having too many units. + // Number of pixels that cannot be used when upscaling a stripe may be up to ~ 2*units + // For details: https://hsdes.intel.com/appstore/article-one/#/article/15018342122 + // This affects the number of possible zoom steps, but for large resolutions it is OK to enlarge the step + while (outputWidth / _upscalerStepW > 70) + { + _upscalerStepW *= 2; + _upscalerStepH *= 2; + } + + // Save original values for kernels that are being updated _originalCropOfDownScaler = _downscalerRunKernel->resolution_info->input_crop; _originalCropOfEspaCropper = _cropperRunKernel->resolution_info->input_crop; @@ -1106,12 +1182,36 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon return; } - if (sensorMode->horizontalScalingDenominator) { + if (sensorMode->horizontalScalingDenominator) + { _sensorHorizontalScaling = static_cast(sensorMode->horizontalScalingNumerator) / sensorMode->horizontalScalingDenominator; } - if (sensorMode->verticalScalingDenominator) { + + if (sensorMode->verticalScalingDenominator) + { _sensorVerticalScaling = static_cast(sensorMode->verticalScalingNumerator) / sensorMode->verticalScalingDenominator; } + +#if SUPPORT_FRAGMENTS == 1 + if (_node != nullptr && _node->GetNumberOfFragments() > 1) + { + _fragmentsConfigurator = new Ipu8FragmentsConfigurator(_staticGraph, _node, _upscalerStepW); + } +#endif +} + +Ipu8GraphResolutionConfigurator::~Ipu8GraphResolutionConfigurator() +{ + _kernelsForUpdateAfterCropper.clear(); + _kernelsForUpdateAfterUpscaler.clear(); + +#if SUPPORT_FRAGMENTS == 1 + if (_fragmentsConfigurator != nullptr) + { + delete _fragmentsConfigurator; + _fragmentsConfigurator = nullptr; + } +#endif } StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(GraphResolutionConfiguratorKernelRole role, StaticGraphRunKernel*& runKernel) @@ -1139,6 +1239,10 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(uint32_t kernel if (node->nodeKernels.kernelList[j].run_kernel.kernel_uuid == kernelUuid) { runKernel = &node->nodeKernels.kernelList[j].run_kernel; + if (node->type == NodeTypes::Cb) + { + _node = node; + } return StaticGraphStatus::SG_OK; } } @@ -1216,6 +1320,21 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initKernelsForUpdate() } } + std::vector> smurfUuids; + GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(smurfUuids); + + for (auto& smurfUuid : smurfUuids) + { + StaticGraphRunKernel* runKernel; + StaticGraphRunKernel* deviceRunKernel; + if (initRunKernel(smurfUuid.first, runKernel) == StaticGraphStatus::SG_OK && + initRunKernel(smurfUuid.second, deviceRunKernel) == StaticGraphStatus::SG_OK) + { + std::pair runKernelPair = std::make_pair(runKernel, deviceRunKernel); + _smurfKernels.push_back(runKernelPair); + } + } + return StaticGraphStatus::SG_OK; } @@ -1306,11 +1425,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - //uint32_t fragments = 1; - //auto downscalerFragments = getKernelFragments(_downscalerRunKernelCoord); - //auto upscalerFragments = getKernelFragments(_upscalerRunKernelCoord); - //auto cropperFragments = getKernelFragments(_cropperRunKernelCoord); - uint32_t inputWidth = _downscalerRunKernel->resolution_info->input_width; uint32_t inputHeight = _downscalerRunKernel->resolution_info->input_height; @@ -1323,17 +1437,20 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso if (roi.width >= outputWidth) { // Only down scaler is active - if (updateRunKernelDownScaler(_downscalerRunKernel, roi, outputWidth, outputHeight) != StaticGraphStatus::SG_OK) + uint32_t dsOutputWidth = outputWidth; + uint32_t dsOutputHeight = outputHeight; + + if (updateRunKernelDownScaler(_downscalerRunKernel, roi, dsOutputWidth, dsOutputHeight) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } - // Pass-through. Must call cropper function in order to update the system API. StaticGraphKernelResCrop EmptyCrop = { 0, 0, 0, 0 }; - if (updateRunKernelCropper(_cropperRunKernel, roi, outputWidth, outputHeight, outputWidth, outputHeight, EmptyCrop) != StaticGraphStatus::SG_OK) + if (updateRunKernelCropper(_cropperRunKernel, roi, dsOutputWidth, dsOutputHeight, outputWidth, outputHeight, downscalerCropHist) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + updateRunKernelPassThrough(_upscalerRunKernel, outputWidth, outputHeight); } else @@ -1385,32 +1502,66 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso } } - // :TODO: Striping Support - // Currently we assume one stripe. - //updateKernelFragments(_downscalerRunKernel, downscalerFragments, fragments); - //updateKernelFragments(_upscalerRunKernel, upscalerFragments, fragments); - //updateKernelFragments(_cropperRunKernel, cropperFragments, fragments); + // After resolution history was updated, re-configure SAP devices to get the correct FOV + // We do not change the sap feeders configuration, only update the crop & scale of smurfs + for (auto& runKernelForUpdate : _smurfKernels) + { + if (updateRunKernelSmurf(runKernelForUpdate.first, runKernelForUpdate.second) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } if (ret == StaticGraphStatus::SG_OK) { ret = SanityCheck(); } + if (_fragmentsConfigurator != nullptr) + { + // Configure fragments according to the new zoomed run kernels information + _fragmentsConfigurator->configureFragments(); + } + return ret; } -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, - uint32_t outputWidth, uint32_t outputHeight) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - runKernel->resolution_info->output_width = outputWidth; - runKernel->resolution_info->output_height = outputHeight; + if (_fragmentsConfigurator == nullptr) + { + // No fragments, crop to ROI and downscale to output resolution + runKernel->resolution_info->output_width = outputWidth; + runKernel->resolution_info->output_height = outputHeight; - runKernel->resolution_info->input_crop.left = roi.left; - runKernel->resolution_info->input_crop.right = roi.right; - runKernel->resolution_info->input_crop.top = roi.top; - runKernel->resolution_info->input_crop.bottom = roi.bottom; + runKernel->resolution_info->input_crop.left = roi.left; + runKernel->resolution_info->input_crop.right = roi.right; + runKernel->resolution_info->input_crop.top = roi.top; + runKernel->resolution_info->input_crop.bottom = roi.bottom; + } + else + { + // Fragments, leave the crop to espa crop, configure according to desired scale factor + // Since ESPA can only crop, make sure new output sizes are larger or equal to requested sizes + auto resInfo = runKernel->resolution_info; + + // If we have frgments, downscaler cannot perform left cropping + auto scaleFactorW = static_cast(roi.width) / outputWidth; + auto scaleFactorH = static_cast(roi.height) / outputHeight; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + runKernel->resolution_info->input_crop = _originalCropOfDownScaler; + + runKernel->resolution_info->output_width = std::max(outputWidth, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / scaleFactor)), 4)); + runKernel->resolution_info->output_height = std::max(outputHeight, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / scaleFactor)), 2)); + + outputWidth = runKernel->resolution_info->output_width; + outputHeight = runKernel->resolution_info->output_height; + } return ret; } @@ -1433,23 +1584,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static runKernel->resolution_info->input_crop.bottom = 0; // In certain cases need to adjust negative and/or odd crop values. - if (downscalerCropHist.left < 0) - { - downscalerCropHist.left = 0; - } - if (downscalerCropHist.right < 0) - { - downscalerCropHist.right = 0; - } - if (downscalerCropHist.top < 0) - { - downscalerCropHist.top = 0; - } - if (downscalerCropHist.bottom < 0) - { - downscalerCropHist.bottom = 0; - } - if (downscalerCropHist.left & 1) { downscalerCropHist.left = downscalerCropHist.left - 1; @@ -1470,29 +1604,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalHorizontalCrop = inputWidth - outputWidth; - int32_t originalDsPadding = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + int32_t originalDsCrop = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.left = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.left = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.left = 0; } - originalDsPadding = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.right = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.right = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.right = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.left += GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.right += GRA_ROUND_UP(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.right += (totalHorizontalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2)); if (roi.left < static_cast(runKernel->resolution_info->input_crop.left)) { @@ -1508,29 +1643,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalVerticalCrop = inputHeight - outputHeight; - originalDsPadding = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.top = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.top = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.top = 0; } - originalDsPadding = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.bottom = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.bottom = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.bottom = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.top += GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.bottom += GRA_ROUND_UP(static_cast(static_cast(totalVerticalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.bottom += (totalVerticalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2)); if (roi.top < static_cast(runKernel->resolution_info->input_crop.top)) { @@ -1559,6 +1695,8 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static return StaticGraphStatus::SG_ERROR; } + // The following will update the system API for single stripe. In case there are additional stripes system API will + // be configured by FrgamentsConfigurator. StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); @@ -1591,13 +1729,15 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati uint32_t actualCropW = units * _upscalerStepW; uint32_t actualCropH = units * _upscalerStepH; - uint32_t deltaW = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); - uint32_t deltaH = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaLeft = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); + uint32_t deltaRight = totalCropW - actualCropW - deltaLeft; + uint32_t deltaTop = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaBottom = totalCropH - actualCropH - deltaTop; - runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaW; - runKernel->resolution_info->input_crop.right = actualCropW - runKernel->resolution_info->input_crop.left; - runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaH; - runKernel->resolution_info->input_crop.bottom = actualCropH - runKernel->resolution_info->input_crop.top; + runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaLeft; + runKernel->resolution_info->input_crop.right = roi.right - cropperKernelCrop.right - deltaRight; + runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaTop; + runKernel->resolution_info->input_crop.bottom = roi.bottom - cropperKernelCrop.bottom - deltaBottom; if (runKernel->resolution_info->input_crop.left < 0) { @@ -1623,34 +1763,36 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati return ret; } -StaticGraphFragmentDesc* Ipu8GraphResolutionConfigurator::getKernelFragments(RunKernelCoords& coord) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel) { - GraphTopology* graphTopology = nullptr; - StaticGraphStatus status = _staticGraph->getGraphTopology(&graphTopology); + StaticGraphStatus ret = StaticGraphStatus::SG_OK; - if (status != StaticGraphStatus::SG_OK) { - return nullptr; + auto resInfo = smurfRunKernel->resolution_info; + if (resInfo->input_width == 0 || resInfo->input_height == 0) + { + return StaticGraphStatus::SG_OK; } - auto node = graphTopology->links[coord.nodeInd]->destNode; - return node->nodeKernels.kernelList[coord.kernelInd].fragment_descs; -} + // We need to reach new history for device, without the crop already done by feeder. + // The hist of the smurf is the crop already being done by feeder, mutliplied by segmap factor (without smurf factor which changes) + StaticGraphKernelResCrop smurfNewCrop; + smurfNewCrop.left = deviceRunKernel->resolution_history->input_crop.left - smurfRunKernel->resolution_history->input_crop.left; + smurfNewCrop.right = deviceRunKernel->resolution_history->input_crop.right - smurfRunKernel->resolution_history->input_crop.right; + smurfNewCrop.top = deviceRunKernel->resolution_history->input_crop.top - smurfRunKernel->resolution_history->input_crop.top; + smurfNewCrop.bottom = deviceRunKernel->resolution_history->input_crop.bottom - smurfRunKernel->resolution_history->input_crop.bottom; -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments) -{ - if (runKernel == nullptr || fragmentsDesc == nullptr) - { - return StaticGraphStatus::SG_ERROR; - } + // Now calculate how much is left for the smurf to crop + // Translate from history units to device units + double newInputToDeviceFactor = static_cast(deviceRunKernel->resolution_history->input_width - deviceRunKernel->resolution_history->input_crop.left - deviceRunKernel->resolution_history->input_crop.right) / + deviceRunKernel->resolution_history->output_width; - if (fragments == 1) - { - // Nothing to do - return StaticGraphStatus::SG_OK; - } + // Now translate from history units to smurf output (device) + smurfRunKernel->resolution_info->output_crop.left = static_cast(smurfNewCrop.left / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.right = static_cast(smurfNewCrop.right / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.top = static_cast(smurfNewCrop.top / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.bottom = static_cast(smurfNewCrop.bottom / newInputToDeviceFactor); - // Add support here - return StaticGraphStatus::SG_OK; + return ret; } StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() @@ -1691,12 +1833,12 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() int32_t widthAfterCrop = _downscalerRunKernel->resolution_info->input_width - _downscalerRunKernel->resolution_info->input_crop.left - _downscalerRunKernel->resolution_info->input_crop.right; int32_t heightAfterCrop = _downscalerRunKernel->resolution_info->input_height - _downscalerRunKernel->resolution_info->input_crop.top - _downscalerRunKernel->resolution_info->input_crop.bottom; - if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || - heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || - static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) - { - return StaticGraphStatus::SG_ERROR; - } + if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || + heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || + static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) + { + return StaticGraphStatus::SG_ERROR; + } // Make sure US is actually up scaling widthAfterCrop = _upscalerRunKernel->resolution_info->input_width - _upscalerRunKernel->resolution_info->input_crop.left - _upscalerRunKernel->resolution_info->input_crop.right; @@ -1852,4 +1994,4 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::getStatsRoiFromSensorRoi(cons return StaticGraphStatus::SG_OK; } -#endif +#endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h index 12d7f6d..21ddfb1 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h @@ -26,10 +26,13 @@ */ #pragma once #include +#include +#include #define _USE_MATH_DEFINES #define GRA_ROUND_UP(a,b) (((a) + ((b)-1)) / (b) * (b)) #define GRA_ROUND_DOWN(a,b) ((a) / (b) * (b)) +#define GRA_ROUND(a) (((double)(a) > 0.0) ? floor((double)(a) + 0.5) : ceil((double)(a) - 0.5)) // ROI in user level class RegionOfInterest @@ -73,7 +76,13 @@ enum class GraphResolutionConfiguratorKernelRole : uint8_t { UpScaler, DownScaler, - EspaCropper + EspaCropper, + NonRcb, + Output, + TnrScaler, + TnrFeederFull, + TnrFeederSmall, + None }; class RunKernelCoords @@ -138,7 +147,7 @@ class GraphResolutionConfigurator #if SUPPORT_KEY_RESOLUTIONS == 1 StaticGraphStatus getZoomKeyResolutionIndex(ZoomKeyResolutions* zoomKeyResolutions, SensorRoi sensorRoi, uint32_t& selectedIndex); #endif - StaticGraphStatus updateRunKernelOfScalers(SensorRoi& roi); + StaticGraphStatus updateRunKernelOfScalers(bool fromInput, SensorRoi& roi); StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, SensorRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop* originalScalerCrop); @@ -161,15 +170,13 @@ class GraphResolutionConfigurator StaticGraphKernelResCrop _originalCropScalerToOutput = { 0,0,0,0 }; }; +class Ipu8FragmentsConfigurator; + class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator { public: Ipu8GraphResolutionConfigurator(IStaticGraphConfig* staticGraph); - ~Ipu8GraphResolutionConfigurator() - { - _kernelsForUpdateAfterCropper.clear(); - _kernelsForUpdateAfterUpscaler.clear(); - } + ~Ipu8GraphResolutionConfigurator(); StaticGraphStatus updateStaticGraphConfig(const RegionOfInterest& roi, bool isCenteredZoom); @@ -185,18 +192,16 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphStatus initOutputRunKernel(); StaticGraphStatus initKernelsForUpdate(); - StaticGraphFragmentDesc* getKernelFragments(RunKernelCoords& coord); - // Calculate ROI in dimensions of pipe downscaler input. StaticGraphStatus getDownscalerInputRoi(const RegionOfInterest& userRoi, ResolutionRoi& pipeInputRoi); StaticGraphStatus updateRunKernelOfScalers(ResolutionRoi& roi); - StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t outputWidth, uint32_t outputHeight); + StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight); StaticGraphStatus updateRunKernelUpScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, StaticGraphKernelResCrop& cropperKernelCrop, uint32_t outputWidth, uint32_t outputHeight); StaticGraphStatus updateRunKernelCropper(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop& downscalerCropHist); - StaticGraphStatus updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments); + StaticGraphStatus updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel); StaticGraphStatus SanityCheck(); StaticGraphStatus SanityCheckCrop(StaticGraphKernelResCrop* crop); @@ -215,5 +220,9 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphRunKernel* _outputRunKernel; std::vector _kernelsForUpdateAfterCropper; std::vector _kernelsForUpdateAfterUpscaler; -}; + std::vector> _smurfKernels; + // For striping + OuterNode* _node = nullptr; + Ipu8FragmentsConfigurator* _fragmentsConfigurator = nullptr; +}; diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h b/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h index 1eceba9..30bb063 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h @@ -39,6 +39,10 @@ #include "Ipu8StaticGraphAutogen.h" #include "Ipu8StaticGraphTypesAutogen.h" #include "Ipu8GraphResolutionConfiguratorAutogen.h" +#elif defined(GRC_IPU9) +#include "Ipu9StaticGraphAutogen.h" +#include "Ipu9StaticGraphTypesAutogen.h" +#include "Ipu9GraphResolutionConfiguratorAutogen.h" #else #include "StaticGraphAutogen.h" #include "StaticGraphTypesAutogen.h" diff --git a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp index cb0fea1..21638b1 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp @@ -59,19 +59,24 @@ uint32_t GraphResolutionConfiguratorHelper::getRunKernelUuidOfOutput(HwSink hwSi case 100038: // Bayer_WithPdaf3_WithDvs_WithTnr case 100039: // RgbIr_NoPdaf_WithDvs_WithTnr return 5637; // gdc7_1 + case 100002: // Bayer_NoPdaf_NoDvs_WithTnr + case 100041: // Bayer_NoPdaf_NoDvs_WithTnr_WithVai + case 100042: // Bayer_NoPdaf_NoDvs_WithTnr_WithImv + return 19706; // sw_scaler case 100005: // Bayer_NoPdaf_WithNntm_WithTnr case 100040: // Bayer_WithPdaf3_WithNntm_WithTnr return 46539; // nntm_1_0 case 100031: // Dol2Inputs_NoGmv_NoTnr - if (links[16]->isActive) return 40423; // tm_app - if (links[19]->isActive) return 46539; // nntm_1_0 + if (links[16]->isActive) return 37003; // tm_app + if (links[20]->isActive) return 46539; // nntm_1_0 break; case 100032: // Dol2Inputs_NoDvs_WithTnr - if (links[21]->isActive) return 40423; // tm_app - if (links[24]->isActive) return 46539; // nntm_1_0 + if (links[21]->isActive) return 37003; // tm_app + if (links[25]->isActive) return 46539; // nntm_1_0 break; } break; + case HwSink::ProcessedSecondarySink: return 19706; // sw_scaler case HwSink::AeOutSink: return 55073; // aestatistics_2_1 } @@ -84,6 +89,7 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto // Must take only one from each resolution history index, since in static graph they all share the same // resolution history instance + kernelUuids.push_back(40915); // odr_output_ps_1_1 kernelUuids.push_back(55391); // odr_output_me_1_1 kernelUuids.push_back(44984); // slim_tnr_spatial_bifd_yuvn_regs_1_1 @@ -101,12 +107,41 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto kernelUuids.push_back(6326); // tnr_sp_bc_bifd_yuv4n_regs_1_1 kernelUuids.push_back(27830); // slim_tnr_fp_blend_bifd_yuvnm1_regs_1_1 kernelUuids.push_back(5637); // gdc7_1 + kernelUuids.push_back(19706); // sw_scaler kernelUuids.push_back(46539); // nntm_1_0 - kernelUuids.push_back(40423); // tm_app + kernelUuids.push_back(37003); // tm_app return StaticGraphStatus::SG_OK; } uint32_t GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid() { return 50058; -} \ No newline at end of file +} + +GraphResolutionConfiguratorKernelRole GraphResolutionConfiguratorHelper::getKernelRole(uint32_t kernelUuid) +{ + (void) kernelUuid; + return GraphResolutionConfiguratorKernelRole::NonRcb; +} + +uint32_t GraphResolutionConfiguratorHelper::getReferenceKernel(uint32_t kernelUuid) +{ + (void) kernelUuid; + return 0; +} + +FormatType GraphResolutionConfiguratorHelper::getFormatForDrainer(uint32_t kernelUuid) +{ + (void) kernelUuid; + return FormatType::YUV420_8_SP_P; +} + +StaticGraphStatus GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(std::vector>& kernelUuids) +{ + kernelUuids.clear(); + + std::pair smurfPair; + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h index e22be43..5eb8156 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h @@ -33,10 +33,13 @@ class GraphResolutionConfiguratorHelper { public: - GraphResolutionConfiguratorHelper(); static uint32_t getRunKernelUuid(GraphResolutionConfiguratorKernelRole role); static uint32_t getRunKernelUuidOfOutput(HwSink hwSink, int32_t graphId, GraphLink** links); static StaticGraphStatus getRunKernelUuidForResHistoryUpdate(std::vector& kernelUuids); static uint32_t getRunKernelIoBufferSystemApiUuid(); + static GraphResolutionConfiguratorKernelRole getKernelRole(uint32_t kernelUuid); + static uint32_t getReferenceKernel(uint32_t kernelUuid); + static FormatType getFormatForDrainer(uint32_t kernelUuid); + static StaticGraphStatus getSmurfRunKernelUuid(std::vector>& kernelUuids); }; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp index 4a760b5..92b86f1 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp @@ -441,6 +441,27 @@ void SwGdcOuterNode::Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurati setInnerNode(None); } +void SwScalerOuterNode::Init(SwScalerOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(7, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void SwNntmOuterNode::Init(SwNntmOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(6, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -585,6 +606,27 @@ void BbpsIrNoTnrOuterNode::Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGrap setInnerNode(None); } +void LbffIrNo2ANoGmvOuterNode::Init(LbffIrNo2ANoGmvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 26, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[26] = {52164 /*ifd_pipe_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 6070 /*ifd_lsc_1_1*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 57496 /*gammatm_v3*/, 31704 /*bxt_csc*/, 15021 /*rgbs_grid_1_1*/, 20739 /*b2i_ds_1_0_1*/, 25569 /*upscaler_1_0*/, 36213 /*lbff_crop_espa_1_1*/, 33723 /*tnr_scale_lb*/, 40915 /*odr_output_ps_1_1*/, 55391 /*odr_output_me_1_1*/, 20731 /*odr_awb_std_1_1*/, 54176 /*odr_awb_sat_1_1*/}; + uint64_t kernelsRcbBitmap = 0xFE0001; // { ifd_pipe_1_1[0], rgbs_grid_1_1[17], b2i_ds_1_0_1[18], upscaler_1_0[19], lbff_crop_espa_1_1[20], tnr_scale_lb[21], odr_output_ps_1_1[22], odr_output_me_1_1[23] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3B8001A; // {{ifd_pipe_1_1}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_1}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v3, bxt_csc, rgbs_grid_1_1, b2i_ds_1_0_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_1}[5], {tnr_scale_lb, odr_output_ps_1_1}[6], {odr_output_me_1_1}[7], {odr_awb_std_1_1}[8], {odr_awb_sat_1_1}[9] } + + uint8_t systemApisSizes[26] = {156 /*ifd_pipe_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_1*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 5 /*gammatm_v3*/, 0 /*bxt_csc*/, 24 /*rgbs_grid_1_1*/, 0 /*b2i_ds_1_0_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_1*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_1*/, 156 /*odr_output_me_1_1*/, 156 /*odr_awb_std_1_1*/, 156 /*odr_awb_sat_1_1*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void LbffIrNoGmvOuterNode::Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(0, NodeTypes::Cb, 31, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -754,7 +796,7 @@ void SwGtmOuterNode::Init(SwGtmOuterNodeConfiguration** selectedGraphConfigurati { OuterNode::Init(5, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); - uint16_t kernelsUuids[1] = {40423 /*tm_app*/}; + uint16_t kernelsUuids[1] = {37003 /*tm_app*/}; uint64_t kernelsRcbBitmap = 0x0; // { } uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{tm_app}[0] } @@ -887,13 +929,34 @@ void SwVaiOuterNode::Init(SwVaiOuterNodeConfiguration** selectedGraphConfigurati uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } - uint8_t systemApisSizes[1] = {0 /*sw_scaler*/}; + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { nodeKernels.kernelList = kernelListOptions[i]; - InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, nullptr); + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void SwImvOuterNode::Init(SwImvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(9, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); } // set default inner Node @@ -1128,6 +1191,7 @@ void LbffBayerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1280,6 +1344,7 @@ void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1712,6 +1777,7 @@ void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1877,6 +1943,7 @@ void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1886,6 +1953,13 @@ void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwScalerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + void SwNntmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { @@ -2336,6 +2410,7 @@ void LbffRgbIrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2564,6 +2639,7 @@ void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerO } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2729,6 +2805,7 @@ void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3533,6 +3610,7 @@ void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3685,6 +3763,213 @@ void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + +} + +void LbffIrNo2ANoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 26; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } + + // Pass-through kernels + kernelListOptions[j][6].run_kernel.enable = 0; // wb_1_1 + kernelListOptions[j][8].run_kernel.enable = 0; // bxt_demosaic + kernelListOptions[j][14].run_kernel.enable = 0; // acm_1_1 + } + + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x0000000000000000000001EA01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0x1EA; + // DEB - 0x0000000000000000000001FFFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0x1FF; + // TEB - 0x000000000000601F + bitmaps.teb[0] = 0x601F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3020000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x00000000000000000000016A07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0x16A; + // DEB - 0x00000000000000000000017FFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0x17F; + // TEB - 0x000000000000231F + bitmaps.teb[0] = 0x231F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + + // Kernels disablement + // 22 odr_output_ps_1_1- inner node disablement + disabledRunKernelsBitmap = 0x400000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x00000000000000000000016A01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0x16A; + // DEB - 0x00000000000000000000017FFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0x17F; + // TEB - 0x000000000000201F + bitmaps.teb[0] = 0x201F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3420000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x0000000000000000000000EA07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0xEA; + // DEB - 0x0000000000000000000000BFFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0xBF; + // TEB - 0x000000000000431F + bitmaps.teb[0] = 0x431F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + + // Kernels disablement + // 21 tnr_scale_lb- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + disabledRunKernelsBitmap = 0xA00000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x0000000000000000000000EA01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0xEA; + // DEB - 0x0000000000000000000000BFFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0xBF; + // TEB - 0x000000000000401F + bitmaps.teb[0] = 0x401F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3A20000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000006404403 + bitmaps.rbm[0] = 0x6404403; + // DEB - 0x0000000000000000000000000000623F + bitmaps.deb[0] = 0x623F; + // TEB - 0x000000000000031F + bitmaps.teb[0] = 0x31F; + // REB - 0x0000000000000000000000000000F0FB + bitmaps.reb[0] = 0xF0FB; + + // Kernels disablement + // 6 wb_1_1- inner node disablement + // 7 bnlm_3_3- inner node disablement + // 8 bxt_demosaic- inner node disablement + // 9 vcsc_2_0_b- inner node disablement + // 10 gltm_2_0- inner node disablement + // 11 xnr_5_2- inner node disablement + // 12 vcr_3_1- inner node disablement + // 13 glim_2_0- inner node disablement + // 14 acm_1_1- inner node disablement + // 15 gammatm_v3- inner node disablement + // 16 bxt_csc- inner node disablement + // 18 b2i_ds_1_0_1- inner node disablement + // 19 upscaler_1_0- inner node disablement + // 20 lbff_crop_espa_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + disabledRunKernelsBitmap = 0xFDFFC0; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_1- inner node disablement + // 1 bxt_blc- inner node disablement + // 2 linearization2_0- inner node disablement + // 3 ifd_lsc_1_1- inner node disablement + // 4 lsc_1_2- inner node disablement + // 5 gd_dpc_2_2- inner node disablement + // 6 wb_1_1- inner node disablement + // 7 bnlm_3_3- inner node disablement + // 8 bxt_demosaic- inner node disablement + // 9 vcsc_2_0_b- inner node disablement + // 10 gltm_2_0- inner node disablement + // 11 xnr_5_2- inner node disablement + // 12 vcr_3_1- inner node disablement + // 13 glim_2_0- inner node disablement + // 14 acm_1_1- inner node disablement + // 15 gammatm_v3- inner node disablement + // 16 bxt_csc- inner node disablement + // 17 rgbs_grid_1_1- inner node disablement + // 18 b2i_ds_1_0_1- inner node disablement + // 19 upscaler_1_0- inner node disablement + // 20 lbff_crop_espa_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFF; + } + else // default inner node + { + // RBM - 0x0000000000000000000001EA07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0x1EA; + // DEB - 0x0000000000000000000001FFFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0x1FF; + // TEB - 0x000000000000631F + bitmaps.teb[0] = 0x631F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + } + + SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3910,6 +4195,7 @@ void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4380,6 +4666,7 @@ void LbffBayerPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4831,6 +5118,7 @@ void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5068,6 +5356,7 @@ void LbffDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGtmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5994,6 +6283,7 @@ void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -6893,6 +7183,7 @@ void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -7778,6 +8069,7 @@ void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8215,6 +8507,7 @@ void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwVaiOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8224,6 +8517,13 @@ void SwVaiOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwImvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + /* * Graph 100000 */ @@ -8504,6 +8804,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -8512,17 +8813,20 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -8700,7 +9004,23 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 21; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -8724,6 +9044,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -8733,6 +9054,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -8764,6 +9086,11 @@ StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -8852,7 +9179,7 @@ StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -8885,6 +9212,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -8892,15 +9220,18 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9036,7 +9367,23 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon link->dest = GraphElementType::ImagePpp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 16; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9059,6 +9406,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon _imageSubGraph.isysOuterNode = &_isysOuterNode; _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9067,6 +9415,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon _imageSubGraph.isysOuterNode->contextId = 0; _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swScalerOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9093,6 +9442,11 @@ StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -9125,6 +9479,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -9162,6 +9517,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_scaler:terminal_connect_input subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp @@ -9175,7 +9531,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9601,6 +9957,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -9609,17 +9966,20 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9780,7 +10140,23 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9804,6 +10180,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9813,6 +10190,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9844,6 +10222,11 @@ StaticGraphStatus StaticGraph100004::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -9930,7 +10313,7 @@ StaticGraphStatus imageSubGraphTopology100004::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9963,6 +10346,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -9971,17 +10355,20 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10142,7 +10529,23 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10166,6 +10569,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -10175,6 +10579,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10206,6 +10611,11 @@ StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -10292,7 +10702,7 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12384,6 +12794,256 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } +/* + * Graph 100024 + */ +StaticGraph100024::StaticGraph100024(GraphConfiguration100024** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100024, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100024[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNo2ANoGmvOuterNodeConfiguration** lbffIrNo2ANoGmvOuterNodeConfigurationOptions = new LbffIrNo2ANoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffIrNo2ANoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNo2ANoGmvOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNo2ANoGmvOuterNode.Init(lbffIrNo2ANoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffIrNo2ANoGmvOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffIrNo2ANoGmv; + link->destNode = &_lbffIrNo2ANoGmvOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffIrNo2ANoGmv; + link->destNode = &_lbffIrNo2ANoGmvOuterNode; + link->destTerminalId = 3; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 9; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImagePpp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 9; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffIrNo2ANoGmvOuterNode = &_lbffIrNo2ANoGmvOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffIrNo2ANoGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100024::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNo2ANoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100024::~StaticGraph100024() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100024::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffIrNo2ANoGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNo2ANoGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffIrNo2ANoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNo2ANoGmvInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[6]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[7]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + if ( + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noPpp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffIrNo2ANoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffIrNo2ANoGmvOuterNode->setInnerNode(lbffIrNo2ANoGmvInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffIrNo2ANoGmvInnerOptions & no3A); // lbff_Ir_No2A_NoGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[4]->isActive = !(lbffIrNo2ANoGmvInnerOptions & no3A); // lbff_Ir_No2A_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[6]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[7]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noPpp); // bbps_NoTnr:bbps_ofs_pp_yuvn_odr -> image_ppp + + /* + * Link enablement by private inner options + */ + subGraphLinks[5]->isActive = !(lbffIrNo2ANoGmvInnerOptions & noLbOutputPs); // lbff_Ir_No2A_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 9; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + /* * Graph 100025 */ @@ -13992,6 +14652,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGtmOuterNodeConfiguration** swGtmOuterNodeConfigurationOptions = new SwGtmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -14002,6 +14663,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; swGtmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGtmOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); @@ -14010,6 +14672,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGtmOuterNode.Init(swGtmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; delete[] swDolOuterNodeConfigurationOptions; @@ -14017,6 +14680,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon delete[] bbpsNoTnrOuterNodeConfigurationOptions; delete[] swGtmOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14155,15 +14819,24 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->type = LinkType::Node2Sink; link = &_graphLinks[17]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; + link->src = GraphElementType::SwGtm; + link->srcNode = &_swGtmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::SwNntm; link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[18]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; @@ -14172,14 +14845,30 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[19]; + link = &_graphLinks[20]; link->src = GraphElementType::SwNntm; link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 20; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14204,6 +14893,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _imageSubGraph.lbffDolOuterNode = &_lbffDolOuterNode; _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; _imageSubGraph.swGtmOuterNode = &_swGtmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; // choose the selected sub graph @@ -14215,7 +14905,8 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _imageSubGraph.lbffDolOuterNode->contextId = 2; _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; _imageSubGraph.swGtmOuterNode->contextId = 4; - _imageSubGraph.swNntmOuterNode->contextId = 5; + _imageSubGraph.swScalerOuterNode->contextId = 5; + _imageSubGraph.swNntmOuterNode->contextId = 6; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14257,6 +14948,11 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -14292,7 +14988,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[11]->linkConfiguration->bufferSize == 0 && subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; @@ -14300,7 +14996,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[12]->linkConfiguration->bufferSize == 0 && subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; @@ -14332,10 +15028,10 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod subGraphLinks[9]->isActive = !(lbffDolInnerOptions & no3A); // lbff_Dol:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[18]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[18]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noPpp); // bbps_NoTnr:bbps_ofs_pp_yuvn_odr -> image_ppp /* @@ -14347,7 +15043,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14374,6 +15070,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGtmOuterNodeConfiguration** swGtmOuterNodeConfigurationOptions = new SwGtmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -14384,6 +15081,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGtmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGtmOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); @@ -14392,6 +15090,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGtmOuterNode.Init(swGtmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; delete[] swDolOuterNodeConfigurationOptions; @@ -14399,6 +15098,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGtmOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14585,6 +15285,15 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Sink; link = &_graphLinks[22]; + link->src = GraphElementType::SwGtm; + link->srcNode = &_swGtmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[23]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; @@ -14593,7 +15302,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[23]; + link = &_graphLinks[24]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; @@ -14602,14 +15311,30 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[24]; + link = &_graphLinks[25]; link->src = GraphElementType::SwNntm; link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 25; ++i) + link = &_graphLinks[26]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[27]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 28; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14634,6 +15359,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _imageSubGraph.lbffDolOuterNode = &_lbffDolOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGtmOuterNode = &_swGtmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; // choose the selected sub graph @@ -14645,7 +15371,8 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _imageSubGraph.lbffDolOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; _imageSubGraph.swGtmOuterNode->contextId = 4; - _imageSubGraph.swNntmOuterNode->contextId = 5; + _imageSubGraph.swScalerOuterNode->contextId = 5; + _imageSubGraph.swNntmOuterNode->contextId = 6; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14687,6 +15414,11 @@ StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -14720,7 +15452,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[16]->linkConfiguration->bufferSize == 0 && subGraphLinks[19]->linkConfiguration->bufferSize == 0 && - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -14728,7 +15460,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[17]->linkConfiguration->bufferSize == 0 && subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - subGraphLinks[23]->linkConfiguration->bufferSize == 0 && + subGraphLinks[24]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -14761,10 +15493,10 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod subGraphLinks[9]->isActive = !(lbffDolInnerOptions & no3A); // lbff_Dol:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[24]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp /* @@ -14777,7 +15509,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 25; i++) + for (uint32_t i = 0; i < 28; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16763,6 +17495,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -16771,17 +17504,20 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16942,7 +17678,23 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16966,6 +17718,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -16975,6 +17728,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17006,6 +17760,11 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -17088,7 +17847,7 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17121,6 +17880,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon SwVaiOuterNodeConfiguration** swVaiOuterNodeConfigurationOptions = new SwVaiOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -17129,17 +17889,20 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon swVaiOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swVaiOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swVaiOuterNode.Init(swVaiOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] swVaiOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -17284,7 +18047,23 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->dest = GraphElementType::ImagePpp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 17; ++i) + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 19; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -17308,6 +18087,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.swVaiOuterNode = &_swVaiOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -17317,6 +18097,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.swVaiOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17348,6 +18129,11 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -17380,6 +18166,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -17417,6 +18204,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_scaler:terminal_connect_input subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp @@ -17430,7 +18218,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 17; i++) + for (uint32_t i = 0; i < 19; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17449,3 +18237,392 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } +/* + * Graph 100042 + */ +StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 3; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 6; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 7; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 9; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImagePpp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swImvOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100042::~StaticGraph100042() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noPpp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h index f33eb5a..7e29d8f 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h @@ -36,6 +36,8 @@ #define SUPPORT_KEY_RESOLUTIONS 1 +#define SUPPORT_FRAGMENTS 0 + enum InnerNodeOption { None = 0, @@ -65,18 +67,18 @@ class OuterNode { /** * \brief resourceId - represents the physical ID of the node, e.g. cb_id for CB node. */ - uint8_t resourceId; + uint8_t resourceId = 0; /** * \brief contextId - represents the logical Id of the node according to the use-case. * Same physical nodes in given graph topology will have a different contextId */ uint8_t contextId = 0; - NodeTypes type; + NodeTypes type = NodeTypes::Cb; HwBitmaps bitmaps; - StaticGraphNodeKernels nodeKernels; + StaticGraphNodeKernels nodeKernels = {}; - uint8_t numberOfFragments; + uint8_t numberOfFragments = 0; OuterNode() {} ~OuterNode(); @@ -225,6 +227,16 @@ struct SwGdcOuterNodeConfiguration StaticGraphKernelBppConfiguration bppInfos[1]; }; +struct SwScalerOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + struct SwNntmOuterNodeConfiguration { uint32_t streamId = 0; @@ -284,6 +296,16 @@ struct BbpsIrNoTnrOuterNodeConfiguration uint8_t systemApiConfiguration[624]; }; +struct LbffIrNo2ANoGmvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[8]; + StaticGraphKernelRes resolutionHistories[10]; + StaticGraphKernelBppConfiguration bppInfos[26]; + uint8_t systemApiConfiguration[1176]; +}; + struct LbffIrNoGmvOuterNodeConfiguration { uint32_t streamId = 0; @@ -405,6 +427,17 @@ struct SwVaiOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[1]; StaticGraphKernelRes resolutionHistories[1]; StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + +struct SwImvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; }; struct GraphConfiguration100000 @@ -423,7 +456,8 @@ struct GraphConfiguration100001 LbffBayerWithGmvOuterNodeConfiguration lbffBayerWithGmvOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[21]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100002 @@ -432,7 +466,8 @@ struct GraphConfiguration100002 IsysOuterNodeConfiguration isysOuterNodeConfiguration; LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[16]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; }; struct GraphConfiguration100003 @@ -452,7 +487,8 @@ struct GraphConfiguration100004 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100005 @@ -462,7 +498,8 @@ struct GraphConfiguration100005 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100006 @@ -510,6 +547,15 @@ struct GraphConfiguration100016 StaticGraphLinkConfiguration linkConfigurations[4]; }; +struct GraphConfiguration100024 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffIrNo2ANoGmvOuterNodeConfiguration lbffIrNo2ANoGmvOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[9]; +}; + struct GraphConfiguration100025 { VirtualSinkMapping sinkMappingConfiguration; @@ -571,7 +617,8 @@ struct GraphConfiguration100031 BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; SwGtmOuterNodeConfiguration swGtmOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100032 @@ -583,7 +630,8 @@ struct GraphConfiguration100032 BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGtmOuterNodeConfiguration swGtmOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[25]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[28]; }; struct GraphConfiguration100035 @@ -639,7 +687,8 @@ struct GraphConfiguration100040 LbffBayerPdaf3OuterNodeConfiguration lbffBayerPdaf3OuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100041 @@ -649,7 +698,19 @@ struct GraphConfiguration100041 SwVaiOuterNodeConfiguration swVaiOuterNodeConfiguration; LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[17]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[19]; +}; + +struct GraphConfiguration100042 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; #pragma pack(pop) @@ -660,6 +721,7 @@ class IsysOuterNode : public OuterNode void Init(IsysOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerOuterNode : public OuterNode { @@ -668,6 +730,7 @@ class LbffBayerOuterNode : public OuterNode void Init(LbffBayerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsNoTnrOuterNode : public OuterNode { @@ -676,6 +739,7 @@ class BbpsNoTnrOuterNode : public OuterNode void Init(BbpsNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerWithGmvOuterNode : public OuterNode { @@ -684,6 +748,7 @@ class LbffBayerWithGmvOuterNode : public OuterNode void Init(LbffBayerWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsWithTnrOuterNode : public OuterNode { @@ -692,6 +757,7 @@ class BbpsWithTnrOuterNode : public OuterNode void Init(BbpsWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGdcOuterNode : public OuterNode { @@ -700,6 +766,16 @@ class SwGdcOuterNode : public OuterNode void Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwScalerOuterNode : public OuterNode +{ +public: + SwScalerOuterNode(): OuterNode(){} + void Init(SwScalerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwNntmOuterNode : public OuterNode { @@ -708,6 +784,7 @@ class SwNntmOuterNode : public OuterNode void Init(SwNntmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrOuterNode : public OuterNode { @@ -716,6 +793,7 @@ class LbffRgbIrOuterNode : public OuterNode void Init(LbffRgbIrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvIrStreamOuterNode : public OuterNode { @@ -724,6 +802,7 @@ class LbffIrNoGmvIrStreamOuterNode : public OuterNode void Init(LbffIrNoGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrWithTnrOuterNode : public OuterNode { @@ -732,6 +811,7 @@ class BbpsIrWithTnrOuterNode : public OuterNode void Init(BbpsIrWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerBurstOutNo3AOuterNode : public OuterNode { @@ -740,6 +820,7 @@ class LbffBayerBurstOutNo3AOuterNode : public OuterNode void Init(LbffBayerBurstOutNo3AOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrNoTnrOuterNode : public OuterNode { @@ -748,6 +829,16 @@ class BbpsIrNoTnrOuterNode : public OuterNode void Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffIrNo2ANoGmvOuterNode : public OuterNode +{ +public: + LbffIrNo2ANoGmvOuterNode(): OuterNode(){} + void Init(LbffIrNo2ANoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvOuterNode : public OuterNode { @@ -756,6 +847,7 @@ class LbffIrNoGmvOuterNode : public OuterNode void Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysPdaf2OuterNode : public OuterNode { @@ -764,6 +856,7 @@ class IsysPdaf2OuterNode : public OuterNode void Init(IsysPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2OuterNode : public OuterNode { @@ -772,6 +865,7 @@ class LbffBayerPdaf2OuterNode : public OuterNode void Init(LbffBayerPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3OuterNode : public OuterNode { @@ -780,6 +874,7 @@ class LbffBayerPdaf3OuterNode : public OuterNode void Init(LbffBayerPdaf3OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysDolOuterNode : public OuterNode { @@ -788,6 +883,7 @@ class IsysDolOuterNode : public OuterNode void Init(IsysDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwDolOuterNode : public OuterNode { @@ -796,6 +892,7 @@ class SwDolOuterNode : public OuterNode void Init(SwDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDolOuterNode : public OuterNode { @@ -804,6 +901,7 @@ class LbffDolOuterNode : public OuterNode void Init(LbffDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGtmOuterNode : public OuterNode { @@ -812,6 +910,7 @@ class SwGtmOuterNode : public OuterNode void Init(SwGtmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2WithGmvOuterNode : public OuterNode { @@ -820,6 +919,7 @@ class LbffBayerPdaf2WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf2WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3WithGmvOuterNode : public OuterNode { @@ -828,6 +928,7 @@ class LbffBayerPdaf3WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf3WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrWithGmvOuterNode : public OuterNode { @@ -836,6 +937,7 @@ class LbffRgbIrWithGmvOuterNode : public OuterNode void Init(LbffRgbIrWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrWithGmvIrStreamOuterNode : public OuterNode { @@ -844,6 +946,7 @@ class LbffIrWithGmvIrStreamOuterNode : public OuterNode void Init(LbffIrWithGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwVaiOuterNode : public OuterNode { @@ -852,6 +955,16 @@ class SwVaiOuterNode : public OuterNode void Init(SwVaiOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwImvOuterNode : public OuterNode +{ +public: + SwImvOuterNode(): OuterNode(){} + void Init(SwImvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class imageSubGraphTopology100000 : public GraphTopology { @@ -897,14 +1010,15 @@ class StaticGraph100000 : public IStaticGraphConfig class imageSubGraphTopology100001 : public GraphTopology { public: - imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} + imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerWithGmvOuterNode* lbffBayerWithGmvOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[21]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; }; @@ -914,7 +1028,7 @@ class StaticGraph100001 : public IStaticGraphConfig StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100001(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3890884975; // autogenerated + static const uint32_t hashCode = 4211786267; // autogenerated private: // Configuration @@ -925,6 +1039,7 @@ class StaticGraph100001 : public IStaticGraphConfig LbffBayerWithGmvOuterNode _lbffBayerWithGmvOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -933,19 +1048,20 @@ class StaticGraph100001 : public IStaticGraphConfig imageSubGraphTopology100001 _imageSubGraph; // All graph links - GraphLink _graphLinks[21]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100002 : public GraphTopology { public: - imageSubGraphTopology100002(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 16, sinkMappingConfiguration) {} + imageSubGraphTopology100002(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[16]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; }; @@ -955,7 +1071,7 @@ class StaticGraph100002 : public IStaticGraphConfig StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100002(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 420795545; // autogenerated + static const uint32_t hashCode = 2359075509; // autogenerated private: // Configuration @@ -965,6 +1081,7 @@ class StaticGraph100002 : public IStaticGraphConfig IsysOuterNode _isysOuterNode; LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -973,7 +1090,7 @@ class StaticGraph100002 : public IStaticGraphConfig imageSubGraphTopology100002 _imageSubGraph; // All graph links - GraphLink _graphLinks[16]; + GraphLink _graphLinks[18]; }; class imageSubGraphTopology100003 : public GraphTopology { @@ -1021,14 +1138,15 @@ class StaticGraph100003 : public IStaticGraphConfig class imageSubGraphTopology100004 : public GraphTopology { public: - imageSubGraphTopology100004(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100004(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1038,7 +1156,7 @@ class StaticGraph100004 : public IStaticGraphConfig StaticGraph100004(GraphConfiguration100004** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100004(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3446052961; // autogenerated + static const uint32_t hashCode = 2537139917; // autogenerated private: // Configuration @@ -1049,6 +1167,7 @@ class StaticGraph100004 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1057,20 +1176,21 @@ class StaticGraph100004 : public IStaticGraphConfig imageSubGraphTopology100004 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100005 : public GraphTopology { public: - imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1080,7 +1200,7 @@ class StaticGraph100005 : public IStaticGraphConfig StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100005(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4056595; // autogenerated + static const uint32_t hashCode = 21815; // autogenerated private: // Configuration @@ -1091,6 +1211,7 @@ class StaticGraph100005 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1099,7 +1220,7 @@ class StaticGraph100005 : public IStaticGraphConfig imageSubGraphTopology100005 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100006 : public GraphTopology { @@ -1360,6 +1481,46 @@ class StaticGraph100016 : public IStaticGraphConfig GraphLink _graphLinks[4]; }; +class imageSubGraphTopology100024 : public GraphTopology { + +public: + imageSubGraphTopology100024(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 9, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffIrNo2ANoGmvOuterNode* lbffIrNo2ANoGmvOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + GraphLink* subGraphLinks[9]; + +}; + +class StaticGraph100024 : public IStaticGraphConfig +{ +public: + StaticGraph100024(GraphConfiguration100024** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100024(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 4016039499; // autogenerated + +private: + // Configuration + GraphConfiguration100024* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffIrNo2ANoGmvOuterNode _lbffIrNo2ANoGmvOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100024 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[9]; +}; + class imageSubGraphTopology100025 : public GraphTopology { public: @@ -1597,7 +1758,7 @@ class StaticGraph100030 : public IStaticGraphConfig class imageSubGraphTopology100031 : public GraphTopology { public: - imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; @@ -1605,8 +1766,9 @@ class imageSubGraphTopology100031 : public GraphTopology { LbffDolOuterNode* lbffDolOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; SwGtmOuterNode* swGtmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + GraphLink* subGraphLinks[23]; }; @@ -1616,7 +1778,7 @@ class StaticGraph100031 : public IStaticGraphConfig StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100031(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4222804565; // autogenerated + static const uint32_t hashCode = 3106659657; // autogenerated private: // Configuration @@ -1629,6 +1791,7 @@ class StaticGraph100031 : public IStaticGraphConfig BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; SwGtmOuterNode _swGtmOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1637,13 +1800,13 @@ class StaticGraph100031 : public IStaticGraphConfig imageSubGraphTopology100031 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100032 : public GraphTopology { public: - imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 28, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; @@ -1651,8 +1814,9 @@ class imageSubGraphTopology100032 : public GraphTopology { LbffDolOuterNode* lbffDolOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGtmOuterNode* swGtmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[25]; + GraphLink* subGraphLinks[28]; }; @@ -1662,7 +1826,7 @@ class StaticGraph100032 : public IStaticGraphConfig StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100032(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1667794249; // autogenerated + static const uint32_t hashCode = 2018657077; // autogenerated private: // Configuration @@ -1675,6 +1839,7 @@ class StaticGraph100032 : public IStaticGraphConfig BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGtmOuterNode _swGtmOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1683,7 +1848,7 @@ class StaticGraph100032 : public IStaticGraphConfig imageSubGraphTopology100032 _imageSubGraph; // All graph links - GraphLink _graphLinks[25]; + GraphLink _graphLinks[28]; }; class rawSubGraphTopology100035 : public GraphTopology { @@ -1917,14 +2082,15 @@ class StaticGraph100039 : public IStaticGraphConfig class imageSubGraphTopology100040 : public GraphTopology { public: - imageSubGraphTopology100040(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100040(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerPdaf3OuterNode* lbffBayerPdaf3OuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1934,7 +2100,7 @@ class StaticGraph100040 : public IStaticGraphConfig StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100040(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3111846513; // autogenerated + static const uint32_t hashCode = 3226663293; // autogenerated private: // Configuration @@ -1945,6 +2111,7 @@ class StaticGraph100040 : public IStaticGraphConfig LbffBayerPdaf3OuterNode _lbffBayerPdaf3OuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1953,20 +2120,21 @@ class StaticGraph100040 : public IStaticGraphConfig imageSubGraphTopology100040 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100041 : public GraphTopology { public: - imageSubGraphTopology100041(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 17, sinkMappingConfiguration) {} + imageSubGraphTopology100041(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; SwVaiOuterNode* swVaiOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[17]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[19]; }; @@ -1976,7 +2144,7 @@ class StaticGraph100041 : public IStaticGraphConfig StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100041(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3244574897; // autogenerated + static const uint32_t hashCode = 4127645209; // autogenerated private: // Configuration @@ -1987,6 +2155,7 @@ class StaticGraph100041 : public IStaticGraphConfig SwVaiOuterNode _swVaiOuterNode; LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1995,7 +2164,51 @@ class StaticGraph100041 : public IStaticGraphConfig imageSubGraphTopology100041 _imageSubGraph; // All graph links - GraphLink _graphLinks[17]; + GraphLink _graphLinks[19]; +}; + +class imageSubGraphTopology100042 : public GraphTopology { + +public: + imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; + +}; + +class StaticGraph100042 : public IStaticGraphConfig +{ +public: + StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100042(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1820896393; // autogenerated + +private: + // Configuration + GraphConfiguration100042* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwImvOuterNode _swImvOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100042 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[21]; }; #endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h index 9a5b4c2..d0ab551 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h @@ -66,6 +66,7 @@ enum class GraphConfigurationKeyAttributes : uint32_t PipelineNormalLight = 0x00000080, VaiActive = 0x00000100, StillsModeCpHdr = 0x00000200, + ImvDewarpActive = 0x00000400, }; struct GraphConfigurationKey { @@ -91,7 +92,7 @@ struct GraphConfigurationHeader { }; struct BinaryHeader { - uint32_t isSapEnable = 0; + uint32_t sapAttributes = 0; uint32_t binaryCommonHashCode = 0; uint32_t numberOfResolutions = 0; uint32_t numberOfSensorModes = 0; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c index 6835325..f54fc69 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c @@ -27,11 +27,6 @@ #include "Ipu7xStaticGraphDataPreloadAutogen.h" -int isSapEnable(char* binaryData) -{ - return ((BinaryHeader*)binaryData)->isSapEnable; -} - void parseTable(char* binaryData, GraphHashCodesTable* table) { char* fileOffset = binaryData; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h index 06d5494..067ea99 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h @@ -67,7 +67,7 @@ typedef enum typedef struct { - uint32_t isSapEnable; + uint32_t sapAttributes; uint32_t binaryCommonHashCode; uint32_t numberOfResolutions; uint32_t numberOfSensorModes; @@ -96,36 +96,38 @@ typedef struct DataRange }DataRange; -static int distinctGraphsCount = 26; +static int distinctGraphsCount = 28; static GraphHashCode hashCodeLookup[] = { - {0, 0x2408066D}, + {0, 0xCBD6F5}, {100000, 0xF9CD2BC5}, - {100001, 0xE7EA316F}, - {100002, 0x1914D499}, + {100001, 0xFB0AC21B}, + {100002, 0x8C9CA2B5}, {100003, 0x2852BB37}, - {100004, 0xCD669861}, - {100005, 0x3DE613}, + {100004, 0x9739AECD}, + {100005, 0x5537}, {100006, 0xA9B58C63}, {100007, 0xC041EA69}, {100008, 0x203F07B3}, {100015, 0x6D7619FD}, {100016, 0x7CF22081}, + {100024, 0xEF5FE64B}, {100025, 0xF9CD2BC5}, {100026, 0x2E0F31C1}, {100027, 0x1E188769}, {100028, 0xFEE9967}, {100029, 0xDA687535}, {100030, 0x5E3042B3}, - {100031, 0xFBB2E255}, - {100032, 0x63688549}, + {100031, 0xB92BDD49}, + {100032, 0x78524335}, {100035, 0x28230C83}, {100036, 0x28230C83}, {100037, 0xCE22B6FB}, {100038, 0xE7B8AD65}, {100039, 0x7B1EE4DB}, - {100040, 0xB97B0271}, - {100041, 0xC16448B1} + {100040, 0xC052F97D}, + {100041, 0xF606DE19}, + {100042, 0x6C88AC89} }; static FrameFormatDesc formatsDB[] = { @@ -308,7 +310,23 @@ static FrameFormatDesc formatsDB[] = { {"IGIG_GRGB_IGIG_GBGRP", "IGP0", 0x30504749, 8}, {"IGIG_GRGB_IGIG_GBGRP", "IGP1", 0x31504749, 10}, {"IGIG_GRGB_IGIG_GBGRP", "IGP2", 0x32504749, 12}, - {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16} + {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16}, + {"RGGBPD", "RG0B", 0x42304752, 8}, + {"RGGBPD", "RG1B", 0x42314752, 10}, + {"RGGBPD", "RG2B", 0x42324752, 12}, + {"RGGBPD", "RG3B", 0x42334752, 16}, + {"BGGRPD", "BG0B", 0x42304742, 8}, + {"BGGRPD", "BG1B", 0x42314742, 10}, + {"BGGRPD", "BG2B", 0x42324742, 12}, + {"BGGRPD", "BG3B", 0x42334742, 16}, + {"GBRGPD", "GB0B", 0x42304247, 8}, + {"GBRGPD", "GB1B", 0x42314247, 10}, + {"GBRGPD", "GB2B", 0x42324247, 12}, + {"GBRGPD", "GB3B", 0x42334247, 16}, + {"GRBGPD", "GR0B", 0x42305247, 8}, + {"GRBGPD", "GR1B", 0x42315247, 10}, + {"GRBGPD", "GR2B", 0x42325247, 12}, + {"GRBGPD", "GR3B", 0x42335247, 16} }; #endif/*DATA_RANGE_H_*/ diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp index e63df26..56c2287 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp @@ -305,6 +305,17 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100016( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100024: + if (StaticGraph100024::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100024( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; case 100025: if (StaticGraph100025::hashCode != selectedGraphConfigurationHeader->graphHashCode) { @@ -470,6 +481,17 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100041( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100042: + if (StaticGraph100042::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100042( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; default: delete[] selectedConfigurationData; delete[] selectedGraphConfigurationHeaders; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h index 6819e5e..3d88e46 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h @@ -82,7 +82,7 @@ class StaticGraphReader StaticGraphStatus Init(StaticReaderBinaryData& binaryGraphSettings); StaticGraphStatus GetStaticGraphConfig(GraphConfigurationKey& settingsKey, IStaticGraphConfig** graph); std::pair GetGraphConfigurationHeaders() const; - static const uint32_t staticGraphCommonHashCode = 604505709; // autogenerated + static const uint32_t staticGraphCommonHashCode = 13358837; // autogenerated private: void GetSinkMappingConfiguration(GraphConfigurationHeader* baseGraphConfigurationHeader, VirtualSinkMapping* baseSinkMappingConfiguration, GraphConfigurationHeader* selectedGraphConfigurationHeader, VirtualSinkMapping* selectedSinkMappingConfiguration); diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h index 8a8ece5..8449861 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h @@ -34,6 +34,7 @@ typedef aic::ImagingKernelGroup StaticGraphNodeKernels; typedef aic::ia_pac_kernel_info StaticGraphPacRunKernel; typedef aic::IaAicFragmentDesc StaticGraphFragmentDesc; +typedef aic::IaAicUpscalerFragDesc StaticGraphUpscalerFragmentDesc; #endif #ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES @@ -63,7 +64,9 @@ enum class NodeResourceId : uint8_t { SwGdc = 4, SwGtm = 5, SwNntm = 6, + SwScaler = 7, SwVai = 8, + SwImv = 9, }; enum class StaticGraphStatus : uint8_t @@ -99,6 +102,7 @@ enum class HwSink : uint8_t ImagePppSink, GmvMatchOutSink, ProcessedMainSink, + ProcessedSecondarySink, AwbSveOutSink, IrAeOutSink, IrAfStdOutSink, @@ -142,6 +146,7 @@ struct StaticGraphKernelRes { // We add only the fields that are used by tests struct StaticGraphKernelSystemApiIoBuffer1_4 { uint32_t x_output_offset_per_stripe[4]; + uint32_t plane_start_address_per_stripe[12]; }; #endif @@ -233,10 +238,19 @@ struct StaticGraphRunKernel { #ifndef STATIC_GRAPH_USE_IA_AIC_TYPES +struct StaticGraphUpscalerFragmentDesc { + uint16_t fragmentInputCropLeft = 0; + uint16_t fragmentInputCropRight = 0; +}; + struct StaticGraphFragmentDesc { - uint16_t inputWidth = 0; - uint16_t outputWidth = 0; - uint16_t left = 0; + uint16_t fragmentInputWidth = 0; + uint16_t fragmentOutputWidth = 0; + uint16_t fragmentStartX = 0; + union + { + StaticGraphUpscalerFragmentDesc upscalerFragDesc; + }; }; // ia_pac_kernel_info @@ -286,6 +300,7 @@ enum class GraphElementType : uint8_t { ImagePpp, GmvMatchOut, ProcessedMain, + ProcessedSecondary, AwbSveOut, IrAeOut, IrAfStdOut, @@ -303,12 +318,14 @@ enum class GraphElementType : uint8_t { LbffBayerWithGmv, BbpsWithTnr, SwGdc, + SwScaler, SwNntm, LbffRgbIr, LbffIrNoGmvIrStream, BbpsIrWithTnr, LbffBayerBurstOutNo3A, BbpsIrNoTnr, + LbffIrNo2ANoGmv, LbffIrNoGmv, IsysPdaf2, LbffBayerPdaf2, @@ -322,6 +339,7 @@ enum class GraphElementType : uint8_t { LbffRgbIrWithGmv, LbffIrWithGmvIrStream, SwVai, + SwImv, }; enum class LinkType : uint8_t { diff --git a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp index 4894c27..031d92e 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp @@ -497,7 +497,7 @@ TerminalDescriptor SW_GTMTerminalDesc[] = PAC_BUFFER_TYPE_NONE, TERMINAL_BUFFER_TYPE_DATA, TERMINAL_DIR_IN, - 40423, // tm_app + 37003, // tm_app }, { SW_GTM_TERMINAL_CONNECT_OUTPUT_1, @@ -594,6 +594,37 @@ TerminalDescriptor SW_VAITerminalDesc[] = }, }; +TerminalDescriptor SW_IMVTerminalDesc[] = +{ + { + SW_IMV_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 19706, // sw_scaler + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_1", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_2", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, +}; + int CountOfSW_ISYSTerminalDesc = sizeof(SW_ISYSTerminalDesc) / sizeof(SW_ISYSTerminalDesc[0]); int CountOfLBFFTerminalDesc = sizeof(LBFFTerminalDesc) / sizeof(LBFFTerminalDesc[0]); int CountOfBBPSTerminalDesc = sizeof(BBPSTerminalDesc) / sizeof(BBPSTerminalDesc[0]); @@ -603,3 +634,4 @@ int CountOfSW_GTMTerminalDesc = sizeof(SW_GTMTerminalDesc) / sizeof(SW_GTMTermin int CountOfSW_NNTMTerminalDesc = sizeof(SW_NNTMTerminalDesc) / sizeof(SW_NNTMTerminalDesc[0]); int CountOfSW_SCALERTerminalDesc = sizeof(SW_SCALERTerminalDesc) / sizeof(SW_SCALERTerminalDesc[0]); int CountOfSW_VAITerminalDesc = sizeof(SW_VAITerminalDesc) / sizeof(SW_VAITerminalDesc[0]); +int CountOfSW_IMVTerminalDesc = sizeof(SW_IMVTerminalDesc) / sizeof(SW_IMVTerminalDesc[0]); diff --git a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h index 4b69697..45fa3ef 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h @@ -169,6 +169,13 @@ enum SW_VAITerminalID SW_VAI_TERMINAL_CONNECT_OUTPUT, }; +enum SW_IMVTerminalID +{ + SW_IMV_TERMINAL_CONNECT_INPUT, + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, +}; + extern TerminalDescriptor SW_ISYSTerminalDesc[]; extern TerminalDescriptor LBFFTerminalDesc[]; extern TerminalDescriptor BBPSTerminalDesc[]; @@ -178,6 +185,7 @@ extern TerminalDescriptor SW_GTMTerminalDesc[]; extern TerminalDescriptor SW_NNTMTerminalDesc[]; extern TerminalDescriptor SW_SCALERTerminalDesc[]; extern TerminalDescriptor SW_VAITerminalDesc[]; +extern TerminalDescriptor SW_IMVTerminalDesc[]; extern int CountOfSW_ISYSTerminalDesc; extern int CountOfLBFFTerminalDesc; @@ -188,3 +196,4 @@ extern int CountOfSW_GTMTerminalDesc; extern int CountOfSW_NNTMTerminalDesc; extern int CountOfSW_SCALERTerminalDesc; extern int CountOfSW_VAITerminalDesc; +extern int CountOfSW_IMVTerminalDesc; diff --git a/modules/v4l2/v4l2_device.h b/modules/v4l2/v4l2_device.h index 9140934..0c9ea94 100644 --- a/modules/v4l2/v4l2_device.h +++ b/modules/v4l2/v4l2_device.h @@ -18,8 +18,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ -#define CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ +#pragma once #include #include @@ -550,4 +549,3 @@ class V4L2Subdevice final : public V4L2Device { }; } // namespace icamera -#endif //CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ diff --git a/modules/v4l2/v4l2_subdevice.cc b/modules/v4l2/v4l2_subdevice.cc index 3313a55..a120db9 100644 --- a/modules/v4l2/v4l2_subdevice.cc +++ b/modules/v4l2/v4l2_subdevice.cc @@ -74,7 +74,7 @@ int V4L2Subdevice::SetFormat(const struct v4l2_subdev_format& format) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } @@ -93,7 +93,7 @@ int V4L2Subdevice::GetFormat(struct v4l2_subdev_format* format) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } @@ -131,7 +131,7 @@ int V4L2Subdevice::SetSelection(const struct v4l2_subdev_selection& selection) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } diff --git a/modules/v4l2/v4l2_video_node.cc b/modules/v4l2/v4l2_video_node.cc index 83e82f3..b0d2a26 100644 --- a/modules/v4l2/v4l2_video_node.cc +++ b/modules/v4l2/v4l2_video_node.cc @@ -675,7 +675,7 @@ int V4L2VideoNode::SetupBuffers(size_t num_buffers, bool is_cached, enum v4l2_me LOG1("@%s", __func__); if (num_buffers == 0 || !buffers || !buffers->empty()) { - LOGE("%s: Device node %s num_buffers or buffer invaild.", __func__, name_.c_str()); + LOGE("%s: Device node %s num_buffers or buffer invalid.", __func__, name_.c_str()); return -EINVAL; } diff --git a/src/3a/AiqCore.cpp b/src/3a/AiqCore.cpp index 7d708f7..b4784b4 100644 --- a/src/3a/AiqCore.cpp +++ b/src/3a/AiqCore.cpp @@ -131,7 +131,8 @@ void AiqCore::init() { mIntel3AParameter->init(); - CLEAR(mLastAeResult), mAeRunTime = 0U; + CLEAR(mLastAeResult); + mAeRunTime = 0U; mAwbRunTime = 0U; mAiqRunTime = 0U; } @@ -225,7 +226,7 @@ int AiqCore::updateParameter(const aiq_parameter_t& param) { // In still frame use force update by setting convergence time to 0. // in other cases use tunings. - mSaParams.manual_convergence_time = (param.frameUsage == FRAME_USAGE_STILL) ? 0.0 : -1.0; + mSaParams.manual_convergence_time = (param.frameUsage == FRAME_USAGE_STILL) ? 0.0F : -1.0F; mIntel3AParameter->updateParameter(param); mAeForceLock = param.aeForceLock; @@ -421,7 +422,7 @@ int AiqCore::runAEC(int64_t ccaId, cca::cca_ae_results* aeResults) { if (mAeForceLock && (mIntel3AParameter->mAeMode != AE_MODE_MANUAL) && (mAeRunTime != 0U) && (!mIntel3AParameter->mAeParams.is_bypass)) { - // Use manual setttings if AE had been locked + // Use manual settings if AE had been locked mIntel3AParameter->mAeParams.manual_exposure_time_us[0] = mLockedExposureTimeUs; mIntel3AParameter->mAeParams.manual_iso[0] = mLockedIso; } @@ -472,7 +473,7 @@ void AiqCore::focusDistanceResult(const cca::cca_af_results* afResults, float* a // This allows the diopters to have 2 decimal values *afDistanceDiopters = 100.0 * 1000.0 * (1.0 / static_cast(afResults->next_focus_distance)); - *afDistanceDiopters = ceil(*afDistanceDiopters); + *afDistanceDiopters = static_cast(ceil(*afDistanceDiopters)); // Divide by 100 for final result. *afDistanceDiopters = *afDistanceDiopters / 100; } @@ -548,10 +549,14 @@ int AiqCore::reFormatLensShadingMap(const LSCGrid& inputLscGrid, float* dstLscGr // for ia_aiq_bayer_order_grbg, the four block is G, R, B, G const size_t size = inputLscGrid.height * inputLscGrid.width; for (size_t i = 0U; i < size; i++) { - *dstLscGridRGGB++ = inputLscGrid.gridR[i]; - *dstLscGridRGGB++ = inputLscGrid.gridGr[i]; - *dstLscGridRGGB++ = inputLscGrid.gridGb[i]; - *dstLscGridRGGB++ = inputLscGrid.gridB[i]; + *dstLscGridRGGB = inputLscGrid.gridR[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridGr[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridGb[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridB[i]; + dstLscGridRGGB++; } return OK; @@ -584,7 +589,7 @@ int AiqCore::storeLensShadingMap(const LSCGrid& inputLscGrid, const LSCGrid& res AiqUtils::resize2dArray(inputLscGrid.gridB, width, height, resizeLscGrid.gridB, destWidth, destHeight); LOG2("resize the 2D array cost %dus", - static_cast(((CameraUtils::systemTime() - startTime) / 1000))); + static_cast(((CameraUtils::systemTime() - startTime) / 1000U))); LOG2("%s:resize lens shading map from [%d,%d] to [%d,%d]", __func__, width, height, destWidth, destHeight); diff --git a/src/3a/AiqCore.h b/src/3a/AiqCore.h index 347a16f..47152ed 100644 --- a/src/3a/AiqCore.h +++ b/src/3a/AiqCore.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_CORE_H -#define AIQ_CORE_H +#pragma once #include #include @@ -136,7 +135,7 @@ class AiqCore { bool bypassAe(const aiq_parameter_t& param); bool bypassAf(const aiq_parameter_t& param); bool bypassAwb(const aiq_parameter_t& param); - // return ture if skip algo running + // return true if skip algo running bool skipAlgoRunning(RunRateInfo* info, int algo, bool converged); // return true if run rate is larger than config run rate bool checkRunRate(float configRunningRate, const RunRateInfo* info); @@ -204,5 +203,3 @@ class AiqCore { }; } /* namespace icamera */ - -#endif // AIQ_CORE_H diff --git a/src/3a/AiqEngine.cpp b/src/3a/AiqEngine.cpp index 0fd4302..a2e348f 100644 --- a/src/3a/AiqEngine.cpp +++ b/src/3a/AiqEngine.cpp @@ -123,13 +123,13 @@ int AiqEngine::run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, in if (aiqRun) { mAiqRunningHistory.aiqResult = aiqResult; mAiqRunningHistory.ccaId = ccaId; - mAiqRunningHistory.statsSequnce = aiqStats != nullptr ? aiqStats->mSequence : -1; + mAiqRunningHistory.statsSequence = aiqStats != nullptr ? aiqStats->mSequence : -1; } if (effectSeq != nullptr) { *effectSeq = mAiqResultStorage->getAiqResult()->mSequence; - LOG2("%s, effect sequence %ld, statsSequnce %ld", __func__, *effectSeq, - mAiqRunningHistory.statsSequnce); + LOG2("%s, effect sequence %ld, statsSequence %ld", __func__, *effectSeq, + mAiqRunningHistory.statsSequence); } PlatformData::saveMakernoteData(mCameraId, dataContext->mAiqParams.makernoteMode, @@ -152,7 +152,7 @@ void AiqEngine::handleEvent(EventData eventData) { int AiqEngine::prepareStatsParams(const aiq_parameter_t& aiqParams, cca::cca_stats_params* statsParams, - AiqStatistics* aiqStatistics, AiqResult* aiqResult) { + const AiqStatistics* aiqStatistics, AiqResult* aiqResult) { LOG2("%s, sequence %ld", __func__, aiqStatistics->mSequence); // update face detection related parameters @@ -209,8 +209,8 @@ int AiqEngine::prepareStatsParams(const aiq_parameter_t& aiqParams, statsParams->dvs_stats_width = resolution.output_width; } - statsParams->frame_id = aiqResult != nullptr ? aiqResult->mFrameId : -1; - statsParams->frame_timestamp = timestamp; + statsParams->frame_id = aiqResult != nullptr ? aiqResult->mFrameId : 0; + statsParams->frame_timestamp = static_cast(timestamp); statsParams->camera_orientation = ia_aiq_camera_orientation_unknown; } while (0); @@ -239,7 +239,7 @@ void AiqEngine::setAiqResult(const aiq_parameter_t& aiqParams, AiqResult* aiqRes mLensManager->setLensResult(aiqResult->mAfResults, aiqResult->mSequence, aiqParams); } -int AiqEngine::getSkippingNum(AiqResult* aiqResult) { +int AiqEngine::getSkippingNum(const AiqResult* aiqResult) { int skipNum = 0; if (!mFirstAiqRunning) { @@ -256,7 +256,7 @@ int AiqEngine::getSkippingNum(AiqResult* aiqResult) { return skipNum; } -bool AiqEngine::needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId) { +bool AiqEngine::needRun3A(const AiqStatistics* aiqStatistics, int64_t ccaId) { // Force to run 3a for per-frame control case if (mAiqRunningForPerframe) { return true; @@ -277,8 +277,8 @@ bool AiqEngine::needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId) { return false; } - if (mAiqRunningHistory.statsSequnce == aiqStatistics->mSequence) { - LOG2("no new stats skip, statsSequnce = %ld", aiqStatistics->mSequence); + if (mAiqRunningHistory.statsSequence == aiqStatistics->mSequence) { + LOG2("no new stats skip, statsSequence = %ld", aiqStatistics->mSequence); return false; } else if (mSensorManager->getCurrentExposureAppliedDelay() > kMaxExposureAppliedDelay) { LOG2("exposure setting applied delay is too larger, skip it"); diff --git a/src/3a/AiqEngine.h b/src/3a/AiqEngine.h index f0c05c6..90ac87f 100644 --- a/src/3a/AiqEngine.h +++ b/src/3a/AiqEngine.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_ENGINE_H -#define AIQ_ENGINE_H - +#pragma once #include "AiqCore.h" #include "AiqResult.h" #include "AiqResultStorage.h" @@ -76,19 +74,19 @@ class AiqEngine : public EventListener { /** * \brief handle event */ - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); int prepareStatsParams(const aiq_parameter_t& aiqParams, - cca::cca_stats_params* statsParams, AiqStatistics* aiqStatistics, + cca::cca_stats_params* statsParams, const AiqStatistics* aiqStatistics, AiqResult* aiqResult); // Handle AIQ results except Exposure results which are handled in setSensorExposure void setAiqResult(const aiq_parameter_t& aiqParams, AiqResult* aiqResult, bool skip); void setSensorExposure(AiqResult* aiqResult, int64_t applyingSeq = -1); - int getSkippingNum(AiqResult* aiqResult); + int getSkippingNum(const AiqResult* aiqResult); - bool needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId); + bool needRun3A(const AiqStatistics* aiqStatistics, int64_t ccaId); enum AiqState { AIQ_STATE_IDLE = 0, @@ -132,7 +130,7 @@ class AiqEngine : public EventListener { struct AiqRunningHistory { AiqResult* aiqResult; int64_t ccaId; - int64_t statsSequnce; + int64_t statsSequence; }; AiqRunningHistory mAiqRunningHistory; @@ -142,4 +140,3 @@ class AiqEngine : public EventListener { } /* namespace icamera */ -#endif // AIQ_ENGINE_H diff --git a/src/3a/AiqResult.h b/src/3a/AiqResult.h index 1c9c7ff..87c19cf 100644 --- a/src/3a/AiqResult.h +++ b/src/3a/AiqResult.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_RESULT_H -#define AIQ_RESULT_H +#pragma once #include "AiqUtils.h" #include "AiqSetting.h" @@ -74,5 +73,3 @@ class AiqResult { }; } /* namespace icamera */ - -#endif // AIQ_RESULT_H diff --git a/src/3a/AiqResultStorage.h b/src/3a/AiqResultStorage.h index 58a0d1b..35f0d37 100644 --- a/src/3a/AiqResultStorage.h +++ b/src/3a/AiqResultStorage.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_RESULT_STORAGE_H -#define AIQ_RESULT_STORAGE_H +#pragma once #include @@ -66,10 +65,10 @@ class AiqResultStorage { * * param[in] int64_t sequence: specify which aiq result is needed. * - * return 1. when sequence id is -1 or not provided, the lastest result will be returned. + * return 1. when sequence id is -1 or not provided, the latest result will be returned. * 2. when sequence id is larger than -1, the result with gaven sequence id will be returned. * 3. if cannot find in result storage, it means either sequence id is too old and its - * result was overrided, or the sequence id is too new, and its result has not been + * result was overridden, or the sequence id is too new, and its result has not been * saved into storage yet. For both cases, nullptr will be returned. */ const AiqResult* getAiqResult(int64_t sequence = -1); @@ -99,7 +98,7 @@ class AiqResultStorage { const AiqStatistics* getAndLockAiqStatistics(); /** - * \brief Clear the mInUse flag of all the AIQ statitics in internal storage. + * \brief Clear the mInUse flag of all the AIQ statistics in internal storage. */ void unLockAiqStatistics(); @@ -145,5 +144,3 @@ class AiqResultStorage { }; } //namespace icamera - -#endif // AIQ_RESULT_STORAGE_H diff --git a/src/3a/AiqSetting.h b/src/3a/AiqSetting.h index 1c63788..3b547e5 100644 --- a/src/3a/AiqSetting.h +++ b/src/3a/AiqSetting.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_SETTING_H -#define AIQ_SETTING_H +#pragma once #include "CameraTypes.h" #include "ParamDataType.h" @@ -117,5 +116,3 @@ struct aiq_parameter_t { }; } /* namespace icamera */ - -#endif // AIG_SETTING_H diff --git a/src/3a/AiqUnit.cpp b/src/3a/AiqUnit.cpp index 59c2a6c..85b721a 100644 --- a/src/3a/AiqUnit.cpp +++ b/src/3a/AiqUnit.cpp @@ -33,7 +33,8 @@ AiqUnit::AiqUnit(int cameraId, SensorHwCtrl *sensorHw, LensHw *lensHw) : mCameraId(cameraId), mAiqUnitState(AIQ_UNIT_NOT_INIT), mOperationMode(CAMERA_STREAM_CONFIGURATION_MODE_NORMAL), - mCcaInitialized(false) { + mCcaInitialized(false), + mActiveStreamCount(0U) { mAiqEngine = new AiqEngine(cameraId, sensorHw, lensHw); } @@ -75,19 +76,31 @@ int AiqUnit::configure(const stream_config_t *streamList) { AutoMutex l(mAiqUnitLock); LOG1("@%s", mCameraId, __func__); + std::vector configModes; + PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, + configModes); + if ((mAiqUnitState == AIQ_UNIT_CONFIGURED) && (mOperationMode == streamList->operation_mode)) { - LOG2("%s: already configured in the same mode: %d", __func__, mOperationMode); - return OK; - } + std::vector streamIds; + if (configModes.empty() == false) { + std::shared_ptr graphConfig = + CameraContext::getInstance(mCameraId)->getGraphConfig(configModes[0]); + if (graphConfig != nullptr) { + graphConfig->graphGetStreamIds(streamIds, false); + } + } - if ((mAiqUnitState != AIQ_UNIT_INIT) && (mAiqUnitState != AIQ_UNIT_STOP)) { + if (streamIds.size() == mActiveStreamCount) { + LOG2("%s: already configured in the same mode: %d", __func__, mOperationMode); + return OK; + } + } else if ((mAiqUnitState != AIQ_UNIT_INIT) && (mAiqUnitState != AIQ_UNIT_STOP)) { LOGW("%s: configure in wrong state: %d", __func__, mAiqUnitState); return BAD_VALUE; + } else { + LOG2("%s: configure CCA handle", __func__); } - std::vector configModes; - PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, - configModes); const int ret = initIntelCcaHandle(configModes); CheckAndLogError(ret < 0, BAD_VALUE, "@%s failed to create intel cca handle", __func__); @@ -97,12 +110,11 @@ int AiqUnit::configure(const stream_config_t *streamList) { } int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { - if (mCcaInitialized) { - return OK; - } + deinitIntelCcaHandle(); LOG1("@%s", mCameraId, __func__); mTuningModes.clear(); + std::vector streamIds; for (const auto &cfg : configModes) { TuningMode tuningMode; int ret = PlatformData::getTuningModeByConfigMode(mCameraId, cfg, tuningMode); @@ -163,7 +175,7 @@ int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { std::shared_ptr graphConfig = CameraContext::getInstance(mCameraId)->getGraphConfig(cfg); if (graphConfig != nullptr) { - std::vector streamIds; + streamIds.clear(); graphConfig->graphGetStreamIds(streamIds, false); params->aic_stream_ids.count = streamIds.size(); CheckAndLogError(streamIds.size() > cca::MAX_STREAM_NUM, UNKNOWN_ERROR, @@ -192,6 +204,7 @@ int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { dumpCcaInitParam(*params); } + mActiveStreamCount = streamIds.size(); mCcaInitialized = true; return OK; } @@ -231,6 +244,7 @@ void AiqUnit::deinitIntelCcaHandle() { } mCcaInitialized = false; + mActiveStreamCount = 0U; } int AiqUnit::start() { diff --git a/src/3a/AiqUnit.h b/src/3a/AiqUnit.h index 60c795e..9dca2cf 100644 --- a/src/3a/AiqUnit.h +++ b/src/3a/AiqUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_UNIT_H -#define AIQ_UNIT_H - +#pragma once #ifdef IPA_SANDBOXING #include "CcaClient.h" #else @@ -77,27 +75,27 @@ class AiqUnit : public AiqUnitBase { /** * \brief Init 3a related objects */ - void init(); + virtual void init(); /** * \brief Deinit 3a related objects */ - void deinit(); + virtual void deinit(); /** * \brief configure 3a engine with stream configuration */ - int configure(const stream_config_t *streamList); + virtual int configure(const stream_config_t *streamList); /** * \brief Start 3a Engine */ - int start(); + virtual int start(); /** * \brief Stop 3a Engine */ - void stop(); + virtual void stop(); /** * \brief Run 3a to get new 3a settings. @@ -111,17 +109,17 @@ class AiqUnit : public AiqUnitBase { * * Return 0 if the operation succeeds. */ - int run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, int64_t* effectSeq); + virtual int run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, int64_t* effectSeq); /** * \brief Get software EventListener */ - std::vector getSofEventListener(); + virtual std::vector getSofEventListener(); /** * \brief Get stats EventListener */ - std::vector getStatsEventListener(); + virtual std::vector getStatsEventListener(); private: DISALLOW_COPY_AND_ASSIGN(AiqUnit); @@ -152,8 +150,8 @@ class AiqUnit : public AiqUnitBase { std::vector mTuningModes; bool mCcaInitialized; + size_t mActiveStreamCount; }; } /* namespace icamera */ -#endif // AIQ_UNIT_H diff --git a/src/3a/AiqUtils.cpp b/src/3a/AiqUtils.cpp index 4ed2f15..4f9ec24 100644 --- a/src/3a/AiqUtils.cpp +++ b/src/3a/AiqUtils.cpp @@ -102,6 +102,7 @@ void AiqUtils::dumpAfResults(const cca::cca_af_results& afResult) { case ia_aiq_af_status_idle: default: LOG3("AF state idle"); + break; } } @@ -173,36 +174,46 @@ void AiqUtils::dumpSaResults(const cca::cca_sa_results& saResult) { } int AiqUtils::convertError(ia_err iaErr) { + int ret; switch (iaErr) { case ia_err_none: - return OK; + ret = OK; + break; case ia_err_general: - return UNKNOWN_ERROR; + ret = UNKNOWN_ERROR; + break; case ia_err_nomemory: - return NO_MEMORY; + ret = NO_MEMORY; + break; case ia_err_data: - return BAD_VALUE; + ret = BAD_VALUE; + break; case ia_err_internal: - return INVALID_OPERATION; + ret = INVALID_OPERATION; + break; case ia_err_argument: - return BAD_VALUE; + ret = BAD_VALUE; + break; default: - return UNKNOWN_ERROR; + ret = UNKNOWN_ERROR; + break; } + return ret; } /** * Convert SensorFrameParams defined in PlatformData to ia_aiq_frame_params in aiq */ void AiqUtils::convertToAiqFrameParam(const SensorFrameParams &sensor, ia_aiq_frame_params &aiq) { - aiq.cropped_image_height = sensor.cropped_image_height; - aiq.cropped_image_width = sensor.cropped_image_width; - aiq.horizontal_crop_offset = sensor.horizontal_crop_offset; - aiq.horizontal_scaling_denominator = sensor.horizontal_scaling_denominator; - aiq.horizontal_scaling_numerator = sensor.horizontal_scaling_numerator; - aiq.vertical_crop_offset = sensor.vertical_crop_offset; - aiq.vertical_scaling_denominator = sensor.vertical_scaling_denominator; - aiq.vertical_scaling_numerator = sensor.vertical_scaling_numerator; + aiq.cropped_image_height = static_cast(sensor.cropped_image_height); + aiq.cropped_image_width = static_cast(sensor.cropped_image_width); + aiq.horizontal_crop_offset = static_cast(sensor.horizontal_crop_offset); + aiq.horizontal_scaling_denominator = + static_cast(sensor.horizontal_scaling_denominator); + aiq.horizontal_scaling_numerator = static_cast(sensor.horizontal_scaling_numerator); + aiq.vertical_crop_offset = static_cast(sensor.vertical_crop_offset); + aiq.vertical_scaling_denominator = static_cast(sensor.vertical_scaling_denominator); + aiq.vertical_scaling_numerator = static_cast(sensor.vertical_scaling_numerator); } camera_coordinate_t AiqUtils::convertCoordinateSystem(const camera_coordinate_system_t& srcSystem, @@ -252,7 +263,7 @@ camera_window_t AiqUtils::convertToIaWindow(const camera_coordinate_system_t& sr * Map user input manual gain(0, 255) to (AWB_GAIN_NORMALIZED_START, AWB_GAIN_NORMALIZED_END) */ float AiqUtils::normalizeAwbGain(int gain) { - gain = CLIP(gain, AWB_GAIN_MAX, AWB_GAIN_MIN); + gain = CLIP(gain, static_cast(AWB_GAIN_MAX), static_cast(AWB_GAIN_MIN)); return static_cast(AWB_GAIN_NORMALIZED_START) + (static_cast(gain) - AWB_GAIN_MIN) * static_cast(AWB_GAIN_RANGE_NORMALIZED) / @@ -260,7 +271,8 @@ float AiqUtils::normalizeAwbGain(int gain) { } int AiqUtils::convertToUserAwbGain(float normalizedGain) { - normalizedGain = CLIP(normalizedGain, AWB_GAIN_NORMALIZED_START, AWB_GAIN_NORMALIZED_END); + normalizedGain = CLIP(normalizedGain, static_cast(AWB_GAIN_NORMALIZED_START), + static_cast(AWB_GAIN_NORMALIZED_END)); return AWB_GAIN_MIN + (normalizedGain - AWB_GAIN_NORMALIZED_START) * \ AWB_GAIN_RANGE_USER / AWB_GAIN_RANGE_NORMALIZED; } @@ -315,26 +327,34 @@ float AiqUtils::convertSpeedModeToTimeForHDR(camera_converge_speed_t mode) { * Convert frame usage to ia_aiq_frame_use */ ia_aiq_frame_use AiqUtils::convertFrameUsageToIaFrameUsage(int frameUsage) { + ia_aiq_frame_use ret; switch (frameUsage) { case FRAME_USAGE_VIDEO: - return ia_aiq_frame_use_video; + ret = ia_aiq_frame_use_video; + break; case FRAME_USAGE_STILL: - return ia_aiq_frame_use_still; + ret = ia_aiq_frame_use_still; + break; case FRAME_USAGE_CONTINUOUS: - return ia_aiq_frame_use_continuous; + ret = ia_aiq_frame_use_continuous; + break; + default: + ret = ia_aiq_frame_use_preview; + break; } - return ia_aiq_frame_use_preview; + return ret; } void AiqUtils::applyTonemapGamma(float gamma, cca::cca_gbce_params* results) { CheckAndLogError(gamma < EPSILON, VOID_VALUE, "Bad gamma %f", gamma); - CheckAndLogError(!results, VOID_VALUE, "gbce results nullptr"); + CheckAndLogError(results == nullptr, VOID_VALUE, "gbce results nullptr"); int lutSize = results->gamma_lut_size; CheckAndLogError(lutSize < MIN_TONEMAP_POINTS, VOID_VALUE, "Bad gamma lut size (%d) in gbce results", lutSize); for (int i = 0; i < lutSize; i++) { - results->g_gamma_lut[i] = pow(i / static_cast(lutSize), 1 / gamma); + results->g_gamma_lut[i] = + static_cast(pow(i / static_cast(lutSize), 1 / gamma)); } MEMCPY_S(results->b_gamma_lut, lutSize * sizeof(float), diff --git a/src/3a/AiqUtils.h b/src/3a/AiqUtils.h index 146d651..a28db6e 100644 --- a/src/3a/AiqUtils.h +++ b/src/3a/AiqUtils.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_UTILS_H -#define AIQ_UTILS_H +#pragma once #include "CameraTypes.h" #include "ParamDataType.h" @@ -161,5 +160,3 @@ template int resize2dArray( float calculateHyperfocalDistance(const cca::cca_cmc &cmc); } // namespace AiqUtils } // namespace icamera - -#endif // AIQ_UTILS_H diff --git a/src/3a/I3AControlFactory.h b/src/3a/I3AControlFactory.h index 0f4eb7e..8d9a752 100644 --- a/src/3a/I3AControlFactory.h +++ b/src/3a/I3AControlFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef I3A_CONTROL_FACTORY_H -#define I3A_CONTROL_FACTORY_H +#pragma once #include "AiqUnit.h" #include "SensorHwCtrl.h" @@ -43,5 +42,3 @@ class I3AControlFactory { }; } /* namespace icamera */ - -#endif // I3A_CONTROL_FACTORY_H diff --git a/src/3a/LensManager.h b/src/3a/LensManager.h index 5364ba1..f911557 100644 --- a/src/3a/LensManager.h +++ b/src/3a/LensManager.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LENS_MANAGER_H -#define LENS_MANAGER_H +#pragma once #include @@ -69,7 +68,7 @@ class LensManager { private: DISALLOW_COPY_AND_ASSIGN(LensManager); - void setFocusPosition(int focusPostion); + void setFocusPosition(int focusPosition); private: int mCameraId; @@ -85,5 +84,3 @@ class LensManager { }; } /* namespace icamera */ - -#endif // LENS_MANAGER_H diff --git a/src/3a/MakerNote.h b/src/3a/MakerNote.h index 87ddc8a..a47dcb2 100644 --- a/src/3a/MakerNote.h +++ b/src/3a/MakerNote.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef MAKER_NOTE_H -#define MAKER_NOTE_H - +#pragma once #include #include #include @@ -126,4 +124,3 @@ class MakerNote { } // namespace icamera -#endif // MAKER_NOTE_H diff --git a/src/3a/SensorManager.cpp b/src/3a/SensorManager.cpp index 9377ae9..7ab99b7 100644 --- a/src/3a/SensorManager.cpp +++ b/src/3a/SensorManager.cpp @@ -220,9 +220,9 @@ uint32_t SensorManager::updateSensorExposure(SensorExpGroup sensorExposures, int } if (effectSeq > 0) { - int sensorSeq = mLastSofSequence + mExposureDataMap.size() + 1; + int sensorSeq = mLastSofSequence + static_cast(mExposureDataMap.size()) + 1; if ((applyingSeq > 0) && (applyingSeq == mLastSofSequence)) { - sensorSeq = applyingSeq; + sensorSeq = static_cast(applyingSeq); mSensorHwCtrl->setFrameDuration(exposureData.lineLengthPixels, exposureData.frameLengthLines); mSensorHwCtrl->setExposure(exposureData.coarseExposures, exposureData.fineExposures); @@ -326,18 +326,24 @@ int SensorManager::getSensorModeData(ia_aiq_exposure_sensor_descriptor& sensorDa status = mSensorHwCtrl->getActivePixelArraySize(width, height, pixelCode); CheckAndLogError(status != OK, status, "Failed to get active pixel array size ret:%d", status); - int pixel_periods_per_line, line_periods_per_field; + int pixel_periods_per_line; + int line_periods_per_field; status = mSensorHwCtrl->getFrameDuration(pixel_periods_per_line, line_periods_per_field); CheckAndLogError(status != OK, status, "Failed to get frame Durations ret:%d", status); - sensorData.pixel_periods_per_line = CLIP(pixel_periods_per_line, USHRT_MAX, 0); - sensorData.line_periods_per_field = CLIP(line_periods_per_field, USHRT_MAX, 0); + sensorData.pixel_periods_per_line = CLIP(pixel_periods_per_line, USHRT_MAX, + static_cast(0)); + sensorData.line_periods_per_field = CLIP(line_periods_per_field, USHRT_MAX, + static_cast(0)); - int coarse_int_time_min, integration_step = 0, integration_max = 0; + int coarse_int_time_min; + int integration_step = 0; + int integration_max = 0; status = mSensorHwCtrl->getExposureRange(coarse_int_time_min, integration_max, integration_step); CheckAndLogError(status != OK, status, "Failed to get Exposure Range ret:%d", status); - sensorData.coarse_integration_time_min = CLIP(coarse_int_time_min, USHRT_MAX, 0); + sensorData.coarse_integration_time_min = CLIP(coarse_int_time_min, USHRT_MAX, + static_cast(0)); sensorData.coarse_integration_time_max_margin = PlatformData::getCITMaxMargin(mCameraId); // fine integration is not supported by v4l2 diff --git a/src/3a/SensorManager.h b/src/3a/SensorManager.h index adfa15f..e6549b6 100644 --- a/src/3a/SensorManager.h +++ b/src/3a/SensorManager.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SENSOR_MANAGER_H -#define SENSOR_MANAGER_H - +#pragma once #include #include "iutils/Thread.h" @@ -104,9 +102,9 @@ class SensorManager { int mAnalogGainDelay; // Analog gain delay comparing exposure int mDigitalGainDelay; // Digital gain delay comparing exposure - // fisrt: sequence id, second: analog gain vector + // first: sequence id, second: analog gain vector std::map> mAnalogGainMap; - // fisrt: sequence id, second: digital gain vector + // first: sequence id, second: digital gain vector std::map> mDigitalGainMap; typedef struct { std::vector coarseExposures; @@ -122,4 +120,3 @@ class SensorManager { } /* namespace icamera */ -#endif // SENSOR_MANAGER_H diff --git a/src/3a/intel3a/Intel3AParameter.cpp b/src/3a/intel3a/Intel3AParameter.cpp index 3a1a24b..f76c01b 100644 --- a/src/3a/intel3a/Intel3AParameter.cpp +++ b/src/3a/intel3a/Intel3AParameter.cpp @@ -35,11 +35,11 @@ #include "modules/algowrapper/IntelCca.h" #endif -namespace icamera { - #define VALID_COLOR_GAINS(colorGains) \ ((colorGains[0] > 0) && (colorGains[1] > 0) && (colorGains[2] > 0) && (colorGains[3] > 0)) +namespace icamera { + Intel3AParameter::Intel3AParameter(int cameraId) : mCameraId(cameraId), mTestPatternMode(TEST_PATTERN_OFF), @@ -186,7 +186,7 @@ void Intel3AParameter::updateAeResult(cca::cca_ae_results* aeResult) const { float Intel3AParameter::convertdBGainToISO(float sensitivityGain, int baseIso) const { // Convert db Gain to ISO - float manualGain = pow(10, (sensitivityGain / 20)); + float manualGain = static_cast(pow(10, (sensitivityGain / 20))); manualGain *= static_cast(baseIso); return manualGain; } @@ -258,7 +258,8 @@ void Intel3AParameter::setManualExposure(const aiq_parameter_t& param) { camera_range_t range = {}; if (PlatformData::getSupportAeExposureTimeRange(mCameraId, param.sceneMode, range) == OK) { - manualExpTimeUs = CLIP(manualExpTimeUs, range.max, range.min); + manualExpTimeUs = CLIP(manualExpTimeUs, static_cast(range.max), + static_cast(range.min)); } for (unsigned int i = 0U; i < mAeParams.num_exposures - 1; i++) { @@ -280,7 +281,7 @@ void Intel3AParameter::setManualGain(const aiq_parameter_t& param) { // Convert db to sensor analog gain. for (unsigned int i = 0U; i < mAeParams.num_exposures; i++) { - mAeParams.manual_analog_gain[i] = pow(10, (manualGain / 20)); + mAeParams.manual_analog_gain[i] = static_cast(pow(10, (manualGain / 20))); } } @@ -469,7 +470,7 @@ void Intel3AParameter::updateAwbResult(cca::cca_awb_results* awbResult) { const float MAX_PER_G = static_cast(AWB_GAIN_NORMALIZED_START) / static_cast(AWB_GAIN_NORMALIZED_END); - const float MIN_PER_G = 1.0 / MAX_PER_G; + const float MIN_PER_G = static_cast(1.0 / MAX_PER_G); if (mUseManualAwbGain) { awbResult->accurate_b_per_g = CLIP((normalizedB / normalizedG), MAX_PER_G, MIN_PER_G); @@ -602,7 +603,8 @@ void Intel3AParameter::updateAfParameter(const aiq_parameter_t& param) { } mAfParams.lens_position = param.lensPosition; - mAfParams.lens_movement_start_timestamp = param.lensMovementStartTimestamp; + mAfParams.lens_movement_start_timestamp = + static_cast(param.lensMovementStartTimestamp); mAfParams.frame_use = AiqUtils::convertFrameUsageToIaFrameUsage(param.frameUsage); // Trigger @@ -681,6 +683,7 @@ void Intel3AParameter::updateAfParameterForAfTriggerStart() { // Continue the current scan and check the af result later break; default: + // No such AF mode and do nothing break; } } @@ -696,11 +699,12 @@ void Intel3AParameter::updateAfParameterForAfTriggerCancel() { mAfParams.focus_mode = ia_aiq_af_operation_mode_infinity; break; default: + // Do not need to update focus mode break; } } -void Intel3AParameter::fillAfTriggerResult(cca::cca_af_results* afResults) { +void Intel3AParameter::fillAfTriggerResult(const cca::cca_af_results* afResults) { if ((afResults == nullptr) || (!mAfForceLock)) { return; } @@ -715,6 +719,7 @@ void Intel3AParameter::fillAfTriggerResult(cca::cca_af_results* afResults) { (afResults->status != ia_aiq_af_status_extended_search); break; default: + // No need to update lock break; } } diff --git a/src/3a/intel3a/Intel3AParameter.h b/src/3a/intel3a/Intel3AParameter.h index 5767e3b..6f8bb05 100644 --- a/src/3a/intel3a/Intel3AParameter.h +++ b/src/3a/intel3a/Intel3AParameter.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef INTEL_3A_PARAMETER_H -#define INTEL_3A_PARAMETER_H +#pragma once #include "AiqSetting.h" #include "AiqUtils.h" @@ -40,7 +39,7 @@ class Intel3AParameter { void updateAwbResult(cca::cca_awb_results* awbResult); void updatePaResult(cca::cca_pa_params* paResult); - void fillAfTriggerResult(cca::cca_af_results* afResults); + void fillAfTriggerResult(const cca::cca_af_results* afResults); private: void initAeParameter(); @@ -98,5 +97,3 @@ class Intel3AParameter { }; } /* namespace icamera */ - -#endif // INTEL_3A_PARAMETER_H diff --git a/src/core/BufferInterface.h b/src/core/BufferInterface.h new file mode 100644 index 0000000..bb458db --- /dev/null +++ b/src/core/BufferInterface.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2025 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "CameraBuffer.h" +#include "CameraEvent.h" + +/** + * These are the abstract Classes for buffer communication between different class of HAL + */ +namespace icamera { + +class BufferProducer; + +/** + * BufferConsumer listens on the onBufferAvailable event from the producer by + * calling setBufferProducer + */ +class BufferConsumer { + public: + virtual ~BufferConsumer() {} + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual void setBufferProducer(BufferProducer* producer) = 0; +}; + +/** + * BufferProcuder get the buffers from consumer by "qbuf". + * Notify the consumer by calling the onBufferAvailable interface of consumer. + * The consumer must be registered by "addFrameAvailableListener" before getting + * any buffer done notification. + */ +class BufferProducer : public EventSource { + public: + explicit BufferProducer(int memType = V4L2_MEMORY_USERPTR); + virtual int qbuf(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual void addFrameAvailableListener(BufferConsumer* listener) = 0; + virtual void removeFrameAvailableListener(BufferConsumer* listener) = 0; + int getMemoryType(void) const { return mMemType; } + + private: + int mMemType; +}; + +} // namespace icamera diff --git a/src/core/BufferQueue.cpp b/src/core/BufferQueue.cpp index 348b6d7..888a97c 100644 --- a/src/core/BufferQueue.cpp +++ b/src/core/BufferQueue.cpp @@ -27,7 +27,9 @@ BufferProducer::BufferProducer(int memType) : mMemType(memType) { LOG1("@%s BufferProducer %p created mMemType: %d", __func__, this, mMemType); } -BufferQueue::BufferQueue() : mBufferProducer(nullptr) { +BufferQueue::BufferQueue() + : mBufferProducer(nullptr), + mThreadWaiting(true) { LOG1("@%s BufferQueue %p created", __func__, this); } @@ -51,7 +53,7 @@ int BufferQueue::queueInputBuffer(uuid port, const std::shared_ptr return OK; } -int BufferQueue::onFrameAvailable(uuid port, const std::shared_ptr& camBuffer) { +int BufferQueue::onBufferAvailable(uuid port, const std::shared_ptr& camBuffer) { AutoMutex l(mBufferQueueLock); return queueInputBuffer(port, camBuffer); @@ -142,6 +144,10 @@ void BufferQueue::getFrameInfo(std::map& inputInfo, outputInfo = mOutputFrameInfo; } +void BufferQueue::setThreadWaiting(bool waiting) { + mThreadWaiting = waiting; +} + int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, std::map >& buffer, std::map& bufferQueue, @@ -156,6 +162,10 @@ int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, const std::cv_status status = mFrameAvailableSignal.wait_for( lock, std::chrono::nanoseconds(timeout)); + if (!mThreadWaiting) { + return -1; // Already stopped + } + if (status == std::cv_status::timeout) { return TIMED_OUT; } @@ -163,6 +173,7 @@ int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, if (cameraBufQ.empty()) { return NOT_ENOUGH_DATA; } + // Wake up from the buffer available buffer[port] = cameraBufQ.front(); } @@ -209,8 +220,12 @@ int BufferQueue::getFreeBuffersInQueue(std::map >& continue; } for (auto& it : mBufferConsumerList) { - it->onFrameAvailable(port, outBuf); + it->onBufferAvailable(port, outBuf); } } } diff --git a/src/core/BufferQueue.h b/src/core/BufferQueue.h index 6aa4f0b..2e11a7b 100644 --- a/src/core/BufferQueue.h +++ b/src/core/BufferQueue.h @@ -14,56 +14,21 @@ * limitations under the License. */ -#ifndef BUFFER_QUEUE_H -#define BUFFER_QUEUE_H +#pragma once #include #include #include +#include "BufferInterface.h" #include "CameraBuffer.h" #include "CameraEvent.h" #include "iutils/Errors.h" #include "iutils/Thread.h" #include "StageDescriptor.h" -/** - * These are the abstract Classes for buffer communication between different class of HAL - */ namespace icamera { -class BufferProducer; - -/** - * BufferConsumer listens on the onFrameAvailable event from the producer by - * calling setBufferProducer - */ -class BufferConsumer { - public: - virtual ~BufferConsumer() {} - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual void setBufferProducer(BufferProducer* producer) = 0; -}; - -/** - * BufferProcuder get the buffers from consumer by "qbuf". - * Notfiy the consumer by calling the onFramAvaible interface of consumer. - * The consumer must be registered by "addFrameAvailableListener" before getting - * any buffer done notification. - */ -class BufferProducer : public EventSource { - public: - explicit BufferProducer(int memType = V4L2_MEMORY_USERPTR); - virtual int qbuf(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual void addFrameAvailableListener(BufferConsumer* listener) = 0; - virtual void removeFrameAvailableListener(BufferConsumer* listener) = 0; - int getMemoryType(void) const { return mMemType; } - - private: - int mMemType; -}; - class BufferQueue : public BufferConsumer, public BufferProducer, public EventListener { public: BufferQueue(); @@ -74,7 +39,7 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi * * Push the CameraBuffer to InputQueue and send a signal if needed */ - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); /** * \brief Register the BufferProducer @@ -161,7 +126,11 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi */ int allocProducerBuffers(int camId, int bufNum); - protected: + /** + * \brief set thread waiting + */ + void setThreadWaiting(bool waiting); + BufferProducer* mBufferProducer; std::vector mBufferConsumerList; @@ -178,10 +147,10 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi Mutex mBufferQueueLock; std::condition_variable mFrameAvailableSignal; + bool mThreadWaiting; // true if the thread is running, false if stopped + private: int queueInputBuffer(uuid port, const std::shared_ptr& camBuffer); }; } // namespace icamera - -#endif // BUFFER_QUEUE_H diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8f1ef04..acd6d9e 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -27,7 +27,6 @@ set(CORE_SRCS # IPU7_SOURCE_FILE_S set(CORE_SRCS ${CORE_SRCS} - ${CORE_DIR}/CameraBufferPool.cpp ${CORE_DIR}/CameraDevice.cpp ${CORE_DIR}/CameraContext.cpp ${CORE_DIR}/CameraStream.cpp @@ -41,14 +40,6 @@ set(CORE_SRCS ) # IPU7_SOURCE_FILE_E -# FRAME_SYNC_S - set(CORE_SRCS - ${CORE_SRCS} - ${CORE_DIR}/SyncManager.cpp - CACHE INTERNAL "core sources" - ) -# FRAME_SYNC_E - # CSI_META_S set(CORE_SRCS ${CORE_SRCS} diff --git a/src/core/CameraBuffer.cpp b/src/core/CameraBuffer.cpp index d78d084..83e305f 100644 --- a/src/core/CameraBuffer.cpp +++ b/src/core/CameraBuffer.cpp @@ -233,6 +233,7 @@ void CameraBuffer::freeMemory() { default: LOGE("Free camera buffer failed, due to memory %d type is not implemented yet.", mV.Memory()); + break; } } @@ -339,7 +340,7 @@ void CameraBuffer::updateUserBuffer(void) { mU->s.field = getField(); // Use valid setting sequence to align shutter/parameter with buffer - mU->sequence = (mSettingSequence < 0) ? getSequence() : mSettingSequence; + mU->sequence = (mSettingSequence < 0) ? getSequence() : static_cast(mSettingSequence); } void CameraBuffer::updateFlags(void) { @@ -351,8 +352,8 @@ void CameraBuffer::updateFlags(void) { if (((mU->flags & BUFFER_FLAG_SW_READ) != 0U) || ((mU->flags & BUFFER_FLAG_SW_WRITE) != 0U)) { set = false; } - - mV.SetFlags(set ? (mV.Flags() | flag) : (mV.Flags() & (~flag))); + const auto f = static_cast(mV.Flags()); + mV.SetFlags(set ? (f | flag) : (f & (~flag))); } bool CameraBuffer::isFlagsSet(uint32_t flag) const { @@ -360,29 +361,37 @@ bool CameraBuffer::isFlagsSet(uint32_t flag) const { } int CameraBuffer::getFd() { + int ret = -1; switch (mV.Memory()) { case V4L2_MEMORY_USERPTR: - return mV.Fd(0); + ret = mV.Fd(0); + break; case V4L2_MEMORY_DMABUF: case V4L2_MEMORY_MMAP: - return mU->dmafd; + ret = mU->dmafd; + break; default: LOGE("iomode %d is not supported yet.", mV.Memory()); - return -1; + break; } + return ret; } void* CameraBuffer::getBufferAddr() { + void* ret = nullptr; switch (mV.Memory()) { case V4L2_MEMORY_USERPTR: - return reinterpret_cast(mV.Userptr(0)); + ret = reinterpret_cast(mV.Userptr(0)); + break; case V4L2_MEMORY_DMABUF: case V4L2_MEMORY_MMAP: - return mU->addr; + ret = mU->addr; + break; default: LOGE("%s: Not supported memory type %u", __func__, mV.Memory()); - return nullptr; + break; } + return ret; } CameraBufferMapper::CameraBufferMapper(std::shared_ptr buffer) diff --git a/src/core/CameraBuffer.h b/src/core/CameraBuffer.h index 562da3c..8ecbf50 100644 --- a/src/core/CameraBuffer.h +++ b/src/core/CameraBuffer.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_BUFFER_H -#define CAMERA_BUFFER_H +#pragma once #include #include @@ -46,11 +45,9 @@ class CameraBuffer { static std::shared_ptr create(int srcWidth, int srcHeight, int size, int srcFmt, int index, void* buffer); - public: CameraBuffer(int memory, uint32_t size, int index); virtual ~CameraBuffer(); - public: // user buffer information int getWidth() const { return mU->s.width; } int getHeight() const { return mU->s.height; } @@ -133,7 +130,6 @@ class CameraBuffer { // Buffers are allocated the buffers by Camera int allocateMemory(V4L2VideoNode* vDevice = nullptr); - public: static void* mapDmaBufferAddr(int fd, unsigned int bufferSize); static void unmapDmaBufferAddr(void* addr, unsigned int bufferSize); @@ -199,5 +195,3 @@ class CameraBufferMapper { }; } // namespace icamera - -#endif // CAMERA_BUFFER_H diff --git a/src/core/CameraBufferPool.cpp b/src/core/CameraBufferPool.cpp deleted file mode 100644 index f0f5916..0000000 --- a/src/core/CameraBufferPool.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2022-2025 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG CameraBufferPool - -#include "CameraBufferPool.h" -#include "iutils/Utils.h" -#include "iutils/CameraLog.h" - -namespace icamera { - -CameraBufferPool::CameraBufferPool() { - LOG2("@%s", __func__); -} - -CameraBufferPool::~CameraBufferPool() { - LOG2("@%s", __func__); - destroyBufferPool(); -} - -status_t CameraBufferPool::createBufferPool(int cameraId, uint32_t numBufs, - const stream_t& stream) { - LOG1("@%s number of buffers:%d", __func__, numBufs); - std::lock_guard l(mLock); - mBuffers.clear(); - - for (uint32_t i = 0U; i < numBufs; i++) { - std::shared_ptr buffer = CameraBuffer::create(stream.memType, - stream.size, i, stream.format, stream.width, stream.height); - if (!buffer) { - mBuffers.clear(); - LOGE("failed to alloc %d internal buffers", i); - return NO_MEMORY; - } - - // Initialize the buffer status to free - mBuffers[buffer] = false; - } - - return OK; -} - -void CameraBufferPool::destroyBufferPool() { - LOG1("@%s Internal buffers size:%zu", __func__, mBuffers.size()); - - std::lock_guard l(mLock); - mBuffers.clear(); -} - -std::shared_ptr CameraBufferPool::acquireBuffer() { - std::lock_guard l(mLock); - for (auto& buf : mBuffers) { - if (!buf.second) { - buf.second = true; - return buf.first; - } - } - - LOGE("%s all the internal buffers are busy", __func__); - return nullptr; -} - -void CameraBufferPool::returnBuffer(std::shared_ptr buffer) { - std::lock_guard l(mLock); - for (auto& buf : mBuffers) { - if (buf.second && (buf.first == buffer)) { - buf.second = false; - return; - } - } - - LOGE("%s, the internal buffer addr:%p not found", __func__, buffer->getBufferAddr()); -} -} // namespace icamera diff --git a/src/core/CameraBufferPool.h b/src/core/CameraBufferPool.h deleted file mode 100644 index 3df77f0..0000000 --- a/src/core/CameraBufferPool.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2022-2025 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef CAMERA_BUFFER_POOL_H -#define CAMERA_BUFFER_POOL_H - -#include -#include - -#include "CameraBuffer.h" -#include "iutils/Errors.h" - -namespace icamera { - -/** - * \class CameraBufferPool - * - * This class is used to manage a memory pool based on CameraBuffer - * It needs to follow the calling sequence: - * createBufferPool -> acquireBuffer -> returnBuffer - */ -class CameraBufferPool { - public: - CameraBufferPool(); - ~CameraBufferPool(); - - status_t createBufferPool(int cameraId, uint32_t numBufs, const stream_t& stream); - void destroyBufferPool(); - std::shared_ptr acquireBuffer(); - void returnBuffer(std::shared_ptr buffer); - - private: - std::unordered_map, bool> mBuffers; - // first: CameraBuffer, second: true as buffer in used - std::mutex mLock; // lock the mBuffers -}; -} // namespace icamera - -#endif // CAMERA_BUFFER_POOL_H diff --git a/src/core/CameraContext.cpp b/src/core/CameraContext.cpp index 1e517a4..b6bb8fd 100644 --- a/src/core/CameraContext.cpp +++ b/src/core/CameraContext.cpp @@ -187,7 +187,8 @@ DataContext* CameraContext::getReprocessingDataContextBySeq(int64_t sequence) { auto it = mSeqToDataContextMap.upper_bound(sequence); if (it != mSeqToDataContextMap.begin()) { - *mDataContext[mCurrentIndex] = *(--it)->second; + --it; + *mDataContext[mCurrentIndex] = *(it)->second; } mDataContext[mCurrentIndex]->setSequence(sequence); mSeqToDataContextMap[sequence] = mDataContext[mCurrentIndex]; diff --git a/src/core/CameraContext.h b/src/core/CameraContext.h index c4bb57d..d7d88f4 100644 --- a/src/core/CameraContext.h +++ b/src/core/CameraContext.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_CONTEXT_H -#define CAMERA_CONTEXT_H +#pragma once #include #include @@ -174,5 +173,3 @@ class CameraContext { }; /* CameraContext */ } /* namespace icamera */ - -#endif // CAMERA_CONTEXT_H diff --git a/src/core/CameraDevice.cpp b/src/core/CameraDevice.cpp index 9bde18e..0c97709 100644 --- a/src/core/CameraDevice.cpp +++ b/src/core/CameraDevice.cpp @@ -94,7 +94,9 @@ CameraDevice::~CameraDevice() { mRequestThread->removeListener(EVENT_PROCESS_REQUEST, this); - for (int i = 0; i < MAX_STREAM_NUMBER; i++) delete mStreams[i]; + for (int i = 0; i < MAX_STREAM_NUMBER; i++) { + delete mStreams[i]; + } if (mGcMgr != nullptr) { delete mGcMgr; @@ -246,7 +248,7 @@ void CameraDevice::bindListeners() { } void CameraDevice::unbindListeners() { - if (mProcessingUnit) { + if (mProcessingUnit != nullptr) { vector statsListenerList = m3AControl->getStatsEventListener(); for (auto statsListener : statsListenerList) { mProcessingUnit->removeListener(EVENT_PSYS_STATS_BUF_READY, statsListener); @@ -323,7 +325,7 @@ int CameraDevice::configure(stream_config_t* streamList) { * 2. Config the graph * 3. Assign port for each stream * 4. Create the CameraStream classes - * 5. Create the procesor + * 5. Create the processor * 6. Bind the CameraStream to processor */ int inputRawStreamId = -1, preStreamIdForFace = -1, inputYuvStreamId = -1; @@ -388,12 +390,12 @@ int CameraDevice::configure(stream_config_t* streamList) { const int graphId = gc->getGraphId(); if (mScheduler != nullptr) { ret = mScheduler->configurate(graphId); - CheckAndLogError(ret != OK, ret, "@%s Faield to configure H-Scheduler", __func__); + CheckAndLogError(ret != OK, ret, "@%s Failed to configure H-Scheduler", __func__); } } ret = assignPortForStreams(streamList, inputRawStreamId, inputYuvStreamId, totalStream); - CheckAndLogError(ret < 0, ret, "@%s Faield to assign port for streams", __func__); + CheckAndLogError(ret < 0, ret, "@%s Failed to assign port for streams", __func__); ret = createStreams(streamList, totalStream); CheckAndLogError(ret < 0, ret, "@%s Failed to create streams", __func__); @@ -437,7 +439,7 @@ int CameraDevice::configure(stream_config_t* streamList) { CheckAndLogError(mProcessingUnit == nullptr, UNKNOWN_ERROR, "@%s Failed to create ProcessingUnit", __func__); - if (mProcessingUnit) { + if (mProcessingUnit != nullptr) { std::map outputConfigs; for (const auto& item : mStreamIdToPortMap) { outputConfigs[item.second] = ((item.first > 0) && (item.first == mFdStream.id)) ? @@ -524,17 +526,6 @@ std::map CameraDevice::selectProducerConfig(const stream_config_ } PlatformData::selectISysFormat(mCameraId, iSysFmt); - // Use the ISYS output if it's provided in media config section of config file. - stream_t mainConfig = PlatformData::getISysOutputByPort(mCameraId, MAIN_INPUT_PORT_UID); - mainConfig.memType = biggestStream.memType; - mainConfig.field = biggestStream.field; - - if ((mainConfig.width != 0) && (mainConfig.height != 0)) { - producerConfigs[MAIN_INPUT_PORT_UID] = mainConfig; - LOG2("%s: mcId %d, select the biggest stream", __func__, mcId); - return producerConfigs; - } - // Filter the ISYS best resolution with input stream const int inputWidth = mInputConfig.width; const int inputHeight = mInputConfig.height; @@ -549,6 +540,9 @@ std::map CameraDevice::selectProducerConfig(const stream_config_ } // Update the height according to the field(interlaced). + stream_t mainConfig = {}; + mainConfig.memType = biggestStream.memType; + mainConfig.field = biggestStream.field; mainConfig.format = PlatformData::getISysFormat(mCameraId); mainConfig.width = producerRes.width; mainConfig.height = CameraUtils::getInterlaceHeight(mainConfig.field, producerRes.height); @@ -596,7 +590,7 @@ bool CameraDevice::isProcessorNeeded(const stream_config_t* streamList, return false; } -int CameraDevice::createStreams(stream_config_t* streamList, int configuredStreamNum) { +int CameraDevice::createStreams(const stream_config_t* streamList, int configuredStreamNum) { LOG1("@%s", mCameraId, __func__); const int streamCounts = streamList->num_streams; @@ -624,7 +618,7 @@ int CameraDevice::createStreams(stream_config_t* streamList, int configuredStrea * 1. Checking if the streams is supported or not * 2. According resolution and format to store the streamId in descending order. */ -int CameraDevice::analyzeStream(stream_config_t* streamList, int* inputRawStreamId, +int CameraDevice::analyzeStream(const stream_config_t* streamList, int* inputRawStreamId, int* preStreamIdForFace, int* inputYuvStreamId) { LOG1("@%s", mCameraId, __func__); @@ -634,7 +628,7 @@ int CameraDevice::analyzeStream(stream_config_t* streamList, int* inputRawStream for (int i = 0; i < streamList->num_streams; i++) { stream_t& stream = streamList->streams[i]; stream.id = i; - stream.max_buffers = PlatformData::getMaxRequestsInHAL(mCameraId); + stream.max_buffers = PlatformData::getMaxPipelineDepth(mCameraId); if (stream.streamType == CAMERA_STREAM_INPUT) { CheckAndLogError(*inputRawStreamId >= 0, BAD_VALUE, "Don't support two INPUT streams!"); @@ -804,7 +798,7 @@ int CameraDevice::stop() { return OK; } -// No Lock for this fuction as it doesn't update any class member +// No Lock for this function as it doesn't update any class member int CameraDevice::allocateMemory(camera_buffer_t* ubuffer) { PERF_CAMERA_ATRACE(); LOG1("@%s", mCameraId, __func__); @@ -828,8 +822,10 @@ int CameraDevice::dqbuf(int streamId, camera_buffer_t** ubuffer) { PERF_CAMERA_ATRACE(); LOG2("@%s, stream id:%d", mCameraId, __func__, streamId); - int ret = mRequestThread->waitFrame(streamId, ubuffer); - while (ret == TIMED_OUT) ret = mRequestThread->waitFrame(streamId, ubuffer); + int ret; + do { + ret = mRequestThread->waitFrame(streamId, ubuffer); + } while (ret == TIMED_OUT); if (ret == NO_INIT) { return ret; diff --git a/src/core/CameraDevice.h b/src/core/CameraDevice.h index df18897..f197960 100644 --- a/src/core/CameraDevice.h +++ b/src/core/CameraDevice.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_DEVICE_H -#define CAMERA_DEVICE_H - +#pragma once #include "AiqUnit.h" #include "CameraStream.h" #include "IProcessingUnitFactory.h" @@ -62,7 +60,7 @@ class RequestThread; * | -> PsysProcessor | -> CameraStream (For still YUV) * * The buffer notification between the Class is based on Interface defined - * in BufferQueue. The upstream element use "onFrameAvailable" message to notfiy + * in BufferQueue. The upstream element use "onBufferAvailable" message to notfiy * downstream elements that the buffers are ready for further processing * * Following singleton instances are created and maintained by CameraDevice @@ -82,7 +80,7 @@ class CameraDevice : public EventListener { * CsiMeta // CSI_META_E * 2.Register listener if enable AIQ - * 3.Set the defualt parameters + * 3.Set the default parameters * * \return OK if succeed, other value indicates failed */ @@ -92,7 +90,7 @@ class CameraDevice : public EventListener { * \brief Camera device class deinit * * 1.Change the state - * 2.Destory the listeners + * 2.Destroy the listeners * 3.Delete the streams * 4.Deinit the Related classes. */ @@ -117,7 +115,7 @@ class CameraDevice : public EventListener { int stop(); /** - * \brief Allocate momery according to user buffer + * \brief Allocate memory according to user buffer * * 1. Convert user buffer to CameraBuffer and push it into UserBufferQueue * 2. Calling CameraStream class to allocateMemory. @@ -186,11 +184,11 @@ class CameraDevice : public EventListener { StreamSource* createBufferProducer(); std::map selectProducerConfig(const stream_config_t* streamList, int mcId); bool isProcessorNeeded(const stream_config_t* streamList, const stream_t& producerConfig) const; - int analyzeStream(stream_config_t* streamList, int* inputStreamId, int* preStreamIdForFace, - int* inputYuvStreamId); - int assignPortForStreams(const stream_config_t* streamList, int inputStreamId, + int analyzeStream(const stream_config_t* streamList, int* inputRawStreamId, + int* preStreamIdForFace, int* inputYuvStreamId); + int assignPortForStreams(const stream_config_t* streamList, int inputRawStreamId, int inputYuvStreamId, int configuredStreamNum); - int createStreams(stream_config_t* streamList, int configuredStreamNum); + int createStreams(const stream_config_t* streamList, int configuredStreamNum); int bindStreams(stream_config_t* streamList); void deleteStreams(); @@ -207,7 +205,7 @@ class CameraDevice : public EventListener { // The second phase of qbuf(), done in RequestThread int handleQueueBuffer(int bufferNum, camera_buffer_t** ubuffer, int64_t sequence); - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); int startLocked(); int stopLocked(); @@ -260,4 +258,3 @@ class CameraDevice : public EventListener { } // namespace icamera -#endif // CAMERA_DEVICE_H diff --git a/src/core/CameraEvent.h b/src/core/CameraEvent.h index 7d1cbd3..fe258ca 100644 --- a/src/core/CameraEvent.h +++ b/src/core/CameraEvent.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_EVENT_H -#define CAMERA_EVENT_H +#pragma once #include #include @@ -54,5 +53,3 @@ class EventSource { }; } // namespace icamera - -#endif // CAMERA_EVENT_H diff --git a/src/core/CameraStream.cpp b/src/core/CameraStream.cpp index 4cb87ec..a886c4f 100644 --- a/src/core/CameraStream.cpp +++ b/src/core/CameraStream.cpp @@ -154,7 +154,7 @@ void CameraStream::setBufferProducer(BufferProducer* producer) { } } -int CameraStream::onFrameAvailable(uuid port, const shared_ptr& camBuffer) { +int CameraStream::onBufferAvailable(uuid port, const shared_ptr& camBuffer) { // Ignore if the buffer is not for this stream. if (mPort != port) { return OK; diff --git a/src/core/CameraStream.h b/src/core/CameraStream.h index 108a229..a7da642 100644 --- a/src/core/CameraStream.h +++ b/src/core/CameraStream.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_STREAM_H -#define CAMERA_STREAM_H - +#pragma once #include "ParamDataType.h" #include "BufferQueue.h" #include "CameraBuffer.h" @@ -69,7 +67,7 @@ class CameraStream : public BufferConsumer, public EventSource { * * \return OK if succeed and BAD_VALUE if failed */ - int allocateMemory(camera_buffer_t* buffer); + int allocateMemory(camera_buffer_t* ubuffer); /** * \brief Register the mBufferProducer @@ -79,7 +77,7 @@ class CameraStream : public BufferConsumer, public EventSource { /** * \brief The notify when polled or processed one frame buffer */ - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); private: std::shared_ptr userBufferToCameraBuffer(camera_buffer_t* ubuffer); @@ -99,4 +97,3 @@ class CameraStream : public BufferConsumer, public EventSource { } // namespace icamera -#endif // CAMERA_STREAM_H diff --git a/src/core/CaptureUnit.cpp b/src/core/CaptureUnit.cpp index 2d91d4b..1640742 100644 --- a/src/core/CaptureUnit.cpp +++ b/src/core/CaptureUnit.cpp @@ -105,20 +105,17 @@ int CaptureUnit::createDevices() { LOG1("%s", mCameraId, __func__); destroyDevices(); - const uuid kDefaultPort = INVALID_PORT; - const uuid portOfMainDevice = findDefaultPort(mOutputFrameInfo); - const stream_t& kDefaultStream = mOutputFrameInfo.at(portOfMainDevice); - const VideoNodeType nodeType = VIDEO_GENERIC; - mDevices.push_back(new MainDevice(mCameraId, nodeType, this)); - // targetPorts specifies the desired port for the device. // But the real port which will be used is deciced whether // the port is provided by the consumer. vector targetPorts; - targetPorts.push_back(portOfMainDevice); + targetPorts.push_back(MAIN_INPUT_PORT_UID); + // Configure has checked the main port is valid. + mDevices.push_back(new MainDevice(mCameraId, VIDEO_GENERIC, this)); // Open and configure the devices. The stream and port that are used by the device is // decided by whether consumer has provided such info, use the default one if not. + const stream_t& kDefaultStream = mOutputFrameInfo.at(MAIN_INPUT_PORT_UID); for (uint8_t i = 0U; i < mDevices.size(); i++) { DeviceBase* device = mDevices[i]; @@ -129,7 +126,7 @@ int CaptureUnit::createDevices() { const bool hasPort = mOutputFrameInfo.find(kTargetPort) != mOutputFrameInfo.end(); const stream_t& stream = hasPort ? mOutputFrameInfo.at(kTargetPort) : kDefaultStream; - ret = device->configure(hasPort ? kTargetPort : kDefaultPort, stream, mMaxBufferNum); + ret = device->configure(hasPort ? kTargetPort : INVALID_PORT, stream, mMaxBufferNum); CheckAndLogError(ret != OK, ret, "Configure device(%s) failed:%d", device->getName(), ret); } @@ -248,17 +245,19 @@ int CaptureUnit::configure(const map& outputFrames) { (mState != CAPTURE_CONFIGURE) && (mState != CAPTURE_INIT) && (mState != CAPTURE_STOP), INVALID_OPERATION, "@%s: Configure in wrong state %d", __func__, mState); - const uuid port = findDefaultPort(outputFrames); - const stream_t& mainStream = outputFrames.at(port); + // Check if the main port is supported. MAIN_INPUT_PORT_UID is the default port for + // the main device. + bool isSupportPortId = IsSupportPort(MAIN_INPUT_PORT_UID, outputFrames); + CheckAndLogError(!isSupportPortId, BAD_VALUE, "No main port for output frames."); + mOutputFrameInfo = outputFrames; for (const auto& item : outputFrames) { LOG1("%s, port:%d, w:%d, h:%d, f:%s", mCameraId, __func__, item.first, item.second.width, item.second.height, CameraUtils::format2string(item.second.format).c_str()); } - mOutputFrameInfo = outputFrames; - + const stream_t& mainStream = outputFrames.at(MAIN_INPUT_PORT_UID); /* media ctl setup */ MediaCtlConf* mediaCtl = PlatformData::getMediaCtlConf(mCameraId); CheckAndLogError(mediaCtl == nullptr, BAD_VALUE, @@ -284,13 +283,12 @@ int CaptureUnit::configure(const map& outputFrames) { return OK; } -uuid CaptureUnit::findDefaultPort(const map& frames) const { - for (uint32_t i = 0U; i < MAX_STREAM_NUMBER; i++) { - if (frames.find(INPUT_STREAM_PORT_UID(i)) != frames.end()) { - return INPUT_STREAM_PORT_UID(i); - } +bool CaptureUnit::IsSupportPort(uuid port, const std::map& frames) { + if (frames.find(port) != frames.end()) { + return true; } - return INVALID_PORT; + + return false; } int CaptureUnit::allocateMemory(uuid port, const std::shared_ptr& camBuffer) { @@ -339,6 +337,10 @@ int CaptureUnit::queueAllBuffers() { break; } + if (ret == DEV_BUSY) { + return DEV_BUSY; + } + CheckAndLogError(ret != OK, ret, "queueBuffer fails, dev:%s, ret:%d", device->getName(), ret); if (predictSequence == -1) { @@ -357,11 +359,9 @@ int CaptureUnit::processPendingBuffers() { LOG2("%s: buffers in device:%d", __func__, mDevices.front()->getBufferNumInDevice()); while (mDevices.front()->getBufferNumInDevice() < mMaxBuffersInDevice) { - bool hasPendingBuffer = true; for (auto device : mDevices) { if (!device->hasPendingBuffer()) { // Do not queue buffer when one of the devices has no pending buffers. - hasPendingBuffer = false; return OK; } } @@ -370,6 +370,11 @@ int CaptureUnit::processPendingBuffers() { if (mExitPending) { break; } + + if (ret == DEV_BUSY) { + return OK; + } + CheckAndLogError(ret != OK, ret, "Failed to queue buffers, ret=%d", ret); } diff --git a/src/core/CaptureUnit.h b/src/core/CaptureUnit.h index eb5fced..00a850b 100644 --- a/src/core/CaptureUnit.h +++ b/src/core/CaptureUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAPTURE_UNIT_H -#define CAPTURE_UNIT_H - +#pragma once #include #include @@ -82,16 +80,16 @@ class CaptureUnit : public StreamSource, public DeviceCallback { virtual void removeAllFrameAvailableListener(); /** - * \brief CaptureUnit initialze + * \brief CaptureUnit initialize */ virtual int init(); /** * \brief CaptureUnit deinit * - * 1. Destory all the buffer pool + * 1. Destroy all the buffer pool * 2. Deinit the v4l2 device - * 3. Destory the poll thread + * 3. Destroy the poll thread */ virtual void deinit(); @@ -129,12 +127,11 @@ class CaptureUnit : public StreamSource, public DeviceCallback { virtual void removeListener(EventType eventType, EventListener* eventListener); // Overwrite DeviceCallback API - void onDequeueBuffer(); + virtual void onDequeueBuffer(); int createDevices(); void destroyDevices(); DeviceBase* findDeviceByPort(uuid port); - uuid findDefaultPort(const std::map& frames) const; int streamOn(); void streamOff(); @@ -143,7 +140,10 @@ class CaptureUnit : public StreamSource, public DeviceCallback { int processPendingBuffers(); int queueAllBuffers(); - private: + private: + bool IsSupportPort(uuid port, const std::map& frames); + + private: PollThread* mPollThread; int mFlushFd[2]; // Flush file descriptor @@ -172,4 +172,3 @@ class CaptureUnit : public StreamSource, public DeviceCallback { } // namespace icamera -#endif // CAPTURE_UNIT_H diff --git a/src/core/CsiMetaDevice.cpp b/src/core/CsiMetaDevice.cpp index 487cc73..e01ec83 100644 --- a/src/core/CsiMetaDevice.cpp +++ b/src/core/CsiMetaDevice.cpp @@ -135,7 +135,7 @@ int CsiMetaDevice::initEmdMetaData() { mEmbeddedMetaData.csiMetaFormat = V4L2_FMT_IPU_ISYS_META; // for embedded meta data, width is equal with bytes per line mEmbeddedMetaData.width = bpl; - // for compatible, set 1 as default, if the *.xml have configed it, use the config value repalce + // for compatible, set 1 as default, if the *.xml have configured it, use the config value repalce mEmbeddedMetaData.height = 1; ret = PlatformData::getVideoNodeNameByType(mCameraId, VIDEO_CSI_META, videoNodeName); if (ret == OK) { diff --git a/src/core/DeviceBase.cpp b/src/core/DeviceBase.cpp index d9be01e..dfc0b22 100644 --- a/src/core/DeviceBase.cpp +++ b/src/core/DeviceBase.cpp @@ -23,9 +23,6 @@ #include "CameraEventType.h" #include "PlatformData.h" -// FRAME_SYNC_S -#include "SyncManager.h" -// FRAME_SYNC_E #include "V4l2DeviceFactory.h" #include "iutils/CameraDump.h" #include "iutils/CameraLog.h" @@ -69,12 +66,6 @@ DeviceBase::~DeviceBase() { int DeviceBase::openDevice() { LOG1("%s, device:%s", mCameraId, __func__, mName); - // FRAME_SYNC_S - if (PlatformData::isEnableFrameSyncCheck(mCameraId)) { - SyncManager::getInstance()->updateSyncCamNum(); - } - // FRAME_SYNC_E - return mDevice->Open(O_RDWR); } @@ -157,7 +148,7 @@ int DeviceBase::queueBuffer(int64_t sequence) { AutoMutex l(mBufferLock); if (mBufferQueuing) { LOG2("buffer is queuing"); - return OK; + return DEV_BUSY; } if (mPendingBuffers.empty()) { @@ -222,7 +213,7 @@ int DeviceBase::dequeueBuffer() { PERF_CAMERA_ATRACE_PARAM3("grabFrame SeqID", camBuffer->getSequence(), "csi2_port", camBuffer->getCsi2Port(), "virtual_channel", - camBuffer->getVirtualChannel()); + camBuffer->getVirtualChannel()); (void)onDequeueBuffer(camBuffer); // Skip initial frames if needed. @@ -272,23 +263,6 @@ shared_ptr DeviceBase::getFirstDeviceBuffer() { return mBuffersInDevice.empty() ? nullptr : mBuffersInDevice.front(); } -// FRAME_SYNC_S -bool DeviceBase::skipFrameAfterSyncCheck(int64_t sequence) { - // For multi-camera sensor, to check whether the frame synced or not - int count = 0; - const int timeoutDuration = gSlowlyRunRatio != 0 ? (gSlowlyRunRatio * 1000000) : 1000; - const int maxCheckTimes = 10; // 10 times - while (!SyncManager::getInstance()->isSynced(mCameraId, sequence)) { - usleep(timeoutDuration); - count++; - if (count > maxCheckTimes) { - return true; - } - } - return false; -} -// FRAME_SYNC_E - void DeviceBase::popBufferFromDevice() { AutoMutex l(mBufferLock); if (mBuffersInDevice.empty()) { @@ -330,25 +304,11 @@ int MainDevice::createBufferPool(const stream_t& config) { struct v4l2_format v4l2fmt; v4l2fmt.fmt.pix_mp.field = config.field; - if (PlatformData::isCSIFrontEndCapture(DeviceBase::mCameraId)) { - const int planesNum = CameraUtils::getNumOfPlanes(config.format); - LOG1("@%s Num of planes: %d, mCameraId:%d", __func__, planesNum, DeviceBase::mCameraId); - - v4l2fmt.fmt.pix_mp.width = config.width; - v4l2fmt.fmt.pix_mp.height = config.height; - v4l2fmt.fmt.pix_mp.num_planes = planesNum; - v4l2fmt.fmt.pix_mp.pixelformat = config.format; - for (int i = 0; i < v4l2fmt.fmt.pix_mp.num_planes; i++) { - v4l2fmt.fmt.pix_mp.plane_fmt[i].bytesperline = config.width; - v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage = 0; - } - } else { - v4l2fmt.fmt.pix.width = config.width; - v4l2fmt.fmt.pix.height = config.height; - v4l2fmt.fmt.pix.pixelformat = config.format; - v4l2fmt.fmt.pix.bytesperline = config.width; - v4l2fmt.fmt.pix.sizeimage = 0; - } + v4l2fmt.fmt.pix.width = config.width; + v4l2fmt.fmt.pix.height = config.height; + v4l2fmt.fmt.pix.pixelformat = config.format; + v4l2fmt.fmt.pix.bytesperline = config.width; + v4l2fmt.fmt.pix.sizeimage = 0; v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; V4L2Format tmpbuf{v4l2fmt}; @@ -388,16 +348,18 @@ int MainDevice::onDequeueBuffer(shared_ptr buffer) { DeviceBase::dumpFrame(buffer); for (auto& consumer : DeviceBase::mConsumers) { - consumer->onFrameAvailable(DeviceBase::mPort, buffer); + consumer->onBufferAvailable(DeviceBase::mPort, buffer); } - EventData frameData; - frameData.type = EVENT_ISYS_FRAME; - frameData.buffer = nullptr; - frameData.data.frame.sequence = buffer->getSequence(); - frameData.data.frame.timestamp.tv_sec = buffer->getTimestamp().tv_sec; - frameData.data.frame.timestamp.tv_usec = buffer->getTimestamp().tv_usec; - notifyListeners(frameData); + if (DeviceBase::mPort == MAIN_INPUT_PORT_UID) { + EventData frameData; + frameData.type = EVENT_ISYS_FRAME; + frameData.buffer = nullptr; + frameData.data.frame.sequence = buffer->getSequence(); + frameData.data.frame.timestamp.tv_sec = buffer->getTimestamp().tv_sec; + frameData.data.frame.timestamp.tv_usec = buffer->getTimestamp().tv_usec; + notifyListeners(frameData); + } return OK; } @@ -407,26 +369,13 @@ bool MainDevice::needQueueBack(shared_ptr buffer) { const V4L2Buffer& vbuf = buffer->getV4L2Buffer(); // Check for STR2MMIO Error from kernel space - if ((vbuf.Flags() & static_cast(V4L2_BUF_FLAG_ERROR)) && + if (((vbuf.Flags() & static_cast(V4L2_BUF_FLAG_ERROR)) != 0U) && (PlatformData::isSkipFrameOnSTR2MMIOErr(this->mCameraId))) { // On STR2MMIO error, enqueue this buffer back to V4L2 before notifying the // listener/consumer and return needSkipFrame = true; LOGW("%s: buffer error", buffer->getSequence(), __func__); } - // FRAME_SYNC_S - if (PlatformData::isEnableFrameSyncCheck(DeviceBase::mCameraId)) { - struct camera_buf_info sharedCamBufInfo; - sharedCamBufInfo.sequence = buffer->getSequence(); - sharedCamBufInfo.sof_ts = buffer->getTimestamp(); - SyncManager::getInstance()->updateCameraBufInfo(DeviceBase::mCameraId, &sharedCamBufInfo); - if (DeviceBase::skipFrameAfterSyncCheck(buffer->getSequence())) { - LOG1("@%s: dropped due to frame not sync", DeviceBase::mCameraId, - buffer->getSequence(), __func__); - needSkipFrame = true; - } - } - // FRAME_SYNC_E return needSkipFrame; } } // namespace icamera diff --git a/src/core/DeviceBase.h b/src/core/DeviceBase.h index 2c72a2f..d9c1d21 100644 --- a/src/core/DeviceBase.h +++ b/src/core/DeviceBase.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef DEVICE_BASE_H -#define DEVICE_BASE_H - +#pragma once #include #include #include @@ -124,7 +122,7 @@ class DeviceBase : public EventSource { VideoNodeDirection mNodeDirection; const char* mName; V4L2VideoNode* mDevice; // The device used to queue/dequeue buffers. - int64_t mLatestSequence; // Track the latest bufffer sequence from driver. + int64_t mLatestSequence; // Track the latest buffer sequence from driver. bool mNeedSkipFrame; // True if the frame/buffer needs to be skipped. int mFrameSkipNum; // How many frames need to be skipped after stream on. DeviceCallback* mDeviceCB; @@ -169,10 +167,9 @@ class MainDevice : public DeviceBase { ~MainDevice(); private: - int createBufferPool(const stream_t& config); - int onDequeueBuffer(std::shared_ptr buffer); - bool needQueueBack(std::shared_ptr buffer); + virtual int createBufferPool(const stream_t& config); + virtual int onDequeueBuffer(std::shared_ptr buffer); + virtual bool needQueueBack(std::shared_ptr buffer); }; } // namespace icamera -#endif // DEVICE_BASE_H diff --git a/src/core/FileSource.cpp b/src/core/FileSource.cpp index 206358e..187f91d 100644 --- a/src/core/FileSource.cpp +++ b/src/core/FileSource.cpp @@ -334,7 +334,7 @@ void FileSource::notifyFrame(std::map> buffe for (auto & port : mOutputPorts) { if (buffers.find(port) != buffers.end()) { LOG2("Notify frame to consumer for port:%x", port); - consumer->onFrameAvailable(port, buffers[port]); + consumer->onBufferAvailable(port, buffers[port]); } } } diff --git a/src/core/FileSource.h b/src/core/FileSource.h index 89bc888..ece8f02 100644 --- a/src/core/FileSource.h +++ b/src/core/FileSource.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef FILE_SOURCE_H -#define FILE_SOURCE_H +#pragma once #include "StreamSource.h" #include "iutils/Thread.h" @@ -36,29 +35,29 @@ namespace icamera { * The value of cameraInjectFile MUST be ended with ".xml". * 3. The third mode which can inject files in sequence by specifying injection folder path. * How to enable: export cameraInjectFile="Injection Folder" - * ("Injection Folder" is the specifyed injection folder path you want to run file injection) + * ("Injection Folder" is the specified injection folder path you want to run file injection) */ class FileSource : public StreamSource { public: explicit FileSource(int cameraId); ~FileSource(); - int init(); - void deinit(); - int configure(const std::map& outputFrames); - int start(); - int stop(); + virtual int init(); + virtual void deinit(); + virtual int configure(const std::map& outputFrames); + virtual int start(); + virtual int stop(); virtual int qbuf(uuid port, const std::shared_ptr& camBuffer); virtual void addFrameAvailableListener(BufferConsumer* listener); virtual void removeFrameAvailableListener(BufferConsumer* listener); - void removeAllFrameAvailableListener(); - int allocateMemory(uuid port, const std::shared_ptr& camBuffer) { return OK; } + virtual void removeAllFrameAvailableListener(); + virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) { return OK; } // Overwrite EventSource APIs to avoid calling its parent's implementation. - void registerListener(EventType eventType, EventListener* eventListener); - void removeListener(EventType eventType, EventListener* eventListener); + virtual void registerListener(EventType eventType, EventListener* eventListener); + virtual void removeListener(EventType eventType, EventListener* eventListener); private: bool produce(); @@ -83,7 +82,7 @@ class FileSource : public StreamSource { } private: - bool threadLoop() { return mFileSrc->produce(); } + virtual bool threadLoop() { return mFileSrc->produce(); } }; ProduceThread* mProduceThread; @@ -184,5 +183,3 @@ class FileSourceFromDir { }; } // namespace icamera - -#endif // FILE_SOURCE_H diff --git a/src/core/IProcessingUnitFactory.h b/src/core/IProcessingUnitFactory.h index 849b0d4..134a704 100644 --- a/src/core/IProcessingUnitFactory.h +++ b/src/core/IProcessingUnitFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef IPROCESSING_UNIT_FACTORY_H -#define IPROCESSING_UNIT_FACTORY_H +#pragma once #include "AiqUnit.h" #include "CameraScheduler.h" @@ -41,5 +40,3 @@ class IProcessingUnitFactory { std::shared_ptr scheduler); }; } // namespace icamera - -#endif // IPROCESSING_UNIT_FACTORY_H diff --git a/src/core/IpuPacAdaptor.cpp b/src/core/IpuPacAdaptor.cpp index 8cc64b3..a8aad3f 100644 --- a/src/core/IpuPacAdaptor.cpp +++ b/src/core/IpuPacAdaptor.cpp @@ -79,7 +79,7 @@ int IpuPacAdaptor::reinitAic(const int32_t aicId) { const ia_err iaErr = mIntelCca->reinitAic(aicId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to reinit aic, aicId: %d", __func__, aicId); + "%s, Failed to reinit aic, aicId: %d", __func__, aicId); return OK; } @@ -120,11 +120,16 @@ status_t IpuPacAdaptor::pacConfig(int streamId, const cca::cca_aic_config& aicCo const ia_err iaErr = mIntelCca->configAic(aicConfig, kernelOffset, offsetPtr, *termCfg, streamId, statsBufToTermIds); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to configure pac, streamId: %d", __func__, streamId); + "%s, Failed to configure pac, streamId: %d", __func__, streamId); return OK; } +void IpuPacAdaptor::clearAicResult() { + AutoMutex l(mPacAdaptorLock); + mPacRunHistMap.clear(); +} + void* IpuPacAdaptor::allocateBuffer(int streamId, uint8_t contextId, uint32_t termId, size_t size) { AutoMutex l(mPacAdaptorLock); @@ -191,7 +196,7 @@ status_t IpuPacAdaptor::registerBuffer(int streamId, const cca::cca_aic_terminal const ia_err iaErr = mIntelCca->registerAicBuf(termCfg, streamId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to register pac buffer, streamId: %d", __func__, streamId); + "%s, Failed to register pac buffer, streamId: %d", __func__, streamId); return OK; } @@ -229,7 +234,7 @@ status_t IpuPacAdaptor::storeTerminalResult(int64_t sequence, int32_t streamId) __func__, streamId, data.first.second, index); const ia_err iaErr = mIntelCca->getAicBuf(ccaTermConfig, streamId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to getAicBuf. streamId: %d, contextId: %d", + "%s, Failed to getAicBuf. streamId: %d, contextId: %d", sequence, __func__, streamId, data.first.second); index = 0; @@ -307,7 +312,7 @@ void IpuPacAdaptor::applyMediaFormat(const AiqResult* aiqResult, *mediaFormat = media_format_custom; LOG2("%s: a linear gamma curve. curveX: %f, curveY: %f", __func__, curveX, curveY); } else if (abs(curveY - pow(curveX, (1 / 2.2))) < EPSILON) { - // Its a standard 2_2 gamma curves + // It's a standard 2_2 gamma curves *mediaFormat = media_format_bt709_8b; LOG2("%s: a 2.2 gamma curve. curveX: %f, curveY: %f", __func__, curveX, curveY); } else { @@ -445,7 +450,7 @@ status_t IpuPacAdaptor::updateResolutionSettings(int streamId, const ia_err iaErr = mIntelCca->updateConfigurationResolutions(aicConfig, streamId, isKeyResChanged); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to configure pac, streamId: %d", __func__, streamId); + "%s, Failed to configure pac, streamId: %d", __func__, streamId); return OK; } @@ -532,22 +537,22 @@ status_t IpuPacAdaptor::decodeStats(int streamId, uint8_t contextId, int64_t seq } const ia_err iaErr = mIntelCca->decodeStats(contextId, sequenceId, streamId, outStats); - CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to decode stats. streamId: %d, contextId: %d", - sequenceId, __func__, streamId, contextId); - - if (statsUsed) { - AiqStatistics* aiqStatistics = mAiqResultStorage->acquireAiqStatistics(); - aiqStatistics->mSequence = sequenceId; - aiqStatistics->mTimestamp = timestamp; - aiqStatistics->mTuningMode = TUNING_MODE_VIDEO; - - mAiqResultStorage->updateAiqStatistics(sequenceId); + if (iaErr == ia_err::ia_err_none) { + if (statsUsed) { + AiqStatistics* aiqStatistics = mAiqResultStorage->acquireAiqStatistics(); + aiqStatistics->mSequence = sequenceId; + aiqStatistics->mTimestamp = timestamp; + aiqStatistics->mTuningMode = TUNING_MODE_VIDEO; + + mAiqResultStorage->updateAiqStatistics(sequenceId); + } + mLastStatsSequence = sequenceId; + } else { + LOGE("%s, Failed to decode stats. streamId: %d, contextId: %d", sequenceId, + __func__, streamId, contextId); } - mLastStatsSequence = sequenceId; mPacRunHistMap[pacItem] = true; - if (mPacRunHistMap.size() >= MAX_CACHE_PAC_HIST) { for (auto iter = mPacRunHistMap.begin(); iter != mPacRunHistMap.end(); iter++) { if (iter->second) { @@ -557,7 +562,7 @@ status_t IpuPacAdaptor::decodeStats(int streamId, uint8_t contextId, int64_t seq } } - return OK; + return (iaErr == ia_err_none) ? OK : UNKNOWN_ERROR; } } // namespace icamera diff --git a/src/core/IpuPacAdaptor.h b/src/core/IpuPacAdaptor.h index af7b0d9..c60836f 100644 --- a/src/core/IpuPacAdaptor.h +++ b/src/core/IpuPacAdaptor.h @@ -54,6 +54,8 @@ class IpuPacAdaptor { int init(std::vector streamIds); int reinitAic(const int32_t aicId); int deinit(); + void clearAicResult(); + status_t pacConfig(int streamId, const cca::cca_aic_config& aicConfig, const cca::cca_aic_kernel_offset& kernelOffset, uint32_t* offsetPtr, cca::cca_aic_terminal_config* termCfg, const int32_t* statsBufToTermIds); diff --git a/src/core/LensHw.h b/src/core/LensHw.h index d94603e..600a49d 100644 --- a/src/core/LensHw.h +++ b/src/core/LensHw.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LENS_HW_H -#define LENS_HW_H +#pragma once #include @@ -49,5 +48,3 @@ class LensHw { }; // class LensHW } // namespace icamera - -#endif // LENS_HW_H diff --git a/src/core/MockPSysDevice.cpp b/src/core/MockPSysDevice.cpp index 5ead3de..5d5582b 100644 --- a/src/core/MockPSysDevice.cpp +++ b/src/core/MockPSysDevice.cpp @@ -36,8 +36,9 @@ MockPSysDevice::MockPSysDevice(int cameraId) : PSysDevice(cameraId) { } MockPSysDevice::~MockPSysDevice() { - mPollThread->exit(); mExitPending = true; + mPollThread->exit(); + mTaskReadyCondition.notify_one(); mPollThread->wait(); delete mPollThread; @@ -54,41 +55,56 @@ void MockPSysDevice::registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCa } int MockPSysDevice::addTask(const PSysTask& task) { - std::lock_guard l(mDataLock); - mTasksMap[task.sequence].insert(task.nodeCtxId); - for (const auto& item : task.terminalBuffers) { if (task.sequence < kStartingFrameCount && item.second.handle > 0) { char* addr = reinterpret_cast(::mmap(nullptr, item.second.size, PROT_READ | PROT_WRITE, MAP_SHARED, item.second.handle, 0)); - if (mFileSource) + if (mFileSource) { mFileSource->fillFrameBuffer(addr, item.second.size, task.sequence); - else + } else { memset(addr, 0x99, item.second.size); + } munmap(addr, item.second.size); } } + { + std::unique_lock lock(mDataLock); + mTasksMap[task.sequence].insert(task.nodeCtxId); + + mTaskReadyCondition.notify_one(); + } return OK; } int MockPSysDevice::poll() { - std::lock_guard l(mDataLock); if (mExitPending) { return -1; } - if (!mTasksMap.empty()) { - auto it = mTasksMap.begin(); - auto sec = it->second.begin(); + auto task = mTasksMap.begin(); + { + std::unique_lock lock(mDataLock); + if (mTasksMap.empty()) { + const std::cv_status ret = + mTaskReadyCondition.wait_for(lock, std::chrono::nanoseconds(2000000000)); + if (mTasksMap.empty() || (ret == std::cv_status::timeout)) { + return 0; + } + } + task = mTasksMap.begin(); + } - LOG2("%s, task.nodeCtxId %u, task.sequence %ld", __func__, *sec, it->first); - mPSysDeviceCallbackMap[*sec]->bufferDone(it->first); + auto sec = task->second.begin(); + LOG2("%s, task.nodeCtxId %u, task.sequence %ld", __func__, *sec, task->first); + mPSysDeviceCallbackMap[*sec]->bufferDone(task->first); - it->second.erase(sec); - if (it->second.empty()) { - mTasksMap.erase(it); + { + std::unique_lock lock(mDataLock); + task->second.erase(sec); + if (task->second.empty()) { + mTasksMap.erase(task); } } diff --git a/src/core/MockPSysDevice.h b/src/core/MockPSysDevice.h index c14e7a2..4123092 100644 --- a/src/core/MockPSysDevice.h +++ b/src/core/MockPSysDevice.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation. + * Copyright (C) 2024-2025 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ class MockPSysDevice : public PSysDevice { virtual ~MockPSysDevice(); virtual int init() override; + virtual void deinit() override {} virtual void registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallback* callback) override; @@ -58,12 +59,14 @@ class MockPSysDevice : public PSysDevice { virtual int poll() override; private: - static const int kStartingFrameCount = 100; + static const int kStartingFrameCount = 20; icamera::FileSourceFromDir* mFileSource; - const char* PNP_INJECTION_NAME = "/run/camera/libcamera/"; + const char* PNP_INJECTION_NAME = "/data/cameraPnp/libcamera"; PollThread* mPollThread; + std::condition_variable mTaskReadyCondition; bool mExitPending = false; + int mFd = 0; std::mutex mDataLock; std::unordered_map mPSysDeviceCallbackMap; diff --git a/src/core/PSysDevice.cpp b/src/core/PSysDevice.cpp index 5cdce9e..a489d73 100644 --- a/src/core/PSysDevice.cpp +++ b/src/core/PSysDevice.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "CameraLog.h" #include "Errors.h" @@ -30,14 +31,15 @@ namespace icamera { -const char* DRIVER_NAME = "/dev/ipu7-psys0"; +static const char* DRIVER_NAME = "/dev/ipu7-psys0"; PSysDevice::PSysDevice(int cameraId) : mPollThread(nullptr), mExitPending(false), mCameraId(cameraId), mFd(-1), - mGraphId(INVALID_GRAPH_ID) { + mGraphId(INVALID_GRAPH_ID), + mEventFd(-1) { LOG1("<%id> Construct PSysDevice", mCameraId); CLEAR(mFrameId); @@ -48,6 +50,8 @@ PSysDevice::PSysDevice(int cameraId) } mPollThread = new PollThread(this); + + mEventFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); } PSysDevice::~PSysDevice() { @@ -66,8 +70,6 @@ PSysDevice::~PSysDevice() { } } - mPollThread->exit(); - mExitPending = true; mPollThread->wait(); delete mPollThread; @@ -76,6 +78,24 @@ PSysDevice::~PSysDevice() { for (uint8_t i = 0U; i < MAX_GRAPH_NODES; i++) { delete[] mTaskBuffers[i]; } + + if (mEventFd >= 0) { + close(mEventFd); + } +} + +void PSysDevice::deinit() { + mPollThread->exit(); + mExitPending = true; + + // Wake up poll thread + if (mEventFd >= 0) { + const uint64_t value = 1U; + const ssize_t ret = write(mEventFd, &value, sizeof(value)); + if (ret < 0) { + LOGW("Failed to interrupt event %s", strerror(errno)); + } + } } int PSysDevice::init() { @@ -160,7 +180,7 @@ int PSysDevice::closeGraph() { CheckAndLogError(ret != 0, INVALID_OPERATION, "Failed to close graph %s", strerror(errno)); mGraphId = INVALID_GRAPH_ID; } - + CLEAR(mFrameId); return OK; } @@ -216,20 +236,20 @@ int PSysDevice::wait(ipu_psys_event& event) { void PSysDevice::updatePsysBufMap(TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { mPtrToTermBufMap[buf->userPtr] = *buf; - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { mFdToTermBufMap[static_cast(buf->handle)] = *buf; } } -void PSysDevice::erasePsysBufMap(TerminalBuffer* buf) { +void PSysDevice::erasePsysBufMap(const TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { if (mPtrToTermBufMap.find(buf->userPtr) != mPtrToTermBufMap.end()) { mPtrToTermBufMap.erase(buf->userPtr); } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { if (mFdToTermBufMap.find(static_cast(buf->handle)) != mFdToTermBufMap.end()) { mFdToTermBufMap.erase(static_cast(buf->handle)); } @@ -238,12 +258,12 @@ void PSysDevice::erasePsysBufMap(TerminalBuffer* buf) { bool PSysDevice::getPsysBufMap(TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { if (mPtrToTermBufMap.find(buf->userPtr) != mPtrToTermBufMap.end()) { buf->psysBuf = mPtrToTermBufMap[buf->userPtr].psysBuf; return true; } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { if (mFdToTermBufMap.find(static_cast(buf->handle)) != mFdToTermBufMap.end()) { buf->psysBuf = mFdToTermBufMap[static_cast(buf->handle)].psysBuf; return true; @@ -255,7 +275,7 @@ bool PSysDevice::getPsysBufMap(TerminalBuffer* buf) { int PSysDevice::registerBuffer(TerminalBuffer* buf) { CheckAndLogError(mFd < 0, INVALID_OPERATION, "psys device wasn't opened"); - CheckAndLogError(!buf, INVALID_OPERATION, "buf is nullptr"); + CheckAndLogError(buf == nullptr, INVALID_OPERATION, "buf is nullptr"); // If already registered, just return if (getPsysBufMap(buf)) { @@ -264,26 +284,26 @@ int PSysDevice::registerBuffer(TerminalBuffer* buf) { int ret = OK; buf->psysBuf.len = buf->size; - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { buf->psysBuf.base.userptr = buf->userPtr; buf->psysBuf.flags |= IPU_BUFFER_FLAG_USERPTR; ret = ioctl(mFd, static_cast(IPU_IOC_GETBUF), &buf->psysBuf); CheckAndLogError(ret != 0, INVALID_OPERATION, "Failed to get buffer %s", strerror(errno)); - if (!(buf->psysBuf.flags & IPU_BUFFER_FLAG_DMA_HANDLE)) { + if ((buf->psysBuf.flags & IPU_BUFFER_FLAG_DMA_HANDLE) == 0U) { LOGW("IOC_GETBUF succeed but did not return dma handle"); return INVALID_OPERATION; - } else if (buf->psysBuf.flags & IPU_BUFFER_FLAG_USERPTR) { + } else if ((buf->psysBuf.flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { LOGW("IOC_GETBUF succeed but did not consume the userptr flag"); return INVALID_OPERATION; } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { buf->psysBuf.base.fd = static_cast(buf->handle); buf->psysBuf.flags |= IPU_BUFFER_FLAG_DMA_HANDLE; } - if (buf->flags & IPU_BUFFER_FLAG_NO_FLUSH) { + if ((buf->flags & IPU_BUFFER_FLAG_NO_FLUSH) != 0U) { buf->psysBuf.flags |= IPU_BUFFER_FLAG_NO_FLUSH; } @@ -303,17 +323,17 @@ int PSysDevice::registerBuffer(TerminalBuffer* buf) { return OK; } -void PSysDevice::unregisterBuffer(TerminalBuffer* buf) { +void PSysDevice::unregisterBuffer(const TerminalBuffer* buf) { if (mFd < 0) { LOGE("psys device wasn't opened"); return; } - if (!buf) { + if (buf == nullptr) { LOGE("buf is nullptr"); return; } - if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) && (!buf->isExtDmaBuf)) { + if (((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) && (!buf->isExtDmaBuf)) { LOGW("cannot unmap buffer fd %d", buf->psysBuf.base.fd); return; } @@ -324,7 +344,7 @@ void PSysDevice::unregisterBuffer(TerminalBuffer* buf) { LOGW("Failed to unmap buffer %s", strerror(errno)); } - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { ret = close(buf->psysBuf.base.fd); if (ret < 0) { LOGE("Failed to close fd %d, error %s", buf->psysBuf.base.fd, strerror(errno)); @@ -341,9 +361,16 @@ void PSysDevice::registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallba int PSysDevice::poll(short events, int timeout) { - struct pollfd fds = { mFd, events, 0 }; + std::vector pollfds; + pollfds.reserve(1 + ((mEventFd >= 0) ? 1 : 0)); + + pollfds.push_back({ mFd, events, 0 }); - return ::poll(&fds, 1, timeout); + if (mEventFd >= 0) { + pollfds.push_back({ mEventFd, POLLIN, 0 }); + } + + return ::poll(pollfds.data(), pollfds.size(), timeout); } void PSysDevice::handleEvent(const ipu_psys_event& event) { @@ -375,7 +402,12 @@ void PSysDevice::handleEvent(const ipu_psys_event& event) { } int PSysDevice::poll() { - int ret = poll(POLLIN | POLLHUP | POLLERR, kEventTimeout * SLOWLY_MULTIPLIER); + if (mExitPending) { + return NO_INIT; + } + + int ret = poll(static_cast(POLLIN | POLLHUP | POLLERR), + kEventTimeout * SLOWLY_MULTIPLIER); if (mExitPending) { return NO_INIT; diff --git a/src/core/PSysDevice.h b/src/core/PSysDevice.h index 8fc3ff5..6e64454 100644 --- a/src/core/PSysDevice.h +++ b/src/core/PSysDevice.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef PSYS_DEVICE_H -#define PSYS_DEVICE_H - +#pragma once #include #include #include @@ -97,6 +95,7 @@ class PSysDevice { virtual ~PSysDevice(); virtual int init(); + virtual void deinit(); virtual void registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallback* callback); virtual int addGraph(const PSysGraph& graph); @@ -104,7 +103,7 @@ class PSysDevice { virtual int addTask(const PSysTask& task); virtual int registerBuffer(TerminalBuffer* buf); - virtual void unregisterBuffer(TerminalBuffer* buf); + virtual void unregisterBuffer(const TerminalBuffer* buf); virtual int poll(); @@ -113,7 +112,7 @@ class PSysDevice { int poll(short events, int timeout); void handleEvent(const ipu_psys_event& event); void updatePsysBufMap(TerminalBuffer* buf); - void erasePsysBufMap(TerminalBuffer* buf); + void erasePsysBufMap(const TerminalBuffer* buf); bool getPsysBufMap(TerminalBuffer* buf); private: @@ -131,6 +130,8 @@ class PSysDevice { int32_t mFd; int mGraphId; + int32_t mEventFd; + uint8_t mFrameId[MAX_NODE_NUM]; std::mutex mDataLock; int64_t mFrameIdToSeqMap[MAX_NODE_NUM][MAX_TASK_NUM]; @@ -144,4 +145,3 @@ class PSysDevice { } /* namespace icamera */ -#endif // PSYS_DEVICE_H diff --git a/src/core/ProcessingUnit.cpp b/src/core/ProcessingUnit.cpp index 9c27650..c6ff31a 100644 --- a/src/core/ProcessingUnit.cpp +++ b/src/core/ProcessingUnit.cpp @@ -146,6 +146,7 @@ int ProcessingUnit::start() { } IProcessingUnit::mThreadRunning = true; + BufferQueue::setThreadWaiting(true); mProcessThread->start(); ret = mPipeManager->start(); @@ -154,9 +155,6 @@ int ProcessingUnit::start() { auto cameraContext = CameraContext::getInstance(mCameraId); auto dataContext = cameraContext->getDataContextBySeq(0); (void)setParameters(dataContext); - AutoWMutex wl(mIspSettingsLock); - // Predict to run AIC with video pipe for the first frame - mPipeManager->prepareIpuParams(&mIspSettings); return OK; } @@ -166,6 +164,7 @@ void ProcessingUnit::stop() { mPipeManager->stop(); IProcessingUnit::mThreadRunning = false; + BufferQueue::setThreadWaiting(false); mProcessThread->exit(); { @@ -180,6 +179,7 @@ void ProcessingUnit::stop() { mProcessThread->wait(); + mRawBufferMap.clear(); // Thread is not running. It is safe to clear the Queue BufferQueue::clearBufferQueues(); } @@ -229,6 +229,7 @@ int ProcessingUnit::setParameters(const DataContext* dataContext) { break; default: mIspSettings.eeSetting.strength = static_cast(EXTREME_STRENGTH_LEVEL2); + break; } LOG2("%s: ISP EE setting, level: %d, strength: %d", __func__, @@ -267,7 +268,7 @@ int ProcessingUnit::setParameters(const DataContext* dataContext) { mIspSettings.videoStabilization = (dataContext->mAiqParams.videoStabilizationMode == VIDEO_STABILIZATION_MODE_ON); - LOG2("%s: Video stablilization enabled:%d", __func__, mIspSettings.videoStabilization); + LOG2("%s: Video stabilization enabled:%d", __func__, mIspSettings.videoStabilization); mIspSettings.zoom = dataContext->zoomRegion; @@ -363,7 +364,8 @@ int ProcessingUnit::processNewFrame() { } // set timeout only when there are already pending tasks in the Queue int64_t timeout = mSequencesInflight.size() > 0 ? kQueueTimeout : 0; - ret = BufferQueue::waitFreeBuffersInQueue(lock, srcBuffers, BufferQueue::mInputQueue, timeout); + ret = BufferQueue::waitFreeBuffersInQueue(lock, srcBuffers, BufferQueue::mInputQueue, + timeout); if (!this->mThreadRunning) { return -1; // Already stopped @@ -399,7 +401,14 @@ int ProcessingUnit::processNewFrame() { CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to process frame", __func__); } - if (!mSequencesInflight.empty()) { + bool execute = true; + { + std::lock_guard lock(mBufferQueueLock); + // Do not trigger scheduler if no pending task + execute = !mSequencesInflight.empty(); + } + + if (execute) { std::string source; mScheduler->executeNode(source, inputSequence); } @@ -407,7 +416,7 @@ int ProcessingUnit::processNewFrame() { return OK; } -int ProcessingUnit::handleYuvReprocessing(CameraBufferPortMap* buffersMap) { +int ProcessingUnit::handleYuvReprocessing(const CameraBufferPortMap* buffersMap) { CheckAndLogError(buffersMap->empty(), UNKNOWN_ERROR, "%s, the input or output buffer is empty", __func__); @@ -441,7 +450,7 @@ int ProcessingUnit::handleYuvReprocessing(CameraBufferPortMap* buffersMap) { // handle buffer done for normal YUV output sendPsysRequestEvent(&dstBuffers, bufSequence, timestamp, EVENT_PSYS_REQUEST_BUF_READY); - // Prepare the task input paramerters including input and output buffers, settings etc. + // Prepare the task input parameters including input and output buffers, settings etc. PipeTaskData taskParam; taskParam.mTuningMode = mTuningMode; taskParam.mInputBuffers = srcBuffers; @@ -514,7 +523,7 @@ void ProcessingUnit::handleRawReprocessing(CameraBufferPortMap* srcBuffers, // Return opaque RAW buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(rawPort, rawOutputBuffer); + it->onBufferAvailable(rawPort, rawOutputBuffer); } // Remove input stream from dstBuffers map @@ -536,7 +545,7 @@ void ProcessingUnit::handleRawReprocessing(CameraBufferPortMap* srcBuffers, // Return opaque RAW buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(rawPort, rawOutputBuffer); + it->onBufferAvailable(rawPort, rawOutputBuffer); } *hasRawOutput = true; @@ -590,7 +599,7 @@ void ProcessingUnit::returnRawBuffer() { AutoMutex lock(mBufferMapLock); // If too many buffers are holden in mRawQueue, return back to producer if (mRawBufferMap.size() > (PlatformData::getMaxRawDataNum(mCameraId) - - PlatformData::getMaxRequestsInHAL(mCameraId))) { + PlatformData::getMaxPipelineDepth(mCameraId))) { auto it = mRawBufferMap.cbegin(); { AutoMutex l(mBufferQueueLock); @@ -756,7 +765,7 @@ status_t ProcessingUnit::prepareTask(CameraBufferPortMap* srcBuffers, return OK; } -void ProcessingUnit::extractZslInfo(CameraBufferPortMap* dstBuffers, bool& reprocess, +void ProcessingUnit::extractZslInfo(const CameraBufferPortMap* dstBuffers, bool& reprocess, CameraBufferPortMap& videoBuf, CameraBufferPortMap& stillBuf, int64_t& zslSequence) { for (const auto& item : *dstBuffers) { @@ -894,11 +903,11 @@ void ProcessingUnit::dispatchTask(CameraBufferPortMap& inBuf, CameraBufferPortMa { std::unique_lock lock(mBufferQueueLock); mSequencesInflight.insert(currentSequence); + LOG2("@%s, fake task %d, pending task: %zu", mCameraId, currentSequence, + __func__, fakeTask, mSequencesInflight.size()); } // End of lock mBufferQueueLock - LOG2("@%s, fake task %d, pending task: %zu", mCameraId, currentSequence, __func__, - fakeTask, mSequencesInflight.size()); - // Prepare the task input paramerters including input and output buffers, settings etc. + // Prepare the task input parameters including input and output buffers, settings etc. PipeTaskData taskParam; taskParam.mTuningMode = mTuningMode; taskParam.mInputBuffers = inBuf; @@ -944,7 +953,7 @@ void ProcessingUnit::onBufferDone(int64_t sequence, uuid port, if (!needSkipOutputFrame(sequence)) { for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(port, camBuffer); + it->onBufferAvailable(port, camBuffer); } } } @@ -1004,13 +1013,13 @@ void ProcessingUnit::onTaskDone(const PipeTaskData& result) { if (result.mYuvTask) { auto iter = result.mInputBuffers.find(YUV_REPROCESSING_INPUT_PORT_ID); if (iter == result.mInputBuffers.end()) { - LOGW("@%s can't find YUV reprocesing input buffer", + LOGW("@%s can't find YUV reprocessing input buffer", mCameraId, sequence, __func__); return; } // Return YUV reprocessing input buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(YUV_REPROCESSING_INPUT_PORT_ID, iter->second); + it->onBufferAvailable(YUV_REPROCESSING_INPUT_PORT_ID, iter->second); } return; } @@ -1032,7 +1041,7 @@ void ProcessingUnit::onTaskDone(const PipeTaskData& result) { if ((src.second->getStreamUsage() != CAMERA_STREAM_OPAQUE_RAW) && (src.second->getStreamType() == CAMERA_STREAM_INPUT)) { for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(src.first, src.second); + it->onBufferAvailable(src.first, src.second); } } else { mBufferProducer->qbuf(src.first, src.second); @@ -1073,7 +1082,7 @@ void ProcessingUnit::outputRawImage(shared_ptr& srcBuf, // Send output buffer to its consumer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(mRawPort, dstBuf); + it->onBufferAvailable(mRawPort, dstBuf); } } } // namespace icamera diff --git a/src/core/ProcessingUnit.h b/src/core/ProcessingUnit.h index 4341d64..037dde8 100644 --- a/src/core/ProcessingUnit.h +++ b/src/core/ProcessingUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef PROCESSING_UNIT_H -#define PROCESSING_UNIT_H - +#pragma once #include #include @@ -58,7 +56,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { DISALLOW_COPY_AND_ASSIGN(ProcessingUnit); private: - int processNewFrame(); + virtual int processNewFrame(); std::shared_ptr allocStatsBuffer(int index); status_t prepareTask(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers); @@ -73,7 +71,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { void outputRawImage(std::shared_ptr& srcBuf, std::shared_ptr& dstBuf); - status_t handleYuvReprocessing(CameraBufferPortMap* buffersMap); + status_t handleYuvReprocessing(const CameraBufferPortMap* buffersMap); void handleRawReprocessing(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers, bool* allBufDone, bool* hasRawOutput, bool* hasRawInput); bool isBufferHoldForRawReprocess(int64_t sequence); @@ -88,7 +86,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { void handleExtraTasksForTnr(int64_t sequence, CameraBufferPortMap* dstBuffers, const AiqResult* aiqResult); - void extractZslInfo(CameraBufferPortMap* dstBuffers, bool& reprocess, + void extractZslInfo(const CameraBufferPortMap* dstBuffers, bool& reprocess, CameraBufferPortMap& videoBuf, CameraBufferPortMap& stillBuf, int64_t& zslSequence); void handleZslReprocessing(int64_t sequence, const CameraBufferPortMap& videoBuf, @@ -142,4 +140,3 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { } // namespace icamera -#endif // PROCESSING_UNIT_H diff --git a/src/core/RequestThread.cpp b/src/core/RequestThread.cpp index 656b25f..ebf1308 100644 --- a/src/core/RequestThread.cpp +++ b/src/core/RequestThread.cpp @@ -186,7 +186,7 @@ int RequestThread::processRequest(int bufferNum, camera_buffer_t **ubuffer) { mState = PROCESSING; } - mRequestTriggerEvent |= NEW_REQUEST; + mRequestTriggerEvent |= static_cast(NEW_REQUEST); mRequestSignal.notify_one(); return OK; } @@ -257,7 +257,7 @@ void RequestThread::handleEvent(EventData eventData) { } // Just in case too many requests are pending in mPendingRequests. if (!mPendingRequests.empty()) { - mRequestTriggerEvent |= NEW_FRAME; + mRequestTriggerEvent |= static_cast(NEW_FRAME); mRequestSignal.notify_one(); } } @@ -269,7 +269,7 @@ void RequestThread::handleEvent(EventData eventData) { if (mBlockRequest) { mBlockRequest = false; } - mRequestTriggerEvent |= NEW_STATS; + mRequestTriggerEvent |= static_cast(NEW_STATS); mRequestSignal.notify_one(); } break; @@ -277,7 +277,7 @@ void RequestThread::handleEvent(EventData eventData) { { AutoMutex l(mPendingReqLock); mLastSofSeq = eventData.data.sync.sequence; - mRequestTriggerEvent |= NEW_SOF; + mRequestTriggerEvent |= static_cast(NEW_SOF); mRequestSignal.notify_one(); } break; @@ -309,7 +309,7 @@ void RequestThread::handleEvent(EventData eventData) { fakeRequest.mBuffer[0] = &mFakeReqBuf; mFakeReqBuf.sequence = -1; mPendingRequests.push_back(fakeRequest); - mRequestTriggerEvent |= NEW_REQUEST; + mRequestTriggerEvent |= static_cast(NEW_REQUEST); mRequestSignal.notify_one(); } } @@ -358,7 +358,7 @@ bool RequestThread::threadLoop() { if (blockRequest()) { LOG2("Pending request processing, mBlockRequest %d, Req in processing %d", mBlockRequest, mRequestsInProcessing); - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); return true; } } @@ -375,17 +375,18 @@ bool RequestThread::threadLoop() { } else if (((mRequestTriggerEvent & static_cast(NEW_STATS)) != 0U) && (mLastSofSeq >= mLastAppliedSeq)) { applyingSeq = mLastSofSeq + 1; - } else if (((mRequestTriggerEvent & (NEW_REQUEST | NEW_FRAME)) != 0U) && + } else if (((mRequestTriggerEvent & (static_cast(NEW_REQUEST) + | static_cast(NEW_FRAME))) != 0U) && (mRequestsInProcessing == 0U)) { applyingSeq = mLastSofSeq + 1; } else { - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); return true; } mLastAppliedSeq = applyingSeq; if ((mLastAppliedSeq + PlatformData::getExposureLag(mCameraId)) <= mLastEffectSeq) { - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); LOG2("%s, skip processing request for AE delay issue", __func__); return true; } @@ -404,14 +405,18 @@ bool RequestThread::threadLoop() { handleRequest(request, applyingSeq); { AutoMutex l(mPendingReqLock); - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); } } return true; } void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { - int64_t effectSeq = mLastEffectSeq + 1; + int64_t effectSeq = 0; + { + std::lock_guard l(mPendingReqLock); + effectSeq = mLastEffectSeq + 1; + } // Reprocessing case, don't run 3A. if (IS_INPUT_BUFFER(request.mBuffer[0]->timestamp, request.mBuffer[0]->sequence)) { effectSeq = request.mBuffer[0]->sequence; @@ -422,7 +427,8 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { { AutoMutex l(mPendingReqLock); if (mState != EXIT) { - ccaId = ++mLastCcaId; + ++mLastCcaId; + ccaId = mLastCcaId; } } diff --git a/src/core/RequestThread.h b/src/core/RequestThread.h index ca285fb..8a6e028 100644 --- a/src/core/RequestThread.h +++ b/src/core/RequestThread.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef REQUEST_THREAD_H -#define REQUEST_THREAD_H - +#pragma once #include #include #include @@ -38,7 +36,7 @@ class RequestThread : public Thread, public EventSource, public EventListener { void requestStart(); void requestStop(); - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); /** * \Clear pending requests. @@ -67,13 +65,13 @@ class RequestThread : public Thread, public EventSource, public EventListener { int configure(const stream_config_t *streamList); private: - void run() { + virtual void run() { bool ret = true; while (ret) { ret = threadLoop(); } } - bool threadLoop(); + virtual bool threadLoop(); int mCameraId; AiqUnitBase *m3AControl; @@ -149,4 +147,3 @@ class RequestThread : public Thread, public EventSource, public EventListener { } //namespace icamera -#endif // REQUEST_THREAD_H diff --git a/src/core/SensorHwCtrl.cpp b/src/core/SensorHwCtrl.cpp index 369566c..65d26b7 100644 --- a/src/core/SensorHwCtrl.cpp +++ b/src/core/SensorHwCtrl.cpp @@ -163,7 +163,10 @@ int SensorHwCtrl::setExposure(const vector& coarseExposures, LOG2("%s coarseExposure=%d fineExposure=%d", __func__, coarseExposures[0], fineExposures[0]); LOG2("SENSORCTRLINFO: exposure_value=%d", coarseExposures[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, coarseExposures[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, coarseExposures[0]); + CheckAndLogError((status != 0), status, "failed to set exposure %d.", coarseExposures[0]); + + return OK; } // CRL_MODULE_S @@ -230,7 +233,7 @@ int SensorHwCtrl::setAnalogGains(const vector& analogGains) { // CRL_MODULE_S if (analogGains.size() > 1) { - if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERSION_AG) { return setConversionGain(analogGains); } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { LOG2("sensor multi conversion gain"); @@ -240,7 +243,10 @@ int SensorHwCtrl::setAnalogGains(const vector& analogGains) { // CRL_MODULE_E LOG2("%s analogGain=%d", __func__, analogGains[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, analogGains[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, analogGains[0]); + CheckAndLogError((status != 0), status, "failed to set analog gain %d.", analogGains[0]); + + return OK; } int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { @@ -250,7 +256,7 @@ int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { // CRL_MODULE_S if (digitalGains.size() > 1) { - if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERSION_AG) { return setMultiDigitalGain(digitalGains); } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { LOG2("sensor multi conversion gain"); @@ -269,7 +275,10 @@ int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { // CRL_MODULE_E LOG2("%s digitalGain=%d", __func__, digitalGains[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_DIGITAL_GAIN, digitalGains[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_DIGITAL_GAIN, digitalGains[0]); + CheckAndLogError((status != 0), status, "failed to set digitalGain gain %d.", digitalGains[0]); + + return OK; } // CRL_MODULE_S @@ -390,12 +399,12 @@ int SensorHwCtrl::setFrameLengthLines(int fll) { int SensorHwCtrl::setFrameDuration(int llp, int fll) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); - CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); + CheckAndLogError(mPixelArraySubdev == nullptr, NO_INIT, "pixel array sub device is not set"); LOG2("@%s, llp:%d, fll:%d", __func__, llp, fll); /* only set them to driver when llp or fll is not 0 */ if (llp != 0) { - (void)setLineLengthPixels(llp); + (void)setLineLengthPixels(llp); } if (fll != 0) { diff --git a/src/core/SensorHwCtrl.h b/src/core/SensorHwCtrl.h index 70adb69..1963eb3 100644 --- a/src/core/SensorHwCtrl.h +++ b/src/core/SensorHwCtrl.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SENSOR_HW_CTRL_H -#define SENSOR_HW_CTRL_H - +#pragma once #include #include @@ -122,28 +120,27 @@ class DummySensor : public SensorHwCtrl { DummySensor(int cameraId) : SensorHwCtrl(cameraId, nullptr, nullptr) {} ~DummySensor() {} - int setTestPatternMode(int32_t testPatternMode) { return OK; } + virtual int setTestPatternMode(int32_t testPatternMode) { return OK; } int setDevice(V4L2Subdevice* pixelArraySubdev) { return OK; } - int getPixelRate(int& pixelRate) { return OK; } - int setExposure(const std::vector& coarseExposures, + virtual int getPixelRate(int& pixelRate) { return OK; } + virtual int setExposure(const std::vector& coarseExposures, const std::vector& fineExposures) { return OK; } - int setAnalogGains(const std::vector& analogGains) { return OK; } - int setDigitalGains(const std::vector& digitalGains) { return OK; } - int setFrameDuration(int llp, int fll) { return OK; } - int getFrameDuration(int& llp, int& fll) { return OK; } - int getVBlank(int& vblank) { return OK; } - int getActivePixelArraySize(int& width, int& height, int& code) { return OK; } - int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep) { return OK; } + virtual int setAnalogGains(const std::vector& analogGains) { return OK; } + virtual int setDigitalGains(const std::vector& digitalGains) { return OK; } + virtual int setFrameDuration(int llp, int fll) { return OK; } + virtual int getFrameDuration(int& llp, int& fll) { return OK; } + virtual int getVBlank(int& vblank) { return OK; } + virtual int getActivePixelArraySize(int& width, int& height, int& code) { return OK; } + virtual int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep) { return OK; } // HDR_FEATURE_S - int setWdrMode(int mode) { return OK; } + virtual int setWdrMode(int mode) { return OK; } // HDR_FEATURE_E // CRL_MODULE_S - int setFrameRate(float fps) { return OK; } + virtual int setFrameRate(float fps) { return OK; } // CRL_MODULE_E }; } // namespace icamera -#endif // SENSOR_HW_CTRL_H diff --git a/src/core/SofSource.h b/src/core/SofSource.h index ad76fa8..62150ef 100644 --- a/src/core/SofSource.h +++ b/src/core/SofSource.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SOF_SOURCE_H -#define SOF_SOURCE_H - +#pragma once #include #include @@ -51,4 +49,3 @@ class SofSource : public EventSource { } // namespace icamera -#endif // SOF_SOURCE_H diff --git a/src/core/SwImageProcessor.cpp b/src/core/SwImageProcessor.cpp index de28ad7..811ba85 100644 --- a/src/core/SwImageProcessor.cpp +++ b/src/core/SwImageProcessor.cpp @@ -131,7 +131,7 @@ int SwImageProcessor::processNewFrame() { static_cast(cInBuffer->getBufferAddr()), cInBuffer->getBufferSize(), cInBuffer->getFormat(), static_cast(cOutBuffer->getBufferAddr()), cOutBuffer->getBufferSize(), cOutBuffer->getFormat()); - CheckAndLogError((ret < 0), ret, "format convertion failed with %d", ret); + CheckAndLogError((ret < 0), ret, "format conversion failed with %d", ret); if (CameraDump::isDumpTypeEnable(DUMP_SW_IMG_PROC_OUTPUT)) { CameraDump::dumpImage(mCameraId, cOutBuffer, M_SWIPOP); @@ -142,7 +142,7 @@ int SwImageProcessor::processNewFrame() { // Notify listener: No lock here: mBufferConsumerList will not updated in this state for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(port, cOutBuffer); + it->onBufferAvailable(port, cOutBuffer); } } diff --git a/src/core/SwImageProcessor.h b/src/core/SwImageProcessor.h index d2c5d4d..0ac6738 100644 --- a/src/core/SwImageProcessor.h +++ b/src/core/SwImageProcessor.h @@ -14,15 +14,13 @@ * limitations under the License. */ -#ifndef SW_IMAGE_PROCESSOR_H -#define SW_IMAGE_PROCESSOR_H - +#pragma once #include "IProcessingUnit.h" namespace icamera { /** - * SwImageProcessor runs the Image Process Alogirhtm in the CPU. + * SwImageProcessor runs the Image Process Algorithm in the CPU. * It implements the BufferConsumer and BufferProducer Interface * This class is for debug purpose when the PsysProcess is not ready. */ @@ -38,7 +36,7 @@ class SwImageProcessor: public IProcessingUnit { virtual void stop(); private: - int processNewFrame(); + virtual int processNewFrame(); private: int mCameraId; @@ -46,4 +44,3 @@ class SwImageProcessor: public IProcessingUnit { } //namespace icamera -#endif // SW_IMAGE_PROCESSOR_H diff --git a/src/core/SyncManager.cpp b/src/core/SyncManager.cpp deleted file mode 100644 index 1108ba0..0000000 --- a/src/core/SyncManager.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2018-2025 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG SyncManager - -#include "SyncManager.h" - -#include -#include - -#include "iutils/CameraLog.h" - -namespace icamera { -SyncManager* SyncManager::sInstance = nullptr; -Mutex SyncManager::sLock; - -#define SEC_TO_MS(sec) ((sec) * (1000)) -#define USEC_TO_MS(usec) ((usec) / (1000)) - -const int32_t max_vc_sync_count = 128; - -SyncManager* SyncManager::getInstance() { - AutoMutex lock(sLock); - if (sInstance == nullptr) { - sInstance = new SyncManager(); - } - - return sInstance; -} - -void SyncManager::releaseInstance() { - AutoMutex lock(sLock); - - if (sInstance != nullptr) { - delete sInstance; - sInstance = nullptr; - } -} - -SyncManager::SyncManager() { - LOG1("@%s", __func__); - AutoMutex lock(mLock); - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { - for (int j = 0; j < MAX_BUFFER_COUNT; j++) { - mCameraBufInfo[i][j].sequence = -1; - CLEAR(mCameraBufInfo[i][j].sof_ts); - } - } - - mTotalSyncCamNum = 0; - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) mVcSyncCount[i] = 0; -} - -SyncManager::~SyncManager() { - LOG1("@%s", __func__); -} - -bool SyncManager::isSynced(int cameraId, int64_t sequence) { - LOG2("@%s", __func__); - const int TIME_DIFF_MS = 2; - bool sync = true; - const int index = sequence % MAX_BUFFER_COUNT; - - AutoMutex lock(mLock); - camera_buf_info bufInfo = mCameraBufInfo[cameraId][index]; - - int syncNum = 0; - bool isSync[MAX_CAMERA_NUMBER]; - long frameSyncedMs[MAX_CAMERA_NUMBER]; - const long curFrameMs = USEC_TO_MS(bufInfo.sof_ts.tv_usec) + SEC_TO_MS(bufInfo.sof_ts.tv_sec); - - // first step: To check whether the current frame is synced with others camera channel - // if timestamp difference <= 2ms, then think the frame is synced - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { - isSync[i] = false; - frameSyncedMs[i] = 0; - if ((mCameraBufInfo[i][0].sequence == -1) || (i == cameraId)) { - continue; - } - for (int j = 0; j < MAX_BUFFER_COUNT; j++) { - if (mCameraBufInfo[i][j].sequence >= 0) { - camera_buf_info& temp = mCameraBufInfo[i][j]; - const long tempFrameMs = - USEC_TO_MS(temp.sof_ts.tv_usec) + SEC_TO_MS(temp.sof_ts.tv_sec); - if (abs(tempFrameMs - curFrameMs) <= TIME_DIFF_MS) { - isSync[syncNum] = true; - frameSyncedMs[syncNum] = tempFrameMs; - syncNum++; - break; - } - } - } - } - // second step: if current frame is synced with frames from other cameraID, - // to check whether other 3 channel frames synced or not - if (syncNum >= mTotalSyncCamNum - 1) { - for (int i = 0; i < mTotalSyncCamNum - 1; i++) { - if (isSync[i]) { - if ((i + 1 < mTotalSyncCamNum - 1) && - abs(frameSyncedMs[i] - frameSyncedMs[i + 1]) <= TIME_DIFF_MS) { - sync &= true; - } else if ((i + 1 == mTotalSyncCamNum - 1) && - abs(frameSyncedMs[i] - frameSyncedMs[0]) <= TIME_DIFF_MS) { - sync &= true; - } else { - sync &= false; - } - } - } - } else { - sync = false; - } - LOG2("Id:%d, sof_ts:%ldms, sequence:%ld sync %d", cameraId, curFrameMs, sequence, sync); - return sync; -} - -void SyncManager::updateCameraBufInfo(int cameraId, camera_buf_info* info) { - LOG2("@%s", __func__); - const int index = info->sequence % MAX_BUFFER_COUNT; - AutoMutex lock(mLock); - mCameraBufInfo[cameraId][index] = *info; -} - -void SyncManager::updateSyncCamNum() { - AutoMutex l(mLock); - CheckAndLogError(mTotalSyncCamNum >= MAX_CAMERA_NUMBER, VOID_VALUE, "Too many cameras"); - mTotalSyncCamNum++; -} - -bool SyncManager::vcSynced(int vc) { - CheckAndLogError(vc >= MAX_CAMERA_NUMBER, false, "vc %d error", vc); - - AutoMutex l(mVcSyncLock); - int count = mVcSyncCount[vc]; - int minCount = INT_MAX; - int maxCount = 0; - - for (int i = 0; i < mTotalSyncCamNum; i++) { - minCount = std::min(minCount, mVcSyncCount[i]); - maxCount = std::max(maxCount, mVcSyncCount[i]); - } - - // Check again if status is circling back to 0. - // Most of time handling code won't be executed because condition is false. - if (maxCount - minCount > max_vc_sync_count / 2) { - minCount = max_vc_sync_count; - maxCount = 0; - for (int i = 0; i < mTotalSyncCamNum; i++) { - count = - (mVcSyncCount[i] + max_vc_sync_count) % (max_vc_sync_count + max_vc_sync_count / 4); - minCount = std::min(minCount, count); - maxCount = std::max(maxCount, count); - } - count = - (mVcSyncCount[vc] + max_vc_sync_count) % (max_vc_sync_count + max_vc_sync_count / 4); - } - - if (count > minCount) { - LOG2("vc %d ready: false", vc); - return false; - } - - return true; -} - -void SyncManager::updateVcSyncCount(int vc) { - CheckAndLogError(vc >= MAX_CAMERA_NUMBER, VOID_VALUE, "vc %d error", vc); - AutoMutex l(mVcSyncLock); - mVcSyncCount[vc] = (mVcSyncCount[vc] + 1) % (max_vc_sync_count + 1); -} - -void SyncManager::printVcSyncCount(void) { - AutoMutex l(mVcSyncLock); - for (int i = 0; i < mTotalSyncCamNum; i++) LOG2("[%d]", mVcSyncCount[i]); -} - -} // namespace icamera diff --git a/src/core/SyncManager.h b/src/core/SyncManager.h deleted file mode 100644 index 7f58189..0000000 --- a/src/core/SyncManager.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2018-2025 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYNC_MANAGER_H -#define SYNC_MANAGER_H - -#include "PlatformData.h" - -namespace icamera { - -struct camera_buf_info { - int64_t sequence; - struct timeval sof_ts; -}; - -class SyncManager { - private: - // Prevent to create multiple instances - SyncManager(); - ~SyncManager(); - - public: - /** - * releaseInstance - * This function must be called when the hal is destroyed. - */ - static void releaseInstance(); - static SyncManager* getInstance(); - - bool isSynced(int cameraId, int64_t sequence); - void updateCameraBufInfo(int cameraId, camera_buf_info* info); - - void updateSyncCamNum(); - - bool vcSynced(int vc); - void updateVcSyncCount(int vc); - void printVcSyncCount(); - - private: - static SyncManager* sInstance; - static Mutex sLock; - Mutex mLock; - struct camera_buf_info mCameraBufInfo[MAX_CAMERA_NUMBER][MAX_BUFFER_COUNT]; - - int mVcSyncCount[MAX_CAMERA_NUMBER]; - Mutex mVcSyncLock; - int mTotalSyncCamNum; -}; - -} /* namespace icamera */ - -#endif // SYNC_MANAGER_H diff --git a/src/core/processingUnit/CBStage.cpp b/src/core/processingUnit/CBStage.cpp index 4b7db97..7375181 100644 --- a/src/core/processingUnit/CBStage.cpp +++ b/src/core/processingUnit/CBStage.cpp @@ -64,7 +64,7 @@ int CBStage::init() { CheckAndLogError(ret != OK, ret, "Failed to get payload descriptor"); ret = CBLayoutUtils::getCbTerminalDescriptors(mResourceId, sTerminalDesc, mTerminalDescCount); - CheckAndLogError(ret != OK, ret, "Failded to get terminal descriptor"); + CheckAndLogError(ret != OK, ret, "Failed to get terminal descriptor"); // Use share memory buffers for sandboxing const size_t size = diff --git a/src/core/processingUnit/FaceStage.cpp b/src/core/processingUnit/FaceStage.cpp old mode 100644 new mode 100755 index c176913..4afdc56 --- a/src/core/processingUnit/FaceStage.cpp +++ b/src/core/processingUnit/FaceStage.cpp @@ -29,7 +29,6 @@ FaceStage::FaceStage(int cameraId, int streamId, const stream_t& stream, bool is : CameraStream(cameraId, streamId, stream), ISchedulerNode("face"), mStreamInfo(stream), - mInternalBufferPool(nullptr), mIsPrivate(isPrivate), mFaceDetection(nullptr) { LOG1("%s, mIsPrivate: %d, width: %d, height: %d", __func__, mIsPrivate, @@ -38,10 +37,20 @@ FaceStage::FaceStage(int cameraId, int streamId, const stream_t& stream, bool is mFaceDetection = std::unique_ptr( IFaceDetection::createFaceDetection(mCameraId, stream.width, stream.height)); - if (mIsPrivate || (!mIsPrivate && !PlatformData::runFaceWithSyncMode(mCameraId))) { - mInternalBufferPool = std::unique_ptr(new CameraBufferPool()); - mStreamInfo.memType = mFaceDetection->getMemoryType(); - mInternalBufferPool->createBufferPool(mCameraId, MAX_BUFFER_COUNT, mStreamInfo); + if (mIsPrivate || !PlatformData::runFaceWithSyncMode(mCameraId)) { + for (int i = 0; i < MAX_BUFFER_COUNT; i++) { + std::shared_ptr buffer = CameraBuffer::create( + mFaceDetection->getMemoryType(), stream.size, i, stream.format, stream.width, + stream.height); + if (buffer == nullptr) { + while (mAvailableBufferQ.empty() == false) { + mAvailableBufferQ.pop(); + } + LOGE("failed to alloc %d internal buffers", i); + break; + } + mAvailableBufferQ.push(buffer); + } } } @@ -52,14 +61,23 @@ FaceStage::~FaceStage() { int FaceStage::start() { LOG1("@%s, %p, mIsPrivate: %d", mCameraId, __func__, this, mIsPrivate); + if ((mIsPrivate || !PlatformData::runFaceWithSyncMode(mCameraId))) { + if (mAvailableBufferQ.empty()) { + return NO_MEMORY; + } + } + return OK; } int FaceStage::stop() { CameraStream::stop(); - if (mInternalBufferPool) { - mInternalBufferPool->destroyBufferPool(); + while (mPendingBufferQ.empty() == false) { + const auto buffer = mPendingBufferQ.front(); + mPendingBufferQ.pop(); + + mAvailableBufferQ.push(buffer); } return OK; @@ -74,11 +92,11 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf if (mIsPrivate) { shared_ptr camBuffer = nullptr; if (addExtraBuf) { + AutoMutex l(mBufferPoolLock); // use the internal buffer pool for private stream - CheckAndLogError(!mInternalBufferPool, ret, "no buffer pool for private stream"); + CheckAndLogError(mAvailableBufferQ.empty(), ret, "no buffer pool for private stream"); - camBuffer = mInternalBufferPool->acquireBuffer(); - CheckAndLogError(!camBuffer, ret, "%s, No available internal buffer", __func__); + camBuffer = mAvailableBufferQ.front(); LOG2("@%s, mStreamId:%d, CameraBuffer:%p for port:%d, addr:%p", mCameraId, sequence, __func__, mStreamId, camBuffer.get(), mPort, camBuffer->getBufferAddr()); @@ -94,6 +112,8 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf ret = mBufferProducer->qbuf(mPort, camBuffer); if (ret == OK) { AutoMutex l(mBufferPoolLock); + mAvailableBufferQ.pop(); + mBufferInProcessing++; LOG2("%s, mIsPrivate: %d, buffer in processing: %d", __func__, mIsPrivate, mBufferInProcessing); @@ -107,24 +127,6 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf return ret; } -shared_ptr FaceStage::copyToInternalBuffer( - const shared_ptr& camBuffer) { - CheckAndLogError(!mInternalBufferPool, nullptr, - "%s, no buffer pool for face detection", __func__); - - shared_ptr faceBuffer = mInternalBufferPool->acquireBuffer(); - CheckAndLogError(!faceBuffer, nullptr, "%s, No available internal buffer", __func__); - - CameraBufferMapper mapper(camBuffer); - CheckAndLogError(!camBuffer->getBufferAddr(), nullptr, - "%s, Failed to get addr for camBuffer", __func__); - - MEMCPY_S(faceBuffer->getBufferAddr(), faceBuffer->getBufferSize(), - camBuffer->getBufferAddr(), camBuffer->getBufferSize()); - - return faceBuffer; -} - bool FaceStage::isFaceEnabled(int64_t sequence) { auto cameraContext = CameraContext::getInstance(mCameraId); auto dataContext = cameraContext->getDataContextBySeq(sequence); @@ -135,7 +137,7 @@ bool FaceStage::isFaceEnabled(int64_t sequence) { return false; } -int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBuffer) { +int FaceStage::onBufferAvailable(uuid port, const shared_ptr& camBuffer) { // Ignore if the buffer is not for this stream. if (mPort != port) { return OK; @@ -162,9 +164,7 @@ int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBu if (this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(camBuffer); - } + mAvailableBufferQ.push(camBuffer); } else { if (isFaceEnabled(sequence) && mFaceDetection->needRunFace(sequence)) { if (PlatformData::runFaceWithSyncMode(mCameraId)) { @@ -175,14 +175,28 @@ int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBu LOG2("%s, run face with ASYNC mode. mIsPrivate: %d", sequence, __func__, mIsPrivate); - shared_ptr faceBuffer = copyToInternalBuffer(camBuffer); - CheckAndLogError(!faceBuffer, UNKNOWN_ERROR, - " %s, Failed to copy frame to internal buffer", __func__); + shared_ptr faceBuffer; + { + AutoMutex l(mBufferPoolLock); + CheckAndLogError(mAvailableBufferQ.empty(), NO_MEMORY, "No detection buffer"); + faceBuffer = mAvailableBufferQ.front(); + } + + CameraBufferMapper mapper(camBuffer); + CheckAndLogError(camBuffer->getBufferAddr() == nullptr, BAD_VALUE, + "%s, Failed to get addr for camBuffer", __func__); + + MEMCPY_S(faceBuffer->getBufferAddr(), faceBuffer->getBufferSize(), + camBuffer->getBufferAddr(), camBuffer->getBufferSize()); + + faceBuffer->setSequence(camBuffer->getSequence()); + AutoMutex l(mBufferPoolLock); + mAvailableBufferQ.pop(); mPendingBufferQ.push(faceBuffer); } } - CameraStream::onFrameAvailable(port, camBuffer); + CameraStream::onBufferAvailable(port, camBuffer); } return OK; } @@ -199,16 +213,14 @@ bool FaceStage::process(int64_t triggerId) { faceBuffer = mPendingBufferQ.front(); mPendingBufferQ.pop(); - if (mPendingBufferQ.size() > PlatformData::getMaxRequestsInHAL(mCameraId)) { + if (mPendingBufferQ.size() > PlatformData::getMaxPipelineDepth(mCameraId)) { LOG2("%s, Skip this time due to many buffer in pendding: %d", __func__, mPendingBufferQ.size()); if (mIsPrivate && this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(faceBuffer); - } + mAvailableBufferQ.push(faceBuffer); return true; } } @@ -222,9 +234,7 @@ bool FaceStage::process(int64_t triggerId) { if (mIsPrivate && this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(faceBuffer); - } + mAvailableBufferQ.push(faceBuffer); return true; } diff --git a/src/core/processingUnit/FaceStage.h b/src/core/processingUnit/FaceStage.h index 4be51db..b52bdc3 100644 --- a/src/core/processingUnit/FaceStage.h +++ b/src/core/processingUnit/FaceStage.h @@ -18,7 +18,6 @@ #include "CameraStream.h" #include "ISchedulerNode.h" -#include "CameraBufferPool.h" #include "IFaceDetection.h" #include "iutils/Errors.h" @@ -40,18 +39,16 @@ class FaceStage : public CameraStream, public ISchedulerNode { virtual int stop(); virtual int qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf = false); - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); virtual bool process(int64_t triggerId); private: - std::shared_ptr copyToInternalBuffer( - const std::shared_ptr& camBuffer); bool isFaceEnabled(int64_t sequence); private: stream_t mStreamInfo; // The stream info for face detection // Maintains a internal buffer pool when face running in async and bind on preview stream - std::unique_ptr mInternalBufferPool; + CameraBufQ mAvailableBufferQ; // Store the pending buffers need to process // Use the mBufferPoolLock in base class to guard it diff --git a/src/core/processingUnit/GPUPostStage.cpp b/src/core/processingUnit/GPUPostStage.cpp index dead15f..d2db943 100644 --- a/src/core/processingUnit/GPUPostStage.cpp +++ b/src/core/processingUnit/GPUPostStage.cpp @@ -91,7 +91,7 @@ int GPUPostStage::qbuf(uuid port, const std::shared_ptr& camBuffer bool GPUPostStage::fetchRequestBuffer(int64_t sequence, std::shared_ptr& inBuffer) { CameraBufVector& bufV = mInternalBuffers[mInputPort]; - CheckAndLogError(bufV.empty(), false, "%s: queued %d, no avaiable buffer", getName(), + CheckAndLogError(bufV.empty(), false, "%s: queued %d, no available buffer", getName(), mQueuedInputBuffers.size()); inBuffer = bufV.back(); bufV.pop_back(); diff --git a/src/core/processingUnit/IPipeManagerFactory.h b/src/core/processingUnit/IPipeManagerFactory.h index e4327c4..619fd5e 100644 --- a/src/core/processingUnit/IPipeManagerFactory.h +++ b/src/core/processingUnit/IPipeManagerFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef I_PIPE_MANAGER_FACTORY -#define I_PIPE_MANAGER_FACTORY +#pragma once #include "IPipeManager.h" #include "CameraScheduler.h" @@ -29,7 +28,7 @@ namespace icamera { class IPipeManagerFactory { public: /** - * \brief Select the IPipeManager accroding to config + * \brief Select the IPipeManager according to config * * \param cameraId: the camera id * \param PipeManagerCallback: the callback object @@ -40,5 +39,3 @@ class IPipeManagerFactory { std::shared_ptr& scheduler); }; } // namespace icamera - -#endif // I_PIPE_MANAGER_FACTORY diff --git a/src/core/processingUnit/PipeLine.cpp b/src/core/processingUnit/PipeLine.cpp index d139ab7..9d47836 100644 --- a/src/core/processingUnit/PipeLine.cpp +++ b/src/core/processingUnit/PipeLine.cpp @@ -46,29 +46,38 @@ PipeLine::~PipeLine() { } } +void PipeLine::deinit() { + if (mPSysDevice != nullptr) { + mPSysDevice->deinit(); + } +} + void PipeLine::updateIspTuningMode(TuningMode tuningMode) { - if (PlatformData::supportUpdateTuning(mCameraId)) { - uint32_t ispTuningMode = 0; - auto ret = mGraphConfig->getIspTuningModeByStreamId(mStreamId, ispTuningMode); - if (ret == OK) { - ia_lard_input_params lardParam = { - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - ispTuningMode, - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - }; - cca::cca_nvm tmpNvm = {}; + if (!PlatformData::supportUpdateTuning(mCameraId)) { + return; + } - auto intelCca = IntelCca::getInstance(mCameraId, tuningMode); - CheckAndLogError(!intelCca, VOID_VALUE, "Failed to get IntelCca"); + uint32_t ispTuningMode = 0; + int ret = mGraphConfig->getIspTuningModeByStreamId(mStreamId, ispTuningMode); + CheckAndLogError(ret != OK, VOID_VALUE, "Failed to get tuning mode"); - ia_err iaErr = intelCca->updateTuning(cca::CCA_LARD_ISP, lardParam, tmpNvm, mStreamId); - CheckAndLogError(iaErr != ia_err_none, VOID_VALUE, "Failed to update tuning %u", - ispTuningMode); + uint32_t aiqMode = IA_MKN_CHTOUL('D', 'F', 'L', 'T'); + ia_lard_input_params lardParam = { + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + aiqMode, + ispTuningMode, + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + }; + cca::cca_nvm tmpNvm = {}; - LOG1("Update isp tuning mode %u, streamId %d", ispTuningMode, mStreamId); - } - } + IntelCca* intelCca = IntelCca::getInstance(mCameraId, tuningMode); + CheckAndLogError(!intelCca, VOID_VALUE, "Failed to get IntelCca"); + + ia_err iaErr = intelCca->updateTuning(cca::CCA_LARD_ISP, lardParam, tmpNvm, mStreamId); + CheckAndLogError(iaErr != ia_err_none, VOID_VALUE, "Failed to update tuning %u", + ispTuningMode); + + LOG1("Update isp tuning mode %u, streamId %d", ispTuningMode, mStreamId); } int PipeLine::configure(TuningMode tuningMode, IpuPacAdaptor* adaptor) { @@ -204,7 +213,7 @@ void PipeLine::releasePipeStage() { status_t PipeLine::createPipeStages() { std::map stages; status_t ret = mGraphConfig->getStagesByStreamId(mStreamId, &stages); - CheckAndLogError(ret != OK, ret, "%s: Get pipeStages from grpah failed", __func__); + CheckAndLogError(ret != OK, ret, "%s: Get pipeStages from graph failed", __func__); if (mPSysDevice) { delete mPSysDevice; diff --git a/src/core/processingUnit/PipeLine.h b/src/core/processingUnit/PipeLine.h index b61c47b..0f881f0 100644 --- a/src/core/processingUnit/PipeLine.h +++ b/src/core/processingUnit/PipeLine.h @@ -75,6 +75,8 @@ class PipeLine { PipeLine(int cameraId, int streamId, std::shared_ptr gc, std::shared_ptr scheduler); virtual ~PipeLine(); + + void deinit(); int configure(TuningMode tuningMode, IpuPacAdaptor* adaptor); int start(); int stop(); diff --git a/src/core/processingUnit/PipeManager.cpp b/src/core/processingUnit/PipeManager.cpp index 9abbf18..5307f1f 100644 --- a/src/core/processingUnit/PipeManager.cpp +++ b/src/core/processingUnit/PipeManager.cpp @@ -101,6 +101,7 @@ int PipeManager::stop() { for (auto& pipeLine : mPipeLines) { pipeLine.second->stop(); } + mPacAdaptor->clearAicResult(); return icamera::OK; } @@ -182,7 +183,7 @@ int PipeManager::bindExternalPorts( bool bind = false; auto frameInfo = inputFrameInfo.begin(); while (frameInfo != inputFrameInfo.end()) { - const bool match = isSameStreamConfig(portInfo.second, frameInfo->second, false); + bool match = isSameStreamConfig(portInfo.second, frameInfo->second, false); if (match) { PortMapping portMap; portMap.mPipeStage = pipeLine.second->getInput(); @@ -268,7 +269,7 @@ int PipeManager::bindYuvReprocessingPort(const std::map& yuvInpu std::map outputInfo; std::map inputInfo; - // YUV reporcessing pipe line has only one pipe stage + // YUV reprocessing pipe line has only one pipe stage IPipeStage* mPipeStage = mYuvPipeLine[YUV_REPROCESSING_STREAM_ID]->getInput(); mPipeStage->getFrameInfo(inputInfo, outputInfo); @@ -380,6 +381,7 @@ void PipeManager::releasePipeLines() { pipeLine.second->removeListener(EVENT_PSYS_STATS_BUF_READY, this); pipeLine.second->removeListener(EVENT_PSYS_STATS_SIS_BUF_READY, this); pipeLine.second->removeListener(EVENT_STAGE_BUF_READY, this); + pipeLine.second->deinit(); } mPipeLines.clear(); @@ -555,7 +557,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* * --------------------- * | | | | * | | | | - * | | orignal | | + * | | original | | * | | | | * | | | | * |-------------------- @@ -564,7 +566,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* // Increase h ptz->y -= (ptz->xSize - ptz->ySize) / 2; ptz->ySize = xSize; - // Check the boundry + // Check the boundary if (ptz->y < 0.0) { ptz->y = 0.0; } else { @@ -576,7 +578,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* // Increase w ptz->x -= (ptz->ySize - ptz->xSize) / 2; ptz->xSize = ySize; - // Check the boundry + // Check the boundary if (ptz->x < 0.0) { ptz->x = 0.0; } else { @@ -630,7 +632,7 @@ void PipeManager::queueBuffers(const PipeTaskData& task, const std::vectorqueue input buffer for stream:%d stage uuid: %u, external:%d", sequence, inputMap.mStreamId, inputMap.mStagePort, inputFrame.first); - inputMap.mPipeStage->onFrameAvailable(inputMap.mStagePort, inputFrame.second); + inputMap.mPipeStage->onBufferAvailable(inputMap.mStagePort, inputFrame.second); } } } @@ -679,7 +681,8 @@ int PipeManager::onBufferDone(uuid port, const std::shared_ptr& bu // Check if buffer belongs to the task because input buffer maybe reused for (auto& buf : task.mTaskData.mOutputBuffers) { - if (buf.second && (buffer->getUserBuffer() == buf.second->getUserBuffer())) { + if ((buf.second != nullptr) && + (buffer->getUserBuffer() == buf.second->getUserBuffer())) { outputPort = buf.first; } } @@ -710,12 +713,12 @@ int PipeManager::onBufferDone(uuid port, const std::shared_ptr& bu return OK; } - if (mPMCallback) { + if (mPMCallback != nullptr) { // Return buffer mPMCallback->onBufferDone(sequence, outputPort, buffer); } - if (needReturn && mPMCallback) { + if (needReturn && (mPMCallback != nullptr)) { mPMCallback->onTaskDone(result); } @@ -745,6 +748,7 @@ void PipeManager::handleEvent(EventData eventData) { (void)onBufferDone(eventData.data.stageBufReady.uuid, eventData.buffer); break; default: + // Do not need to callback break; } } diff --git a/src/core/processingUnit/PipeManager.h b/src/core/processingUnit/PipeManager.h index 3b44b4f..60fdb54 100644 --- a/src/core/processingUnit/PipeManager.h +++ b/src/core/processingUnit/PipeManager.h @@ -53,9 +53,9 @@ class PipeManager : public IPipeManager { */ virtual void handleEvent(EventData eventData); // handle bufferDone - int onBufferDone(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferDone(uuid port, const std::shared_ptr& camBuffer); // metadata handler - void onMetadataReady(int64_t sequence); + virtual void onMetadataReady(int64_t sequence); public: /** diff --git a/src/core/processingUnit/PipeManagerStub.cpp b/src/core/processingUnit/PipeManagerStub.cpp index ec55638..929f358 100644 --- a/src/core/processingUnit/PipeManagerStub.cpp +++ b/src/core/processingUnit/PipeManagerStub.cpp @@ -281,7 +281,7 @@ int PipeManagerStub::processTask(const PipeTaskData& task) { static_cast(cInBuffer->getBufferAddr()), cInBuffer->getBufferSize(), cInBuffer->getFormat(), static_cast(mIntermBuffer->getBufferAddr()), mIntermBuffer->getBufferSize(), mIntermBuffer->getFormat()); - CheckAndLogError((ret < 0), ret, "format convertion failed with %d", ret); + CheckAndLogError((ret < 0), ret, "format conversion failed with %d", ret); } for (auto& outputFrame : task.mOutputBuffers) { if (outputFrame.second) { diff --git a/src/core/processingUnit/PostProcessStage.cpp b/src/core/processingUnit/PostProcessStage.cpp index d1444cb..7380738 100644 --- a/src/core/processingUnit/PostProcessStage.cpp +++ b/src/core/processingUnit/PostProcessStage.cpp @@ -122,7 +122,7 @@ bool PostProcessStage::fetchRequestBuffer(int64_t sequence, } CameraBufVector& bufV = mInternalBuffers[mInputPort]; - CheckAndLogError(bufV.empty(), false, "%s: queued %d, no avaiable buffer", getName(), + CheckAndLogError(bufV.empty(), false, "%s: queued %d, no available buffer", getName(), mQueuedInputBuffers.size()); inBuffer = bufV.back(); bufV.pop_back(); diff --git a/src/fd/FaceDetection.h b/src/fd/FaceDetection.h index 87dd832..3a03cbf 100644 --- a/src/fd/FaceDetection.h +++ b/src/fd/FaceDetection.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef FACE_DETECTION_H -#define FACE_DETECTION_H - +#pragma once #include #include "CameraBuffer.h" @@ -72,4 +70,3 @@ class FaceDetection { } // namespace icamera -#endif // FACE_DETECTION_H diff --git a/src/fd/IFaceDetection.cpp b/src/fd/IFaceDetection.cpp index 2760796..54f0c33 100644 --- a/src/fd/IFaceDetection.cpp +++ b/src/fd/IFaceDetection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ #define LOG_TAG IFaceDetection #include "src/fd/IFaceDetection.h" -#include "FaceDetectionPVL.h" #include "FaceSSD.h" #include "PlatformData.h" #include "iutils/CameraLog.h" @@ -27,9 +26,7 @@ namespace icamera { FaceDetection* IFaceDetection::createFaceDetection(int cameraId, int width, int height) { FaceDetection* fd = nullptr; int fdVendor = PlatformData::faceEngineVendor(cameraId); - if (fdVendor == FACE_ENGINE_INTEL_PVL) { - fd = new FaceDetectionPVL(cameraId, width, height); - } else if (fdVendor == FACE_ENGINE_GOOGLE_FACESSD) { + if (fdVendor == FACE_ENGINE_GOOGLE_FACESSD) { fd = new FaceSSD(cameraId, width, height); } diff --git a/src/fd/facessd/CameraFaceDetection.cpp b/src/fd/facessd/CameraFaceDetection.cpp new file mode 100644 index 0000000..b43895b --- /dev/null +++ b/src/fd/facessd/CameraFaceDetection.cpp @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG FaceSSD +#include "src/fd/facessd/CameraFaceDetection.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "iutils/CameraLog.h" +#include "src/fd/facessd/CommonTypes.h" + +namespace icamera { + +namespace { + +constexpr int kImageSizeForDetection = 160; + +} // namespace + +// static +std::unique_ptr FaceDetector::Create() { + auto face_detector_handle = face_detector_create(); + + // store the model and anchor path + if (!face_detector_initialize(face_detector_handle)) { + LOGE("Failed to initialize FaceSSD detector"); + return nullptr; + } + return std::unique_ptr(new FaceDetector(face_detector_handle)); +} + +FaceDetector::~FaceDetector() { + face_detector_delete(face_detector_handle_); +} + +FaceDetector::FaceDetector(FaceDetectorHandle face_detector_handle) + : face_detector_handle_(face_detector_handle) {}; + +FaceDetectResult FaceDetector::Detect( + const uint8_t* buffer_addr, int input_stride, Size input_size, + std::optional active_sensor_array_size, + std::vector& faces) { + Size scaled_size = + (input_size.width > input_size.height) + ? Size(kImageSizeForDetection, + kImageSizeForDetection * input_size.height / input_size.width) + : Size(kImageSizeForDetection * input_size.width / input_size.height, + kImageSizeForDetection); + + PrepareBuffer(scaled_size); + + libyuv::ScalePlane(buffer_addr, input_stride, input_size.width, + input_size.height, scaled_buffer_.data(), + scaled_size.width, scaled_size.width, scaled_size.height, + libyuv::FilterMode::kFilterNone); + + { + size_t num_faces = 0; + faces.clear(); + faces.resize(MAX_NUM_FACES); + if (!face_detector_detect(face_detector_handle_, scaled_buffer_.data(), + scaled_size.width, scaled_size.height, + faces.data(), &num_faces)) { + return FaceDetectResult::kDetectError; + } + faces.resize(num_faces); + } + + if (!faces.empty()) { + float ratio = static_cast(input_size.width) / + static_cast(scaled_size.width); + for (auto& f : faces) { + f.bounding_box.x1 *= ratio; + f.bounding_box.y1 *= ratio; + f.bounding_box.x2 *= ratio; + f.bounding_box.y2 *= ratio; + for (auto& l : f.landmarks) { + l.x *= ratio; + l.y *= ratio; + } + } + } + + if (active_sensor_array_size) { + std::optional> transform = + GetCoordinateTransform(input_size, *active_sensor_array_size); + if (!transform) { + return FaceDetectResult::kTransformError; + } + const float scale = std::get<0>(*transform); + const float offset_x = std::get<1>(*transform); + const float offset_y = std::get<2>(*transform); + for (auto& f : faces) { + f.bounding_box.x1 = scale * f.bounding_box.x1 + offset_x; + f.bounding_box.y1 = scale * f.bounding_box.y1 + offset_y; + f.bounding_box.x2 = scale * f.bounding_box.x2 + offset_x; + f.bounding_box.y2 = scale * f.bounding_box.y2 + offset_y; + for (auto& l : f.landmarks) { + l.x = scale * l.x + offset_x; + l.y = scale * l.y + offset_y; + } + } + } + return FaceDetectResult::kDetectOk; +} + +// static +std::optional> +FaceDetector::GetCoordinateTransform(const Size src, const Size dst) { + if (src.width > dst.width || src.height > dst.height) { + return std::nullopt; + } + const float width_ratio = static_cast(dst.width) / src.width; + const float height_ratio = static_cast(dst.height) / src.height; + const float scaling = std::min(width_ratio, height_ratio); + float offset_x = 0.0f, offset_y = 0.0f; + if (width_ratio < height_ratio) { + // |dst| has larger height than |src| * scaling. + offset_y = (dst.height - (src.height * scaling)) / 2; + } else { + // |dst| has larger width than |src| * scaling. + offset_x = (dst.width - (src.width * scaling)) / 2; + } + return std::make_tuple(scaling, offset_x, offset_y); +} + +void FaceDetector::PrepareBuffer(Size img_size) { + size_t new_size = img_size.width * img_size.height; + if (new_size > scaled_buffer_.size()) { + scaled_buffer_.resize(new_size); + } +} + +std::string LandmarkTypeToString(LandmarkType type) { + switch (type) { + case LANDMARK_LEFT_EYE: + return "LeftEye"; + case LANDMARK_RIGHT_EYE: + return "RightEye"; + case LANDMARK_NOSE_TIP: + return "NoseTip"; + case LANDMARK_MOUTH_CENTER: + return "MouthCenter"; + case LANDMARK_LEFT_EAR_TRAGION: + return "LeftEarTragion"; + case LANDMARK_RIGHT_EAR_TRAGION: + return "RightEarTragion"; + default: + return "Unknown"; + } +} + +} // namespace icamera diff --git a/src/fd/facessd/CameraFaceDetection.h b/src/fd/facessd/CameraFaceDetection.h new file mode 100644 index 0000000..f5b0716 --- /dev/null +++ b/src/fd/facessd/CameraFaceDetection.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "src/fd/facessd/CommonTypes.h" + +namespace icamera { + +enum class FaceDetectResult { + kDetectOk, + kDetectError, + kBufferError, + kTransformError, + kTimeoutError, +}; + +// This class encapsulates Google3 FaceSSD library. Only support gray type. +class FaceDetector { + public: + static std::unique_ptr Create(); + + ~FaceDetector(); + + FaceDetectResult Detect(const uint8_t* buffer_addr, int input_stride, Size input_size, + std::optional active_sensor_array_size, + std::vector& faces); + + static std::optional> GetCoordinateTransform( + const Size src, const Size dst); + + private: + explicit FaceDetector(FaceDetectorHandle face_detector_handle); + + void PrepareBuffer(Size img_size); + + std::vector scaled_buffer_; + + FaceDetectorHandle face_detector_handle_; +}; + +std::string LandmarkTypeToString(LandmarkType type); + +} // namespace icamera diff --git a/src/fd/facessd/CommonTypes.h b/src/fd/facessd/CommonTypes.h new file mode 100644 index 0000000..89098c5 --- /dev/null +++ b/src/fd/facessd/CommonTypes.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include +#include +#include +#include +#include +#include + +namespace icamera { + +/** + * Rect follows rectangular coordinate system for images. (0, 0) is the + * top-left corner. It can be used to present the coordinates of active sensory + * array and bounding box of detected faces. + */ +template +struct Rect { + T left; + T top; + T width; + T height; + + Rect() : left(0), top(0), width(0), height(0) {} + Rect(T l, T t, T w, T h) : left(l), top(t), width(w), height(h) {} + T right() const { + return left + width - (std::is_integral::value ? 1 : 0); + } + T bottom() const { + return top + height - (std::is_integral::value ? 1 : 0); + } + bool is_valid() const { return width > 0 && height > 0; } + template , bool> = true> + bool operator==(const Rect& rhs) const { + return left == rhs.left && top == rhs.top && width == rhs.width && + height == rhs.height; + } + + template , bool> = true> + bool operator==(const Rect& rhs) const { + constexpr E kEpsilon = 1e-3; + return std::abs(left - rhs.left) <= kEpsilon && + std::abs(top - rhs.top) <= kEpsilon && + std::abs(width - rhs.width) <= kEpsilon && + std::abs(height - rhs.height) <= kEpsilon; + } + + template + Rect AsRect() const { + return Rect(static_cast(left), static_cast(top), + static_cast(width), static_cast(height)); + } + std::string ToString() const { + std::stringstream ss; + ss << left << "," << top << "+" << width << "x" << height; + std::string str; + ss >> str; + return str; + } +}; + +struct Size { + uint32_t width; + uint32_t height; + + Size() : width(0), height(0) {} + Size(uint32_t w, uint32_t h) : width(w), height(h) {} + uint32_t area() const { return width * height; } + bool operator<(const Size& rhs) const { + if (area() == rhs.area()) { + return width < rhs.width; + } + return area() < rhs.area(); + } + bool operator==(const Size& rhs) const { + return width == rhs.width && height == rhs.height; + } + bool operator!=(const Size& rhs) const { return !(*this == rhs); } + bool is_valid() const { return width > 0 && height > 0; } + std::string ToString() const { + return std::format("{0}x{1}", width, height); + } + double aspect_ratio() const { + return static_cast(width) / static_cast(height); + } + Size Scale(float factor) const { + return Size( + static_cast(static_cast(width) * factor + 0.5f), + static_cast(static_cast(height) * factor + + 0.5f)); + } +}; + +template +struct Range { + T lower_bound = 0; + T upper_bound = 0; + + Range() = default; + Range(T l, T u) : lower_bound(l), upper_bound(u) {} + bool is_valid() const { return lower_bound <= upper_bound; } + T lower() const { return lower_bound; } + T upper() const { return upper_bound; } + T Clamp(T value) const { return std::clamp(value, lower_bound, upper_bound); } + bool operator==(const Range& rhs) const { + return lower_bound == rhs.lower_bound && upper_bound == rhs.upper_bound; + } +}; + +template +std::ostream& operator<<(std::ostream& stream, const Rect& r) { + return stream << "(" << r.left << "," << r.top << ")+" << r.width << "x" + << r.height; +} + +template +std::ostream& operator<<(std::ostream& stream, const Range& r) { + return stream << "[" << r.lower_bound << ", " << r.upper_bound << "]"; +} + +// Relative FoV (field of view) are ratios of (width, height) of the visible +// region to the active array region. +class RelativeFov { + public: + RelativeFov(float x, float y); + // Calculates FoV from image size and sensor active array size in Android spec + // (either image dimension has full FoV of the sensor active array). + // For example, the RelativeFov of 640x360 (16:9) images generated from + // 1600x1200 (4:3) active sensor array is (1, 0.75). + RelativeFov(const Size& image_size, const Size& active_array_size); + bool operator==(const RelativeFov& other) const; + bool IsValid() const; + bool Covers(const RelativeFov& other) const; + Rect GetCropWindowInto(const RelativeFov& other) const; + + private: + static constexpr float kEpsilon = 3e-2f; + + float x_ = 0.0f; + float y_ = 0.0f; +}; + +} // namespace icamera + +template <> +struct std::hash { + std::size_t operator()(icamera::Size const& s) const noexcept { + std::size_t h1 = std::hash{}(s.width); + std::size_t h2 = std::hash{}(s.height); + return h1 ^ (h2 << 1); + } +}; diff --git a/src/fd/facessd/FaceSSD.cpp b/src/fd/facessd/FaceSSD.cpp index 6ec5c1b..e87673d 100644 --- a/src/fd/facessd/FaceSSD.cpp +++ b/src/fd/facessd/FaceSSD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ namespace icamera { using namespace std; FaceSSD::FaceSSD(int cameraId, int width, int height) - : FaceDetection(cameraId, width, height, V4L2_MEMORY_DMABUF), + : FaceDetection(cameraId, width, height, V4L2_MEMORY_USERPTR), mFaceDetector(nullptr) { int ret = initFaceDetection(); CheckAndLogError(ret != OK, VOID_VALUE, "failed to init face detection, ret %d", ret); @@ -38,6 +38,7 @@ FaceSSD::FaceSSD(int cameraId, int width, int height) FaceSSD::~FaceSSD() { LOG1(" @%s", mCameraId, __func__); + mFaceDetector = nullptr; } int FaceSSD::initFaceDetection() { @@ -48,7 +49,7 @@ int FaceSSD::initFaceDetection() { return OK; } - mFaceDetector = cros::FaceDetector::Create(); + mFaceDetector = FaceDetector::Create(); CheckAndLogError(!mFaceDetector, NO_INIT, "Failed to create Face SSD instance %s", __func__); mInitialized = true; @@ -60,26 +61,56 @@ void FaceSSD::runFaceDetection(const shared_ptr& camBuffer) { CheckAndLogError(mInitialized == false, VOID_VALUE, "@%s, mInitialized is false", __func__); CheckAndLogError(!camBuffer, VOID_VALUE, "@%s, ccBuf buffer is nullptr", __func__); - camera_buffer_t* ubuffer = camBuffer->getUserBuffer(); - auto handle = reinterpret_cast(static_cast(ubuffer->privateHandle)); - CheckAndLogError(!handle, VOID_VALUE, "Face SSD only supports gbm handle buffer", __func__); + CameraBufferMapper mapper(camBuffer); int64_t sequence = camBuffer->getSequence(); + int input_stride = camBuffer->getStride(); + Size input_size = Size(camBuffer->getWidth(), camBuffer->getHeight()); + LOG2("@%s, sequence %ld, stride %d, wxh [%dx%d]", __func__, sequence, input_stride, + camBuffer->getWidth(), camBuffer->getHeight()); + const uint8_t* buffer_addr = static_cast(mapper.addr()); + std::vector faces; nsecs_t startTime = CameraUtils::systemTime(); - std::vector faces; - cros::FaceDetectResult ret = mFaceDetector->Detect(handle, &faces); - CheckAndLogError(ret != cros::FaceDetectResult::kDetectOk, VOID_VALUE, + auto ret = mFaceDetector->Detect(buffer_addr, input_stride, input_size, std::nullopt, + faces); + CheckAndLogError(ret != FaceDetectResult::kDetectOk, VOID_VALUE, "%s, Failed to run face for sequence: %ld", __func__, sequence); printfFDRunRate(); LOG2("%s: ret:%d, it takes need %ums", camBuffer->getSequence(), __func__, ret, (unsigned)((CameraUtils::systemTime() - startTime) / 1000000)); - updateFaceResult(faces, sequence); + FaceSSDResult fdResults{}; + faceDetectResult(faces, fdResults); + + updateFaceResult(fdResults, sequence); +} + +void FaceSSD::faceDetectResult(const std::vector& faces, FaceSSDResult& fdResults) { + std::vector sortFaces = faces; + std::sort(sortFaces.begin(), sortFaces.end(), + [](const DetectedFace& a, const DetectedFace& b) { + auto area1 = (a.bounding_box.x2 - a.bounding_box.x1) * + (a.bounding_box.y2 - a.bounding_box.y1); + auto area2 = (b.bounding_box.x2 - b.bounding_box.x1) * + (b.bounding_box.y2 - b.bounding_box.y1); + return area1 > area2; + }); + + int faceCount = 0; + for (auto& face : sortFaces) { + if (faceCount >= mMaxFaceNum) break; + fdResults.faceSsdResults[faceCount] = face; + faceCount++; + LOG2("face result: box: %f,%f,%f,%f", face.bounding_box.x1, face.bounding_box.y1, + face.bounding_box.x2, face.bounding_box.y2); + } + fdResults.faceNum = faceCount; + fdResults.faceUpdated = true; + LOG2("@%s, faceNum:%d", __func__, fdResults.faceNum); } -void FaceSSD::updateFaceResult(const std::vector& result, - int64_t sequence) { +void FaceSSD::updateFaceResult(const FaceSSDResult& fdResults, int64_t sequence) { camera_coordinate_system_t sysCoord = {IA_COORDINATE_LEFT, IA_COORDINATE_TOP, IA_COORDINATE_RIGHT, IA_COORDINATE_BOTTOM}; auto cameraContext = CameraContext::getInstance(mCameraId); @@ -90,18 +121,18 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.updated = true; buf->ccaFaceState.is_video_conf = true; - buf->ccaFaceState.num_faces = CLIP(result.size(), mMaxFaceNum, 0); + buf->ccaFaceState.num_faces = CLIP(fdResults.faceNum, mMaxFaceNum, 0); LOG2("@%s, face number: %d", sequence, __func__, buf->ccaFaceState.num_faces); for (int i = 0; i < buf->ccaFaceState.num_faces; i++) { buf->ccaFaceState.faces[i].face_area.left = - static_cast(result[i].bounding_box.x1); // rect.left; + static_cast(fdResults.faceSsdResults[i].bounding_box.x1); // rect.left; buf->ccaFaceState.faces[i].face_area.top = - static_cast(result[i].bounding_box.y1); // rect.top + static_cast(fdResults.faceSsdResults[i].bounding_box.y1); // rect.top buf->ccaFaceState.faces[i].face_area.right = - static_cast(result[i].bounding_box.x2); // rect.right + static_cast(fdResults.faceSsdResults[i].bounding_box.x2); // rect.right buf->ccaFaceState.faces[i].face_area.bottom = - static_cast(result[i].bounding_box.y2); // rect.bottom + static_cast(fdResults.faceSsdResults[i].bounding_box.y2); // rect.bottom convertFaceCoordinate(sysCoord, &buf->ccaFaceState.faces[i].face_area.left, &buf->ccaFaceState.faces[i].face_area.top, &buf->ccaFaceState.faces[i].face_area.right, @@ -110,7 +141,7 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.faces[i].rip_angle = 0; buf->ccaFaceState.faces[i].rop_angle = 0; buf->ccaFaceState.faces[i].tracking_id = i; - buf->ccaFaceState.faces[i].confidence = result[i].confidence; + buf->ccaFaceState.faces[i].confidence = fdResults.faceSsdResults[i].confidence; buf->ccaFaceState.faces[i].person_id = -1; buf->ccaFaceState.faces[i].similarity = 0; buf->ccaFaceState.faces[i].best_ratio = 0; @@ -127,11 +158,12 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.faces[i].face_area.bottom); buf->faceIds[i] = i; - buf->faceScores[i] = static_cast(result[i].confidence * 100); - buf->faceRect[i * 4] = static_cast(result[i].bounding_box.x1); // rect.left; - buf->faceRect[i * 4 + 1] = static_cast(result[i].bounding_box.y1); // rect.top - buf->faceRect[i * 4 + 2] = static_cast(result[i].bounding_box.x2); // rect.right - buf->faceRect[i * 4 + 3] = static_cast(result[i].bounding_box.y2); // rect.bottom + buf->faceScores[i] = static_cast(fdResults.faceSsdResults[i].confidence * 100); + // left, top, right and bottom + buf->faceRect[i * 4] = static_cast(fdResults.faceSsdResults[i].bounding_box.x1); + buf->faceRect[i * 4 + 1] = static_cast(fdResults.faceSsdResults[i].bounding_box.y1); + buf->faceRect[i * 4 + 2] = static_cast(fdResults.faceSsdResults[i].bounding_box.x2); + buf->faceRect[i * 4 + 3] = static_cast(fdResults.faceSsdResults[i].bounding_box.y2); convertFaceCoordinate(mRatioInfo.sysCoord, &buf->faceRect[i * 4], &buf->faceRect[i * 4 + 1], &buf->faceRect[i * 4 + 2], &buf->faceRect[i * 4 + 3]); diff --git a/src/fd/facessd/FaceSSD.h b/src/fd/facessd/FaceSSD.h index d785ce6..5f9d09a 100644 --- a/src/fd/facessd/FaceSSD.h +++ b/src/fd/facessd/FaceSSD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,19 @@ */ #pragma once -#include #include "FaceDetection.h" +#include + namespace icamera { +struct FaceSSDResult { + bool faceUpdated; + int faceNum; + DetectedFace faceSsdResults[MAX_FACES_DETECTABLE]; +}; + class FaceSSD : public FaceDetection { public: FaceSSD(int cameraId, int width, int height); @@ -32,11 +39,11 @@ class FaceSSD : public FaceDetection { DISALLOW_COPY_AND_ASSIGN(FaceSSD); int initFaceDetection(); - void updateFaceResult(const std::vector& result, int64_t sequence); - void updateFaceResult(const FaceDetectionResult& result, int64_t sequence); + void faceDetectResult(const std::vector& faces, FaceSSDResult& fdResults); + void updateFaceResult(const FaceSSDResult& fdResults, int64_t sequence); private: - std::unique_ptr mFaceDetector; + std::unique_ptr mFaceDetector; }; } // namespace icamera diff --git a/src/hal/CameraHal.cpp b/src/hal/CameraHal.cpp index b61b37c..7d79fb3 100644 --- a/src/hal/CameraHal.cpp +++ b/src/hal/CameraHal.cpp @@ -24,9 +24,6 @@ #include "Parameters.h" #include "PlatformData.h" #include "ParameterConvert.h" -// FRAME_SYNC_S -#include "SyncManager.h" -// FRAME_SYNC_E #include "iutils/CameraLog.h" namespace icamera { @@ -112,11 +109,6 @@ int CameraHal::deinit() { } // VIRTUAL_CHANNEL_E - // FRAME_SYNC_S - // SyncManager is used to do synchronization with multi-devices. - // Release it when the last device exit - SyncManager::releaseInstance(); - // FRAME_SYNC_E // Release the PlatformData instance here due to it was // created in init() period PlatformData::releaseInstance(); diff --git a/src/hal/MockCameraHal.h b/src/hal/MockCameraHal.h index 5818961..0d9aeb7 100644 --- a/src/hal/MockCameraHal.h +++ b/src/hal/MockCameraHal.h @@ -37,7 +37,7 @@ namespace icamera { * If open dual cameras in different process, the shared memory must be used to * keep the account of the open times. * - * The CameraHal create and maintains followings singleton instancs + * The CameraHal create and maintains following singleton instances * 1. MediaControl Instance * 2. PlatformData Instance */ diff --git a/src/hal/hal_adaptor/HalAdaptor.cpp b/src/hal/hal_adaptor/HalAdaptor.cpp index b58ce42..25d8d0c 100644 --- a/src/hal/hal_adaptor/HalAdaptor.cpp +++ b/src/hal/hal_adaptor/HalAdaptor.cpp @@ -57,8 +57,13 @@ static bool get_ipu_info(const std::string& path) { return retval; } - struct dirent* entry; - while ((entry = readdir(dir)) != nullptr) { + struct dirent* entry = nullptr; + while (true) { + entry = readdir(dir); + if (entry == nullptr) { + break; + } + if ((entry->d_type != DT_LNK) || (strstr(entry->d_name, "0000:") == nullptr)) { continue; } diff --git a/src/hal/hal_adaptor/HalAdaptor.h b/src/hal/hal_adaptor/HalAdaptor.h index 191d698..5793ab4 100644 --- a/src/hal/hal_adaptor/HalAdaptor.h +++ b/src/hal/hal_adaptor/HalAdaptor.h @@ -13,9 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef HAL_ADAPTOR_H -#define HAL_ADAPTOR_H - +#pragma once #include "ICamera.h" extern "C" { @@ -51,4 +49,3 @@ struct HalApiHandle { } // namespace icamera } // extern "C" -#endif // HAL_ADAPTOR_H diff --git a/src/icbm/ICBMThread.cpp b/src/icbm/ICBMThread.cpp index 4d604c4..a7493b0 100644 --- a/src/icbm/ICBMThread.cpp +++ b/src/icbm/ICBMThread.cpp @@ -36,7 +36,7 @@ int ICBMThread::setup(ICBMInitInfo* initParams) { } void ICBMThread::shutdown(const ICBMReqInfo& request) { - LOG1("%s, Shuting down...", __func__); + LOG1("%s, Shutting down...", __func__); mIntelICBM->shutdown(request); } diff --git a/src/icbm/OPIC2Api.h b/src/icbm/OPIC2Api.h index 4883ea3..dced07e 100644 --- a/src/icbm/OPIC2Api.h +++ b/src/icbm/OPIC2Api.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef IC2API_FOR_CHROME_H -#define IC2API_FOR_CHROME_H - +#pragma once extern "C" { #define KEYPOINTSCOUNT 40 diff --git a/src/image_process/PostProcessorBase.cpp b/src/image_process/PostProcessorBase.cpp index aaa1170..8143c17 100644 --- a/src/image_process/PostProcessorBase.cpp +++ b/src/image_process/PostProcessorBase.cpp @@ -18,6 +18,9 @@ #include "PostProcessorBase.h" #include +#ifdef LIBCAMERA_BUILD +#else +#endif #include "iutils/CameraLog.h" #include "stdlib.h" diff --git a/src/image_process/chrome/ImageProcessorCore.cpp b/src/image_process/chrome/ImageProcessorCore.cpp index d3850bb..d6f0a6b 100644 --- a/src/image_process/chrome/ImageProcessorCore.cpp +++ b/src/image_process/chrome/ImageProcessorCore.cpp @@ -23,13 +23,18 @@ namespace icamera { -ImageProcessorCore::ImageProcessorCore() { - mRotationMode = {{0, libyuv::RotationMode::kRotate0}, - {90, libyuv::RotationMode::kRotate90}, - {180, libyuv::RotationMode::kRotate180}, - {270, libyuv::RotationMode::kRotate270}}; +libyuv::RotationMode getRotationMode(int angle) { + switch (angle) { + case 0: return libyuv::RotationMode::kRotate0; + case 90: return libyuv::RotationMode::kRotate90; + case 180: return libyuv::RotationMode::kRotate180; + case 270: return libyuv::RotationMode::kRotate270; + default: return libyuv::RotationMode::kRotate0; + } } +ImageProcessorCore::ImageProcessorCore() {} + std::unique_ptr IImageProcessor::createImageProcessor() { return std::unique_ptr(new ImageProcessorCore()); } @@ -126,7 +131,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in CheckAndLogError(output->getWidth() != input->getHeight() || output->getHeight() != input->getWidth(), BAD_VALUE, - "output resolution mis-match [%d x %d] -> [%d x %d]", input->getWidth(), + "output resolution mismatch [%d x %d] -> [%d x %d]", input->getWidth(), input->getHeight(), output->getWidth(), output->getHeight()); CheckAndLogError((angle != 90 && angle != 270), BAD_VALUE, "angle value:%d is wrong", angle); @@ -144,7 +149,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in uint8_t* I420Buffer = rotateBuf.data(); - if (mRotationMode[angle] == libyuv::RotationMode::kRotate0) { + if (getRotationMode(angle) == libyuv::RotationMode::kRotate0) { libyuv::CopyPlane(inBuffer, inStride, outBuffer, outStride, inW, inH); libyuv::CopyPlane(inBuffer + inH * inStride, inStride, outBuffer + outH * outStride, outStride, inW, inH / 2); @@ -152,7 +157,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in int ret = libyuv::NV12ToI420Rotate(inBuffer, inStride, inBuffer + inH * inStride, inStride, I420Buffer, outW, I420Buffer + outW * outH, outW / 2, I420Buffer + outW * outH * 5 / 4, outW / 2, inW, inH, - mRotationMode[angle]); + getRotationMode(angle)); CheckAndLogError((ret < 0), UNKNOWN_ERROR, "NV12ToI420Rotate failed [%d]", ret); ret = libyuv::I420ToNV12(I420Buffer, outW, I420Buffer + outW * outH, outW / 2, diff --git a/src/image_process/chrome/ImageProcessorCore.h b/src/image_process/chrome/ImageProcessorCore.h index 5a2efa7..0d788f0 100644 --- a/src/image_process/chrome/ImageProcessorCore.h +++ b/src/image_process/chrome/ImageProcessorCore.h @@ -17,8 +17,6 @@ #include -#include - #include "IImageProcessor.h" namespace icamera { @@ -40,8 +38,6 @@ class ImageProcessorCore : public IImageProcessor { private: DISALLOW_COPY_AND_ASSIGN(ImageProcessorCore); - - std::unordered_map mRotationMode; }; } /* namespace icamera */ diff --git a/src/image_process/sw/ImageConverter.cpp b/src/image_process/sw/ImageConverter.cpp index bcf2387..68dc74f 100644 --- a/src/image_process/sw/ImageConverter.cpp +++ b/src/image_process/sw/ImageConverter.cpp @@ -128,7 +128,7 @@ void trimConvertNV12ToRGB565(int width, int height, int srcStride, void *src, vo } } -// covert YV12 (Y plane, V plane, U plane) to NV21 (Y plane, interlaced VU bytes) +// convert YV12 (Y plane, V plane, U plane) to NV21 (Y plane, interlaced VU bytes) void convertYV12ToNV21(int width, int height, int srcStride, int dstStride, void *src, void *dst) { const int cStride = srcStride>>1; @@ -206,7 +206,7 @@ void copyYV12ToYV12(int width, int height, int srcStride, int dstStride, void *s } } -// covert NV12 (Y plane, interlaced UV bytes) to +// convert NV12 (Y plane, interlaced UV bytes) to // NV21 (Y plane, interlaced VU bytes) and trim stride width to real width void trimConvertNV12ToNV21(int width, int height, int srcStride, void *src, void *dst) { @@ -401,7 +401,7 @@ void align16ConvertNV12ToYV12(int width, int height, int srcStride, void *src, v } } -// P411's Y, U, V are seperated. But the YUY2's Y, U and V are interleaved. +// P411's Y, U, V are separated. But the YUY2's Y, U and V are interleaved. void YUY2ToP411(int width, int height, int stride, void *src, void *dst) { int ySize = width * height; @@ -474,7 +474,7 @@ void NV12ToP411Separate(int width, int height, int stride, } } -// P411's Y, U, V are seperated. But the NV12's U and V are interleaved. +// P411's Y, U, V are separated. But the NV12's U and V are interleaved. void NV12ToP411(int width, int height, int stride, void *src, void *dst) { NV12ToP411Separate(width, height, stride, @@ -516,7 +516,7 @@ void NV21ToP411Separate(int width, int height, int stride, } } -// P411's Y, U, V are seperated. But the NV21's U and V are interleaved. +// P411's Y, U, V are separated. But the NV21's U and V are interleaved. void NV21ToP411(int width, int height, int stride, void *src, void *dst) { NV21ToP411Separate(width, height, stride, @@ -641,7 +641,7 @@ void repadYUV420(int width, int height, int srcStride, int dstStride, void *src, } } -// covert YUYV(YUY2, YUV422 format) to YV12 (Y plane, V plane, U plane) +// convert YUYV(YUY2, YUV422 format) to YV12 (Y plane, V plane, U plane) void convertYUYVToYV12(int width, int height, int srcStride, int dstStride, void *src, void *dst) { int ySize = width * height; @@ -679,7 +679,7 @@ void convertYUYVToYV12(int width, int height, int srcStride, int dstStride, void } } -// covert YUYV(YUY2, YUV422 format) to NV21 (Y plane, interlaced VU bytes) +// convert YUYV(YUY2, YUV422 format) to NV21 (Y plane, interlaced VU bytes) void convertYUYVToNV21(int width, int height, int srcStride, void *src, void *dst) { int ySize = width * height; diff --git a/src/image_process/sw/ImageScalerCore.cpp b/src/image_process/sw/ImageScalerCore.cpp index 9dd4001..9df756e 100644 --- a/src/image_process/sw/ImageScalerCore.cpp +++ b/src/image_process/sw/ImageScalerCore.cpp @@ -530,7 +530,7 @@ void ImageScalerCore::downScaleNv12ImageFrom800x600ToQvga(unsigned char *dest, c 0 * ((a2 >> 0) & 0xff) + 2 * ((a2 >> 8) & 0xff) + 4 * ((a2 >> 16) & 0xff) + 4 * ((a2 >> 24) & 0xff) + 0 * ((a3 >> 0) & 0xff) + 1 * ((a3 >> 8) & 0xff) + 2 * ((a3 >> 16) & 0xff) + 2 * ((a3 >> 24) & 0xff)); t = (t + 12) / 25; - b |= t << 24; // Eigth pixel + b |= t << 24; // Eight pixel *d++ = b; } s1 = (u_int32_t *)(&src[(i * 5 + 4) * src_stride]); @@ -611,7 +611,7 @@ void ImageScalerCore::downScaleNv12ImageFrom800x600ToQvga(unsigned char *dest, c 0 * ((a2 >> 0) & 0xff) + 2 * ((a2 >> 8) & 0xff) + 4 * ((a2 >> 16) & 0xff) + 4 * ((a2 >> 24) & 0xff) + 0 * ((a3 >> 0) & 0xff) + 1 * ((a3 >> 8) & 0xff) + 2 * ((a3 >> 16) & 0xff) + 2 * ((a3 >> 24) & 0xff)); t = (t + 12) / 25; - b |= t << 24; // Eigth pixel + b |= t << 24; // Eight pixel *d++ = b; } } diff --git a/src/iutils/CameraDump.cpp b/src/iutils/CameraDump.cpp index ca11a5b..dab4435 100644 --- a/src/iutils/CameraDump.cpp +++ b/src/iutils/CameraDump.cpp @@ -430,7 +430,7 @@ static string formatBinFileName(int cameraId, const char* prefix, BinParam_t* bi binParam->bParam.height); default: - LOGW("Unknow binary type:%d", binParam->bType); + LOGW("Unknown binary type:%d", binParam->bType); break; } diff --git a/src/iutils/CameraDump.h b/src/iutils/CameraDump.h index c2d4f2d..3dfe678 100644 --- a/src/iutils/CameraDump.h +++ b/src/iutils/CameraDump.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_DUMP_H -#define CAMERA_DUMP_H - +#pragma once #include #include @@ -123,7 +121,7 @@ typedef struct { } BinParam_t; /** - * Dump files with formated file name, put under getDumpPath() + * Dump files with formatted file name, put under getDumpPath() * Supported dump type: * Image(RAW/YUV/RGB) * PAL bin @@ -157,4 +155,3 @@ void dumpBinary(int cameraId, const void* data, int size, BinParam_t* binParam); } // namespace icamera -#endif // CAMERA_DUMP_H diff --git a/src/iutils/CameraLog.cpp b/src/iutils/CameraLog.cpp index 4fb3216..81aba08 100644 --- a/src/iutils/CameraLog.cpp +++ b/src/iutils/CameraLog.cpp @@ -41,12 +41,12 @@ GroupDesc globalGroupsDescp[TAGS_MAX_NUM]; namespace icamera { uint32_t gLogLevel = 0U; -uint32_t gPerfLevel = 0U; +static uint32_t gPerfLevel = 0U; int32_t gSlowlyRunRatio = 0; // DUMP_ENTITY_TOPOLOGY_S -bool gIsDumpMediaTopo = false; +static bool gIsDumpMediaTopo = false; // DUMP_ENTITY_TOPOLOGY_E -bool gIsDumpMediaInfo = false; +static bool gIsDumpMediaInfo = false; const char* cameraDebugLogToString(uint32_t level) { switch (level) { @@ -147,26 +147,26 @@ void doLogBody(int logTag, uint32_t level, const char* fmt, ...) { namespace Log { -#define DEFAULT_LOG_SINK "GLOG" -#define FILELOG_SINK "FILELOG" - static void initLogSinks() { #ifdef LIBCAMERA_BUILD - globalLogSink = new LibcameraLogSink(); - LOG2("Enable libcamera LOG"); + if (globalLogSink == nullptr) { + globalLogSink = new LibcameraLogSink(); + LOG2("Enable libcamera LOG"); + return; + } #else +#endif globalLogSink = new StdconLogSink(); LOG2("Enable Stdcon LOG"); -#endif } static void setLogTagLevel() { static const char* LOG_FILE_TAG = "cameraTags"; char* logFileTag = ::getenv(LOG_FILE_TAG); - if (logFileTag == nullptr) { return; } + std::string s = logFileTag; std::istringstream is(s); std::string token; @@ -189,7 +189,8 @@ static void setLogTagLevel() { } if (!levelStr.empty()) { - globalGroupsDescp[itemIdx].level = strtoul(levelStr.c_str(), nullptr, 0); + globalGroupsDescp[itemIdx].level = + static_cast(strtoul(levelStr.c_str(), nullptr, 0)); } } } @@ -206,7 +207,7 @@ void setDebugLevel(void) { gLogLevel = CAMERA_DEBUG_LOG_ERR | CAMERA_DEBUG_LOG_WARNING | CAMERA_DEBUG_LOG_INFO; if (dbgLevel != nullptr) { - gLogLevel = strtoul(dbgLevel, nullptr, 0); + gLogLevel = static_cast(strtoul(dbgLevel, nullptr, 0)); LOG1("Debug level is 0x%x", gLogLevel); } @@ -226,7 +227,7 @@ void setDebugLevel(void) { const char* PROP_CAMERA_HAL_PERF = "cameraPerf"; char* perfLevel = getenv(PROP_CAMERA_HAL_PERF); if (perfLevel != nullptr) { - gPerfLevel = strtoul(perfLevel, nullptr, 0); + gPerfLevel = static_cast(strtoul(perfLevel, nullptr, 0)); LOGI("Performance level is 0x%x", gPerfLevel); // bitmask of tracing categories diff --git a/src/iutils/CameraLog.h b/src/iutils/CameraLog.h index 61587a1..2482ef7 100644 --- a/src/iutils/CameraLog.h +++ b/src/iutils/CameraLog.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_LOG_H -#define CAMERA_LOG_H - +#pragma once #include #include #include @@ -163,6 +161,11 @@ extern void doLogBody(int logTag, uint32_t level, const char* fmt, ...); { doLogBody(GET_FILE_SHIFT(LOG_TAG), icamera::CAMERA_DEBUG_LOG_WARNING, ##__VA_ARGS__); } \ } while (0) +#define ALOGE LOGE +#define ALOGW LOGW +#define ALOGI LOGI +#define ALOGD LOGI + #define HAL_TRACE_NAME(level, name) ScopedTrace ___tracer(level, name) #define HAL_TRACE_CALL(level) HAL_TRACE_NAME(level, __PRETTY_FUNCTION__) @@ -208,4 +211,3 @@ class ScopedTrace { } // namespace icamera -#endif // CAMERA_LOG_H diff --git a/src/iutils/Errors.h b/src/iutils/Errors.h index 727350a..d3703e9 100644 --- a/src/iutils/Errors.h +++ b/src/iutils/Errors.h @@ -15,8 +15,7 @@ * limitations under the License. */ -#ifndef ERRORS_H -#define ERRORS_H +#pragma once #include #include @@ -65,5 +64,3 @@ enum { }; } // namespace icamera - -#endif // ERRORS_H diff --git a/src/iutils/LogSink.cpp b/src/iutils/LogSink.cpp index 36c09bb..cc63959 100644 --- a/src/iutils/LogSink.cpp +++ b/src/iutils/LogSink.cpp @@ -23,6 +23,7 @@ #ifdef LIBCAMERA_BUILD #include +#else #endif #include @@ -31,10 +32,19 @@ #include "iutils/LogSink.h" #include "iutils/Utils.h" +#define TIME_BUF_SIZE 128 +#define DEFAULT_FILELOG_PATH "/run/camera/hal_logs.txt" + namespace icamera { extern const char* cameraDebugLogToString(uint32_t level); -#define CAMERA_DEBUG_LOG_ERR (1 << 5) -#define CAMERA_DEBUG_LOG_WARNING (1 << 3) + +static const uint32_t CAMERA_DEBUG_LOG_LEVEL1 = 1U; +static const uint32_t CAMERA_DEBUG_LOG_LEVEL2 = 2U; // 1 << 1 +static const uint32_t CAMERA_DEBUG_LOG_LEVEL3 = 4U; // 1 << 2 + +static const uint32_t CAMERA_DEBUG_LOG_INFO = 16U; // 1 << 4 +static const uint32_t CAMERA_DEBUG_LOG_WARNING = 32U; // 1 << 5; +static const uint32_t CAMERA_DEBUG_LOG_ERR = 64U; // 1 << 6; #ifdef LIBCAMERA_BUILD void LibcameraLogSink::sendOffLog(LogItem logItem) { @@ -44,21 +54,25 @@ void LibcameraLogSink::sendOffLog(LogItem logItem) { libcamera::LogCategory* cat = libcamera::LogCategory::create(logItem.logTags); libcamera::LogSeverity sev = (logItem.level == CAMERA_DEBUG_LOG_ERR) ? libcamera::LogError : (logItem.level == CAMERA_DEBUG_LOG_WARNING) ? libcamera::LogWarning + : (logItem.level == CAMERA_DEBUG_LOG_INFO) ? libcamera::LogInfo : libcamera::LogDebug; + uint32_t levels = CAMERA_DEBUG_LOG_LEVEL1 | CAMERA_DEBUG_LOG_LEVEL2 | CAMERA_DEBUG_LOG_LEVEL3; + if (logItem.level & levels) { + cat->setSeverity(libcamera::LogDebug); + } libcamera::_log(cat, sev).stream() << prefix << logItem.logEntry; } #else -#endif +#endif void StdconLogSink::sendOffLog(LogItem logItem) { -#define TIME_BUF_SIZE 128 char timeInfo[TIME_BUF_SIZE]; LogOutputSink::setLogTime(timeInfo); fprintf(stdout, "[%s] CamHAL[%s] %s: %s\n", timeInfo, icamera::cameraDebugLogToString(logItem.level), logItem.logTags, logItem.logEntry); } -void LogOutputSink::setLogTime(char* buf) { +void LogOutputSink::setLogTime(char* timeBuf) { struct timeval tv; gettimeofday(&tv, nullptr); const time_t nowtime = tv.tv_sec; @@ -68,7 +82,7 @@ void LogOutputSink::setLogTime(char* buf) { if (nowtm != nullptr) { char tmbuf[TIME_BUF_SIZE]; (void)strftime(tmbuf, TIME_BUF_SIZE, "%m-%d %H:%M:%S", nowtm); - snprintf(buf, TIME_BUF_SIZE, "%.96s.%d", tmbuf, + snprintf(timeBuf, TIME_BUF_SIZE, "%.96s.%d", tmbuf, static_cast((tv.tv_usec / 1000U) % 1000U)); } } @@ -83,7 +97,6 @@ FtraceLogSink::FtraceLogSink() { } void FtraceLogSink::sendOffLog(LogItem logItem) { -#define TIME_BUF_SIZE 128 char timeInfo[TIME_BUF_SIZE]; setLogTime(timeInfo); dprintf(mFtraceFD, "%s CamHAL[%s] %s\n", timeInfo, cameraDebugLogToString(logItem.level), @@ -91,12 +104,11 @@ void FtraceLogSink::sendOffLog(LogItem logItem) { } #endif -#define DEFALUT_PATH "/run/camera/hal_logs.txt" FileLogSink::FileLogSink() { static const char* filePath = ::getenv("FILE_LOG_PATH"); if (filePath == nullptr) { - filePath = DEFALUT_PATH; + filePath = DEFAULT_FILELOG_PATH; } mFp = fopen(filePath, "w"); diff --git a/src/iutils/LogSink.h b/src/iutils/LogSink.h index a9caac5..72e96f7 100644 --- a/src/iutils/LogSink.h +++ b/src/iutils/LogSink.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LOG_SINK -#define LOG_SINK +#pragma once #include @@ -40,8 +39,8 @@ class LibcameraLogSink : public LogOutputSink { void sendOffLog(LogItem logItem) override; }; #else -#endif +#endif #ifdef CAMERA_TRACE class FtraceLogSink : public LogOutputSink { public: @@ -68,5 +67,3 @@ class FileLogSink : public LogOutputSink { }; } // namespace icamera - -#endif diff --git a/src/iutils/ModuleTags.cpp b/src/iutils/ModuleTags.cpp index 2930ae3..baf030d 100644 --- a/src/iutils/ModuleTags.cpp +++ b/src/iutils/ModuleTags.cpp @@ -75,8 +75,7 @@ const char* tagNames[] = { "Dvs", "EXIFMaker", "EXIFMetaData", - "EvcpManager", - "ExifCreater", + "ExifCreator", "FaceDetection", "FaceDetectionPVL", "FaceSSD", @@ -119,9 +118,6 @@ const char* tagNames[] = { "IntelCca", "IntelCcaClient", "IntelCcaServer", - "IntelEVCPClient", - "IntelEVCPServer", - "IntelEvcp", "IntelFDServer", "IntelFaceDetection", "IntelFaceDetectionClient", @@ -131,7 +127,6 @@ const char* tagNames[] = { "IntelICBMServer", "IntelTNR7Stage", "IpuPacAdaptor", - "IspControlUtils", "JpegEncoderCore", "JpegMaker", "JsonCommonParser", @@ -172,17 +167,14 @@ const char* tagNames[] = { "Scheduler", "SensorHwCtrl", "SensorManager", - "SensorOB", "SofSource", "SwImageConverter", "SwImageProcessor", "SwPostProcessUnit", - "SyncManager", "SysCall", "TCPServer", "Thread", "Trace", - "UltraManEvcp", "Utils", "V4l2DeviceFactory", "V4l2_device_cc", diff --git a/src/iutils/ModuleTags.h b/src/iutils/ModuleTags.h index 2cc20d6..48bdf33 100644 --- a/src/iutils/ModuleTags.h +++ b/src/iutils/ModuleTags.h @@ -16,8 +16,7 @@ // !!! DO NOT EDIT THIS FILE !!! -#ifndef __MODULE_TAGS_HPP__ -#define __MODULE_TAGS_HPP__ +#pragma once #ifdef __clang__ #pragma clang diagnostic push @@ -83,129 +82,120 @@ enum ModuleTags { GENERATED_TAGS_Dvs = 53, GENERATED_TAGS_EXIFMaker = 54, GENERATED_TAGS_EXIFMetaData = 55, - GENERATED_TAGS_EvcpManager = 56, - GENERATED_TAGS_ExifCreater = 57, - GENERATED_TAGS_FaceDetection = 58, - GENERATED_TAGS_FaceDetectionPVL = 59, - GENERATED_TAGS_FaceSSD = 60, - GENERATED_TAGS_FaceStage = 61, - GENERATED_TAGS_FileSource = 62, - GENERATED_TAGS_GPUPostProcessor = 63, - GENERATED_TAGS_GPUPostStage = 64, - GENERATED_TAGS_GenGfx = 65, - GENERATED_TAGS_GraphConfig = 66, - GENERATED_TAGS_GraphConfigManager = 67, - GENERATED_TAGS_GraphUtils = 68, - GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 69, - GENERATED_TAGS_HAL_basic = 70, - GENERATED_TAGS_HAL_inset_portrait = 71, - GENERATED_TAGS_HAL_jpeg = 72, - GENERATED_TAGS_HAL_multi_streams_test = 73, - GENERATED_TAGS_HAL_rotation_test = 74, - GENERATED_TAGS_HAL_supported_streams_test = 75, - GENERATED_TAGS_HAL_yuv = 76, - GENERATED_TAGS_HalAdaptor = 77, - GENERATED_TAGS_HalV3Utils = 78, - GENERATED_TAGS_I3AControlFactory = 79, - GENERATED_TAGS_ICBMThread = 80, - GENERATED_TAGS_ICamera = 81, - GENERATED_TAGS_IFaceDetection = 82, - GENERATED_TAGS_IPCIntelCca = 83, - GENERATED_TAGS_IPC_FACE_DETECTION = 84, - GENERATED_TAGS_IPipeManagerFactory = 85, - GENERATED_TAGS_IProcessingUnitFactory = 86, - GENERATED_TAGS_ImageProcessorCore = 87, - GENERATED_TAGS_ImageScalerCore = 88, - GENERATED_TAGS_Intel3AParameter = 89, - GENERATED_TAGS_IntelAEStateMachine = 90, - GENERATED_TAGS_IntelAFStateMachine = 91, - GENERATED_TAGS_IntelAWBStateMachine = 92, - GENERATED_TAGS_IntelAlgoClient = 93, - GENERATED_TAGS_IntelAlgoCommonClient = 94, - GENERATED_TAGS_IntelAlgoServer = 95, - GENERATED_TAGS_IntelCPUAlgoServer = 96, - GENERATED_TAGS_IntelCca = 97, - GENERATED_TAGS_IntelCcaClient = 98, - GENERATED_TAGS_IntelCcaServer = 99, - GENERATED_TAGS_IntelEVCPClient = 100, - GENERATED_TAGS_IntelEVCPServer = 101, - GENERATED_TAGS_IntelEvcp = 102, - GENERATED_TAGS_IntelFDServer = 103, - GENERATED_TAGS_IntelFaceDetection = 104, - GENERATED_TAGS_IntelFaceDetectionClient = 105, - GENERATED_TAGS_IntelGPUAlgoServer = 106, - GENERATED_TAGS_IntelICBM = 107, - GENERATED_TAGS_IntelICBMClient = 108, - GENERATED_TAGS_IntelICBMServer = 109, - GENERATED_TAGS_IntelTNR7Stage = 110, - GENERATED_TAGS_IpuPacAdaptor = 111, - GENERATED_TAGS_IspControlUtils = 112, - GENERATED_TAGS_JpegEncoderCore = 113, - GENERATED_TAGS_JpegMaker = 114, - GENERATED_TAGS_JsonCommonParser = 115, - GENERATED_TAGS_JsonParserBase = 116, - GENERATED_TAGS_LensHw = 117, - GENERATED_TAGS_LensManager = 118, - GENERATED_TAGS_LiveTuning = 119, - GENERATED_TAGS_MANUAL_POST_PROCESSING = 120, - GENERATED_TAGS_MakerNote = 121, - GENERATED_TAGS_MediaControl = 122, - GENERATED_TAGS_MetadataConvert = 123, - GENERATED_TAGS_MockCamera3HAL = 124, - GENERATED_TAGS_MockCameraHal = 125, - GENERATED_TAGS_MockPSysDevice = 126, - GENERATED_TAGS_MockSysCall = 127, - GENERATED_TAGS_MsgHandler = 128, - GENERATED_TAGS_OnePunchIC2 = 129, - GENERATED_TAGS_OpenSourceGFX = 130, - GENERATED_TAGS_PSysDevice = 131, - GENERATED_TAGS_ParameterConvert = 132, - GENERATED_TAGS_ParameterHelper = 133, - GENERATED_TAGS_Parameters = 134, - GENERATED_TAGS_PipeLine = 135, - GENERATED_TAGS_PipeManager = 136, - GENERATED_TAGS_PipeManagerStub = 137, - GENERATED_TAGS_PlatformData = 138, - GENERATED_TAGS_PnpDebugControl = 139, - GENERATED_TAGS_PostProcessStage = 140, - GENERATED_TAGS_PostProcessorBase = 141, - GENERATED_TAGS_PostProcessorCore = 142, - GENERATED_TAGS_ProcessingUnit = 143, - GENERATED_TAGS_RequestManager = 144, - GENERATED_TAGS_RequestThread = 145, - GENERATED_TAGS_ResultProcessor = 146, - GENERATED_TAGS_SWJpegEncoder = 147, - GENERATED_TAGS_SWPostProcessor = 148, - GENERATED_TAGS_SchedPolicy = 149, - GENERATED_TAGS_Scheduler = 150, - GENERATED_TAGS_SensorHwCtrl = 151, - GENERATED_TAGS_SensorManager = 152, - GENERATED_TAGS_SensorOB = 153, - GENERATED_TAGS_SofSource = 154, - GENERATED_TAGS_SwImageConverter = 155, - GENERATED_TAGS_SwImageProcessor = 156, - GENERATED_TAGS_SwPostProcessUnit = 157, - GENERATED_TAGS_SyncManager = 158, - GENERATED_TAGS_SysCall = 159, - GENERATED_TAGS_TCPServer = 160, - GENERATED_TAGS_Thread = 161, - GENERATED_TAGS_Trace = 162, - GENERATED_TAGS_UltraManEvcp = 163, - GENERATED_TAGS_Utils = 164, - GENERATED_TAGS_V4l2DeviceFactory = 165, - GENERATED_TAGS_V4l2_device_cc = 166, - GENERATED_TAGS_V4l2_subdevice_cc = 167, - GENERATED_TAGS_V4l2_video_node_cc = 168, - GENERATED_TAGS_VendorTags = 169, - GENERATED_TAGS_camera_metadata_tests = 170, - GENERATED_TAGS_icamera_metadata_base = 171, - GENERATED_TAGS_metadata_test = 172, - ST_FPS = 173, - ST_GPU_TNR = 174, - ST_STATS = 175, + GENERATED_TAGS_ExifCreator = 56, + GENERATED_TAGS_FaceDetection = 57, + GENERATED_TAGS_FaceDetectionPVL = 58, + GENERATED_TAGS_FaceSSD = 59, + GENERATED_TAGS_FaceStage = 60, + GENERATED_TAGS_FileSource = 61, + GENERATED_TAGS_GPUPostProcessor = 62, + GENERATED_TAGS_GPUPostStage = 63, + GENERATED_TAGS_GenGfx = 64, + GENERATED_TAGS_GraphConfig = 65, + GENERATED_TAGS_GraphConfigManager = 66, + GENERATED_TAGS_GraphUtils = 67, + GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 68, + GENERATED_TAGS_HAL_basic = 69, + GENERATED_TAGS_HAL_inset_portrait = 70, + GENERATED_TAGS_HAL_jpeg = 71, + GENERATED_TAGS_HAL_multi_streams_test = 72, + GENERATED_TAGS_HAL_rotation_test = 73, + GENERATED_TAGS_HAL_supported_streams_test = 74, + GENERATED_TAGS_HAL_yuv = 75, + GENERATED_TAGS_HalAdaptor = 76, + GENERATED_TAGS_HalV3Utils = 77, + GENERATED_TAGS_I3AControlFactory = 78, + GENERATED_TAGS_ICBMThread = 79, + GENERATED_TAGS_ICamera = 80, + GENERATED_TAGS_IFaceDetection = 81, + GENERATED_TAGS_IPCIntelCca = 82, + GENERATED_TAGS_IPC_FACE_DETECTION = 83, + GENERATED_TAGS_IPipeManagerFactory = 84, + GENERATED_TAGS_IProcessingUnitFactory = 85, + GENERATED_TAGS_ImageProcessorCore = 86, + GENERATED_TAGS_ImageScalerCore = 87, + GENERATED_TAGS_Intel3AParameter = 88, + GENERATED_TAGS_IntelAEStateMachine = 89, + GENERATED_TAGS_IntelAFStateMachine = 90, + GENERATED_TAGS_IntelAWBStateMachine = 91, + GENERATED_TAGS_IntelAlgoClient = 92, + GENERATED_TAGS_IntelAlgoCommonClient = 93, + GENERATED_TAGS_IntelAlgoServer = 94, + GENERATED_TAGS_IntelCPUAlgoServer = 95, + GENERATED_TAGS_IntelCca = 96, + GENERATED_TAGS_IntelCcaClient = 97, + GENERATED_TAGS_IntelCcaServer = 98, + GENERATED_TAGS_IntelFDServer = 99, + GENERATED_TAGS_IntelFaceDetection = 100, + GENERATED_TAGS_IntelFaceDetectionClient = 101, + GENERATED_TAGS_IntelGPUAlgoServer = 102, + GENERATED_TAGS_IntelICBM = 103, + GENERATED_TAGS_IntelICBMClient = 104, + GENERATED_TAGS_IntelICBMServer = 105, + GENERATED_TAGS_IntelTNR7Stage = 106, + GENERATED_TAGS_IpuPacAdaptor = 107, + GENERATED_TAGS_JpegEncoderCore = 108, + GENERATED_TAGS_JpegMaker = 109, + GENERATED_TAGS_JsonCommonParser = 110, + GENERATED_TAGS_JsonParserBase = 111, + GENERATED_TAGS_LensHw = 112, + GENERATED_TAGS_LensManager = 113, + GENERATED_TAGS_LiveTuning = 114, + GENERATED_TAGS_MANUAL_POST_PROCESSING = 115, + GENERATED_TAGS_MakerNote = 116, + GENERATED_TAGS_MediaControl = 117, + GENERATED_TAGS_MetadataConvert = 118, + GENERATED_TAGS_MockCamera3HAL = 119, + GENERATED_TAGS_MockCameraHal = 120, + GENERATED_TAGS_MockPSysDevice = 121, + GENERATED_TAGS_MockSysCall = 122, + GENERATED_TAGS_MsgHandler = 123, + GENERATED_TAGS_OnePunchIC2 = 124, + GENERATED_TAGS_OpenSourceGFX = 125, + GENERATED_TAGS_PSysDevice = 126, + GENERATED_TAGS_ParameterConvert = 127, + GENERATED_TAGS_ParameterHelper = 128, + GENERATED_TAGS_Parameters = 129, + GENERATED_TAGS_PipeLine = 130, + GENERATED_TAGS_PipeManager = 131, + GENERATED_TAGS_PipeManagerStub = 132, + GENERATED_TAGS_PlatformData = 133, + GENERATED_TAGS_PnpDebugControl = 134, + GENERATED_TAGS_PostProcessStage = 135, + GENERATED_TAGS_PostProcessorBase = 136, + GENERATED_TAGS_PostProcessorCore = 137, + GENERATED_TAGS_ProcessingUnit = 138, + GENERATED_TAGS_RequestManager = 139, + GENERATED_TAGS_RequestThread = 140, + GENERATED_TAGS_ResultProcessor = 141, + GENERATED_TAGS_SWJpegEncoder = 142, + GENERATED_TAGS_SWPostProcessor = 143, + GENERATED_TAGS_SchedPolicy = 144, + GENERATED_TAGS_Scheduler = 145, + GENERATED_TAGS_SensorHwCtrl = 146, + GENERATED_TAGS_SensorManager = 147, + GENERATED_TAGS_SofSource = 148, + GENERATED_TAGS_SwImageConverter = 149, + GENERATED_TAGS_SwImageProcessor = 150, + GENERATED_TAGS_SwPostProcessUnit = 151, + GENERATED_TAGS_SysCall = 152, + GENERATED_TAGS_TCPServer = 153, + GENERATED_TAGS_Thread = 154, + GENERATED_TAGS_Trace = 155, + GENERATED_TAGS_Utils = 156, + GENERATED_TAGS_V4l2DeviceFactory = 157, + GENERATED_TAGS_V4l2_device_cc = 158, + GENERATED_TAGS_V4l2_subdevice_cc = 159, + GENERATED_TAGS_V4l2_video_node_cc = 160, + GENERATED_TAGS_VendorTags = 161, + GENERATED_TAGS_camera_metadata_tests = 162, + GENERATED_TAGS_icamera_metadata_base = 163, + GENERATED_TAGS_metadata_test = 164, + ST_FPS = 165, + ST_GPU_TNR = 166, + ST_STATS = 167, }; -#define TAGS_MAX_NUM 176 +#define TAGS_MAX_NUM 168 -#endif // !!! DO NOT EDIT THIS FILE !!! diff --git a/src/iutils/RWLock.h b/src/iutils/RWLock.h index a25ef56..daa254a 100644 --- a/src/iutils/RWLock.h +++ b/src/iutils/RWLock.h @@ -37,14 +37,14 @@ namespace icamera { */ class RWLock { public: - RWLock() {} - ~RWLock(); + RWLock() {} + ~RWLock(); - status_t readLock(); - status_t tryReadLock(); - status_t writeLock(); - status_t tryWriteLock(); - void unlock(); + status_t readLock(); + status_t tryReadLock(); + status_t writeLock(); + status_t tryWriteLock(); + void unlock(); class AutoRLock { public: @@ -64,10 +64,10 @@ class RWLock { private: // A RWLock cannot be copied - RWLock(const RWLock&); - RWLock& operator = (const RWLock&); + RWLock(const RWLock&); + RWLock& operator = (const RWLock&); - pthread_rwlock_t mRWLock = PTHREAD_RWLOCK_INITIALIZER; + pthread_rwlock_t mRWLock = PTHREAD_RWLOCK_INITIALIZER; }; inline RWLock::~RWLock() { diff --git a/src/iutils/ScopedAtrace.cpp b/src/iutils/ScopedAtrace.cpp index 709b4a6..4250d93 100644 --- a/src/iutils/ScopedAtrace.cpp +++ b/src/iutils/ScopedAtrace.cpp @@ -20,8 +20,8 @@ namespace icamera { -const int32_t ATRACE_LEN = 128; -uint32_t gScopedAtraceLevel = 0U; +static const int32_t ATRACE_LEN = 128; +static uint32_t gScopedAtraceLevel = 0U; ScopedAtrace::ScopedAtrace(uint32_t level, const char* func, const char* tag, const char* note, long value, const char* note2, int value2, const char* note3, diff --git a/src/iutils/SwImageConverter.cpp b/src/iutils/SwImageConverter.cpp index 30b544e..2f864b6 100644 --- a/src/iutils/SwImageConverter.cpp +++ b/src/iutils/SwImageConverter.cpp @@ -424,7 +424,7 @@ int SwImageConverter::convertFormat(unsigned int width, unsigned int height, uns CameraUtils::format2string(dstFmt).c_str(), width, height); if (dstFmt == srcFmt) { - // No need do format convertion. + // No need do format conversion. LOG2("No conversion needed"); MEMCPY_S(outBuf, outLength, inBuf, inLength); return 0; diff --git a/src/iutils/Thread.h b/src/iutils/Thread.h index c3984e1..5ad4ea7 100644 --- a/src/iutils/Thread.h +++ b/src/iutils/Thread.h @@ -134,7 +134,7 @@ class Thread { bool isExited() const; /** - * Overrided by derived class + * Overridden by derived class */ virtual void run() {} diff --git a/src/iutils/Trace.h b/src/iutils/Trace.h index 7b31b71..f721a98 100644 --- a/src/iutils/Trace.h +++ b/src/iutils/Trace.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef TRACE_H -#define TRACE_H +#pragma once #include #include @@ -220,5 +219,3 @@ static inline void atrace_int64(uint64_t tag, const char* name, int64_t value) { // ASYNC_TRACE_E } // namespace icamera - -#endif // TRACE_H diff --git a/src/iutils/Utils.cpp b/src/iutils/Utils.cpp index ab61cad..db9f93b 100644 --- a/src/iutils/Utils.cpp +++ b/src/iutils/Utils.cpp @@ -40,6 +40,12 @@ using std::string; #define FPS_FRAME_COUNT 60 // the frame interval to print fps +#define GET_FOURCC_FMT(a, b, c, d) \ + ((static_cast(d)) | \ + ((static_cast(c) << 8)) | \ + ((static_cast(b) << 16)) | \ + ((static_cast(a) << 24))) + namespace icamera { int CameraUtils::getFileContent(const char* filename, char* buffer, int maxSize) { @@ -57,12 +63,6 @@ int CameraUtils::getFileContent(const char* filename, char* buffer, int maxSize) return copyLength; } -#define GET_FOURCC_FMT(a, b, c, d) \ - ((static_cast(d)) | \ - ((static_cast(c) << 8)) | \ - ((static_cast(b) << 16)) | \ - ((static_cast(a) << 24))) - enum FormatType { FORMAT_RAW, FORMAT_RAW_VEC, @@ -539,14 +539,14 @@ int CameraUtils::getCompressedFrameSize(int format, int width, int height) { * Calc frame buffer size. * * Why alignment is 64? - * The IPU DMA unit must transimit at leat 64 bytes one time. + * The IPU DMA unit must transimit at least 64 bytes one time. * * Why need extra size? It's due to a hardware issue: the DMA unit is a power of * two, and a line should be transferred as few units as possible. * The result is that up to line length more data than the image size * may be transferred to memory after the image. * - * Another limition is the GDA(Global Dynamic Allocator) allocation unit size(1024). For low + * Another limitation is the GDA(Global Dynamic Allocator) allocation unit size(1024). For low * resolution it gives a bigger number. Use larger one to avoid * memory corruption. * for example: 320x480 UVVY, which bpl is 640, less than 1024, in this case, driver will @@ -557,7 +557,7 @@ int CameraUtils::getFrameSize(int format, int width, int height, bool needAligne const int alignedBpl = getStride(format, width); // Get frame size with aligned height taking in count for internal buffers. - // To garantee PSYS kernel like GDC always get enough buffer size to process. + // To guarantee PSYS kernel like GDC always get enough buffer size to process. // This is to satisfy the PSYS kernel, like GDC, input alignment requirement. if (needAlignedHeight) { height = ALIGN_64(height); @@ -608,7 +608,12 @@ void CameraUtils::getDeviceName(const char* entityName, string& deviceNodeName, CheckAndLogError((dp == nullptr), VOID_VALUE, "@%s, Fail open : %s", __func__, dirPath); struct dirent* dirp = nullptr; - while ((dirp = readdir(dp)) != nullptr) { + while (true) { + dirp = readdir(dp); + if (dirp == nullptr) { + break; + } + if ((dirp->d_type == DT_LNK) && (strncmp(dirp->d_name, filePrefix, strlen(filePrefix)) == 0)) { string subDeviceName = dirPath; @@ -621,7 +626,11 @@ void CameraUtils::getDeviceName(const char* entityName, string& deviceNodeName, char buf[128] = {'\0'}; int len = read(fd, buf, sizeof(buf)); close(fd); - len--; // remove "\n" + if (len > 0) { + len--; // remove "\n" + } else { + len = 0; + } if ((len == static_cast(strlen(entityName))) && (memcmp(buf, entityName, len) == 0)) { deviceNodeName = "/dev/"; @@ -692,8 +701,8 @@ void CameraUtils::getConfigModeFromString(string str, std::vector& c string resultStr, modeStr = str; while (split) { - size_t pos = 0U; - if ((pos = modeStr.find(",")) == string::npos) { + const auto pos = modeStr.find(","); + if (pos == string::npos) { mode = getConfigModeByName(modeStr.c_str()); split = false; } else { @@ -807,7 +816,8 @@ std::vector CameraUtils::splitString(const char* srcStr, char delim) { nsecs_t CameraUtils::systemTime() { struct timespec t; - t.tv_sec = t.tv_nsec = 0; + t.tv_sec = 0; + t.tv_nsec = 0; clock_gettime(CLOCK_MONOTONIC, &t); return nsecs_t(t.tv_sec) * 1000000000LL + t.tv_nsec; } diff --git a/src/iutils/Utils.h b/src/iutils/Utils.h index fa20be8..9c73b3c 100644 --- a/src/iutils/Utils.h +++ b/src/iutils/Utils.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef UTILS_H -#define UTILS_H +#pragma once #include #include @@ -127,7 +126,7 @@ typedef int64_t nsecs_t; * long long signed value (equivalent to int64_t) */ #define TIMEVAL2USECS(x) (static_cast( \ - ((x).tv_sec * 1000000000LL + (x).tv_usec * 1000LL) / 1000LL)) + ((x).tv_sec * 1000000000ULL + (x).tv_usec * 1000ULL) / 1000ULL)) // macro for float comparaion with 0 #define EPSILON 0.00001 @@ -275,11 +274,9 @@ std::vector splitString(const char* srcStr, char delim); nsecs_t systemTime(); -void checkFps(unsigned int frameNumber, timeval *requestTime); +void checkFps(unsigned int frameNumber, timeval *startPoint); frame_usage_mode_t getFrameUsage(const stream_config_t *streamList); } // namespace CameraUtils } // namespace icamera - -#endif // UTILS_H diff --git a/src/jpeg/CMakeLists.txt b/src/jpeg/CMakeLists.txt index 409f472..48988e6 100644 --- a/src/jpeg/CMakeLists.txt +++ b/src/jpeg/CMakeLists.txt @@ -27,7 +27,7 @@ endif() set(JPEG_SRCS ${JPEG_SRCS} - ${JPEG_DIR}/ExifCreater.cpp + ${JPEG_DIR}/ExifCreator.cpp ${JPEG_DIR}/EXIFMetaData.cpp ${JPEG_DIR}/EXIFMaker.cpp ${JPEG_DIR}/JpegMaker.cpp diff --git a/src/jpeg/EXIFMaker.cpp b/src/jpeg/EXIFMaker.cpp index cd37ce1..7e686f8 100644 --- a/src/jpeg/EXIFMaker.cpp +++ b/src/jpeg/EXIFMaker.cpp @@ -97,7 +97,7 @@ void EXIFMaker::readProperty() { * Fills EXIF data after a picture has been taken to * record the active sensor, 3A and ISP state to EXIF metadata. * - * This function is intented to set EXIF tags belonging + * This function is intended to set EXIF tags belonging * to the EXIF "Per Picture Camera Setting" group. * * @arg params active Android HAL parameters diff --git a/src/jpeg/EXIFMaker.h b/src/jpeg/EXIFMaker.h index d776adb..af21aed 100644 --- a/src/jpeg/EXIFMaker.h +++ b/src/jpeg/EXIFMaker.h @@ -19,7 +19,7 @@ #include #include "EXIFMetaData.h" -#include "ExifCreater.h" +#include "ExifCreator.h" #include "AiqResult.h" #include "CameraContext.h" #include "iutils/Utils.h" @@ -53,7 +53,7 @@ class EXIFMaker { void setSensorAeConfig(const AiqResult* aiqResult, const DataContext* dataContext); private: // member variables - ExifCreater mEncoder; + ExifCreator mEncoder; exif_attribute_t mExifAttributes; size_t mExifSize; bool mInitialized; diff --git a/src/jpeg/Exif.h b/src/jpeg/Exif.h index bce7b71..484a9a8 100644 --- a/src/jpeg/Exif.h +++ b/src/jpeg/Exif.h @@ -35,7 +35,7 @@ #define NUM_1TH_IFD_TIFF 9 // For QVGA: 320 * 240 * 1.5 #define EXIF_SIZE_LIMITATION 0x10000 -// Limite the thumbnail size to 32k, to make sure the whole exif size does +// Limit the thumbnail size to 32k, to make sure the whole exif size does // not exceed the exif size limitation. We guess the total size of all the // other fields is smaller than 32k. (Currently the size is about 26k.) #define THUMBNAIL_SIZE_LIMITATION 0x8000 diff --git a/src/jpeg/ExifCreater.cpp b/src/jpeg/ExifCreator.cpp similarity index 96% rename from src/jpeg/ExifCreater.cpp rename to src/jpeg/ExifCreator.cpp index cc51b36..d3db8c9 100644 --- a/src/jpeg/ExifCreater.cpp +++ b/src/jpeg/ExifCreator.cpp @@ -15,15 +15,15 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * JPEG DRIVER MODULE (ExifCreater.cpp) + * JPEG DRIVER MODULE (ExifCreator.cpp) * Author : ge.lee -- initial version * Date : 03 June 2010 * Purpose : This file implements the JPEG encoder APIs as needed by Camera HAL */ -#define LOG_TAG ExifCreater +#define LOG_TAG ExifCreator -#include "ExifCreater.h" +#include "ExifCreator.h" #include #include @@ -37,14 +37,14 @@ static const char ExifAsciiPrefix[] = {0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0 namespace icamera { -ExifCreater::ExifCreater() { +ExifCreator::ExifCreator() { m_thumbBuf = nullptr; m_thumbSize = 0; } -ExifCreater::~ExifCreater() {} +ExifCreator::~ExifCreator() {} -exif_status ExifCreater::setThumbData(const void* thumbBuf, unsigned int thumbSize) { +exif_status ExifCreator::setThumbData(const void* thumbBuf, unsigned int thumbSize) { if ((thumbSize + EXIF_SIZE_WITHOUT_THUMBNAIL) >= EXIF_SIZE_LIMITATION) { LOGE("ERROR: Too big thumb size %d (limit: %d)", thumbSize, EXIF_SIZE_LIMITATION); m_thumbBuf = nullptr; @@ -57,12 +57,12 @@ exif_status ExifCreater::setThumbData(const void* thumbBuf, unsigned int thumbSi return EXIF_SUCCESS; } -bool ExifCreater::isThumbDataSet() const { +bool ExifCreator::isThumbDataSet() const { return m_thumbBuf != nullptr; } // if exif tags size + thumbnail size is > 64K, it will disable thumbnail -exif_status ExifCreater::makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size) { +exif_status ExifCreator::makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size) { LOG1("makeExif start"); unsigned char *pCur, *pApp1Start, *pIfdStart, *pGpsIfdPtr, *pNextIfdOffset; @@ -354,7 +354,7 @@ exif_status ExifCreater::makeExif(void* exifOut, exif_attribute_t* exifInfo, siz return status; } -void ExifCreater::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) { +void ExifCreator::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) { unsigned char size_mm[2] = {static_cast((size >> 8) & 0xFF), static_cast(size & 0xFF)}; @@ -372,7 +372,7 @@ void ExifCreater::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) * \param writeId [IN] Whether to write the Intel Makernote ID string. * \param size [OUT] Total size after APP2 is written */ -exif_status ExifCreater::makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, +exif_status ExifCreator::makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, bool writeId) { // APP2 marker will be written starting from the pos pointed to by // pStartApp2 @@ -446,7 +446,7 @@ exif_status ExifCreater::makeApp2(void* pStartApp2, size_t& size, exif_attribute return EXIF_SUCCESS; } -void ExifCreater::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, +void ExifCreator::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, unsigned int* LongerTagOffset, exif_attribute_t* exifInfo) { unsigned char* pCur; unsigned int tmp; @@ -501,7 +501,7 @@ void ExifCreater::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextI } } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, uint32_t value) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); *pCur += 2; @@ -513,7 +513,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *pCur += 4; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, unsigned char* pValue) { char buf[4] = { 0, @@ -530,7 +530,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *pCur += 4; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, unsigned char* pValue, unsigned int* offset, unsigned char* start) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); @@ -545,7 +545,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *offset += count; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, rational_t* pValue, unsigned int* offset, unsigned char* start) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); diff --git a/src/jpeg/ExifCreater.h b/src/jpeg/ExifCreator.h similarity index 98% rename from src/jpeg/ExifCreater.h rename to src/jpeg/ExifCreator.h index bf90e26..ae5eb3b 100644 --- a/src/jpeg/ExifCreater.h +++ b/src/jpeg/ExifCreator.h @@ -72,10 +72,10 @@ const unsigned SIZEOF_APP2_OVERHEAD = const bool ENABLE_APP2_MARKER = true; typedef enum { EXIF_FAIL = -1, EXIF_SUCCESS = 0 } exif_status; -class ExifCreater { +class ExifCreator { public: - ExifCreater(); - virtual ~ExifCreater(); + ExifCreator(); + virtual ~ExifCreator(); exif_status setThumbData(const void* thumbBuf, unsigned int thumbSize); diff --git a/src/jpeg/JpegMaker.cpp b/src/jpeg/JpegMaker.cpp index c43209c..db218a8 100644 --- a/src/jpeg/JpegMaker.cpp +++ b/src/jpeg/JpegMaker.cpp @@ -130,7 +130,7 @@ status_t JpegMaker::processJpegSettings(const AiqResult* aiqResult, const DataCo LOG2("@%s:", __func__); status_t status = OK; - CheckAndLogError(!metaData, UNKNOWN_ERROR, "MetaData struct not intialized"); + CheckAndLogError(!metaData, UNKNOWN_ERROR, "MetaData struct not initialized"); metaData->mJpegSetting.jpegQuality = dataContext->mJpegParams.jpegQuality; @@ -162,7 +162,7 @@ status_t JpegMaker::processJpegSettings(const AiqResult* aiqResult, const DataCo /** * This function will get GPS metadata from request setting * - * \param[in] settings The Anroid metadata to process GPS settings from + * \param[in] settings The Android metadata to process GPS settings from * \param[out] metadata The EXIF data where the GPS setting are written to */ status_t JpegMaker::processGpsSettings(const DataContext* dataContext, ExifMetaData* metadata) { diff --git a/src/jpeg/sw/SWJpegEncoder.cpp b/src/jpeg/sw/SWJpegEncoder.cpp index 2dd94c4..6207f79 100644 --- a/src/jpeg/sw/SWJpegEncoder.cpp +++ b/src/jpeg/sw/SWJpegEncoder.cpp @@ -228,7 +228,7 @@ void SWJpegEncoder::deInit(void) { } /** - * configue every thread for multi thread jpeg + * configure every thread for multi thread jpeg * * \param package: jpeg encode package */ @@ -416,7 +416,8 @@ SWJpegEncoder::CodecWorkerThread::~CodecWorkerThread() { */ status_t SWJpegEncoder::CodecWorkerThread::runThread(const char* name) { LOG2("@%s, line:%d", __func__, __LINE__); - return this->start(); + this->start(); + return OK; } /** @@ -539,8 +540,8 @@ void SWJpegEncoder::Codec::setJpegQuality(int quality) { * * mainly, it will set the destination buffer manager, color space, quality. * - * \param width: the width of the jpeg dimentions. - * \param height: the height of the jpeg dimentions. + * \param width: the width of the jpeg dimensions. + * \param height: the height of the jpeg dimensions. * \param jpegBuf: the dest buffer to store the jpeg data * \param jpegBufSize: the size of jpegBuf buffer * diff --git a/src/meson.build b/src/meson.build index 8573d51..c6bf941 100644 --- a/src/meson.build +++ b/src/meson.build @@ -29,7 +29,6 @@ libcamera_sources += files([ '3a/intel3a/Intel3AParameter.cpp', 'core/BufferQueue.cpp', 'core/CameraBuffer.cpp', - 'core/CameraBufferPool.cpp', 'core/CameraContext.cpp', 'core/CameraEvent.cpp', 'core/CameraStream.cpp', diff --git a/src/metadata/CameraMetadata.cpp b/src/metadata/CameraMetadata.cpp index 555d19b..7950db9 100644 --- a/src/metadata/CameraMetadata.cpp +++ b/src/metadata/CameraMetadata.cpp @@ -145,8 +145,8 @@ status_t CameraMetadata::checkType(uint32_t tag, uint8_t expectedType) { status_t CameraMetadata::update(uint32_t tag, const int32_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_INT32)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_INT32); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -154,8 +154,8 @@ status_t CameraMetadata::update(uint32_t tag, const int32_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const uint8_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_BYTE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_BYTE); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -163,8 +163,8 @@ status_t CameraMetadata::update(uint32_t tag, const uint8_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const float* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_FLOAT)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_FLOAT); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -172,8 +172,8 @@ status_t CameraMetadata::update(uint32_t tag, const float* data, size_t data_cou status_t CameraMetadata::update(uint32_t tag, const int64_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_INT64)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_INT64); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -181,8 +181,8 @@ status_t CameraMetadata::update(uint32_t tag, const int64_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const double* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_DOUBLE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_DOUBLE); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -191,8 +191,8 @@ status_t CameraMetadata::update(uint32_t tag, const double* data, size_t data_co status_t CameraMetadata::update(uint32_t tag, const icamera_metadata_rational_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_RATIONAL)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_RATIONAL); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -200,8 +200,8 @@ status_t CameraMetadata::update(uint32_t tag, const icamera_metadata_rational_t* status_t CameraMetadata::update(uint32_t tag, const std::string& string) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_BYTE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_BYTE); + if (res != OK) { return res; } // string.size() doesn't count the null termination character. diff --git a/src/metadata/CameraMetadata.h b/src/metadata/CameraMetadata.h index 3dc8e08..1bfb4c2 100644 --- a/src/metadata/CameraMetadata.h +++ b/src/metadata/CameraMetadata.h @@ -15,9 +15,7 @@ * limitations under the License. */ -#ifndef CAMERA_METADATA_H -#define CAMERA_METADATA_H - +#pragma once #include #include "icamera_metadata_base.h" @@ -110,7 +108,7 @@ class CameraMetadata { size_t entryCount() const; /** - * Is the buffer empty (no entires) + * Is the buffer empty (no entries) */ bool isEmpty() const; @@ -192,4 +190,3 @@ class CameraMetadata { } // namespace icamera -#endif // CAMERA_METADATA_H diff --git a/src/metadata/ParameterHelper.h b/src/metadata/ParameterHelper.h index 454023b..09e0fb4 100644 --- a/src/metadata/ParameterHelper.h +++ b/src/metadata/ParameterHelper.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef PARAMETER_HELPER_H -#define PARAMETER_HELPER_H +#pragma once #include "iutils/RWLock.h" #include "CameraMetadata.h" @@ -142,5 +141,3 @@ class ParameterHelper { }; } // namespace icamera - -#endif // PARAMETER_HELPER_H diff --git a/src/metadata/Parameters.cpp b/src/metadata/Parameters.cpp index 5423b90..dbb168c 100644 --- a/src/metadata/Parameters.cpp +++ b/src/metadata/Parameters.cpp @@ -49,7 +49,7 @@ void Parameters::merge(const Parameters& other) { } int Parameters::setAeMode(camera_ae_mode_t aeMode) { - uint8_t mode = aeMode; + uint8_t mode = static_cast(aeMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_MODE, &mode, 1); } @@ -65,7 +65,7 @@ int Parameters::getAeMode(camera_ae_mode_t& aeMode) const { } int Parameters::setAeState(camera_ae_state_t aeState) { - uint8_t state = aeState; + uint8_t state = static_cast(aeState); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_STATE, &state, 1); } @@ -222,7 +222,7 @@ int Parameters::getFrameRate(float& fps) const { } int Parameters::setAntiBandingMode(camera_antibanding_mode_t bandingMode) { - uint8_t mode = bandingMode; + uint8_t mode = static_cast(bandingMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_ANTIBANDING_MODE, &mode, 1); } @@ -238,7 +238,7 @@ int Parameters::getAntiBandingMode(camera_antibanding_mode_t& bandingMode) const } int Parameters::setAwbMode(camera_awb_mode_t awbMode) { - uint8_t mode = awbMode; + uint8_t mode = static_cast(awbMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AWB_MODE, &mode, 1); } @@ -254,7 +254,7 @@ int Parameters::getAwbMode(camera_awb_mode_t& awbMode) const { } int Parameters::setAwbState(camera_awb_state_t awbState) { - uint8_t state = awbState; + uint8_t state = static_cast(awbState); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AWB_STATE, &state, 1); } @@ -325,7 +325,7 @@ int Parameters::getAwbGains(camera_awb_gains_t& awbGains) const { int Parameters::setAwbResult(void* data) { const uint32_t size = sizeof(camera_awb_result_t); - const uint32_t tag = CAMERA_AWB_RESULT; + const uint32_t tag = static_cast(CAMERA_AWB_RESULT); ParameterHelper::AutoWLock wl(mData); if (data == NULL) { @@ -340,7 +340,7 @@ int Parameters::getAwbResult(void* data) const { } const uint32_t size = sizeof(camera_awb_result_t); - const uint32_t tag = CAMERA_AWB_RESULT; + const uint32_t tag = static_cast(CAMERA_AWB_RESULT); ParameterHelper::AutoRLock rl(mData); auto entry = ParameterHelper::getMetadataEntry(mData, tag); @@ -1149,20 +1149,20 @@ int Parameters::getRun3ACadence(int& cadence) const { return OK; } -int Parameters::setFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t mode) { - uint8_t dewarpingMode = static_cast(mode); +int Parameters::setFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t dewarpingMode) { + uint8_t mode = static_cast(dewarpingMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_FISHEYE_DEWARPING_MODE, - &dewarpingMode, 1); + &mode, 1); } -int Parameters::getFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t& mode) const { +int Parameters::getFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t& dewarpingMode) const { ParameterHelper::AutoRLock rl(mData); auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_CONTROL_FISHEYE_DEWARPING_MODE); if (entry.count != 1) { return NAME_NOT_FOUND; } - mode = static_cast(entry.data.u8[0]); + dewarpingMode = static_cast(entry.data.u8[0]); return OK; } @@ -1501,7 +1501,7 @@ int Parameters::getAfState(camera_af_state_t& afState) const { } int Parameters::setLensState(bool lensMoving) { - uint8_t state = (lensMoving) ? 1 : 0; + uint8_t state = (lensMoving) ? 1U : 0U; ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_LENS_STATE, &state, 1); } @@ -1568,7 +1568,7 @@ int Parameters::getSensorMountType(camera_mount_type_t& sensorMountType) const { return OK; } -// User can set envrionment and then call api to update the debug level. +// User can set environment and then call api to update the debug level. int Parameters::updateDebugLevel() { Log::setDebugLevel(); return OK; @@ -1632,7 +1632,7 @@ int Parameters::getFaceDetectMode(uint8_t& faceDetectMode) const { return OK; } -int Parameters::setFaceIds(int* faceIds, int faceNum) { +int Parameters::setFaceIds(const int* faceIds, int faceNum) { ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_STATISTICS_FACE_IDS, faceIds, faceNum); } diff --git a/src/metadata/icamera_metadata_base.cpp b/src/metadata/icamera_metadata_base.cpp index f58f4fa..1db972d 100644 --- a/src/metadata/icamera_metadata_base.cpp +++ b/src/metadata/icamera_metadata_base.cpp @@ -887,7 +887,8 @@ void dump_indented_icamera_metadata(const icamera_metadata_t *metadata, camera_metadata_buffer_entry_t *entry = get_entries(metadata); for (i = 0U; i < metadata->entry_count; i++, entry++) { - const char *tag_name, *tag_section; + const char *tag_name; + const char *tag_section; tag_section = get_icamera_metadata_section_name(entry->tag); if (tag_section == NULL) { tag_section = "unknownSection"; @@ -961,7 +962,8 @@ static void print_data(int32_t fd, const uint8_t *data_ptr, uint32_t tag, } int index = 0; - int j, k; + int j; + int k; for (j = 0; j < lines; j++) { dprintf(fd, "%*s[", indentation + 4, ""); for (k = 0; diff --git a/src/metadata/icamera_metadata_base.h b/src/metadata/icamera_metadata_base.h index d9a7584..3e7df9c 100644 --- a/src/metadata/icamera_metadata_base.h +++ b/src/metadata/icamera_metadata_base.h @@ -15,9 +15,7 @@ * limitations under the License. */ -#ifndef ICAMERA_METADATA_BASE_H -#define ICAMERA_METADATA_BASE_H - +#pragma once #include #include @@ -451,4 +449,3 @@ int icamera_metadata_enum_snprint(uint32_t tag, } #endif -#endif // ICAMERA_METADATA_BASE_H diff --git a/src/metadata/icamera_metadata_tags.h b/src/metadata/icamera_metadata_tags.h index 3c55fec..9396124 100644 --- a/src/metadata/icamera_metadata_tags.h +++ b/src/metadata/icamera_metadata_tags.h @@ -29,7 +29,7 @@ /** * Top level hierarchy definitions for camera metadata. *_INFO sections are for - * the static metadata that can be retrived without opening the camera device. + * the static metadata that can be retrieved without opening the camera device. * New sections must be added right before CAMERA_SECTION_COUNT to maintain * existing enumerations. */ diff --git a/src/platformdata/CameraParserInvoker.cpp b/src/platformdata/CameraParserInvoker.cpp index 1c52b73..6f3924e 100644 --- a/src/platformdata/CameraParserInvoker.cpp +++ b/src/platformdata/CameraParserInvoker.cpp @@ -43,7 +43,7 @@ void CameraParserInvoker::parseSensors() { mStaticCfg->mCommonConfig.availableSensors); if (allSensors.empty()) { - LOGW("%s: No sensors availabe", __func__); + LOGW("%s: No sensors available", __func__); return; } @@ -68,10 +68,10 @@ void CameraParserInvoker::runParser() { dumpSensorInfo(); } -void CameraParserInvoker::chooseAvaliableJsonFile( - const std::vector& avaliableJsonFiles, std::string* jsonFile) { +void CameraParserInvoker::chooseAvailableJsonFile( + const std::vector& availableJsonFiles, std::string* jsonFile) const { struct stat st; - for (const auto json : avaliableJsonFiles) { + for (const auto json : availableJsonFiles) { const int ret = stat(json, &st); if (ret == 0) { *jsonFile = json; @@ -87,7 +87,7 @@ std::string CameraParserInvoker::getJsonFileFullName(std::string fileName) { sysFolderFileName.c_str()}; std::string chosenJsonFile = fileName; - chooseAvaliableJsonFile(profiles, &chosenJsonFile); + chooseAvailableJsonFile(profiles, &chosenJsonFile); return chosenJsonFile; } diff --git a/src/platformdata/CameraParserInvoker.h b/src/platformdata/CameraParserInvoker.h index 2529fb9..c880805 100644 --- a/src/platformdata/CameraParserInvoker.h +++ b/src/platformdata/CameraParserInvoker.h @@ -40,8 +40,8 @@ class CameraParserInvoker { void parseCommon(); void parseSensors(); void dumpSensorInfo(void); - void chooseAvaliableJsonFile(const std::vector& avaliableJsonFiles, - std::string* jsonFile); + void chooseAvailableJsonFile(const std::vector& availableJsonFiles, + std::string* jsonFile) const; std::string getJsonFileFullName(std::string fileName); private: diff --git a/src/platformdata/CameraSensorsParser.cpp b/src/platformdata/CameraSensorsParser.cpp index 32bb1a0..49f4238 100644 --- a/src/platformdata/CameraSensorsParser.cpp +++ b/src/platformdata/CameraSensorsParser.cpp @@ -497,19 +497,19 @@ void CameraSensorsParser::parseStaticMetaDataSectionSupportedFeatures(const Json for (Json::Value::ArrayIndex i = 0; i < node.size(); ++i) { camera_features feature = INVALID_FEATURE; - auto featrueStr = node[i].asString(); + const auto featureStr = node[i].asString(); - if (featrueStr == "MANUAL_EXPOSURE") + if (featureStr == "MANUAL_EXPOSURE") feature = MANUAL_EXPOSURE; - else if (featrueStr == "MANUAL_WHITE_BALANCE") + else if (featureStr == "MANUAL_WHITE_BALANCE") feature = MANUAL_WHITE_BALANCE; - else if (featrueStr == "IMAGE_ENHANCEMENT") + else if (featureStr == "IMAGE_ENHANCEMENT") feature = IMAGE_ENHANCEMENT; - else if (featrueStr == "NOISE_REDUCTION") + else if (featureStr == "NOISE_REDUCTION") feature = NOISE_REDUCTION; - else if (featrueStr == "SCENE_MODE") + else if (featureStr == "SCENE_MODE") feature = SCENE_MODE; - else if (featrueStr == "PER_FRAME_CONTROL") + else if (featureStr == "PER_FRAME_CONTROL") feature = PER_FRAME_CONTROL; if (feature != INVALID_FEATURE) { @@ -734,7 +734,7 @@ std::string CameraSensorsParser::resolveI2CBusString(const std::string& name) { pos = res.find("$CAP_N"); if (pos != std::string::npos) { res.replace(pos, sizeof("$CAP_N"), - std::to_string(std::stoi(mCsiPort) * NR_OF_CSI2_SRC_PADS)); + std::to_string(std::atoi(mCsiPort.c_str()) * NR_OF_CSI2_SRC_PADS)); } return res; @@ -848,6 +848,9 @@ void CameraSensorsParser::parseSensorSection(const Json::Value& node) { if (node.isMember("faceEngineVendor")) { mCurCam->mFaceEngineVendor = node["faceEngineVendor"].asInt(); } + if (node.isMember("runFaceWithSyncMode")) { + mCurCam->mRunFaceWithSyncMode = node["runFaceWithSyncMode"].asBool(); + } if (node.isMember("psysBundleWithAic")) { mCurCam->mPsysBundleWithAic = node["psysBundleWithAic"].asBool(); } @@ -881,6 +884,9 @@ void CameraSensorsParser::parseSensorSection(const Json::Value& node) { if (node.isMember("removeCacheFlushOutputBuffer")) { mCurCam->mRemoveCacheFlushOutputBuffer = node["removeCacheFlushOutputBuffer"].asBool(); } + if (node.isMember("sensorExposureNum")) { + mCurCam->mSensorExposureNum = node["sensorExposureNum"].asInt(); + } if (node.isMember("MediaCtlConfig")) { parseMediaCtlConfigSection(node["MediaCtlConfig"]); @@ -1004,10 +1010,14 @@ void CameraSensorsParser::updateNVMDir() { } fseek(fp, 0, SEEK_SET); std::unique_ptr ptr(new char[size + 1]); - ptr[size] = 0; size_t readSize = fread(ptr.get(), sizeof(char), size, fp); fclose(fp); + if (readSize < size) { + ptr[readSize] = '\0'; + } else { + ptr[size] = '\0'; + } if (readSize > 0) { for (auto& nvm : mNVMDeviceInfo) { if (strstr(ptr.get(), nvm.nodeName.c_str()) != nullptr) { diff --git a/src/platformdata/CameraTypes.h b/src/platformdata/CameraTypes.h index 88d8878..4b41606 100644 --- a/src/platformdata/CameraTypes.h +++ b/src/platformdata/CameraTypes.h @@ -62,7 +62,7 @@ enum { enum { SENSOR_GAIN_NONE = 0, - SENSOR_MULTI_DG_AND_CONVERTION_AG, /* Multi-DigitalGain and convertion AnalogGain are set + SENSOR_MULTI_DG_AND_CONVERSION_AG, /* Multi-DigitalGain and conversion AnalogGain are set to sensor driver */ ISP_DG_AND_SENSOR_DIRECT_AG, /* All digital gain is passed to ISP */ SENSOR_MULTI_DG_AND_DIRECT_AG /* Multi analog and digital gains, i.e. DCG */ diff --git a/src/platformdata/PlatformData.cpp b/src/platformdata/PlatformData.cpp index 740d8c7..32d79c4 100644 --- a/src/platformdata/PlatformData.cpp +++ b/src/platformdata/PlatformData.cpp @@ -104,7 +104,7 @@ int PlatformData::init() { /** * Read graph descriptor and settings from configuration files. * - * The resulting graphs represend all possible graphs for given sensor, and + * The resulting graphs represent all possible graphs for given sensor, and * they are stored in capinfo structure. */ void PlatformData::parseGraphFromXmlFile() { @@ -291,12 +291,6 @@ bool PlatformData::isNeedToPreRegisterBuffer(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mNeedPreRegisterBuffers; } -// FRAME_SYNC_S -bool PlatformData::isEnableFrameSyncCheck(int cameraId) { - return getInstance()->mStaticCfg.mCameras[cameraId].mFrameSyncCheckEnabled; -} -// FRAME_SYNC_E - int PlatformData::getExposureNum(int cameraId, bool multiExposure) { if (multiExposure) { return getInstance()->mStaticCfg.mCameras[cameraId].mSensorExposureNum; @@ -697,25 +691,6 @@ int PlatformData::getISysRawFormat(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mISysRawFormat; } -stream_t PlatformData::getISysOutputByPort(int cameraId, uuid port) { - stream_t config; - CLEAR(config); - - MediaCtlConf* mc = PlatformData::getMediaCtlConf(cameraId); - CheckAndLogError(!mc, config, "Invalid media control config."); - - for (const auto& output : mc->outputs) { - if (output.port == port) { - config.format = output.v4l2Format; - config.width = output.width; - config.height = output.height; - break; - } - } - - return config; -} - // CSI_META_S bool PlatformData::isCsiMetaEnabled(int cameraId) { // FILE_SOURCE_S @@ -1105,7 +1080,7 @@ int PlatformData::getStreamIdByConfigMode(int cameraId, ConfigMode configMode) { return modeMap.find(configMode) == modeMap.end() ? -1 : modeMap[configMode]; } -int PlatformData::getMaxRequestsInHAL(int cameraId) { +int32_t PlatformData::getMaxPipelineDepth(int cameraId) { const std::string str = "request.pipelineMaxDepth"; auto v = getByteStaticMetadata(cameraId, str); if (v.size() == 1) { @@ -1171,22 +1146,6 @@ bool PlatformData::isCSIBackEndCapture(int cameraId) { return isCsiBECapture; } -bool PlatformData::isCSIFrontEndCapture(int cameraId) { - bool isCsiFeCapture = false; - MediaCtlConf* mc = getMediaCtlConf(cameraId); - CheckAndLogError(!mc, false, "getMediaCtlConf returns nullptr, cameraId:%d", cameraId); - - for (const auto& node : mc->videoNodes) { - if ((node.videoNodeType == VIDEO_GENERIC) && - ((node.name.find(CSI_PORT_NAME) != string::npos) || - (node.name.find("TPG") != string::npos))) { - isCsiFeCapture = true; - break; - } - } - return isCsiFeCapture; -} - bool PlatformData::isTPGReceiver(int cameraId) { bool isTPGCapture = false; MediaCtlConf* mc = getMediaCtlConf(cameraId); diff --git a/src/platformdata/PlatformData.h b/src/platformdata/PlatformData.h index bdba766..5850fc8 100644 --- a/src/platformdata/PlatformData.h +++ b/src/platformdata/PlatformData.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef PLATFORM_DATA_H -#define PLATFORM_DATA_H +#pragma once #include #include @@ -223,9 +222,6 @@ class PlatformData { mUseSensorDigitalGain(false), mUseIspDigitalGain(false), mNeedPreRegisterBuffers(false), - // FRAME_SYNC_S - mFrameSyncCheckEnabled(false), - // FRAME_SYNC_E mEnableAiqd(false), mCurrentMcConf(nullptr), mDVSType(MORPH_TABLE), @@ -316,9 +312,6 @@ class PlatformData { bool mUseSensorDigitalGain; bool mUseIspDigitalGain; bool mNeedPreRegisterBuffers; - // FRAME_SYNC_S - bool mFrameSyncCheckEnabled; - // FRAME_SYNC_E bool mEnableAiqd; MediaCtlConf* mCurrentMcConf; std::map mStreamToMcMap; @@ -466,7 +459,7 @@ class PlatformData { * get the sensor description * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return const char*: the sensor descrition string. + * \return const char*: the sensor description string. */ static const char* getSensorDescription(int cameraId); @@ -615,16 +608,6 @@ class PlatformData { */ static bool isNeedToPreRegisterBuffer(int cameraId); - // FRAME_SYNC_S - /** - * Check Frame Sync is enabled or not - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return if Frame Sync is enabled or not. - */ - static bool isEnableFrameSyncCheck(int cameraId); - // FRAME_SYNC_E - /** * Get exposure number * @@ -885,7 +868,7 @@ class PlatformData { * in the mMediaCtlConfs. * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return MediaCtlConf*, if it doens't find one, this function will return nullptr. + * \return MediaCtlConf*, if it doesn't find one, this function will return nullptr. */ static MediaCtlConf* getMediaCtlConf(int cameraId); @@ -1026,14 +1009,6 @@ class PlatformData { */ static int getISysRawFormat(int cameraId); - /** - * Get the config of the ISYS output per port - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the config of the ISYS output for the given port. - */ - static stream_t getISysOutputByPort(int cameraId, uuid port); - // CSI_META_S /** * get CSI meta enabled status @@ -1086,7 +1061,7 @@ class PlatformData { static int calculateFrameParams(int cameraId, SensorFrameParams& sensorFrameParams); /** - * Get the optmized resolutions that supported by input system + * Get the optimized resolutions that supported by input system * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] * \param width: The width of the request frame @@ -1148,12 +1123,12 @@ class PlatformData { static int getStreamIdByConfigMode(int cameraId, ConfigMode configMode); /* - * Get the max requests number in HAL + * Get max pipeline depth * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the max requests number in HAL + * \return the max pipeline depth */ - static int getMaxRequestsInHAL(int cameraId); + static int32_t getMaxPipelineDepth(int cameraId); /* * Get the max requests number in flight @@ -1167,7 +1142,7 @@ class PlatformData { * get yuv color range mode * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the correponding camera_yuv_color_range_mode_t. + * \return the corresponding camera_yuv_color_range_mode_t. */ static camera_yuv_color_range_mode_t getYuvColorRangeMode(int cameraId); @@ -1207,14 +1182,6 @@ class PlatformData { */ static bool isCSIBackEndCapture(int cameraId); - /** - * if ISYS CSI Front End capture enabled - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return true if the current sensor is CSI Front End capture or not - */ - static bool isCSIFrontEndCapture(int cameraId); - /** * if AIQD enabled * @@ -1538,4 +1505,3 @@ class PlatformData { }; } /* namespace icamera */ -#endif // PLATFORM_DATA_H diff --git a/src/platformdata/PnpDebugControl.cpp b/src/platformdata/PnpDebugControl.cpp index f381a3e..d60e646 100644 --- a/src/platformdata/PnpDebugControl.cpp +++ b/src/platformdata/PnpDebugControl.cpp @@ -108,7 +108,7 @@ PnpDebugParser::PnpDebugParser(PnpDebugControl::StaticCfg* cfg) std::string fullpath = PlatformData::getCameraCfgPath() + filename; bool ret = run(fullpath); - CheckAndLogError(!ret, VOID_VALUE, "Failed to get policy profiles data frome %s", + CheckAndLogError(!ret, VOID_VALUE, "Failed to get policy profiles data from %s", PNP_DEBUG_FILE_NAME); } diff --git a/src/platformdata/gc/GraphConfig.cpp b/src/platformdata/gc/GraphConfig.cpp index 4bb2bd6..423fb63 100644 --- a/src/platformdata/gc/GraphConfig.cpp +++ b/src/platformdata/gc/GraphConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -306,7 +306,7 @@ void GraphConfig::chooseIpuStreams(map& streams, int avaS /* * For some special streams which aren't from IPU, and their ratio aren't same as any ipu - * stream, we asume to use the biggest stream for them. + * stream, we assume to use the biggest stream for them. * This stream with the biggest size will be default ipu stream for those special streams. */ int bigIpuStreamIdx = streams.begin()->first; @@ -776,7 +776,7 @@ status_t GraphConfig::fillConnectionFormat(const IpuGraphLink& ipuLink, const Ou bool useDest = (node == link->destNode) ? true : false; int32_t terminal = useDest ? link->destTerminalId : link->srcTerminalId; const StaticGraphRunKernel* kernel = nullptr; - kernel = findKernalForFrameTerminal(node, terminal); + kernel = findKernelForFrameTerminal(node, terminal); CheckAndLogError((ipuLink.stream == nullptr) && (kernel == nullptr), NO_ENTRY, "%s: Can't find kernel for link", __func__); @@ -813,7 +813,7 @@ status_t GraphConfig::fillConnectionFormat(const IpuGraphLink& ipuLink, const Ou } const StaticGraphRunKernel* -GraphConfig::findKernalForFrameTerminal(const OuterNode* node, int32_t terminalId) { +GraphConfig::findKernelForFrameTerminal(const OuterNode* node, int32_t terminalId) { int32_t kernelId = CBLayoutUtils::getKernelForDataTerminal(node->resourceId, terminalId); if (kernelId > 0) { for (uint32_t i = 0U; i < node->nodeKernels.kernelCount; i++) { @@ -884,7 +884,7 @@ status_t GraphConfig::updateGraphSettingForPtz(const PtzInfo& cur, const PtzInfo } void GraphConfig::dumpLink(const GraphLink* link) { -#define INVALID_SOURCE_ID (-1) +#define INVALID_SOURCE_ID (0xff) uint8_t srcId = link->srcNode ? link->srcNode->resourceId : INVALID_SOURCE_ID; uint8_t destId = link->destNode ? link->destNode->resourceId : INVALID_SOURCE_ID; LOG3("", diff --git a/src/platformdata/gc/GraphConfig.h b/src/platformdata/gc/GraphConfig.h index 0421bf1..0cfc2d5 100644 --- a/src/platformdata/gc/GraphConfig.h +++ b/src/platformdata/gc/GraphConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -173,7 +173,7 @@ class GraphConfig { IGraphType::ConnectionConfig* conn); OuterNode* findFrameTerminalOwner(const GraphLink* link); - const StaticGraphRunKernel* findKernalForFrameTerminal(const OuterNode* node, + const StaticGraphRunKernel* findKernelForFrameTerminal(const OuterNode* node, int32_t terminalId); uint32_t createQueryKeyAttribute(int cameraId); diff --git a/src/platformdata/gc/GraphConfigManager.h b/src/platformdata/gc/GraphConfigManager.h index 9c03a60..1a4ae57 100644 --- a/src/platformdata/gc/GraphConfigManager.h +++ b/src/platformdata/gc/GraphConfigManager.h @@ -71,7 +71,7 @@ class GraphConfigManager { PipeUseCase getUseCaseFromStream(ConfigMode configMode, const stream_t& stream); void releaseHalStream(std::vector* halStreamVec); - // Debuging helpers + // Debugging helpers void dumpStreamConfig(); private: diff --git a/src/platformdata/gc/IGraphType.h b/src/platformdata/gc/IGraphType.h index 54e64fa..60b9537 100644 --- a/src/platformdata/gc/IGraphType.h +++ b/src/platformdata/gc/IGraphType.h @@ -41,13 +41,20 @@ namespace icamera { #ifdef TNR7_CM // Stream id associated with video stream. static const int32_t VIDEO_STREAM_ID = 60006; +#elif defined(DOL_FEATURE) +static const int32_t VIDEO_STREAM_ID = 60014; #else static const int32_t VIDEO_STREAM_ID = 60001; #endif // Stream id associated with still capture with gpu tnr. static const int32_t STILL_TNR_STREAM_ID = 60009; + +#ifdef DOL_FEATURE +static const int32_t STILL_STREAM_ID = 60015; +#else // Stream id associated with still capture. static const int32_t STILL_STREAM_ID = 60000; +#endif #define MAX_RBM_STR_SIZE 128 diff --git a/src/platformdata/gc/StageDescriptor.h b/src/platformdata/gc/StageDescriptor.h index 540cb9f..f12c892 100644 --- a/src/platformdata/gc/StageDescriptor.h +++ b/src/platformdata/gc/StageDescriptor.h @@ -22,8 +22,11 @@ namespace icamera { -#define STAGE_UID(stream, stage) ((((stream)&0xFFFFU) << 16) | (((stage) & 0xFFU) << 8)) -#define PORT_UID(stream, stage, terminal) (STAGE_UID(stream, stage) + ((terminal) & 0xFFU)+ 1U) +#define STAGE_UID(stream, stage) \ + ((((static_cast(stream)) & 0xFFFFU) << 16U) | \ + (((static_cast(stage)) & 0xFFU) << 8U)) +#define PORT_UID(stream, stage, terminal) \ + (STAGE_UID(stream, stage) + ((static_cast(terminal)) & 0xFFU) + 1U) #define GET_STREAM_ID(uuid) (((uuid) >> 16) & 0xFFFF) #define GET_STAGE_ID(uuid) (((uuid) >> 8) & 0xFF) diff --git a/src/scheduler/CameraScheduler.cpp b/src/scheduler/CameraScheduler.cpp index 15d8225..8ae29da 100644 --- a/src/scheduler/CameraScheduler.cpp +++ b/src/scheduler/CameraScheduler.cpp @@ -35,7 +35,7 @@ CameraScheduler::CameraScheduler(int cameraId) : mCameraId(cameraId), mTriggerCo } CameraScheduler::~CameraScheduler() { - destoryExecutors(); + destroyExecutors(); } int32_t CameraScheduler::configurate(int32_t graphId) { @@ -43,7 +43,7 @@ int32_t CameraScheduler::configurate(int32_t graphId) { CheckAndLogError(ret != OK, ret, "configurate %d error", graphId); mTriggerCount = 0; - destoryExecutors(); + destroyExecutors(); return createExecutors(); } @@ -76,7 +76,7 @@ int32_t CameraScheduler::createExecutors() { return OK; } -void CameraScheduler::destoryExecutors() { +void CameraScheduler::destroyExecutors() { std::lock_guard l(mLock); mRegisteredNodes.clear(); mExeGroups.clear(); @@ -155,7 +155,7 @@ CameraScheduler::Executor::Executor(const char* name) mTriggerTick(0) {} CameraScheduler::Executor::~Executor() { - LOG1("%s: destory", getName()); + LOG1("%s: destroy", getName()); CameraScheduler::Executor::stop(); } @@ -242,7 +242,7 @@ bool CameraScheduler::Executor::threadLoop() { } void CameraScheduler::SystemTimerExecutor::trigger(int64_t tick) { - // Ingore external trigger + // Ignore external trigger UNUSED(tick); } @@ -268,6 +268,7 @@ int CameraScheduler::SystemTimerExecutor::waitTrigger() { } } + std::lock_guard l(Executor::mNodeLock); PERF_CAMERA_ATRACE_PARAM1(getName(), mTriggerTick); mTriggerTick++; return mTriggerTick; diff --git a/src/scheduler/CameraScheduler.h b/src/scheduler/CameraScheduler.h index 8206573..3b0cf11 100644 --- a/src/scheduler/CameraScheduler.h +++ b/src/scheduler/CameraScheduler.h @@ -53,7 +53,7 @@ class CameraScheduler { /** * triggerSource: - * emptry string: no designated source, will trigger executors WITHOUT trigger sources + * empty string: no designated source, will trigger executors WITHOUT trigger sources * in configuration file. * triggerId: * >= 0: will be passed to ISchedulerNode for processing sync. @@ -93,13 +93,13 @@ class CameraScheduler { std::string mName; - std::mutex mNodeLock; std::vector mNodes; std::vector> mListeners; std::condition_variable mTriggerSignal; bool mActive; protected: + std::mutex mNodeLock; int64_t mTriggerTick; private: @@ -126,14 +126,14 @@ class CameraScheduler { private: int32_t createExecutors(); - void destoryExecutors(); + void destroyExecutors(); std::shared_ptr findExecutor(const char* exeName); private: struct ExecutorGroup { std::shared_ptr executor; - std::string triggerSource; // emptry string means no designated source + std::string triggerSource; // empty string means no designated source std::vector nodeList; }; diff --git a/src/v4l2/MediaControl.cpp b/src/v4l2/MediaControl.cpp index 86b9ac0..10b6453 100644 --- a/src/v4l2/MediaControl.cpp +++ b/src/v4l2/MediaControl.cpp @@ -507,6 +507,7 @@ int MediaControl::getDevnameFromSysfs(MediaEntity* entity) { LOGE("readlink sysName %s failed ret %d.", sysName, ret); return -EINVAL; } + target[MAX_TARGET_NAME - 1] = '\0'; char* d = strrchr(target, '/'); if (!d) { @@ -762,6 +763,9 @@ int MediaControl::setFormat(int cameraId, const McFormat* format, int targetWidt struct v4l2_subdev_format tmt = {}; tmt.format = mbusfmt; tmt.pad = link->sink->index; + // VIRTUAL_CHANNEL_S + tmt.stream = format->stream; + // VIRTUAL_CHANNEL_E tmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; subDev->SetFormat(tmt); } diff --git a/src/v4l2/MediaControl.h b/src/v4l2/MediaControl.h index 77e2e9a..c2dd29f 100644 --- a/src/v4l2/MediaControl.h +++ b/src/v4l2/MediaControl.h @@ -161,7 +161,6 @@ struct MediaCtlConf { std::vector links; std::map> routings; std::vector formats; - std::vector outputs; std::vector videoNodes; int mcId; int outputWidth; diff --git a/src/v4l2/V4l2DeviceFactory.cpp b/src/v4l2/V4l2DeviceFactory.cpp index 8bb9b6d..d4292aa 100644 --- a/src/v4l2/V4l2DeviceFactory.cpp +++ b/src/v4l2/V4l2DeviceFactory.cpp @@ -48,7 +48,7 @@ void V4l2DeviceFactory::createDeviceFactory(int cameraId) { /** * Release the static instance of V4l2DeviceFactory for cameraId. - * All device related to the instance of of V4l2DeviceFactory will be release here as well + * All device related to the instance of V4l2DeviceFactory will be release here as well * After calling this function, all device could not be used anymore. */ void V4l2DeviceFactory::releaseDeviceFactory(int cameraId) { @@ -64,7 +64,7 @@ void V4l2DeviceFactory::releaseDeviceFactory(int cameraId) { * * The caller is supposed to get an opened sub device. * If openSubDev failed, it just return non-opened instance, - * and using this instance to call its funtion will cause 'device not open' error, + * and using this instance to call its function will cause 'device not open' error, * * Return a not nullptr sub device pointer */ diff --git a/src/v4l2/V4l2DeviceFactory.h b/src/v4l2/V4l2DeviceFactory.h index 732a0e3..2a91106 100644 --- a/src/v4l2/V4l2DeviceFactory.h +++ b/src/v4l2/V4l2DeviceFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef V4L2_DEVICE_FACTORY_H -#define V4L2_DEVICE_FACTORY_H +#pragma once #include #include @@ -57,5 +56,3 @@ class V4l2DeviceFactory { }; } // namespace icamera - -#endif // V4L2_DEVICE_FACTORY_H