refactoring

This commit is contained in:
Maxim Devaev
2024-02-29 19:13:02 +02:00
parent a3f4294cd8
commit 3e5a444023
6 changed files with 14 additions and 17 deletions

View File

@@ -74,7 +74,7 @@ void us_frame_copy(const us_frame_s *src, us_frame_s *dest) {
bool us_frame_compare(const us_frame_s *a, const us_frame_s *b) {
return (
a->allocated && b->allocated
&& US_FRAME_COMPARE_META_USED_NOTS(a, b)
&& US_FRAME_COMPARE_GEOMETRY(a, b)
&& !memcmp(a->data, b->data, b->used)
);
}
@@ -99,6 +99,10 @@ uint us_frame_get_padding(const us_frame_s *frame) {
return 0;
}
bool us_is_jpeg(uint format) {
return (format == V4L2_PIX_FMT_JPEG || format == V4L2_PIX_FMT_MJPEG);
}
const char *us_fourcc_to_string(uint format, char *buf, uz size) {
assert(size >= 8);
buf[0] = format & 0x7F;