Lines Matching refs:src_buf
231 struct vb2_v4l2_buffer *src_buf, in coda_buffer_parse_headers() argument
234 u8 *vaddr = vb2_plane_vaddr(&src_buf->vb2_buf, 0); in coda_buffer_parse_headers()
252 struct vb2_v4l2_buffer *src_buf) in coda_bitstream_try_queue() argument
254 unsigned long payload = vb2_get_plane_payload(&src_buf->vb2_buf, 0); in coda_bitstream_try_queue()
255 u8 *vaddr = vb2_plane_vaddr(&src_buf->vb2_buf, 0); in coda_bitstream_try_queue()
276 u32 header_size = coda_buffer_parse_headers(ctx, src_buf, in coda_bitstream_try_queue()
309 src_buf->sequence = ctx->qsequence++; in coda_bitstream_try_queue()
316 if (src_buf->flags & V4L2_BUF_FLAG_LAST) in coda_bitstream_try_queue()
325 struct vb2_v4l2_buffer *src_buf; in coda_fill_bitstream() local
359 src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); in coda_fill_bitstream()
363 !coda_jpeg_check_buffer(ctx, &src_buf->vb2_buf)) { in coda_fill_bitstream()
367 src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in coda_fill_bitstream()
371 m2m_buf = container_of(src_buf, in coda_fill_bitstream()
376 v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_ERROR); in coda_fill_bitstream()
382 if (!vb2_get_plane_payload(&src_buf->vb2_buf, 0)) { in coda_fill_bitstream()
383 src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in coda_fill_bitstream()
384 v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); in coda_fill_bitstream()
391 if (coda_bitstream_try_queue(ctx, src_buf)) { in coda_fill_bitstream()
396 src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in coda_fill_bitstream()
400 meta->sequence = src_buf->sequence; in coda_fill_bitstream()
401 meta->timecode = src_buf->timecode; in coda_fill_bitstream()
402 meta->timestamp = src_buf->vb2_buf.timestamp; in coda_fill_bitstream()
405 meta->last = src_buf->flags & V4L2_BUF_FLAG_LAST; in coda_fill_bitstream()
414 trace_coda_bit_queue(ctx, src_buf, meta); in coda_fill_bitstream()
420 m2m_buf = container_of(src_buf, in coda_fill_bitstream()
425 v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); in coda_fill_bitstream()
1473 struct vb2_v4l2_buffer *src_buf, *dst_buf; in coda_prepare_encode() local
1489 src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); in coda_prepare_encode()
1495 src_buf->sequence = ctx->osequence; in coda_prepare_encode()
1503 (src_buf->sequence % ctx->params.gop_size) == 0) in coda_prepare_encode()
1512 src_buf->flags |= V4L2_BUF_FLAG_PFRAME; in coda_prepare_encode()
1513 src_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME; in coda_prepare_encode()
1515 src_buf->flags |= V4L2_BUF_FLAG_KEYFRAME; in coda_prepare_encode()
1516 src_buf->flags &= ~V4L2_BUF_FLAG_PFRAME; in coda_prepare_encode()
1526 if (src_buf->sequence == 0 || force_ipicture) { in coda_prepare_encode()
1597 coda_write_base(ctx, q_data_src, src_buf, reg); in coda_prepare_encode()
1617 trace_coda_enc_pic_run(ctx, src_buf); in coda_prepare_encode()
1633 struct vb2_v4l2_buffer *src_buf, *dst_buf; in coda_finish_encode() local
1646 src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in coda_finish_encode()
1657 src_buf->flags & V4L2_BUF_FLAG_KEYFRAME) { in coda_finish_encode()
1678 dst_buf->flags |= src_buf->flags & V4L2_BUF_FLAG_LAST; in coda_finish_encode()
1680 v4l2_m2m_buf_copy_metadata(src_buf, dst_buf, false); in coda_finish_encode()
1682 v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); in coda_finish_encode()