Lines Matching refs:format
84 memset( &format, 0, sizeof(format) );
101 unicap_format_t format;
146 if (!SUCCESS(unicap_enumerate_formats(handle, &format_spec, &format, desired_format))) {
148 CV_ERROR(CV_StsError, "unicap: failed to get video format\n");
152 if (format.sizes)
154 for (i = format.size_count - 1; i > 0; i--)
155 if (format.sizes[i].width == desired_size.width &&
156 format.sizes[i].height == desired_size.height)
158 format.size.width = format.sizes[i].width;
159 format.size.height = format.sizes[i].height;
162 if (!SUCCESS(unicap_set_format(handle, &format))) {
164 CV_ERROR(CV_StsError, "unicap: failed to set video format\n");
168 raw_frame = cvCreateImage(cvSize(format.size.width,
169 format.size.height),
170 8, format.bpp / 8);
171 memcpy(&raw_buffer.format, &format, sizeof(raw_buffer.format));
173 raw_buffer.buffer_size = format.size.width *
174 format.size.height * format.bpp / 8;
177 memcpy(&buffer.format, &format, sizeof(buffer.format));
179 buffer.format.fourcc = UCIL_FOURCC('B','G','R','3');
180 buffer.format.bpp = 24;
182 // buffer.format.fourcc = UCIL_FOURCC('G','R','E','Y');
183 // buffer.format.bpp = 8;
185 frame = cvCreateImage(cvSize(buffer.format.size.width,
186 buffer.format.size.height),
187 8, buffer.format.bpp / 8);
189 buffer.buffer_size = buffer.format.size.width *
190 buffer.format.size.height * buffer.format.bpp / 8;