Skip to content

Commit

Permalink
Merge branch 'main' into FacelandmarksCV
Browse files Browse the repository at this point in the history
  • Loading branch information
venkat0907 authored Jul 12, 2023
2 parents 7c06210 + 948af77 commit a6a9183
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
13 changes: 12 additions & 1 deletion base/src/H264Decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class H264Decoder::Detail
{
helper->process(frame);
}

#ifdef ARM64
void closeAllThreads(frame_sp eosFrame)
{
helper->closeAllThreads(eosFrame);
}
#endif
public:
int mWidth;
int mHeight;
Expand Down Expand Up @@ -138,8 +145,12 @@ bool H264Decoder::init()

bool H264Decoder::term()
{
mDetail.reset();
#ifdef ARM64
auto eosFrame = frame_sp(new EoSFrame());
mDetail->closeAllThreads(eosFrame);
#endif

mDetail.reset();
return Module::term();
}

Expand Down
3 changes: 2 additions & 1 deletion base/src/H264DecoderV4L2Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,8 +1385,9 @@ int h264DecoderV4L2Helper::process(frame_sp inputFrame)
}
return true;
}
h264DecoderV4L2Helper::~h264DecoderV4L2Helper()
void h264DecoderV4L2Helper::closeAllThreads(frame_sp eosFrame)
{
process(eosFrame);
if (ctx.fd != -1)
{
if (ctx.dec_capture_thread)
Expand Down
3 changes: 2 additions & 1 deletion base/src/H264DecoderV4L2Helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class h264DecoderV4L2Helper
* Refer to [V4L2 Video Decoder](group__V4L2Dec.html) for more information on the decoder.
*/
h264DecoderV4L2Helper() {}
~h264DecoderV4L2Helper(); //
~h264DecoderV4L2Helper() {};
typedef struct
{
uint32_t decode_pixfmt;
Expand Down Expand Up @@ -385,6 +385,7 @@ class h264DecoderV4L2Helper

bool init(std::function<void(frame_sp &)> send, std::function<frame_sp()> makeFrame);

void closeAllThreads(frame_sp eosFrame);
protected:
boost::shared_ptr<Buffer> mBuffer;
context_t ctx;
Expand Down
4 changes: 2 additions & 2 deletions base/test/jpegdecoderl4tm_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_basic, * boost::unit_test::disabled())
delete[] pReadData;
}

BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb)
BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb, * boost::unit_test::disabled())
{
const uint8_t* pReadData = nullptr;
unsigned int readDataSize = 0U;
Expand Down Expand Up @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb)
delete[] pReadData;
}

BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_mono)
BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_mono, * boost::unit_test::disabled())
{
const uint8_t* pReadData = nullptr;
unsigned int readDataSize = 0U;
Expand Down
6 changes: 3 additions & 3 deletions base/test/jpegencoderl4tm_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

BOOST_AUTO_TEST_SUITE(jpegencoderl4tm_tests)

BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic)
BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic, * boost::unit_test::disabled())
{
// metadata is known
auto width = 3840;
Expand Down Expand Up @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic)
Test_Utils::saveOrCompare("./data/testOutput/frame_test_l4tm.jpg", (const uint8_t *)encodedImageFrame->data(), encodedImageFrame->size(), 0);
}

BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb)
BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb, * boost::unit_test::disabled())
{
// metadata is known
auto width = 1280;
Expand Down Expand Up @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb)
Test_Utils::saveOrCompare("./data/testOutput/jpegencoderl4tm_frame_1280x720_rgb.jpg", (const uint8_t *)encodedImageFrame->data(), encodedImageFrame->size(), 0);
}

BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic_scale)
BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic_scale, * boost::unit_test::disabled())
{
// metadata is known
auto width = 3840;
Expand Down
2 changes: 1 addition & 1 deletion base/test/l4tm_dec_enc_1_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int startIndex = 0;
int endIndex = -1;
bool sw = false;

BOOST_AUTO_TEST_CASE(sample)
BOOST_AUTO_TEST_CASE(sample, * boost::unit_test::disabled())
{
LoggerProps loggerProps;
loggerProps.logLevel = boost::log::trivial::severity_level::info;
Expand Down

0 comments on commit a6a9183

Please sign in to comment.