Lines Matching defs:fmt
56 static inline unsigned int v4l2_get_width(struct v4l2_format *fmt)
58 return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width;
61 static inline unsigned int v4l2_get_height(struct v4l2_format *fmt)
63 return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height;
88 fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width ||
89 fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height
91 fmt1->fmt.pix.width != fmt2->fmt.pix.width ||
92 fmt1->fmt.pix.height != fmt2->fmt.pix.height;
125 static inline void v4l2_save_to_context(V4L2Context* ctx, struct v4l2_format_update *fmt)
129 if (fmt->update_avfmt)
130 ctx->av_pix_fmt = fmt->av_fmt;
134 ctx->format.fmt.pix_mp.height = ctx->height;
135 ctx->format.fmt.pix_mp.width = ctx->width;
136 if (fmt->update_v4l2) {
137 ctx->format.fmt.pix_mp.pixelformat = fmt->v4l2_fmt;
140 ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage =
144 ctx->format.fmt.pix.height = ctx->height;
145 ctx->format.fmt.pix.width = ctx->width;
146 if (fmt->update_v4l2) {
147 ctx->format.fmt.pix.pixelformat = fmt->v4l2_fmt;
150 ctx->format.fmt.pix.sizeimage =
464 struct v4l2_format *fmt = &ctx->format;
473 fmt->fmt.pix_mp.pixelformat = v4l2_fmt;
475 fmt->fmt.pix.pixelformat = v4l2_fmt;
477 fmt->type = ctx->type;
479 ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_TRY_FMT, fmt);
664 struct v4l2_format_update fmt = { 0 };
668 ret = v4l2_get_raw_format(ctx, &fmt.av_fmt);
672 fmt.update_avfmt = !probe;
673 v4l2_save_to_context(ctx, &fmt);
679 ret = v4l2_get_coded_format(ctx, &fmt.v4l2_fmt);
683 fmt.update_v4l2 = 1;
684 v4l2_save_to_context(ctx, &fmt);
750 V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? av_fourcc2str(ctx->format.fmt.pix_mp.pixelformat) : av_fourcc2str(ctx->format.fmt.pix.pixelformat),
754 V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage : ctx->format.fmt.pix.sizeimage,
755 V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].bytesperline : ctx->format.fmt.pix.bytesperline);