Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Faster pipelines" #3

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions indi-rpicam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,4 @@ ELSE()
MESSAGE (STATUS "GTEST not found, not building unit tests")
ENDIF (GTEST_FOUND)

# ARM specific flags
include(FindARM.cmake)
IF (NEON_FOUND)
MESSAGE(STATUS "Neon found with compiler flag : -mfpu=neon -D__NEON__")
SET(CMAKE_C_FLAGS "-mfpu=neon -D__NEON__ -ftree-vectorize ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-mfpu=neon -D__NEON__ -ftree-vectorize ${CMAKE_CXX_FLAGS}")
ENDIF (NEON_FOUND)
IF (CORTEXA8_FOUND)
MESSAGE(STATUS "Cortex-A8 Found with compiler flag : -mcpu=cortex-a8")
SET(CMAKE_C_FLAGS "-mcpu=cortex-a8 -fprefetch-loop-arrays ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-mcpu=cortex-a8 -fprefetch-loop-arrays ${CMAKE_CXX_FLAGS}")
ENDIF (CORTEXA8_FOUND)
IF (CORTEXA9_FOUND)
MESSAGE(STATUS "Cortex-A9 Found with compiler flag : -mcpu=cortex-a9")
SET(CMAKE_C_FLAGS "-mcpu=cortex-a9 ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-mcpu=cortex-a9 ${CMAKE_CXX_FLAGS}")
ENDIF (CORTEXA9_FOUND)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_rpicam.xml CONFIGURATIONS Release DESTINATION ${INDI_DATA_DIR})
79 changes: 0 additions & 79 deletions indi-rpicam/FindARM.cmake

This file was deleted.

21 changes: 4 additions & 17 deletions indi-rpicam/jpegpipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void JpegPipeline::reset()
void JpegPipeline::data_received(uint8_t *data, uint32_t length)
{
uint8_t byte;
while(length > 0)
for(;length; data++, length--)
{
byte = *data;
switch(state)
Expand Down Expand Up @@ -74,18 +74,7 @@ void JpegPipeline::reset()
break;

case State::SKIP_BYTES:
if(skip_bytes <= length)
{
length -= skip_bytes;
data += skip_bytes;
skip_bytes = 0;
}
else
{
length = 0;
data += length;
skip_bytes -= length;
}
skip_bytes--;
if (skip_bytes == 0) {
if (entropy_data_follows) {
state = State::WANT_ENTROPY_DATA;
Expand All @@ -94,7 +83,7 @@ void JpegPipeline::reset()
state = State::WANT_FF;
}
}
continue;
break;

case State::WANT_ENTROPY_DATA:
if (byte == 0xFF) {
Expand Down Expand Up @@ -132,7 +121,7 @@ void JpegPipeline::reset()
state = State::END_OF_JPEG;
break;

case 0xda: // SOS (Start of stream)
case 0xda: // SOS (Start of scan)
case 0xc0: // Baseline DCT
case 0xc4: // Huffman Table
entropy_data_follows = true;
Expand All @@ -150,7 +139,5 @@ void JpegPipeline::reset()
}
break;
}
data++;
length--;
}
}
2 changes: 1 addition & 1 deletion indi-rpicam/jpegpipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class JpegPipeline : public Pipeline
private:
int s1 {0}; // Length field, first byte MSB.
int s2 {0}; // Length field, second byte LSB.
uint32_t skip_bytes {0}; //Counter for skipping bytes.
int skip_bytes {0}; //Counter for skipping bytes.
bool entropy_data_follows {false};
int current_type {}; // For debugging only.
};
Expand Down
3 changes: 0 additions & 3 deletions indi-rpicam/mmalcamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ void MMALCamera::getSensorInfo()
if (!strcmp(cameraModel, "imx477")) {
xPixelSize = yPixelSize = 1.55F;
}
else if (!strcmp(cameraModel, "ov5647")) {
xPixelSize = yPixelSize = 1.4F;
}
else if (!strcmp(cameraModel, "imx219")) {
xPixelSize = yPixelSize = 1.12F;
}
Expand Down
12 changes: 0 additions & 12 deletions indi-rpicam/mmaldriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,18 +567,6 @@ void MMALDriver::setupPipeline()
Raw12ToBayer16Pipeline *raw12_pipe = new Raw12ToBayer16Pipeline(brcm_pipe, &chipWrapper);
brcm_pipe->daisyChain(raw12_pipe);
}
else if (!strcmp(camera_control->get_camera()->getModel(), "ov5647")) {


raw_pipe.reset(new JpegPipeline());

BroadcomPipeline *brcm_pipe = new BroadcomPipeline();
raw_pipe->daisyChain(brcm_pipe);

Raw10ToBayer16Pipeline *raw10_pipe = new Raw10ToBayer16Pipeline(brcm_pipe, &chipWrapper);
// receiver->daisyChain(&raw_writer);
brcm_pipe->daisyChain(raw10_pipe);
}
else if (!strcmp(camera_control->get_camera()->getModel(), "imx219"))
{
raw_pipe.reset(new JpegPipeline());
Expand Down
Loading