Skip to content

Commit

Permalink
Fix linter error in uyvy file
Browse files Browse the repository at this point in the history
- Update comment in CI from Jammy to Noble

Signed-off-by: Evan Flynn <evan.flynn@apex.ai>
  • Loading branch information
evan-flynn-apexai committed May 1, 2024
1 parent a8962cb commit 053b678
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
sort -u)
# Handle the case if two docker images were declared for one distro
# e.g. rolling moving from one Ubuntu Focal to Ubuntu Jammy
# e.g. rolling moving from one Ubuntu Jammy to Ubuntu Noble
docker_image_arr=($docker_image)
DISTRO_STR+="\"${distro}\", "
Expand Down
5 changes: 4 additions & 1 deletion include/usb_cam/formats/uyvy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ class UYVY2RGB : public pixel_format_base
///
/// Source: https://www.linuxtv.org/downloads/v4l-dvb-apis-old/V4L2-PIX-FMT-YUYV.html
///
// Use `INDENT-OFF` here to disable uncrustify for this function due to
// differing uncrustify formats for different distros
// *INDENT-OFF*
void convert(const char * & src, char * & dest, const int & bytes_used) override
{
(void)bytes_used; // not used by this conversion method
int i, j;
unsigned char y0, y1, u, v;
unsigned char r, g, b;

for (i = 0, j = 0; i < (static_cast<int>(m_number_of_pixels) << 1); i += 4, j += 6) {
u = (unsigned char)src[i + 0];
y0 = (unsigned char)src[i + 1];
Expand All @@ -102,6 +104,7 @@ class UYVY2RGB : public pixel_format_base
dest[j + 5] = b;
}
}
// *INDENT-ON*

private:
size_t m_number_of_pixels;
Expand Down

0 comments on commit 053b678

Please sign in to comment.