ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_camera_codec_passthrough.c
Go to the documentation of this file.
1
17
19
20#include <stddef.h>
21
22#include "ra8_attributes.h"
23#include "ra8_camera_internal.h"
24#include "ra8_err.h"
25
47 const ra8_camera_frame_t* input,
48 const ra8_camera_buffer_t* output_buffer,
49 ra8_camera_frame_t* out_frame)
50{
51 (void)ctx;
52 (void)output_buffer;
53 if (input == nullptr) {
54 return k_ra8_err_null_ptr;
55 }
56 if (out_frame == nullptr) {
57 return k_ra8_err_null_ptr;
58 }
59 if (input->format != k_ra8_camera_format_jpeg) {
61 }
62 *out_frame = *input;
63 return k_ra8_ok;
64}
65
70
72{
73 if (codec == nullptr) {
74 return k_ra8_err_null_ptr;
75 }
77 codec->ctx = nullptr;
78 return k_ra8_ok;
79}
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
struct ra8_camera_codec_iface ra8_camera_codec_iface_t
Opaque codec vtable; concrete codec backends define its rows.
Definition ra8_camera.h:51
@ k_ra8_camera_format_jpeg
Complete encoded JPEG byte stream.
Definition ra8_camera.h:66
static ra8_err_t internal_passthrough_encode(void *ctx, const ra8_camera_frame_t *input, const ra8_camera_buffer_t *output_buffer, ra8_camera_frame_t *out_frame)
Return a JPEG input view unchanged.
ra8_err_t ra8_camera_codec_passthrough_init(ra8_camera_codec_t *codec)
Bind the zero-copy JPEG passthrough codec.
static const ra8_camera_codec_iface_t s_passthrough_codec_iface
Stateless passthrough codec vtable.
Zero-copy JPEG passthrough codec backend.
Private source and codec vtables for ra8_camera backends.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_not_supported
Requested feature not compiled in, not wired, or not supported by this MCU variant.
Definition ra8_err.h:180
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
Definition ra8_err.h:478
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Caller-owned writable byte-buffer description.
Definition ra8_camera.h:80
Caller-owned handle binding one image codec and its context.
Definition ra8_camera.h:145
void * ctx
Caller-owned backend context.
Definition ra8_camera.h:147
const ra8_camera_codec_iface_t * iface
Bound codec vtable (private).
Definition ra8_camera.h:146
Immutable view of one captured or encoded image.
Definition ra8_camera.h:96
ra8_camera_format_t format
Pixel or compressed-image layout.
Definition ra8_camera.h:102