Lines Matching refs:parms
657 static int cpia2_g_jpegcomp(struct file *file, void *fh, struct v4l2_jpegcompression *parms) in cpia2_g_jpegcomp() argument
661 memset(parms, 0, sizeof(*parms)); in cpia2_g_jpegcomp()
663 parms->quality = 80; // TODO: Can this be made meaningful? in cpia2_g_jpegcomp()
665 parms->jpeg_markers = V4L2_JPEG_MARKER_DQT | V4L2_JPEG_MARKER_DRI; in cpia2_g_jpegcomp()
667 parms->jpeg_markers |= V4L2_JPEG_MARKER_DHT; in cpia2_g_jpegcomp()
669 parms->APPn = cam->APPn; in cpia2_g_jpegcomp()
670 parms->APP_len = cam->APP_len; in cpia2_g_jpegcomp()
672 memcpy(parms->APP_data, cam->APP_data, cam->APP_len); in cpia2_g_jpegcomp()
673 parms->jpeg_markers |= V4L2_JPEG_MARKER_APP; in cpia2_g_jpegcomp()
676 parms->COM_len = cam->COM_len; in cpia2_g_jpegcomp()
678 memcpy(parms->COM_data, cam->COM_data, cam->COM_len); in cpia2_g_jpegcomp()
679 parms->jpeg_markers |= JPEG_MARKER_COM; in cpia2_g_jpegcomp()
683 parms->APP_len, parms->COM_len); in cpia2_g_jpegcomp()
698 const struct v4l2_jpegcompression *parms) in cpia2_s_jpegcomp() argument
703 parms->APP_len, parms->COM_len); in cpia2_s_jpegcomp()
706 !(parms->jpeg_markers & V4L2_JPEG_MARKER_DHT); in cpia2_s_jpegcomp()
708 if (parms->APP_len != 0) { in cpia2_s_jpegcomp()
709 if (parms->APP_len > 0 && in cpia2_s_jpegcomp()
710 parms->APP_len <= sizeof(cam->APP_data) && in cpia2_s_jpegcomp()
711 parms->APPn >= 0 && parms->APPn <= 15) { in cpia2_s_jpegcomp()
712 cam->APPn = parms->APPn; in cpia2_s_jpegcomp()
713 cam->APP_len = parms->APP_len; in cpia2_s_jpegcomp()
714 memcpy(cam->APP_data, parms->APP_data, parms->APP_len); in cpia2_s_jpegcomp()
717 parms->APPn, parms->APP_len); in cpia2_s_jpegcomp()
724 if (parms->COM_len != 0) { in cpia2_s_jpegcomp()
725 if (parms->COM_len > 0 && in cpia2_s_jpegcomp()
726 parms->COM_len <= sizeof(cam->COM_data)) { in cpia2_s_jpegcomp()
727 cam->COM_len = parms->COM_len; in cpia2_s_jpegcomp()
728 memcpy(cam->COM_data, parms->COM_data, parms->COM_len); in cpia2_s_jpegcomp()
730 LOG("Bad COM_len=%d\n", parms->COM_len); in cpia2_s_jpegcomp()