/linux/drivers/gpu/drm/ |
H A D | drm_format_helper.c | 374 u32 pix; in drm_fb_xrgb8888_to_rgb332_line() local 377 pix = le32_to_cpu(sbuf32[x]); in drm_fb_xrgb8888_to_rgb332_line() 378 dbuf8[x] = ((pix & 0x00e00000) >> 16) | in drm_fb_xrgb8888_to_rgb332_line() 379 ((pix & 0x0000e000) >> 11) | in drm_fb_xrgb8888_to_rgb332_line() 380 ((pix & 0x000000c0) >> 6); in drm_fb_xrgb8888_to_rgb332_line() 424 u32 pix; in drm_fb_xrgb8888_to_rgb565_line() local 427 pix = le32_to_cpu(sbuf32[x]); in drm_fb_xrgb8888_to_rgb565_line() 428 val16 = ((pix & 0x00F80000) >> 8) | in drm_fb_xrgb8888_to_rgb565_line() 429 ((pix & 0x0000FC00) >> 5) | in drm_fb_xrgb8888_to_rgb565_line() 430 ((pix & 0x000000F8) >> 3); in drm_fb_xrgb8888_to_rgb565_line() [all …]
|
H A D | drm_panic.c | 145 static u16 convert_xrgb8888_to_rgb565(u32 pix) in convert_xrgb8888_to_rgb565() argument 147 return ((pix & 0x00F80000) >> 8) | in convert_xrgb8888_to_rgb565() 148 ((pix & 0x0000FC00) >> 5) | in convert_xrgb8888_to_rgb565() 149 ((pix & 0x000000F8) >> 3); in convert_xrgb8888_to_rgb565() 152 static u16 convert_xrgb8888_to_rgba5551(u32 pix) in convert_xrgb8888_to_rgba5551() argument 154 return ((pix & 0x00f80000) >> 8) | in convert_xrgb8888_to_rgba5551() 155 ((pix & 0x0000f800) >> 5) | in convert_xrgb8888_to_rgba5551() 156 ((pix & 0x000000f8) >> 2) | in convert_xrgb8888_to_rgba5551() 160 static u16 convert_xrgb8888_to_xrgb1555(u32 pix) in convert_xrgb8888_to_xrgb1555() argument 162 return ((pix & 0x00f80000) >> 9) | in convert_xrgb8888_to_xrgb1555() [all …]
|
/linux/drivers/media/pci/cobalt/ |
H A D | cobalt-v4l2.c | 706 struct v4l2_pix_format *pix = &f->fmt.pix; in cobalt_g_fmt_vid_cap() local 708 pix->width = s->width; in cobalt_g_fmt_vid_cap() 709 pix->height = s->height; in cobalt_g_fmt_vid_cap() 710 pix->bytesperline = s->stride; in cobalt_g_fmt_vid_cap() 711 pix->field = V4L2_FIELD_NONE; in cobalt_g_fmt_vid_cap() 714 pix->colorspace = V4L2_COLORSPACE_SRGB; in cobalt_g_fmt_vid_cap() 722 v4l2_fill_pix_format(pix, &sd_fmt.format); in cobalt_g_fmt_vid_cap() 725 pix->pixelformat = s->pixfmt; in cobalt_g_fmt_vid_cap() 726 pix->sizeimage = pix->bytesperline * pix->height; in cobalt_g_fmt_vid_cap() 735 struct v4l2_pix_format *pix = &f->fmt.pix; in cobalt_try_fmt_vid_cap() local [all …]
|
/linux/drivers/media/pci/zoran/ |
H A D | zoran_driver.c | 294 fmt->fmt.pix.width = zr->jpg_settings.img_width / zr->jpg_settings.hor_dcm; in zoran_g_fmt_vid_out() 295 fmt->fmt.pix.height = zr->jpg_settings.img_height * 2 / in zoran_g_fmt_vid_out() 297 fmt->fmt.pix.sizeimage = zr->buffer_size; in zoran_g_fmt_vid_out() 298 fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG; in zoran_g_fmt_vid_out() 300 fmt->fmt.pix.field = (zr->jpg_settings.odd_even ? in zoran_g_fmt_vid_out() 303 fmt->fmt.pix.field = (zr->jpg_settings.odd_even ? in zoran_g_fmt_vid_out() 305 fmt->fmt.pix.bytesperline = 0; in zoran_g_fmt_vid_out() 306 fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; in zoran_g_fmt_vid_out() 318 fmt->fmt.pix.width = zr->v4l_settings.width; in zoran_g_fmt_vid_cap() 319 fmt->fmt.pix.height = zr->v4l_settings.height; in zoran_g_fmt_vid_cap() [all …]
|
/linux/drivers/gpu/ipu-v3/ |
H A D | ipu-cpmem.c | 588 #define Y_OFFSET(pix, x, y) ((x) + pix->bytesperline * (y)) argument 589 #define U_OFFSET(pix, x, y) ((pix->bytesperline * pix->height) + \ argument 590 (pix->bytesperline * ((y) / 2) / 2) + (x) / 2) 591 #define V_OFFSET(pix, x, y) ((pix->bytesperline * pix->height) + \ argument 592 (pix->bytesperline * pix->height / 4) + \ 593 (pix->bytesperline * ((y) / 2) / 2) + (x) / 2) 594 #define U2_OFFSET(pix, x, y) ((pix->bytesperline * pix->height) + \ argument 595 (pix->bytesperline * (y) / 2) + (x) / 2) 596 #define V2_OFFSET(pix, x, y) ((pix->bytesperline * pix->height) + \ argument 597 (pix->bytesperline * pix->height / 2) + \ [all …]
|
/linux/drivers/media/platform/st/sti/delta/ |
H A D | delta-v4l2.c | 429 struct v4l2_pix_format *pix = &f->fmt.pix; in delta_g_fmt_stream() local 439 pix->pixelformat = streaminfo->streamformat; in delta_g_fmt_stream() 440 pix->width = streaminfo->width; in delta_g_fmt_stream() 441 pix->height = streaminfo->height; in delta_g_fmt_stream() 442 pix->field = streaminfo->field; in delta_g_fmt_stream() 443 pix->bytesperline = 0; in delta_g_fmt_stream() 444 pix->sizeimage = ctx->max_au_size; in delta_g_fmt_stream() 445 pix->colorspace = streaminfo->colorspace; in delta_g_fmt_stream() 446 pix->xfer_func = streaminfo->xfer_func; in delta_g_fmt_stream() 447 pix->ycbcr_enc = streaminfo->ycbcr_enc; in delta_g_fmt_stream() [all …]
|
/linux/drivers/media/platform/renesas/rcar-vin/ |
H A D | rcar-v4l2.c | 121 struct v4l2_pix_format *pix) in rvin_format_bytesperline() argument 126 fmt = rvin_format_from_pixel(vin, pix->pixelformat); in rvin_format_bytesperline() 131 switch (pix->pixelformat) { in rvin_format_bytesperline() 141 if (V4L2_FIELD_IS_SEQUENTIAL(pix->field)) in rvin_format_bytesperline() 144 return ALIGN(pix->width, align) * fmt->bpp; in rvin_format_bytesperline() 147 static u32 rvin_format_sizeimage(struct v4l2_pix_format *pix) in rvin_format_sizeimage() argument 149 switch (pix->pixelformat) { in rvin_format_sizeimage() 151 return pix->bytesperline * pix->height * 3 / 2; in rvin_format_sizeimage() 153 return pix->bytesperline * pix->height * 2; in rvin_format_sizeimage() 155 return pix->bytesperline * pix->height; in rvin_format_sizeimage() [all …]
|
/linux/drivers/media/platform/st/sti/hva/ |
H A D | hva-v4l2.c | 301 f->fmt.pix.width = streaminfo->width; in hva_g_fmt_stream() 302 f->fmt.pix.height = streaminfo->height; in hva_g_fmt_stream() 303 f->fmt.pix.field = V4L2_FIELD_NONE; in hva_g_fmt_stream() 304 f->fmt.pix.colorspace = ctx->colorspace; in hva_g_fmt_stream() 305 f->fmt.pix.xfer_func = ctx->xfer_func; in hva_g_fmt_stream() 306 f->fmt.pix.ycbcr_enc = ctx->ycbcr_enc; in hva_g_fmt_stream() 307 f->fmt.pix.quantization = ctx->quantization; in hva_g_fmt_stream() 308 f->fmt.pix.pixelformat = streaminfo->streamformat; in hva_g_fmt_stream() 309 f->fmt.pix.bytesperline = 0; in hva_g_fmt_stream() 310 f->fmt.pix.sizeimage = ctx->max_stream_size; in hva_g_fmt_stream() [all …]
|
/linux/drivers/staging/media/starfive/camss/ |
H A D | stf-video.c | 66 struct v4l2_pix_format *pix = &f->fmt.pix; in __video_try_fmt() local 72 fi = video_g_fi_by_pfmt(video, pix->pixelformat); in __video_try_fmt() 76 width = pix->width; in __video_try_fmt() 77 height = pix->height; in __video_try_fmt() 79 memset(pix, 0, sizeof(*pix)); in __video_try_fmt() 81 pix->pixelformat = fi->pixelformat; in __video_try_fmt() 82 pix->width = clamp_t(u32, width, STFCAMSS_FRAME_MIN_WIDTH, in __video_try_fmt() 84 pix->height = clamp_t(u32, height, STFCAMSS_FRAME_MIN_HEIGHT, in __video_try_fmt() 86 bpl = pix->width * fi->bpp / 8; in __video_try_fmt() 88 pix->bytesperline = bpl; in __video_try_fmt() [all …]
|
/linux/drivers/media/platform/renesas/ |
H A D | sh_vou.c | 80 struct v4l2_pix_format pix; member 193 switch (vou_dev->pix.pixelformat) { in sh_vou_schedule_next() 196 addr2 = addr1 + vou_dev->pix.width * vou_dev->pix.height; in sh_vou_schedule_next() 215 switch (vou_dev->pix.pixelformat) { in sh_vou_stream_config() 233 sh_vou_reg_ab_write(vou_dev, VOUAIR, vou_dev->pix.width * row_coeff); in sh_vou_stream_config() 242 struct v4l2_pix_format *pix = &vou_dev->pix; in sh_vou_queue_setup() local 243 int bytes_per_line = vou_fmt[vou_dev->pix_idx].bpp * pix->width / 8; in sh_vou_queue_setup() 248 return sizes[0] < pix->height * bytes_per_line ? -EINVAL : 0; in sh_vou_queue_setup() 250 sizes[0] = pix->height * bytes_per_line; in sh_vou_queue_setup() 257 struct v4l2_pix_format *pix = &vou_dev->pix; in sh_vou_buf_prepare() local [all …]
|
H A D | renesas-ceu.c | 280 static bool ceu_fmt_mplane(struct v4l2_pix_format_mplane *pix) in ceu_fmt_mplane() argument 282 switch (pix->pixelformat) { in ceu_fmt_mplane() 351 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_hw_config() local 363 capwr = (pix->height << 16) | pix->width * mbus_fmt->bpp / 8; in ceu_hw_config() 392 switch (pix->pixelformat) { in ceu_hw_config() 400 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config() 401 cdwdr = pix->plane_fmt[0].bytesperline; in ceu_hw_config() 414 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config() 415 cdwdr = pix->width; in ceu_hw_config() 428 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config() [all …]
|
/linux/drivers/media/platform/nxp/imx8-isi/ |
H A D | imx8-isi-video.c | 409 mxc_isi_format_try(struct mxc_isi_pipe *pipe, struct v4l2_pix_format_mplane *pix, in mxc_isi_format_try() argument 420 fmt = mxc_isi_format_by_fourcc(pix->pixelformat, type); in mxc_isi_format_try() 424 pix->width = clamp(pix->width, MXC_ISI_MIN_WIDTH, max_width); in mxc_isi_format_try() 425 pix->height = clamp(pix->height, MXC_ISI_MIN_HEIGHT, MXC_ISI_MAX_HEIGHT); in mxc_isi_format_try() 426 pix->pixelformat = fmt->fourcc; in mxc_isi_format_try() 427 pix->field = V4L2_FIELD_NONE; in mxc_isi_format_try() 429 if (pix->colorspace == V4L2_COLORSPACE_DEFAULT) { in mxc_isi_format_try() 430 pix->colorspace = MXC_ISI_DEF_COLOR_SPACE; in mxc_isi_format_try() 431 pix->ycbcr_enc = MXC_ISI_DEF_YCBCR_ENC; in mxc_isi_format_try() 432 pix->quantization = MXC_ISI_DEF_QUANTIZATION; in mxc_isi_format_try() [all …]
|
/linux/drivers/media/platform/st/stm32/dma2d/ |
H A D | dma2d.c | 366 f->fmt.pix.width = frm->width; in vidioc_g_fmt() 367 f->fmt.pix.height = frm->height; in vidioc_g_fmt() 368 f->fmt.pix.field = V4L2_FIELD_NONE; in vidioc_g_fmt() 369 f->fmt.pix.pixelformat = frm->fmt->fourcc; in vidioc_g_fmt() 370 f->fmt.pix.bytesperline = (frm->width * frm->fmt->depth) >> 3; in vidioc_g_fmt() 371 f->fmt.pix.sizeimage = frm->size; in vidioc_g_fmt() 372 f->fmt.pix.colorspace = ctx->colorspace; in vidioc_g_fmt() 373 f->fmt.pix.xfer_func = ctx->xfer_func; in vidioc_g_fmt() 374 f->fmt.pix.ycbcr_enc = ctx->ycbcr_enc; in vidioc_g_fmt() 375 f->fmt.pix.quantization = ctx->quant; in vidioc_g_fmt() [all …]
|
/linux/drivers/staging/media/imx/ |
H A D | imx-media-csc-scaler.c | 187 f->fmt.pix = q_data->cur_fmt; in ipu_csc_scaler_g_fmt() 200 field = f->fmt.pix.field; in ipu_csc_scaler_try_fmt() 210 test_out.pix = f->fmt.pix; in ipu_csc_scaler_try_fmt() 211 test_in.pix = q_data_in->cur_fmt; in ipu_csc_scaler_try_fmt() 216 test_in.pix = f->fmt.pix; in ipu_csc_scaler_try_fmt() 217 test_out.pix = q_data_out->cur_fmt; in ipu_csc_scaler_try_fmt() 222 f->fmt.pix = (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) ? in ipu_csc_scaler_try_fmt() 223 test_out.pix : test_in.pix; in ipu_csc_scaler_try_fmt() 226 f->fmt.pix.colorspace = q_data->cur_fmt.colorspace; in ipu_csc_scaler_try_fmt() 227 f->fmt.pix.ycbcr_enc = q_data->cur_fmt.ycbcr_enc; in ipu_csc_scaler_try_fmt() [all …]
|
/linux/drivers/media/platform/sunxi/sun4i-csi/ |
H A D | sun4i_v4l2.c | 92 struct v4l2_pix_format_mplane *pix) in _sun4i_csi_try_fmt() argument 98 _fmt = sun4i_csi_find_format(&pix->pixelformat, NULL); in _sun4i_csi_try_fmt() 102 pix->field = V4L2_FIELD_NONE; in _sun4i_csi_try_fmt() 103 pix->colorspace = V4L2_COLORSPACE_SRGB; in _sun4i_csi_try_fmt() 104 pix->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(pix->colorspace); in _sun4i_csi_try_fmt() 105 pix->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(pix->colorspace); in _sun4i_csi_try_fmt() 106 pix->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true, pix->colorspace, in _sun4i_csi_try_fmt() 107 pix->ycbcr_enc); in _sun4i_csi_try_fmt() 109 pix->num_planes = _fmt->num_planes; in _sun4i_csi_try_fmt() 110 pix->pixelformat = _fmt->fourcc; in _sun4i_csi_try_fmt() [all …]
|
/linux/drivers/media/platform/ti/vpe/ |
H A D | vpe.c | 365 return __find_format(f->fmt.pix.pixelformat); in find_format() 1024 struct v4l2_pix_format_mplane *pix; in add_out_dtd() local 1034 pix = &q_data->format.fmt.pix_mp; in add_out_dtd() 1035 stride = ALIGN((pix->width * vpdma_fmt->depth) >> 3, in add_out_dtd() 1041 pix = &q_data->format.fmt.pix_mp; in add_out_dtd() 1047 if (pix->num_planes == 1 && plane) { in add_out_dtd() 1050 offset = pix->plane_fmt[0].bytesperline * pix->height; in add_out_dtd() 1064 stride = pix->plane_fmt[VPE_LUMA].bytesperline; in add_out_dtd() 1075 vpdma_add_out_dtd(&ctx->desc_list, pix->width, in add_out_dtd() 1088 struct v4l2_pix_format_mplane *pix; in add_in_dtd() local [all …]
|
/linux/drivers/media/test-drivers/ |
H A D | vim2m.c | 299 u16 pix = le16_to_cpu(*(__le16 *)(src[i])); in copy_two_pixels() local 301 *r++ = (u8)(((pix & 0xf800) >> 11) << 3) | 0x07; in copy_two_pixels() 302 *g++ = (u8)((((pix & 0x07e0) >> 5)) << 2) | 0x03; in copy_two_pixels() 303 *b++ = (u8)((pix & 0x1f) << 3) | 0x07; in copy_two_pixels() 308 u16 pix = be16_to_cpu(*(__be16 *)(src[i])); in copy_two_pixels() local 310 *r++ = (u8)(((pix & 0xf800) >> 11) << 3) | 0x07; in copy_two_pixels() 311 *g++ = (u8)((((pix & 0x07e0) >> 5)) << 2) | 0x03; in copy_two_pixels() 312 *b++ = (u8)((pix & 0x1f) << 3) | 0x07; in copy_two_pixels() 341 u16 pix; in copy_two_pixels() local 344 pix = ((*r << 8) & 0xf800) | ((*g << 3) & 0x07e0) | in copy_two_pixels() [all …]
|
/linux/drivers/media/pci/cx25821/ |
H A D | cx25821-video.c | 322 f->fmt.pix.width = chan->width; in cx25821_vidioc_g_fmt_vid_cap() 323 f->fmt.pix.height = chan->height; in cx25821_vidioc_g_fmt_vid_cap() 324 f->fmt.pix.field = chan->field; in cx25821_vidioc_g_fmt_vid_cap() 325 f->fmt.pix.pixelformat = chan->fmt->fourcc; in cx25821_vidioc_g_fmt_vid_cap() 326 f->fmt.pix.bytesperline = (chan->width * chan->fmt->depth) >> 3; in cx25821_vidioc_g_fmt_vid_cap() 327 f->fmt.pix.sizeimage = chan->height * f->fmt.pix.bytesperline; in cx25821_vidioc_g_fmt_vid_cap() 328 f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; in cx25821_vidioc_g_fmt_vid_cap() 339 enum v4l2_field field = f->fmt.pix.field; in cx25821_vidioc_try_fmt_vid_cap() 343 fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat); in cx25821_vidioc_try_fmt_vid_cap() 348 w = f->fmt.pix.width; in cx25821_vidioc_try_fmt_vid_cap() [all …]
|
/linux/drivers/media/platform/ti/omap/ |
H A D | omap_voutlib.c | 43 void omap_vout_default_crop(struct v4l2_pix_format *pix, in omap_vout_default_crop() argument 46 crop->width = (pix->width < fbuf->fmt.width) ? in omap_vout_default_crop() 47 pix->width : fbuf->fmt.width; in omap_vout_default_crop() 48 crop->height = (pix->height < fbuf->fmt.height) ? in omap_vout_default_crop() 49 pix->height : fbuf->fmt.height; in omap_vout_default_crop() 52 crop->left = ((pix->width - crop->width) >> 1) & ~1; in omap_vout_default_crop() 53 crop->top = ((pix->height - crop->height) >> 1) & ~1; in omap_vout_default_crop() 169 int omap_vout_new_crop(struct v4l2_pix_format *pix, in omap_vout_new_crop() argument 188 try_crop.width = (try_crop.width < pix->width) ? in omap_vout_new_crop() 189 try_crop.width : pix->width; in omap_vout_new_crop() [all …]
|
H A D | omap_vout.c | 124 static int omap_vout_try_format(struct v4l2_pix_format *pix) in omap_vout_try_format() argument 128 pix->height = clamp(pix->height, (u32)VID_MIN_HEIGHT, in omap_vout_try_format() 130 pix->width = clamp(pix->width, (u32)VID_MIN_WIDTH, (u32)VID_MAX_WIDTH); in omap_vout_try_format() 133 if (pix->pixelformat == omap_formats[ifmt].pixelformat) in omap_vout_try_format() 140 pix->pixelformat = omap_formats[ifmt].pixelformat; in omap_vout_try_format() 141 pix->field = V4L2_FIELD_NONE; in omap_vout_try_format() 143 switch (pix->pixelformat) { in omap_vout_try_format() 147 pix->colorspace = V4L2_COLORSPACE_SRGB; in omap_vout_try_format() 152 pix->colorspace = V4L2_COLORSPACE_SRGB; in omap_vout_try_format() 156 pix->colorspace = V4L2_COLORSPACE_SRGB; in omap_vout_try_format() [all …]
|
/linux/drivers/usb/gadget/function/ |
H A D | uvc_v4l2.c | 226 fmt->fmt.pix.pixelformat = video->fcc; in uvc_v4l2_get_format() 227 fmt->fmt.pix.width = video->width; in uvc_v4l2_get_format() 228 fmt->fmt.pix.height = video->height; in uvc_v4l2_get_format() 229 fmt->fmt.pix.field = V4L2_FIELD_NONE; in uvc_v4l2_get_format() 230 fmt->fmt.pix.bytesperline = video->bpp * video->width / 8; in uvc_v4l2_get_format() 231 fmt->fmt.pix.sizeimage = video->imagesize; in uvc_v4l2_get_format() 232 fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB; in uvc_v4l2_get_format() 233 fmt->fmt.pix.priv = 0; in uvc_v4l2_get_format() 252 fcc = (u8 *)&fmt->fmt.pix.pixelformat; in uvc_v4l2_try_format() 254 fmt->fmt.pix.pixelformat, in uvc_v4l2_try_format() [all …]
|
/linux/drivers/media/platform/ti/cal/ |
H A D | cal-video.c | 173 v4l_bound_align_image(&f->fmt.pix.width, 48, max_width, 2, in cal_calc_format_size() 174 &f->fmt.pix.height, 32, CAL_MAX_HEIGHT_LINES, in cal_calc_format_size() 177 bpl = (f->fmt.pix.width * ALIGN(fmtinfo->bpp, 8)) >> 3; in cal_calc_format_size() 178 f->fmt.pix.bytesperline = ALIGN(bpl, 16); in cal_calc_format_size() 180 f->fmt.pix.sizeimage = f->fmt.pix.height * in cal_calc_format_size() 181 f->fmt.pix.bytesperline; in cal_calc_format_size() 184 __func__, fourcc_to_str(f->fmt.pix.pixelformat), in cal_calc_format_size() 185 f->fmt.pix.width, f->fmt.pix.height, in cal_calc_format_size() 186 f->fmt.pix.bytesperline, f->fmt.pix.sizeimage); in cal_calc_format_size() 199 fmtinfo = find_format_by_pix(ctx, f->fmt.pix.pixelformat); in cal_legacy_try_fmt_vid_cap() [all …]
|
/linux/drivers/media/pci/mgb4/ |
H A D | mgb4_vout.c | 269 f->fmt.pix.width = voutdev->width; in vidioc_g_fmt() 270 f->fmt.pix.height = voutdev->height; in vidioc_g_fmt() 271 f->fmt.pix.field = V4L2_FIELD_NONE; in vidioc_g_fmt() 274 f->fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; in vidioc_g_fmt() 276 f->fmt.pix.colorspace = V4L2_COLORSPACE_REC709; in vidioc_g_fmt() 279 f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; in vidioc_g_fmt() 281 f->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB; in vidioc_g_fmt() 283 f->fmt.pix.bytesperline = (f->fmt.pix.width + voutdev->padding) * 2; in vidioc_g_fmt() 285 f->fmt.pix.pixelformat = V4L2_PIX_FMT_ABGR32; in vidioc_g_fmt() 286 f->fmt.pix.colorspace = V4L2_COLORSPACE_RAW; in vidioc_g_fmt() [all …]
|
/linux/drivers/media/platform/renesas/rzg2l-cru/ |
H A D | rzg2l-video.c | 796 static u32 rzg2l_cru_format_bytesperline(struct v4l2_pix_format *pix) in rzg2l_cru_format_bytesperline() argument 800 fmt = rzg2l_cru_format_from_pixel(pix->pixelformat); in rzg2l_cru_format_bytesperline() 805 return pix->width * fmt->bpp[0]; in rzg2l_cru_format_bytesperline() 808 static u32 rzg2l_cru_format_sizeimage(struct v4l2_pix_format *pix) in rzg2l_cru_format_sizeimage() argument 810 return pix->bytesperline * pix->height; in rzg2l_cru_format_sizeimage() 814 struct v4l2_pix_format *pix) in rzg2l_cru_format_align() argument 816 if (!rzg2l_cru_format_from_pixel(pix->pixelformat)) in rzg2l_cru_format_align() 817 pix->pixelformat = RZG2L_CRU_DEFAULT_FORMAT; in rzg2l_cru_format_align() 819 switch (pix->field) { in rzg2l_cru_format_align() 828 pix->field = RZG2L_CRU_DEFAULT_FIELD; in rzg2l_cru_format_align() [all …]
|
/linux/drivers/media/common/saa7146/ |
H A D | saa7146_video.c | 93 struct v4l2_pix_format *pix = &vv->video_fmt; in saa7146_pgtable_build() local 94 struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev, pix->pixelformat); in saa7146_pgtable_build() 106 int size = pix->width * pix->height; in saa7146_pgtable_build() 345 f->fmt.pix = vv->video_fmt; in vidioc_g_fmt_vid_cap() 369 fmt = saa7146_format_by_fourcc(dev, f->fmt.pix.pixelformat); in vidioc_try_fmt_vid_cap() 373 field = f->fmt.pix.field; in vidioc_try_fmt_vid_cap() 378 field = (f->fmt.pix.height > maxh / 2) in vidioc_try_fmt_vid_cap() 393 f->fmt.pix.field = field; in vidioc_try_fmt_vid_cap() 394 f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; in vidioc_try_fmt_vid_cap() 395 if (f->fmt.pix.width < 48) in vidioc_try_fmt_vid_cap() [all …]
|