Home
last modified time | relevance | path

Searched refs:vbuf (Results 1 – 11 of 11) sorted by relevance

/Zephyr-latest/drivers/video/
Dvideo_sw_generator.c126 static void __fill_buffer_colorbar(struct video_sw_generator_data *data, struct video_buffer *vbuf) in __fill_buffer_colorbar() argument
135 uint16_t *pixel = (uint16_t *)&vbuf->buffer[i]; in __fill_buffer_colorbar()
139 uint32_t *pixel = (uint32_t *)&vbuf->buffer[i]; in __fill_buffer_colorbar()
146 vbuf->timestamp = k_uptime_get_32(); in __fill_buffer_colorbar()
147 vbuf->bytesused = i; in __fill_buffer_colorbar()
148 vbuf->line_offset = 0; in __fill_buffer_colorbar()
155 struct video_buffer *vbuf; in __buffer_work() local
161 vbuf = k_fifo_get(&data->fifo_in, K_NO_WAIT); in __buffer_work()
162 if (vbuf == NULL) { in __buffer_work()
168 __fill_buffer_colorbar(data, vbuf); in __buffer_work()
[all …]
Dvideo_emul_rx.c156 struct video_buffer *vbuf = vbuf; in emul_rx_worker() local
161 while ((vbuf = k_fifo_get(&data->fifo_in, K_NO_WAIT)) != NULL) { in emul_rx_worker()
162 vbuf->bytesused = fmt->pitch * fmt->height; in emul_rx_worker()
163 vbuf->line_offset = 0; in emul_rx_worker()
165 LOG_DBG("Inserting %u bytes into buffer %p", vbuf->bytesused, vbuf->buffer); in emul_rx_worker()
170 memcpy(vbuf->buffer, cfg->source_dev->data, vbuf->bytesused); in emul_rx_worker()
173 k_fifo_put(&data->fifo_out, vbuf); in emul_rx_worker()
178 struct video_buffer *vbuf) in emul_rx_enqueue() argument
188 if (vbuf->size < fmt->pitch * fmt->height) { in emul_rx_enqueue()
194 vbuf->bytesused = 0; in emul_rx_enqueue()
[all …]
Dvideo_common.c36 struct video_buffer *vbuf = NULL; in video_buffer_aligned_alloc() local
43 vbuf = &video_buf[i]; in video_buffer_aligned_alloc()
49 if (vbuf == NULL) { in video_buffer_aligned_alloc()
59 vbuf->buffer = block->data; in video_buffer_aligned_alloc()
60 vbuf->size = size; in video_buffer_aligned_alloc()
61 vbuf->bytesused = 0; in video_buffer_aligned_alloc()
63 return vbuf; in video_buffer_aligned_alloc()
71 void video_buffer_release(struct video_buffer *vbuf) in video_buffer_release() argument
78 if (video_block[i].data == vbuf->buffer) { in video_buffer_release()
84 vbuf->buffer = NULL; in video_buffer_release()
Dvideo_mcux_csi.c42 struct video_buffer *vbuf, *vbuf_first = NULL; in __frame_done_cb() local
58 while ((vbuf = k_fifo_get(&data->fifo_in, K_NO_WAIT))) { in __frame_done_cb()
59 if ((uint32_t)vbuf->buffer == buffer_addr) { in __frame_done_cb()
67 k_fifo_put(&data->fifo_in, vbuf); in __frame_done_cb()
71 vbuf_first = vbuf; in __frame_done_cb()
72 } else if (vbuf_first == vbuf) { in __frame_done_cb()
73 vbuf = NULL; in __frame_done_cb()
78 if (vbuf == NULL) { in __frame_done_cb()
83 vbuf->timestamp = k_uptime_get_32(); in __frame_done_cb()
86 DCACHE_InvalidateByRange(buffer_addr, vbuf->bytesused); in __frame_done_cb()
[all …]
Dvideo_mcux_smartdma.c155 struct video_buffer *vbuf) in nxp_video_sdma_enqueue() argument
164 vbuf->bytesused = SDMA_VBUF_WIDTH * SDMA_LINE_COUNT * sizeof(uint16_t); in nxp_video_sdma_enqueue()
165 if (vbuf->size < vbuf->bytesused) { in nxp_video_sdma_enqueue()
170 k_fifo_put(&data->fifo_in, vbuf); in nxp_video_sdma_enqueue()
180 struct video_buffer **vbuf, in nxp_video_sdma_dequeue() argument
189 *vbuf = k_fifo_get(&data->fifo_out, timeout); in nxp_video_sdma_dequeue()
190 if (*vbuf == NULL) { in nxp_video_sdma_dequeue()
203 struct video_buf *vbuf; in nxp_video_sdma_flush() local
212 while ((vbuf = k_fifo_get(&data->fifo_in, K_NO_WAIT))) { in nxp_video_sdma_flush()
213 k_fifo_put(&data->fifo_out, vbuf); in nxp_video_sdma_flush()
Dvideo_stm32_dcmi.c66 struct video_buffer *vbuf; in HAL_DCMI_FrameEventCallback() local
70 vbuf = k_fifo_get(&dev_data->fifo_in, K_NO_WAIT); in HAL_DCMI_FrameEventCallback()
72 if (vbuf == NULL) { in HAL_DCMI_FrameEventCallback()
77 vbuf->timestamp = k_uptime_get_32(); in HAL_DCMI_FrameEventCallback()
78 memcpy(vbuf->buffer, dev_data->buffer, vbuf->bytesused); in HAL_DCMI_FrameEventCallback()
80 k_fifo_put(&dev_data->fifo_out, vbuf); in HAL_DCMI_FrameEventCallback()
293 struct video_buffer *vbuf) in video_stm32_dcmi_enqueue() argument
302 if (buffer_size > vbuf->size) { in video_stm32_dcmi_enqueue()
306 vbuf->bytesused = buffer_size; in video_stm32_dcmi_enqueue()
307 vbuf->line_offset = 0; in video_stm32_dcmi_enqueue()
[all …]
Dvideo_esp32_dvp.c298 struct video_buffer *vbuf) in video_esp32_enqueue() argument
306 vbuf->bytesused = data->video_format.pitch * data->video_format.height; in video_esp32_enqueue()
307 vbuf->line_offset = 0; in video_esp32_enqueue()
309 k_fifo_put(&data->fifo_in, vbuf); in video_esp32_enqueue()
315 struct video_buffer **vbuf, k_timeout_t timeout) in video_esp32_dequeue() argument
323 *vbuf = k_fifo_get(&data->fifo_out, timeout); in video_esp32_dequeue()
324 LOG_DBG("Dequeue done, vbuf = %p", *vbuf); in video_esp32_dequeue()
325 if (*vbuf == NULL) { in video_esp32_dequeue()
/Zephyr-latest/samples/drivers/video/capture/src/
Dmain.c69 const struct video_buffer *const vbuf, in video_display_frame() argument
73 .buf_size = vbuf->bytesused, in video_display_frame()
76 .height = vbuf->bytesused / fmt.pitch, in video_display_frame()
79 display_write(display_dev, 0, vbuf->line_offset, &buf_desc, vbuf->buffer); in video_display_frame()
85 struct video_buffer *buffers[CONFIG_VIDEO_BUFFER_POOL_NUM_MAX], *vbuf; in main() local
238 err = video_dequeue(video_dev, VIDEO_EP_OUT, &vbuf, K_FOREVER); in main()
244 LOG_DBG("Got frame %u! size: %u; timestamp %u ms", frame++, vbuf->bytesused, in main()
245 vbuf->timestamp); in main()
248 if (is_colorbar_ok(vbuf->buffer, fmt)) { in main()
254 video_display_frame(display_dev, vbuf, fmt); in main()
[all …]
/Zephyr-latest/tests/drivers/video/api/src/
Dvideo_emul.c147 struct video_buffer *vbuf = NULL; in ZTEST() local
160 vbuf = video_buffer_alloc(fmt.pitch * fmt.height, K_FOREVER); in ZTEST()
161 zexpect_not_null(vbuf); in ZTEST()
167 zexpect_ok(video_enqueue(rx_dev, VIDEO_EP_OUT, vbuf)); in ZTEST()
170 zexpect_ok(video_dequeue(rx_dev, VIDEO_EP_OUT, &vbuf, K_FOREVER)); in ZTEST()
171 zexpect_not_null(vbuf); in ZTEST()
172 zexpect_equal(vbuf->bytesused, vbuf->size); in ZTEST()
175 zexpect_ok(video_enqueue(rx_dev, VIDEO_EP_OUT, vbuf)); in ZTEST()
181 zexpect_ok(video_dequeue(rx_dev, VIDEO_EP_OUT, &vbuf, K_FOREVER)); in ZTEST()
182 zexpect_not_null(vbuf); in ZTEST()
[all …]
/Zephyr-latest/samples/drivers/video/tcpserversink/src/
Dmain.c41 struct video_buffer *buffers[2], *vbuf; in main() local
143 ret = video_dequeue(video, VIDEO_EP_OUT, &vbuf, K_FOREVER); in main()
152 ret = sendall(client, vbuf->buffer, vbuf->bytesused); in main()
159 (void)video_enqueue(video, VIDEO_EP_OUT, vbuf); in main()
170 ret = video_dequeue(video, VIDEO_EP_OUT, &vbuf, K_NO_WAIT); in main()
/Zephyr-latest/samples/drivers/video/capture_to_lvgl/src/
Dmain.c22 struct video_buffer *buffers[2], *vbuf; in main() local
149 err = video_dequeue(video_dev, VIDEO_EP_OUT, &vbuf, K_FOREVER); in main()
160 err = video_enqueue(video_dev, VIDEO_EP_OUT, vbuf); in main()