hi all
using dm365 with latest dvsdk
need to know how to set the pitch of the fmt according to use as the video coming after encoding is lines only
suggested problem is the buffer is extra then the required buffer and taking extra data due to pitch option
my resolution is 720x480 and ioctl setting pitch 736 automatically
here is detail
in Capture.c
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_NV12;
fmt.fmt.pix.bytesperline = 720;
fmt.fmt.pix.sizeimage = (720 * 480 * (1+1/2));
pixelFormat = fmt.fmt.pix.pixelformat;
{type = V4L2_BUF_TYPE_VIDEO_CAPTURE, fmt = {pix = {width = 720,
height = 480, pixelformat = 842094158, field = V4L2_FIELD_INTERLACED,
bytesperline = 720, sizeimage = 345600,
colorspace = V4L2_COLORSPACE_SMPTE170M, priv = 0}, win = {w = {
left = 720, top = 480, width = 842094158, height = 4}, field = 720,
chromakey = 345600, clips = 0x1, clipcount = 0, bitmap = 0xc50fbc23,
global_alpha = 93 ']'}, vbi = {sampling_rate = 720, offset = 480,
samples_per_line = 842094158, sample_format = 4, start = {720, 345600},
count = {1, 0}, flags = 3306142755, reserved = {65629, 3305635840}},
sliced = {service_set = 720, service_lines = {{0, 480, 0, 22094, 12849, 4,
0, 720, 0, 17920, 5, 1, 0, 0, 0, 48163, 50447, 93, 1, 0, 50440,
48198, 50447, 0}, {0, 0, 0, 20504, 50445, 1, 0, 2, 0, 56320, 50440,
19104, 50548, 20208, 50445, 48372, 50447, 48304, 50447, 8788, 49186,
6792, 49186, 2}}, io_size = 2, reserved = {3306142918, 3306135552}},
raw_data = "�\002\000\000�\001\000\000NV12\004\000\000\000�\002\000\000\000F\005\000\001\000\000\000\000\000\000\000#�\017�]\000\001\000\000\000\b�F�\017�\000\000\000\000\000\000\000\000\030P\r�\001\000\000\000\002\000\000\000\000�\bŠJt��N\r���\017Ű�\017�T\"\"�\210\032\"�\002\000\000\000\002\000\000\000Ƽ\017�\000�\017�\000\000\000\000\030{\001�`\211\t�\001\000\000\000\f�\017���\017Ũ�\003�`\223\003� \026\002�\223\000\000 \034�\017���\017�8\206#�$\"\"�\000\000\000\000\000P\r�\000\000\000\000\000\000\000\000p�\017ŠJt�<�\017� �\017�"}}
as pitch i ve given 730
but after
ioctl(hCapture->fd, VIDIOC_TRY_FMT, &fmt) call
{type = V4L2_BUF_TYPE_VIDEO_CAPTURE, fmt = {pix = {width = 720,
height = 480, pixelformat = 842094158, field = V4L2_FIELD_INTERLACED,
bytesperline = 736, sizeimage = 529920,
colorspace = V4L2_COLORSPACE_SMPTE170M, priv = 0}, win = {w = {
left = 720, top = 480, width = 842094158, height = 4}, field = 736,
chromakey = 529920, clips = 0x1, clipcount = 0, bitmap = 0x0,
global_alpha = 0 '\0'}, vbi = {sampling_rate = 720, offset = 480,
samples_per_line = 842094158, sample_format = 4, start = {736, 529920},
count = {1, 0}, flags = 0, reserved = {0, 0}}, sliced = {
service_set = 720, service_lines = {{0, 480, 0, 22094, 12849, 4, 0, 736,
0, 5632, 8, 1, 0 <repeats 12 times>}, {0 <repeats 24 times>}},
io_size = 0, reserved = {0, 0}},
raw_data = "�\002\000\000�\001\000\000NV12\004\000\000\000�\002\000\000\000\026\b\000\001", '\0' <repeats 174 times>}}
It is
setting pitch 736
please short out the problem
ATTACHMENT : attached one yuv captured frame
pls rename it to .yuv and see the frame
thanxx
kailash