Lines Matching refs:q_data
125 struct vicodec_q_data q_data[2]; member
154 return &ctx->q_data[V4L2_M2M_SRC]; in get_q_data()
157 return &ctx->q_data[V4L2_M2M_DST]; in get_q_data()
762 struct vicodec_q_data *q_data; in vidioc_g_fmt() local
771 q_data = get_q_data(ctx, f->type); in vidioc_g_fmt()
772 info = q_data->info; in vidioc_g_fmt()
780 pix->width = q_data->coded_width; in vidioc_g_fmt()
781 pix->height = q_data->coded_height; in vidioc_g_fmt()
784 pix->bytesperline = q_data->coded_width * in vidioc_g_fmt()
786 pix->sizeimage = q_data->sizeimage; in vidioc_g_fmt()
798 pix_mp->width = q_data->coded_width; in vidioc_g_fmt()
799 pix_mp->height = q_data->coded_height; in vidioc_g_fmt()
804 q_data->coded_width * info->bytesperline_mult; in vidioc_g_fmt()
805 pix_mp->plane_fmt[0].sizeimage = q_data->sizeimage; in vidioc_g_fmt()
970 struct vicodec_q_data *q_data; in vidioc_s_fmt() local
980 q_data = get_q_data(ctx, f->type); in vidioc_s_fmt()
981 if (!q_data) in vidioc_s_fmt()
990 !q_data->info || in vidioc_s_fmt()
991 q_data->info->id != pix->pixelformat || in vidioc_s_fmt()
992 q_data->coded_width != pix->width || in vidioc_s_fmt()
993 q_data->coded_height != pix->height; in vidioc_s_fmt()
999 q_data->info = &pixfmt_fwht; in vidioc_s_fmt()
1001 q_data->info = &pixfmt_stateless_fwht; in vidioc_s_fmt()
1003 q_data->info = find_fmt(pix->pixelformat); in vidioc_s_fmt()
1004 q_data->coded_width = pix->width; in vidioc_s_fmt()
1005 q_data->coded_height = pix->height; in vidioc_s_fmt()
1006 q_data->sizeimage = pix->sizeimage; in vidioc_s_fmt()
1013 !q_data->info || in vidioc_s_fmt()
1014 q_data->info->id != pix_mp->pixelformat || in vidioc_s_fmt()
1015 q_data->coded_width != pix_mp->width || in vidioc_s_fmt()
1016 q_data->coded_height != pix_mp->height; in vidioc_s_fmt()
1022 q_data->info = &pixfmt_fwht; in vidioc_s_fmt()
1024 q_data->info = &pixfmt_stateless_fwht; in vidioc_s_fmt()
1026 q_data->info = find_fmt(pix_mp->pixelformat); in vidioc_s_fmt()
1027 q_data->coded_width = pix_mp->width; in vidioc_s_fmt()
1028 q_data->coded_height = pix_mp->height; in vidioc_s_fmt()
1029 q_data->sizeimage = pix_mp->plane_fmt[0].sizeimage; in vidioc_s_fmt()
1037 f->type, q_data->coded_width, q_data->coded_height, in vidioc_s_fmt()
1038 q_data->info->id); in vidioc_s_fmt()
1059 struct vicodec_q_data *q_data; in vidioc_s_fmt_vid_out() local
1067 q_data = get_q_data(ctx, f->type); in vidioc_s_fmt_vid_out()
1088 if (vb2_is_busy(vq) && (coded_w != q_data->coded_width || in vidioc_s_fmt_vid_out()
1089 coded_h != q_data->coded_height)) in vidioc_s_fmt_vid_out()
1103 q_data->visible_width = coded_w; in vidioc_s_fmt_vid_out()
1104 q_data->visible_height = coded_h; in vidioc_s_fmt_vid_out()
1136 struct vicodec_q_data *q_data; in vidioc_g_selection() local
1138 q_data = get_q_data(ctx, s->type); in vidioc_g_selection()
1139 if (!q_data) in vidioc_g_selection()
1150 s->r.width = q_data->visible_width; in vidioc_g_selection()
1151 s->r.height = q_data->visible_height; in vidioc_g_selection()
1157 s->r.width = q_data->coded_width; in vidioc_g_selection()
1158 s->r.height = q_data->coded_height; in vidioc_g_selection()
1166 s->r.width = q_data->visible_width; in vidioc_g_selection()
1167 s->r.height = q_data->visible_height; in vidioc_g_selection()
1173 s->r.width = q_data->coded_width; in vidioc_g_selection()
1174 s->r.height = q_data->coded_height; in vidioc_g_selection()
1185 struct vicodec_q_data *q_data; in vidioc_s_selection() local
1190 q_data = get_q_data(ctx, s->type); in vidioc_s_selection()
1191 if (!q_data) in vidioc_s_selection()
1199 q_data->visible_width = clamp(s->r.width, MIN_WIDTH, in vidioc_s_selection()
1200 q_data->coded_width); in vidioc_s_selection()
1201 s->r.width = q_data->visible_width; in vidioc_s_selection()
1202 q_data->visible_height = clamp(s->r.height, MIN_HEIGHT, in vidioc_s_selection()
1203 q_data->coded_height); in vidioc_s_selection()
1204 s->r.height = q_data->visible_height; in vidioc_s_selection()
1374 struct vicodec_q_data *q_data = get_q_data(ctx, vq->type); in vicodec_queue_setup() local
1375 unsigned int size = q_data->sizeimage; in vicodec_queue_setup()
1382 q_data->vb2_sizeimage = size; in vicodec_queue_setup()
1398 struct vicodec_q_data *q_data; in vicodec_buf_prepare() local
1402 q_data = get_q_data(ctx, vb->vb2_queue->type); in vicodec_buf_prepare()
1413 if (vb2_plane_size(vb, 0) < q_data->vb2_sizeimage) { in vicodec_buf_prepare()
1417 (long)q_data->vb2_sizeimage); in vicodec_buf_prepare()
1534 static unsigned int total_frame_size(struct vicodec_q_data *q_data) in total_frame_size() argument
1539 if (!q_data->info) { in total_frame_size()
1543 size = q_data->coded_width * q_data->coded_height; in total_frame_size()
1544 chroma_div = q_data->info->width_div * q_data->info->height_div; in total_frame_size()
1546 if (q_data->info->components_num == 4) in total_frame_size()
1548 else if (q_data->info->components_num == 3) in total_frame_size()
1557 struct vicodec_q_data *q_data = get_q_data(ctx, q->type); in vicodec_start_streaming() local
1559 const struct v4l2_fwht_pixfmt_info *info = q_data->info; in vicodec_start_streaming()
1560 unsigned int size = q_data->coded_width * q_data->coded_height; in vicodec_start_streaming()
1566 q_data->sequence = 0; in vicodec_start_streaming()
1581 total_planes_size = total_frame_size(q_data); in vicodec_start_streaming()
1584 state->visible_width = q_data->visible_width; in vicodec_start_streaming()
1585 state->visible_height = q_data->visible_height; in vicodec_start_streaming()
1586 state->coded_width = q_data->coded_width; in vicodec_start_streaming()
1587 state->coded_height = q_data->coded_height; in vicodec_start_streaming()
1588 state->stride = q_data->coded_width * in vicodec_start_streaming()
1595 state->ref_stride = q_data->coded_width * info->luma_alpha_step; in vicodec_start_streaming()
1872 ctx->q_data[V4L2_M2M_SRC].info = info; in vicodec_open()
1874 ctx->q_data[V4L2_M2M_SRC].info = &pixfmt_stateless_fwht; in vicodec_open()
1876 ctx->q_data[V4L2_M2M_SRC].info = &pixfmt_fwht; in vicodec_open()
1877 ctx->q_data[V4L2_M2M_SRC].coded_width = 1280; in vicodec_open()
1878 ctx->q_data[V4L2_M2M_SRC].coded_height = 720; in vicodec_open()
1879 ctx->q_data[V4L2_M2M_SRC].visible_width = 1280; in vicodec_open()
1880 ctx->q_data[V4L2_M2M_SRC].visible_height = 720; in vicodec_open()
1885 ctx->q_data[V4L2_M2M_SRC].sizeimage = raw_size; in vicodec_open()
1887 ctx->q_data[V4L2_M2M_SRC].sizeimage = comp_size; in vicodec_open()
1889 ctx->q_data[V4L2_M2M_SRC].sizeimage = in vicodec_open()
1891 ctx->q_data[V4L2_M2M_DST] = ctx->q_data[V4L2_M2M_SRC]; in vicodec_open()
1893 ctx->q_data[V4L2_M2M_DST].info = &pixfmt_fwht; in vicodec_open()
1894 ctx->q_data[V4L2_M2M_DST].sizeimage = in vicodec_open()
1897 ctx->q_data[V4L2_M2M_DST].info = info; in vicodec_open()
1898 ctx->q_data[V4L2_M2M_DST].sizeimage = raw_size; in vicodec_open()