Browse Source

comments and #error in unused Darknet/YOLO files

pull/7/head
Stéphane Charette 10 months ago
parent
commit
3191f8a00b
  1. 3
      Projects/img_mill/IM_DnnWorker.cpp
  2. 3
      Projects/img_mill/IM_DnnWorker.h
  3. 3
      Projects/img_slim/IM_DLibWorker.cpp
  4. 3
      Projects/img_slim/IM_DnnWorker.cpp
  5. 3
      Projects/img_slim/IM_DnnWorker.h
  6. 14
      lib/App/common/kernelModuleEmbedVideo.cpp
  7. 3
      lib/App/mojo/mojoKernel.cpp
  8. 19
      lib/alg/generic/md5.cpp
  9. 14
      lib/components/base/basicPosition.cpp
  10. 2
      lib/data/cortex/base/basicImage.cpp
  11. 4
      lib/data/darknet/darknetWraper.cpp
  12. 26
      lib/data/media/video/videoAVLIBSource.cpp

3
Projects/img_mill/IM_DnnWorker.cpp

@ -1,3 +1,6 @@
#error "This source file seems to be unused. 2026-02-20"
#include "IM_DnnWorker.h" #include "IM_DnnWorker.h"
#include "../../lib/components/base/basicFunctionality.h" #include "../../lib/components/base/basicFunctionality.h"

3
Projects/img_mill/IM_DnnWorker.h

@ -1,3 +1,6 @@
#error "This source file seems to be unused. 2026-02-20"
#ifndef __IM_DNNWORKER_H_INCL__ #ifndef __IM_DNNWORKER_H_INCL__
#define __IM_DNNWORKER_H_INCL__ #define __IM_DNNWORKER_H_INCL__

3
Projects/img_slim/IM_DLibWorker.cpp

@ -1,3 +1,6 @@
#error "This source file seems to be unused. 2026-02-20"
#include "IM_DLibWorker.h" #include "IM_DLibWorker.h"
#include <stdio.h> #include <stdio.h>
#include "../../lib/alg/generic/md5.h" #include "../../lib/alg/generic/md5.h"

3
Projects/img_slim/IM_DnnWorker.cpp

@ -1,3 +1,6 @@
#error "This source file seems to be unused. 2026-02-20"
#include "IM_DnnWorker.h" #include "IM_DnnWorker.h"
#include "../../lib/components/base/basicFunctionality.h" #include "../../lib/components/base/basicFunctionality.h"

3
Projects/img_slim/IM_DnnWorker.h

@ -1,3 +1,6 @@
#error "This source file seems to be unused. 2026-02-20"
#ifndef __IM_DNNWORKER_H_INCL__ #ifndef __IM_DNNWORKER_H_INCL__
#define __IM_DNNWORKER_H_INCL__ #define __IM_DNNWORKER_H_INCL__

14
lib/App/common/kernelModuleEmbedVideo.cpp

@ -1999,19 +1999,7 @@ bool streamHandler::pushFrame( AVFrame *Frame, void* src){
bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){ bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){
/** @todo Valgrind is reporting an important memory leak in this method. The @p malloc() call on line 2568 (and others, such as 2576).
* The details are as follows:
*
* ~~~~
= =00:00:04:04.219 26021== 8,805,208 (4,416 direct, 8,800,792 *indirect) bytes in 184 blocks are definitely lost in loss record 3,972 of 3,972
==00:00:04:04.219 26021== at 0x483877F: malloc (vg_replace_malloc.c:307)
==00:00:04:04.219 26021== by 0x1B0FF9: streamHandler::pushFrame(cv::Mat&, void*) (kernelModuleEmbedVideo.cpp:2568)
==00:00:04:04.219 26021== by 0x2490CB: videoAVLIBSource::m_fThreadProc() (videoAVLIBSource.cpp:874)
==00:00:04:04.219 26021== by 0x131B54: basicThread::m_fThreadEntryPoint(void*) (basicThread.cpp:62)
==00:00:04:04.219 26021== by 0x49B7EA6: start_thread (pthread_create.c:477)
==00:00:04:04.219 26021== by 0x7874ADE: clone (clone.S:95)
* ~~~~
*/
/// @todo Valgrind is reporting an important memory leak in this method.
bool SkeepW, SkeepA, SkeepB; bool SkeepW, SkeepA, SkeepB;
if( m_pMaster == NULL ) return false; if( m_pMaster == NULL ) return false;

3
lib/App/mojo/mojoKernel.cpp

@ -1370,6 +1370,8 @@ void mojoKernel::handleVideo( VIDEO_SEGMENT_INFO *ptr ){
}; };
bool mojoKernel::validateReports( void ){ bool mojoKernel::validateReports( void ){
/// @todo Stephane needs to follow this function...
if ( m_bKeepLocalReport ) { if ( m_bKeepLocalReport ) {
DBC_SITE_DATA *tSiteData = m_pDBC->getSiteData(1); DBC_SITE_DATA *tSiteData = m_pDBC->getSiteData(1);
if( tSiteData ) { if( tSiteData ) {
@ -1457,6 +1459,7 @@ void mojoKernel::cleanUpReportDir( uint32_t days ){
#ifdef DEBUG_EXTRA #ifdef DEBUG_EXTRA
LOG("Deleting Old Reports"); LOG("Deleting Old Reports");
#endif #endif
/// @todo Stephane needs to see when this gets called...
m_pDBC->deleteReportDate( oTS ); m_pDBC->deleteReportDate( oTS );
}; };
}; };

19
lib/alg/generic/md5.cpp

@ -81,24 +81,7 @@ char* PrintMD5(u_char md5Digest[16])
strncat(chBuffer, chEach, sizeof(chEach)); strncat(chBuffer, chEach, sizeof(chEach));
}; };
#ifdef __linux__ #ifdef __linux__
/** @todo Valgrind tells us this @p strdup() called from @ref videoAVLIBSource is never freed.
*
* ~~~~
= =00:00:04:04.006 26021== 33 bytes in 1 blocks are definitely* lost in loss record 2,412 of 3,972
==00:00:04:04.006 26021== at 0x483877F: malloc (vg_replace_malloc.c:307)
==00:00:04:04.006 26021== by 0x7802C3A: strdup (strdup.c:42) [now line 102 since I've inserted this comment]
==00:00:04:04.006 26021== by 0x1D20BD: PrintMD5(unsigned char*) (md5.cpp:84)
==00:00:04:04.006 26021== by 0x1D212A: MD5String(char*) (md5.cpp:100)
==00:00:04:04.006 26021== by 0x2476EA: videoAVLIBSource::_open(char*, bool, float, int, int, int, int, int) (videoAVLIBSource.cpp:388)
==00:00:04:04.006 26021== by 0x1AE949: streamHandler::create(dataBinder*, unsigned int) (kernelModuleEmbedVideo.cpp:1949)
==00:00:04:04.006 26021== by 0x1ADA24: kernelModuleEmbedVideo::registerStream(unsigned int, unsigned char) (kernelModuleEmbedVideo.cpp:1731)
==00:00:04:04.006 26021== by 0x1AC2A9: kernelModuleEmbedVideo::validate() (kernelModuleEmbedVideo.cpp:1347)
==00:00:04:04.006 26021== by 0x1BB1E7: kernelModuleFactory::m_fThreadProc() (kernelModuleFactory.cpp:397)
==00:00:04:04.006 26021== by 0x131B54: basicThread::m_fThreadEntryPoint(void*) (basicThread.cpp:62)
==00:00:04:04.006 26021== by 0x49B7EA6: start_thread (pthread_create.c:477)
==00:00:04:04.006 26021== by 0x7874ADE: clone (clone.S:95)
* ~~~~
*/
/// @todo Valgrind tells us this @p strdup() called from @ref videoAVLIBSource is never freed.
return strdup(chBuffer); return strdup(chBuffer);
#else #else
return _strdup(chBuffer); return _strdup(chBuffer);

14
lib/components/base/basicPosition.cpp

@ -217,19 +217,7 @@ void basicPosition::setPositionDeg(float Lat, float Lon, float Alt, float h_lat,
void basicPosition::updateMatrix( void ){ void basicPosition::updateMatrix( void ){
/** @todo Valgrind is showing several memory leaks from this function.
*
* ~~~~
==00:00:04:04.173 26021== 176 bytes in 2 blocks are definitely lost in loss record 3,541 of 3,972
==00:00:04:04.173 26021== at 0x4838DEF: operator new(unsigned long) (vg_replace_malloc.c:342)
==00:00:04:04.173 26021== by 0x130F5C: basicPosition::updateMatrix() (basicPosition.cpp:232)
==00:00:04:04.173 26021== by 0x167C58: deviceNodeSensor::reloadDeviceNodeFromDB() (deviceNodeSensor.cpp:298)
==00:00:04:04.173 26021== by 0x169DE2: deviceNodeSensor::m_fThreadProc() (deviceNodeSensor.cpp:1075)
==00:00:04:04.173 26021== by 0x131B54: basicThread::m_fThreadEntryPoint(void*) (basicThread.cpp:62)
==00:00:04:04.173 26021== by 0x49B7EA6: start_thread (pthread_create.c:477)
==00:00:04:04.173 26021== by 0x7874ADE: clone (clone.S:95)
* ~~~~
*/
/// @todo Valgrind is showing several memory leaks from this function.
//Tait-Bryan angles //Tait-Bryan angles
//X1Y2Z3 //X1Y2Z3

2
lib/data/cortex/base/basicImage.cpp

@ -1,3 +1,5 @@
#error "This source file seems to be unused. 2026-02-20"
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Dr.Frucht Systems Ltd. // Dr.Frucht Systems Ltd.
// Copyright © 2000-2017. All Rights Reserved. // Copyright © 2000-2017. All Rights Reserved.

4
lib/data/darknet/darknetWraper.cpp

@ -1,9 +1,13 @@
#error "This source file seems to be unused. 2026-02-20"
#include "darknetWraper.h" #include "darknetWraper.h"
#include <experimental/filesystem> #include <experimental/filesystem>
#define DARKNET_INCLUDE_ORIGINAL_API #define DARKNET_INCLUDE_ORIGINAL_API
#include <darknet/darknet.hpp> #include <darknet/darknet.hpp>
//#include <darknet/darknet_image.hpp> //#include <darknet/darknet_image.hpp>
darknetWraper::darknetWraper(){ darknetWraper::darknetWraper(){
m_pNET = NULL; m_pNET = NULL;
}; };

26
lib/data/media/video/videoAVLIBSource.cpp

@ -762,33 +762,7 @@ void videoAVLIBSource::m_fThreadProc( void ){
/** @todo Valgrind is reporting several important memory leaks in this method. /** @todo Valgrind is reporting several important memory leaks in this method.
* *
* The first one has to do with @p av_frame_alloc(): * The first one has to do with @p av_frame_alloc():
*
* ~~~~
==00:00:04:04.219 26021== 2,074,168 (536 direct, 2,073,632 indirect) bytes in 1 blocks are definitely lost in loss record 3,970 of 3,972
==00:00:04:04.219 26021== at 0x483AEB8: memalign (vg_replace_malloc.c:906)
==00:00:04:04.219 26021== by 0x483AFCE: posix_memalign (vg_replace_malloc.c:1070)
==00:00:04:04.219 26021== by 0x66E2244: av_malloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.56.70.100)
==00:00:04:04.219 26021== by 0x66E25FD: av_mallocz (in /usr/lib/x86_64-linux-gnu/libavutil.so.56.70.100)
==00:00:04:04.219 26021== by 0x66BF6BF: av_frame_alloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.56.70.100)
==00:00:04:04.219 26021== by 0x248B0E: videoAVLIBSource::m_fThreadProc() (videoAVLIBSource.cpp:802)
==00:00:04:04.219 26021== by 0x131B54: basicThread::m_fThreadEntryPoint(void*) (basicThread.cpp:62)
==00:00:04:04.219 26021== by 0x49B7EA6: start_thread (pthread_create.c:477)
==00:00:04:04.219 26021== by 0x7874ADE: clone (clone.S:95)
* ~~~~
*
* The next one has to do with @p av_image_alloc(): * The next one has to do with @p av_image_alloc():
*
* ~~~~
==00:00:04:04.219 26021== 2,073,632 bytes in 1 blocks are indirectly lost in loss record 3,969 of 3,972
==00:00:04:04.219 26021== at 0x483AEB8: memalign (vg_replace_malloc.c:906)
==00:00:04:04.219 26021== by 0x483AFCE: posix_memalign (vg_replace_malloc.c:1070)
==00:00:04:04.219 26021== by 0x66E2244: av_malloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.56.70.100)
==00:00:04:04.219 26021== by 0x66DCEB5: av_image_alloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.56.70.100)
==00:00:04:04.219 26021== by 0x248BCB: videoAVLIBSource::m_fThreadProc() (videoAVLIBSource.cpp:807)
==00:00:04:04.219 26021== by 0x131B54: basicThread::m_fThreadEntryPoint(void*) (basicThread.cpp:62)
==00:00:04:04.219 26021== by 0x49B7EA6: start_thread (pthread_create.c:477)
==00:00:04:04.219 26021== by 0x7874ADE: clone (clone.S:95)
* ~~~~
*/ */
m_bThreadStatus = TH_WORKING; m_bThreadStatus = TH_WORKING;

Loading…
Cancel
Save