Advertisement
fneuhaus

omap3isp preview-out problem

Jul 5th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.74 KB | None | 0 0
  1. > The following mediactl-commands configures the omap3isp pipe to output on the "OMAP3 ISP preview output" (/dev/video4):
  2.  
  3. root@beagleboard:~# media-ctl -v -r -l '"mt9p031 2-0048":0->"OMAP3 ISP CCDC":0[1]'
  4. Opening media device /dev/media0
  5. Enumerating entities
  6. Found 16 entities
  7. Enumerating pads and links
  8. Resetting all links to inactive
  9. Setting up link 16:0 -> 5:0 [1]
  10. root@beagleboard:~# media-ctl -v -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]'
  11. Opening media device /dev/media0
  12. Enumerating entities
  13. Found 16 entities
  14. Enumerating pads and links
  15. Setting up link 5:2 -> 7:0 [1]
  16. root@beagleboard:~# media-ctl -v -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]'
  17. Opening media device /dev/media0
  18. Enumerating entities
  19. Found 16 entities
  20. Enumerating pads and links
  21. Setting up link 7:1 -> 9:0 [1]
  22. root@beagleboard:~# media-ctl -v -f '"mt9p031 2-0048":0 [SGRBG12 800x600]'
  23. Warning: the -f option is deprecated and has been replaced by -V.
  24. Opening media device /dev/media0
  25. Enumerating entities
  26. Found 16 entities
  27. Enumerating pads and links
  28. Setting up format SGRBG12 800x600 on pad mt9p031 2-0048/0
  29. Format set: SGRBG12 864x648
  30. Setting up format SGRBG12 864x648 on pad OMAP3 ISP CCDC/0
  31. Format set: SGRBG12 864x648
  32. root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP CCDC":0 [SGRBG10 864x648]'
  33. Warning: the -f option is deprecated and has been replaced by -V.
  34. Opening media device /dev/media0
  35. Enumerating entities
  36. Found 16 entities
  37. Enumerating pads and links
  38. Setting up format SGRBG10 864x648 on pad OMAP3 ISP CCDC/0
  39. Format set: SGRBG10 864x648
  40. root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP CCDC":2 [SGRBG10 864x647]'
  41. Warning: the -f option is deprecated and has been replaced by -V.
  42. Opening media device /dev/media0
  43. Enumerating entities
  44. Found 16 entities
  45. Enumerating pads and links
  46. Setting up format SGRBG10 864x647 on pad OMAP3 ISP CCDC/2
  47. Format set: SGRBG10 864x647
  48. Setting up format SGRBG10 864x647 on pad OMAP3 ISP preview/0
  49. Format set: SGRBG10 864x647
  50. Setting up format SGRBG10 864x647 on pad OMAP3 ISP AEWB/0
  51. Unable to set format: Inappropriate ioctl for device (-25)
  52. Setting up format SGRBG10 864x647 on pad OMAP3 ISP AF/0
  53. Unable to set format: Inappropriate ioctl for device (-25)
  54. Setting up format SGRBG10 864x647 on pad OMAP3 ISP histogram/0
  55. Unable to set format: Inappropriate ioctl for device (-25)
  56. root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP preview":0 [SGRBG10 864x647]'
  57. Warning: the -f option is deprecated and has been replaced by -V.
  58. Opening media device /dev/media0
  59. Enumerating entities
  60. Found 16 entities
  61. Enumerating pads and links
  62. Setting up format SGRBG10 864x647 on pad OMAP3 ISP preview/0
  63. Format set: SGRBG10 864x647
  64. root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP preview":1 [UYVY 864x647]'
  65. Warning: the -f option is deprecated and has been replaced by -V.
  66. Opening media device /dev/media0
  67. Enumerating entities
  68. Found 16 entities
  69. Enumerating pads and links
  70. Setting up format UYVY 864x647 on pad OMAP3 ISP preview/1
  71. Format set: UYVY 846x639
  72. root@beagleboard:~# media-ctl -p
  73. Opening media device /dev/media0
  74. Enumerating entities
  75. Found 16 entities
  76. Enumerating pads and links
  77. Media controller API version 0.0.0
  78.  
  79. Media device information
  80. ------------------------
  81. driver          omap3isp
  82. model           TI OMAP3 ISP
  83. serial          
  84. bus info        
  85. hw revision     0xf0
  86. driver version  0.0.0
  87.  
  88. Device topology
  89. - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
  90.             type V4L2 subdev subtype Unknown
  91.             device node name /dev/v4l-subdev0
  92.     pad0: Sink
  93.         [fmt:SGRBG10/4096x4096]
  94.         <- "OMAP3 ISP CCP2 input":0 []
  95.     pad1: Source
  96.         [fmt:SGRBG10/4096x4096]
  97.         -> "OMAP3 ISP CCDC":0 []
  98.  
  99. - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
  100.             type Node subtype V4L
  101.             device node name /dev/video0
  102.     pad0: Source
  103.         -> "OMAP3 ISP CCP2":0 []
  104.  
  105. - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
  106.             type V4L2 subdev subtype Unknown
  107.             device node name /dev/v4l-subdev1
  108.     pad0: Sink
  109.         [fmt:SGRBG10/4096x4096]
  110.     pad1: Source
  111.         [fmt:SGRBG10/4096x4096]
  112.         -> "OMAP3 ISP CSI2a output":0 []
  113.         -> "OMAP3 ISP CCDC":0 []
  114.  
  115. - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
  116.             type Node subtype V4L
  117.             device node name /dev/video1
  118.     pad0: Sink
  119.         <- "OMAP3 ISP CSI2a":1 []
  120.  
  121. - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
  122.             type V4L2 subdev subtype Unknown
  123.             device node name /dev/v4l-subdev2
  124.     pad0: Sink
  125.         [fmt:SGRBG10/864x648]
  126.         <- "OMAP3 ISP CCP2":1 []
  127.         <- "OMAP3 ISP CSI2a":1 []
  128.         <- "mt9p031 2-0048":0 [ENABLED]
  129.     pad1: Source
  130.         [fmt:SGRBG10/864x648
  131.          crop.bounds:(0,0)/864x648
  132.          crop:(0,0)/864x648]
  133.         -> "OMAP3 ISP CCDC output":0 []
  134.         -> "OMAP3 ISP resizer":0 []
  135.     pad2: Source
  136.         [fmt:SGRBG10/864x647]
  137.         -> "OMAP3 ISP preview":0 [ENABLED]
  138.         -> "OMAP3 ISP AEWB":0 [ENABLED,IMMUTABLE]
  139.         -> "OMAP3 ISP AF":0 [ENABLED,IMMUTABLE]
  140.         -> "OMAP3 ISP histogram":0 [ENABLED,IMMUTABLE]
  141.  
  142. - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
  143.             type Node subtype V4L
  144.             device node name /dev/video2
  145.     pad0: Sink
  146.         <- "OMAP3 ISP CCDC":1 []
  147.  
  148. - entity 7: OMAP3 ISP preview (2 pads, 4 links)
  149.             type V4L2 subdev subtype Unknown
  150.             device node name /dev/v4l-subdev3
  151.     pad0: Sink
  152.         [fmt:SGRBG10/864x647
  153.          crop.bounds:(10,4)/846x639
  154.          crop:(10,4)/846x639]
  155.         <- "OMAP3 ISP CCDC":2 [ENABLED]
  156.         <- "OMAP3 ISP preview input":0 []
  157.     pad1: Source
  158.         [fmt:UYVY/846x639]
  159.         -> "OMAP3 ISP preview output":0 [ENABLED]
  160.         -> "OMAP3 ISP resizer":0 []
  161.  
  162. - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
  163.             type Node subtype V4L
  164.             device node name /dev/video3
  165.     pad0: Source
  166.         -> "OMAP3 ISP preview":0 []
  167.  
  168. - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
  169.             type Node subtype V4L
  170.             device node name /dev/video4
  171.     pad0: Sink
  172.         <- "OMAP3 ISP preview":1 [ENABLED]
  173.  
  174. - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
  175.              type V4L2 subdev subtype Unknown
  176.              device node name /dev/v4l-subdev4
  177.     pad0: Sink
  178.         [fmt:YUYV/4095x4095
  179.          crop.bounds:(4,6)/4086x4082
  180.          crop:(4,6)/4086x4082]
  181.         <- "OMAP3 ISP CCDC":1 []
  182.         <- "OMAP3 ISP preview":1 []
  183.         <- "OMAP3 ISP resizer input":0 []
  184.     pad1: Source
  185.         [fmt:YUYV/4096x4095]
  186.         -> "OMAP3 ISP resizer output":0 []
  187.  
  188. - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
  189.              type Node subtype V4L
  190.              device node name /dev/video5
  191.     pad0: Source
  192.         -> "OMAP3 ISP resizer":0 []
  193.  
  194. - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
  195.              type Node subtype V4L
  196.              device node name /dev/video6
  197.     pad0: Sink
  198.         <- "OMAP3 ISP resizer":1 []
  199.  
  200. - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
  201.              type V4L2 subdev subtype Unknown
  202.              device node name /dev/v4l-subdev5
  203.     pad0: Sink
  204.         <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
  205.  
  206. - entity 14: OMAP3 ISP AF (1 pad, 1 link)
  207.              type V4L2 subdev subtype Unknown
  208.              device node name /dev/v4l-subdev6
  209.     pad0: Sink
  210.         <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
  211.  
  212. - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
  213.              type V4L2 subdev subtype Unknown
  214.              device node name /dev/v4l-subdev7
  215.     pad0: Sink
  216.         <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
  217.  
  218. - entity 16: mt9p031 2-0048 (1 pad, 1 link)
  219.              type V4L2 subdev subtype Unknown
  220.              device node name /dev/v4l-subdev8
  221.     pad0: Source
  222.         [fmt:SGRBG12/864x648
  223.          crop:(16,54)/2592x1944]
  224.         -> "OMAP3 ISP CCDC":0 [ENABLED]
  225.  
  226.  
  227. root@beagleboard:~#
  228.  
  229. Now we stream with yavta and capture/save the 11th frame:
  230.  
  231. root@beagleboard:~# yavta -c11 -p --skip 10 -f UYVY -s 846x639 /dev/video4 -Fbad-frame-846x639.yuv
  232. Device /dev/video4 opened.
  233. Device `OMAP3 ISP preview output' on `media' is a video capture device.
  234. Video format set: UYVY (59565955) 846x639 (stride 1696) buffer size 1083744
  235. Video format: UYVY (59565955) 846x639 (stride 1696) buffer size 1083744
  236. 8 buffers requested.
  237. length: 1083744 offset: 0
  238. Buffer 0 mapped at address 0xb6d30000.
  239. length: 1083744 offset: 1085440
  240. Buffer 1 mapped at address 0xb6c27000.
  241. length: 1083744 offset: 2170880
  242. Buffer 2 mapped at address 0xb6b1e000.
  243. length: 1083744 offset: 3256320
  244. Buffer 3 mapped at address 0xb6a15000.
  245. length: 1083744 offset: 4341760
  246. Buffer 4 mapped at address 0xb690c000.
  247. length: 1083744 offset: 5427200
  248. Buffer 5 mapped at address 0xb6803000.
  249. length: 1083744 offset: 6512640
  250. Buffer 6 mapped at address 0xb66fa000.
  251. length: 1083744 offset: 7598080
  252. Buffer 7 mapped at address 0xb65f1000.
  253. Press enter to start capture
  254.  
  255. 0 (0) [-] 0 1083744 bytes 313.735779 313.736023 5.549 fps
  256. 1 (1) [-] 1 1083744 bytes 313.921722 313.921936 5.378 fps
  257. 2 (2) [-] 2 1083744 bytes 313.991241 313.991455 14.385 fps
  258. 3 (3) [-] 3 1083744 bytes 314.060760 314.061004 14.385 fps
  259. 4 (4) [-] 4 1083744 bytes 314.130310 314.130523 14.378 fps
  260. 5 (5) [-] 5 1083744 bytes 314.199829 314.200042 14.385 fps
  261. 6 (6) [-] 6 1083744 bytes 314.269348 314.269592 14.385 fps
  262. 7 (7) [-] 7 1083744 bytes 314.338867 314.339111 14.385 fps
  263. 8 (0) [-] 8 1083744 bytes 314.408417 314.408630 14.378 fps
  264. 9 (1) [-] 9 1083744 bytes 314.478027 314.478149 14.366 fps
  265. 10 (2) [-] 10 1083744 bytes 314.547455 314.547668 14.403 fps
  266. Captured 11 frames in 0.992095 seconds (11.087640 fps, 12016163.469054 B/s).
  267. 8 buffers released.
  268. root@beagleboard:~#
  269.  
  270. > The captured picture (bad-frame-846x639.yuv) can be downloaded here:
  271. > https://www.dropbox.com/sh/p2fy5u4i71c3vy8/Fyya25YqK-
  272. > It looks like the screenshot bad-frame-846x639_on_display.bmp, if its streamed to the attached display.
  273.  
  274. root@beagleboard:~# ls -l bad-frame-846x639.yuv
  275. -rw-r--r-- 1 root root 1083744 Jul  5 07:54 bad-frame-846x639.yuv
  276.  
  277. > Notice the frame size of 1083744 bytes, which is exactly 848*639*2 (NOT 846*639*2)!
  278.  
  279. Analyzation of the captured picture on the developer machine with raw2rgbpnm:
  280. vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$ ./raw2rgbpnm -s 846x639 -f UYVY bad-frame-846x639.yuv bad-frame-846x639.pnm
  281. warning: too large image file
  282. 4 padding bytes detected at end of line
  283. Image size: 846x639, bytes per pixel: 16, format: UYVY (16  YUV 4:2:2)
  284. Writing to file `bad-frame-846x639.pnm'...
  285. vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$
  286.  
  287. > Although the generated picture seems to be fine, lease note the warning that the image file is too large!
  288. > The transformed picture (bad-frame-846x639.pnm) can be downloaded here (and yes, that's me):
  289. > https://www.dropbox.com/sh/p2fy5u4i71c3vy8/Fyya25YqK-
  290.  
  291. > So if we redo the transforming with a bigger line-width, the warning disappears:
  292.  
  293. vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$ ./raw2rgbpnm -s 848x639 -f UYVY bad-frame-846x639.yuv bad-frame-848x639.pnm
  294. Image size: 848x639, bytes per pixel: 16, format: UYVY (16  YUV 4:2:2)
  295. Writing to file `bad-frame-848x639.pnm'...
  296. vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$
  297.  
  298. > This file is also in the mentioned dropbox folder.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement