Re: v4l2-ctl bug(?) printing ctrl payload array

2014-11-13 Thread Andrey Utkin
2014-11-06 15:57 GMT+04:00 Hans Verkuil hverk...@xs4all.nl:
 OK, I had some time and I made several fixes. Please pull from v4l-utils.git
 and verify that it is now working correctly.

Looks appropriate now. Thanks.

-- 
Andrey Utkin
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2-ctl bug(?) printing ctrl payload array

2014-11-06 Thread Hans Verkuil
On 11/05/14 20:52, Andrey Utkin wrote:
 More on the same topic.
 I believe there's another bug on displaying of payload.
 Let's say we have the same [45][45] array, and this is what is posted to it:
 uint16_t buf[45 * 45] = {0, };
 buf[0] = 1;
 buf[1] = 2;
 buf[45] = 3;
 buf[45 * 45 - 1] = 0xff;
 
 What is shown by v4l2-ctl you can see here:
 https://dl.dropboxusercontent.com/u/43104344/v4l2-ctl_payload_bug.png
 

I'll look at this Friday or Monday.

I want to add some test array controls to the vivid driver as well to make
it easier to test such controls, so that will be a good test case.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2-ctl bug(?) printing ctrl payload array

2014-11-06 Thread Hans Verkuil
On 11/06/14 10:31, Hans Verkuil wrote:
 On 11/05/14 20:52, Andrey Utkin wrote:
 More on the same topic.
 I believe there's another bug on displaying of payload.
 Let's say we have the same [45][45] array, and this is what is posted to it:
 uint16_t buf[45 * 45] = {0, };
 buf[0] = 1;
 buf[1] = 2;
 buf[45] = 3;
 buf[45 * 45 - 1] = 0xff;

 What is shown by v4l2-ctl you can see here:
 https://dl.dropboxusercontent.com/u/43104344/v4l2-ctl_payload_bug.png

 
 I'll look at this Friday or Monday.
 
 I want to add some test array controls to the vivid driver as well to make
 it easier to test such controls, so that will be a good test case.

OK, I had some time and I made several fixes. Please pull from v4l-utils.git
and verify that it is now working correctly.

Thanks for reporting this!

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2-ctl bug(?) printing ctrl payload array

2014-11-05 Thread Andrey Utkin
More on the same topic.
I believe there's another bug on displaying of payload.
Let's say we have the same [45][45] array, and this is what is posted to it:
uint16_t buf[45 * 45] = {0, };
buf[0] = 1;
buf[1] = 2;
buf[45] = 3;
buf[45 * 45 - 1] = 0xff;

What is shown by v4l2-ctl you can see here:
https://dl.dropboxusercontent.com/u/43104344/v4l2-ctl_payload_bug.png

-- 
Andrey Utkin
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


v4l2-ctl bug(?) printing ctrl payload array

2014-11-04 Thread Andrey Utkin
I used today's git master HEAD of v4l-utils.
There's a device which provides r/w v4l2 control for a map of motion
thresholds by regions. See

md_threshold_grid (u16): min=0 max=65535 step=1 default=768
[45][45] flags=has-payload

So when i print its value with -C md_threshold_grid, i see MD
Threshold Grid[0]: in the beginning of every line. I guess it is
supposed to have a number in brackets increase each line?
I am not smart enought to fix this in code from first glance, so I'm
just reporting this.

00:57:28krieger@zver /usr/local/src/v4l-utils/utils/v4l2-ctl
 $ git describe --long
v4l-utils-1.6.0-29-gc873001

00:49:32krieger@zver /usr/local/src/v4l-utils/utils/v4l2-ctl
 $ ./v4l2-ctl -d /dev/video12 --all
Driver Info (not using libv4l2):
Driver name   : solo6x10
Card type : Softlogic 6x10 Enc 2
Bus info  : PCI::07:05.0
Driver version: 3.18.0
Capabilities  : 0x8521
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x0521
Video Capture
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Encoder 3: no signal)
Video Standard = 0x1000
NTSC-M
Format Video Capture:
Width/Height  : 352/240
Pixel Format  : 'H264'
Field : None
Bytes per Line: 0
Size Image: 200704
Colorspace: Broadcast NTSC/PAL (SMPTE170M/ITU601)
Flags :
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 2

User Controls

 brightness (int): min=0 max=255 step=1
default=128 value=128 flags=slider
   contrast (int): min=0 max=255 step=1
default=128 value=128 flags=slider
 saturation (int): min=0 max=255 step=1
default=128 value=128 flags=slider
hue (int): min=0 max=255 step=1
default=128 value=128 flags=slider
  sharpness (int): min=0 max=15 step=1
default=0 value=0 flags=slider
   osd_text (str): min=0 max=44 step=1
value='' flags=has-payload

Codec Controls

 video_gop_size (int): min=1 max=255 step=1
default=30 value=30
  h264_minimum_qp_value (int): min=0 max=31 step=1 default=3 value=3

Detection Controls

  motion_detection_mode (menu)   : min=0 max=2 default=0 value=2
md_global_threshold (int): min=0 max=255 step=1
default=3 value=3 flags=slider
  md_threshold_grid (u16): min=0 max=65535 step=1
default=768 [45][45] flags=has-payload
 brightness (int): min=0 max=255 step=1
default=128 value=128 flags=slider
   contrast (int): min=0 max=255 step=1
default=128 value=128 flags=slider
 saturation (int): min=0 max=255 step=1
default=128 value=128 flags=slider
hue (int): min=0 max=255 step=1
default=128 value=128 flags=slider
  sharpness (int): min=0 max=15 step=1
default=0 value=0 flags=slider

00:53:23krieger@zver /usr/local/src/v4l-utils/utils/v4l2-ctl
 $ ./v4l2-ctl -d /dev/video12 -C md_threshold_grid
MD Threshold Grid[0]:  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0
MD Threshold Grid[0]:  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0
MD Threshold Grid[0]:  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0
MD Threshold Grid[0]:  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
 0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0
MD Threshold Grid[0]:  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,