Skip to content

Commit

Permalink
fix linter and mem check
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Dec 24, 2024
1 parent 921fe97 commit 3d38b77
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
23 changes: 10 additions & 13 deletions rem/vidconv/vconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,11 @@ static inline void _yuv2rgb(uint8_t *rgb, uint8_t y, uint8_t u, uint8_t v)
}


typedef void (line_h)(unsigned xsoffs, unsigned xdoffs, unsigned width, double rw,
unsigned yd, unsigned ys, unsigned ys2,
uint8_t *dd0, uint8_t *dd1, uint8_t *dd2,
unsigned lsd,
const uint8_t *sd0, const uint8_t *sd1,
const uint8_t *sd2, unsigned lss);
typedef void(line_h)(unsigned xsoffs, unsigned xdoffs, unsigned width,
double rw, unsigned yd, unsigned ys, unsigned ys2,
uint8_t *dd0, uint8_t *dd1, uint8_t *dd2, unsigned lsd,
const uint8_t *sd0, const uint8_t *sd1,
const uint8_t *sd2, unsigned lss);


static void yuv420p_to_yuv420p(unsigned xsoffs, unsigned xdoffs,
Expand Down Expand Up @@ -595,13 +594,11 @@ static void yuv444p_to_rgb32(unsigned xsoffs, unsigned xdoffs, unsigned width,
}


static void nv12_to_rgb32(unsigned xsoffs, unsigned xdoffs, unsigned width, double rw,
unsigned yd, unsigned ys, unsigned ys2,
uint8_t *dd0, uint8_t *dd1, uint8_t *dd2,
unsigned lsd,
const uint8_t *ds0, const uint8_t *ds1,
const uint8_t *ds2, unsigned lss
)
static void nv12_to_rgb32(unsigned xsoffs, unsigned xdoffs, unsigned width,
double rw, unsigned yd, unsigned ys, unsigned ys2,
uint8_t *dd0, uint8_t *dd1, uint8_t *dd2,
unsigned lsd, const uint8_t *ds0, const uint8_t *ds1,
const uint8_t *ds2, unsigned lss)
{
unsigned x, xd, xs, xs2;
unsigned id, is;
Expand Down
7 changes: 5 additions & 2 deletions test/vidconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ int test_vidconv_pixel_formats(void)
static int test_vidconv_center(void)
{
int err;
struct vidframe *dst = NULL;
struct vidframe *src = NULL;

static struct test {
struct vidrect r;
Expand Down Expand Up @@ -401,8 +403,6 @@ static int test_vidconv_center(void)

for (size_t i = 0; i < RE_ARRAY_SIZE(testv); i++) {
struct test *test = &testv[i];
struct vidframe *dst = NULL;
struct vidframe *src = NULL;

err = vidframe_alloc(&src, VID_FMT_YUV420P, &test->src_sz);
err |= vidframe_alloc(&dst, VID_FMT_YUV420P, &test->dst_sz);
Expand All @@ -415,6 +415,9 @@ static int test_vidconv_center(void)
}

out:
src = mem_deref(src);
dst = mem_deref(dst);

return err;
}

Expand Down

0 comments on commit 3d38b77

Please sign in to comment.