Skip to content

Commit b69e1d5

Browse files
hfruchet-stjhedberg
authored andcommitted
include: video: add size field to video_format structure
Add size field to the video_format structure which needs to be set by the driver and exposed to the application. For uncompressed formats, this is the size of the raw data buffer in bytes, which could be the whole raw image or a portion of the raw image in cases the receiver / dma supports it. For compressed formats, this is the estimated maximum number of bytes required to hold a complete compressed frame. Signed-off-by: Hugues Fruchet <[email protected]> Signed-off-by: Phi Bang Nguyen <[email protected]>
1 parent 09ed77f commit b69e1d5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/zephyr/drivers/video.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ struct video_format {
7979
* the next row (>=width).
8080
*/
8181
uint32_t pitch;
82+
/**
83+
* @brief size of the buffer in bytes, need to be set by the drivers
84+
*
85+
* For uncompressed formats, this is the size of the raw data buffer in bytes,
86+
* which could be the whole raw image or a portion of the raw image in cases
87+
* the receiver / dma supports it.
88+
*
89+
* For compressed formats, this is the maximum number of bytes required to
90+
* hold a complete compressed frame, estimated for the worst case.
91+
*/
92+
uint32_t size;
8293
};
8394

8495
/**

0 commit comments

Comments
 (0)