Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > The following mediactl-commands configures the omap3isp pipe to output on the "OMAP3 ISP preview output" (/dev/video4):
- root@beagleboard:~# media-ctl -v -r -l '"mt9p031 2-0048":0->"OMAP3 ISP CCDC":0[1]'
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Resetting all links to inactive
- Setting up link 16:0 -> 5:0 [1]
- root@beagleboard:~# media-ctl -v -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]'
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up link 5:2 -> 7:0 [1]
- root@beagleboard:~# media-ctl -v -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]'
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up link 7:1 -> 9:0 [1]
- root@beagleboard:~# media-ctl -v -f '"mt9p031 2-0048":0 [SGRBG12 800x600]'
- Warning: the -f option is deprecated and has been replaced by -V.
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up format SGRBG12 800x600 on pad mt9p031 2-0048/0
- Format set: SGRBG12 864x648
- Setting up format SGRBG12 864x648 on pad OMAP3 ISP CCDC/0
- Format set: SGRBG12 864x648
- root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP CCDC":0 [SGRBG10 864x648]'
- Warning: the -f option is deprecated and has been replaced by -V.
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up format SGRBG10 864x648 on pad OMAP3 ISP CCDC/0
- Format set: SGRBG10 864x648
- root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP CCDC":2 [SGRBG10 864x647]'
- Warning: the -f option is deprecated and has been replaced by -V.
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP CCDC/2
- Format set: SGRBG10 864x647
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP preview/0
- Format set: SGRBG10 864x647
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP AEWB/0
- Unable to set format: Inappropriate ioctl for device (-25)
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP AF/0
- Unable to set format: Inappropriate ioctl for device (-25)
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP histogram/0
- Unable to set format: Inappropriate ioctl for device (-25)
- root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP preview":0 [SGRBG10 864x647]'
- Warning: the -f option is deprecated and has been replaced by -V.
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up format SGRBG10 864x647 on pad OMAP3 ISP preview/0
- Format set: SGRBG10 864x647
- root@beagleboard:~# media-ctl -v -f '"OMAP3 ISP preview":1 [UYVY 864x647]'
- Warning: the -f option is deprecated and has been replaced by -V.
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Setting up format UYVY 864x647 on pad OMAP3 ISP preview/1
- Format set: UYVY 846x639
- root@beagleboard:~# media-ctl -p
- Opening media device /dev/media0
- Enumerating entities
- Found 16 entities
- Enumerating pads and links
- Media controller API version 0.0.0
- Media device information
- ------------------------
- driver omap3isp
- model TI OMAP3 ISP
- serial
- bus info
- hw revision 0xf0
- driver version 0.0.0
- Device topology
- - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev0
- pad0: Sink
- [fmt:SGRBG10/4096x4096]
- <- "OMAP3 ISP CCP2 input":0 []
- pad1: Source
- [fmt:SGRBG10/4096x4096]
- -> "OMAP3 ISP CCDC":0 []
- - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video0
- pad0: Source
- -> "OMAP3 ISP CCP2":0 []
- - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev1
- pad0: Sink
- [fmt:SGRBG10/4096x4096]
- pad1: Source
- [fmt:SGRBG10/4096x4096]
- -> "OMAP3 ISP CSI2a output":0 []
- -> "OMAP3 ISP CCDC":0 []
- - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video1
- pad0: Sink
- <- "OMAP3 ISP CSI2a":1 []
- - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev2
- pad0: Sink
- [fmt:SGRBG10/864x648]
- <- "OMAP3 ISP CCP2":1 []
- <- "OMAP3 ISP CSI2a":1 []
- <- "mt9p031 2-0048":0 [ENABLED]
- pad1: Source
- [fmt:SGRBG10/864x648
- crop.bounds:(0,0)/864x648
- crop:(0,0)/864x648]
- -> "OMAP3 ISP CCDC output":0 []
- -> "OMAP3 ISP resizer":0 []
- pad2: Source
- [fmt:SGRBG10/864x647]
- -> "OMAP3 ISP preview":0 [ENABLED]
- -> "OMAP3 ISP AEWB":0 [ENABLED,IMMUTABLE]
- -> "OMAP3 ISP AF":0 [ENABLED,IMMUTABLE]
- -> "OMAP3 ISP histogram":0 [ENABLED,IMMUTABLE]
- - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video2
- pad0: Sink
- <- "OMAP3 ISP CCDC":1 []
- - entity 7: OMAP3 ISP preview (2 pads, 4 links)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev3
- pad0: Sink
- [fmt:SGRBG10/864x647
- crop.bounds:(10,4)/846x639
- crop:(10,4)/846x639]
- <- "OMAP3 ISP CCDC":2 [ENABLED]
- <- "OMAP3 ISP preview input":0 []
- pad1: Source
- [fmt:UYVY/846x639]
- -> "OMAP3 ISP preview output":0 [ENABLED]
- -> "OMAP3 ISP resizer":0 []
- - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video3
- pad0: Source
- -> "OMAP3 ISP preview":0 []
- - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video4
- pad0: Sink
- <- "OMAP3 ISP preview":1 [ENABLED]
- - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev4
- pad0: Sink
- [fmt:YUYV/4095x4095
- crop.bounds:(4,6)/4086x4082
- crop:(4,6)/4086x4082]
- <- "OMAP3 ISP CCDC":1 []
- <- "OMAP3 ISP preview":1 []
- <- "OMAP3 ISP resizer input":0 []
- pad1: Source
- [fmt:YUYV/4096x4095]
- -> "OMAP3 ISP resizer output":0 []
- - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video5
- pad0: Source
- -> "OMAP3 ISP resizer":0 []
- - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
- type Node subtype V4L
- device node name /dev/video6
- pad0: Sink
- <- "OMAP3 ISP resizer":1 []
- - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev5
- pad0: Sink
- <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
- - entity 14: OMAP3 ISP AF (1 pad, 1 link)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev6
- pad0: Sink
- <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
- - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev7
- pad0: Sink
- <- "OMAP3 ISP CCDC":2 [ENABLED,IMMUTABLE]
- - entity 16: mt9p031 2-0048 (1 pad, 1 link)
- type V4L2 subdev subtype Unknown
- device node name /dev/v4l-subdev8
- pad0: Source
- [fmt:SGRBG12/864x648
- crop:(16,54)/2592x1944]
- -> "OMAP3 ISP CCDC":0 [ENABLED]
- root@beagleboard:~#
- Now we stream with yavta and capture/save the 11th frame:
- root@beagleboard:~# yavta -c11 -p --skip 10 -f UYVY -s 846x639 /dev/video4 -Fbad-frame-846x639.yuv
- Device /dev/video4 opened.
- Device `OMAP3 ISP preview output' on `media' is a video capture device.
- Video format set: UYVY (59565955) 846x639 (stride 1696) buffer size 1083744
- Video format: UYVY (59565955) 846x639 (stride 1696) buffer size 1083744
- 8 buffers requested.
- length: 1083744 offset: 0
- Buffer 0 mapped at address 0xb6d30000.
- length: 1083744 offset: 1085440
- Buffer 1 mapped at address 0xb6c27000.
- length: 1083744 offset: 2170880
- Buffer 2 mapped at address 0xb6b1e000.
- length: 1083744 offset: 3256320
- Buffer 3 mapped at address 0xb6a15000.
- length: 1083744 offset: 4341760
- Buffer 4 mapped at address 0xb690c000.
- length: 1083744 offset: 5427200
- Buffer 5 mapped at address 0xb6803000.
- length: 1083744 offset: 6512640
- Buffer 6 mapped at address 0xb66fa000.
- length: 1083744 offset: 7598080
- Buffer 7 mapped at address 0xb65f1000.
- Press enter to start capture
- 0 (0) [-] 0 1083744 bytes 313.735779 313.736023 5.549 fps
- 1 (1) [-] 1 1083744 bytes 313.921722 313.921936 5.378 fps
- 2 (2) [-] 2 1083744 bytes 313.991241 313.991455 14.385 fps
- 3 (3) [-] 3 1083744 bytes 314.060760 314.061004 14.385 fps
- 4 (4) [-] 4 1083744 bytes 314.130310 314.130523 14.378 fps
- 5 (5) [-] 5 1083744 bytes 314.199829 314.200042 14.385 fps
- 6 (6) [-] 6 1083744 bytes 314.269348 314.269592 14.385 fps
- 7 (7) [-] 7 1083744 bytes 314.338867 314.339111 14.385 fps
- 8 (0) [-] 8 1083744 bytes 314.408417 314.408630 14.378 fps
- 9 (1) [-] 9 1083744 bytes 314.478027 314.478149 14.366 fps
- 10 (2) [-] 10 1083744 bytes 314.547455 314.547668 14.403 fps
- Captured 11 frames in 0.992095 seconds (11.087640 fps, 12016163.469054 B/s).
- 8 buffers released.
- root@beagleboard:~#
- > The captured picture (bad-frame-846x639.yuv) can be downloaded here:
- > https://www.dropbox.com/sh/p2fy5u4i71c3vy8/Fyya25YqK-
- > It looks like the screenshot bad-frame-846x639_on_display.bmp, if its streamed to the attached display.
- root@beagleboard:~# ls -l bad-frame-846x639.yuv
- -rw-r--r-- 1 root root 1083744 Jul 5 07:54 bad-frame-846x639.yuv
- > Notice the frame size of 1083744 bytes, which is exactly 848*639*2 (NOT 846*639*2)!
- Analyzation of the captured picture on the developer machine with raw2rgbpnm:
- vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$ ./raw2rgbpnm -s 846x639 -f UYVY bad-frame-846x639.yuv bad-frame-846x639.pnm
- warning: too large image file
- 4 padding bytes detected at end of line
- Image size: 846x639, bytes per pixel: 16, format: UYVY (16 YUV 4:2:2)
- Writing to file `bad-frame-846x639.pnm'...
- vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$
- > Although the generated picture seems to be fine, lease note the warning that the image file is too large!
- > The transformed picture (bad-frame-846x639.pnm) can be downloaded here (and yes, that's me):
- > https://www.dropbox.com/sh/p2fy5u4i71c3vy8/Fyya25YqK-
- > So if we redo the transforming with a bigger line-width, the warning disappears:
- vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$ ./raw2rgbpnm -s 848x639 -f UYVY bad-frame-846x639.yuv bad-frame-848x639.pnm
- Image size: 848x639, bytes per pixel: 16, format: UYVY (16 YUV 4:2:2)
- Writing to file `bad-frame-848x639.pnm'...
- vdev@vhost:/voisee/rootfs/raw2rgbpnm/raw2rgbpnm$
- > This file is also in the mentioned dropbox folder.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement