Skip to content

Commit bad94d3

Browse files
committed
video: controls: Add VIDEO_CID_ROTATE
Add VIDEO_CID_ROTATE which is needed for some m2m devices. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 065487a commit bad94d3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/video/video_ctrls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ static inline const char *video_get_ctrl_name(uint32_t id)
488488
return "Brightness, Automatic";
489489
case VIDEO_CID_BAND_STOP_FILTER:
490490
return "Band-Stop Filter";
491+
case VIDEO_CID_ROTATE:
492+
return "Rotate";
491493
case VIDEO_CID_ALPHA_COMPONENT:
492494
return "Alpha Component";
493495

include/zephyr/drivers/video-controls.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,19 @@ enum video_colorfx {
134134
VIDEO_COLORFX_ANTIQUE = 14,
135135
};
136136

137-
/* Enable Automatic Brightness. */
137+
/** Enable Automatic Brightness. */
138138
#define VIDEO_CID_AUTOBRIGHTNESS (VIDEO_CID_BASE + 32)
139139

140140
/** Switch the band-stop filter of a camera sensor on or off, or specify its strength.
141141
* Such band-stop filters can be used, for example, to filter out the fluorescent light component.
142142
*/
143143
#define VIDEO_CID_BAND_STOP_FILTER (VIDEO_CID_BASE + 33)
144144

145+
/** Rotate the image by a given angle, e.g. 90, 180, 270 degree. The application will be then
146+
* responsible for setting the new width and height of the image using video_set_fmt() if needed.
147+
*/
148+
#define VIDEO_CID_ROTATE (VIDEO_CID_BASE + 34)
149+
145150
/** Sets the alpha color component.
146151
* Some devices produce data with a user-controllable alpha component. Set the value applied to
147152
* the alpha channel of every pixel produced.

0 commit comments

Comments
 (0)