Dear all,
I observes libcamera3 support MJPG format for UVC camera on Android 7.1.1.
After trying to enable configUseMJPG and use 5M USB camera for test on imx6q sabresd platform, I got different results when capturing different resolution pictures.
5M USB camera resolution support as below:
01-01 02:54:17.064 1862 1867 I FslCameraHAL: DeviceAdapter: Create uvc device, config to use MJPG
01-01 02:54:17.064 1862 1867 I FslCameraHAL: Camera::Camera(int32_t, int32_t, int32_t, char *):1: new camera device
01-01 02:54:17.064 1862 1867 E FslCameraHAL: Stream:220, PXP_IOC_GET_CHAN failed -1
01-01 02:54:17.064 1862 1867 E FslCameraHAL: Error: format:
01-01 02:54:17.064 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.064 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.064 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.064 1862 1867 I FslCameraHAL: vid_frmval denominator:15, numeraton:1
01-01 02:54:17.064 1862 1867 I FslCameraHAL: vid_frmval denominator:15, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: vid_frmval denominator:30, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: vid_frmval denominator:15, numeraton:1
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 640 x 480
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 352 x 288
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 320 x 240
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 2048 x 1536
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 2592 x 1944
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 800 x 600
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 1024 x 768
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 1280 x 720
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 1920 x 1080
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPictureSizes: 1600 x 1200
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 1920 x 1080
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 352 x 288
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 320 x 240
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 800 x 600
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 1024 x 768
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 1280 x 720
01-01 02:54:17.065 1862 1867 I FslCameraHAL: SupportedPreviewSizes: 640 x 480
01-01 02:54:17.065 1862 1867 I FslCameraHAL: FrameDuration is 33331760, 30000000000
01-01 02:54:17.065 1862 1867 I FslCameraHAL: mMaxWidth:2592, mMaxHeight:1944
case 1: 2592 x 1944, the camera app always crash and error log as below
01-01 02:56:31.275 1862 2639 I FslCameraHAL: Width * Height 2592 x 1944 format MJPG, fps: 15
01-01 02:56:31.277 1862 2639 I FslCameraHAL: Special handling for MJPG on Stride 2592, size 7558272
01-01 02:56:31.280 1862 2639 I FslCameraHAL: virtual int32_t UvcMJPGDevice::UvcStream::onDeviceStartLocked()
01-01 02:56:31.527 1862 2639 I FslCameraHAL: UvcMJPGDevice::VPUInit
01-01 02:56:31.527 1862 2639 I vpu-lib : Product Info: i.MX6Q/D/S
01-01 02:56:31.527 1862 2639 I FslCameraHAL: vpu lib version : major.minor.rel=5.4.36
01-01 02:56:31.527 1862 2639 I FslCameraHAL: vpu fw version : major.minor.rel_rcode=3.1.1_r46075
01-01 02:56:31.527 1862 2639 I FslCameraHAL: vpu wrapper version : major.minor.rel=1.0.66: VPUWRAPPER_ARM_LINUX Build on Oct 17 2017 13:59:21
01-01 02:56:31.610 1862 2639 I vpu-lib : <gpu> alloc handle: 0xa09b43b0, paddr: 0x3e500000, vaddr: 0x94db6000
01-01 02:56:31.610 1862 2639 I FslCameraHAL: capability: file mode supported: 0
01-01 02:56:31.610 1862 2639 I FslCameraHAL: capability: tile format supported: 1
01-01 02:56:31.611 1862 2639 I vpu-lib : <gpu> alloc handle: 0xa09b4140, paddr: 0x2b6e9000, vaddr: 0xa1c69000
01-01 02:56:31.611 1862 2639 I vpu-lib : bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
01-01 02:56:31.611 1862 2639 I FslCameraHAL: buf[0] length:10077696
01-01 02:56:31.611 1862 2639 I FslCameraHAL: buf[1] length:10077696
01-01 02:56:31.644 1871 1871 W AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 4, track 48000 Hz, output 44100 Hz
01-01 02:56:31.649 226 257 W audio_hw_primary: ret -32, pcm write 768 error wait error: hw 0x21600 app 0x21c00 avail 0x0
01-01 02:56:31.649 226 257 W audio_hw_primary: : Unknown error -32
01-01 02:56:33.247 1862 2639 E FslCameraHAL: getGpsCoordinates: error reading jpeg Coordinates tag
01-01 02:56:33.248 1862 2639 E FslCameraHAL: getGpsTimeStamp: error reading jpeg TimeStamp tag
01-01 02:56:33.248 1862 2639 E FslCameraHAL: getGpsProcessingMethod: error reading jpeg ProcessingMethod tag
01-01 02:56:33.248 1862 2639 I FslCameraHAL: int32_t Stream::processJpegBuffer(StreamBuffer &, sp<Metadata>) srcStream->mWidth:2592, srcStream->mHeight:1944, v4l2Width:2592, v4l2Height:1944
01-01 02:56:33.250 1862 2639 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x990bd480 in tid 2639 (MessageThread)
01-01 02:56:33.252 205 205 W : debuggerd: handling request: pid=1862 uid=1047 gid=1005 tid=2639
01-01 02:56:33.278 2755 2755 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 02:56:33.278 2755 2755 F DEBUG : Build fingerprint: 'Freescale/sabresd_6dq/sabresd_6dq:7.1.1/1.0.0-ga-rc10/20170227:eng/release-keys'
01-01 02:56:33.278 2755 2755 F DEBUG : Revision: '0'
01-01 02:56:33.278 2755 2755 F DEBUG : ABI: 'arm'
01-01 02:56:33.279 2755 2755 F DEBUG : pid: 1862, tid: 2639, name: MessageThread >>> /system/bin/cameraserver <<<
01-01 02:56:33.279 2755 2755 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x990bd480
01-01 02:56:33.279 2755 2755 F DEBUG : r0 00000000 r1 0000001b r2 0000001a r3 00000000
01-01 02:56:33.279 2755 2755 F DEBUG : r4 990bd480 r5 00000014 r6 00000258 r7 0000001b
01-01 02:56:33.279 2755 2755 F DEBUG : r8 00000000 r9 990bd480 sl 94380b40 fp 00000a20
01-01 02:56:33.279 2755 2755 F DEBUG : ip 0000001b sp a05ff3b0 lr a9a71ecf pc a9a71ece cpsr 800e0030
01-01 02:56:33.303 2755 2755 F DEBUG :
01-01 02:56:33.303 2755 2755 F DEBUG : backtrace:
01-01 02:56:33.303 2755 2755 F DEBUG : #00 pc 0000cece /system/lib/hw/camera.imx6.so
01-01 02:56:33.303 2755 2755 F DEBUG : #01 pc 0000c791 /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #02 pc 0000a875 /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #03 pc 0000a80f /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #04 pc 0000717b /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #05 pc 00007cff /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #06 pc 00009891 /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #07 pc 0000965b /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #08 pc 00009a07 /system/lib/hw/camera.imx6.so
01-01 02:56:33.304 2755 2755 F DEBUG : #09 pc 00009b67 /system/lib/hw/camera.imx6.so
01-01 02:56:33.305 2755 2755 F DEBUG : #10 pc 0000e3d9 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+264)
01-01 02:56:33.305 2755 2755 F DEBUG : #11 pc 00046e83 /system/lib/libc.so (_ZL15__pthread_startPv+22)
01-01 02:56:33.305 2755 2755 F DEBUG : #12 pc 00019cdd /system/lib/libc.so (__start_thread+6)
01-01 02:56:33.705 495 582 W NativeCrashListener: Couldn't find ProcessRecord for pid 1862
01-01 02:56:33.705 2755 2755 E : AM data write failed: Broken pipe
01-01 02:56:33.707 205 205 W : debuggerd: resuming target 1862
01-01 02:56:33.717 495 513 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
01-01 02:56:33.726 1871 1883 W CameraBase: mediaserver's remote binder Camera object died
01-01 02:56:33.727 219 219 I ServiceManager: service 'media.camera' died
01-01 02:56:33.727 234 255 D NuPlayerDriver: reset(0xb132c2c0) at state 4
01-01 02:56:33.727 234 255 D NuPlayerDriver: notifyListener_l(0xb132c2c0), (8, 0, 0), loop setting(0, 0)
01-01 02:56:33.727 1871 2536 W CameraBase: Camera service died!
01-01 02:56:33.727 1871 2727 E Camera : Error 100
01-01 02:56:33.727 1871 2727 E RequestThread-1: Received error 100 from the Camera1 ErrorCallback
01-01 02:56:33.728 1871 2727 I CameraDeviceState: Legacy camera service transitioning to state ERROR
01-01 02:56:33.728 234 2729 D NuPlinit: Service 'cameraserver' (pid 1862) killed by signal 11
ayerDriver: notifyResetComplete(0init: Service 'cameraserver' (pid 1862) killing any children in process group
case 2: 1920 x 1080, sometimes camera app crash, and sometime get wrong image as below
case 3: 1280 x 720, the picture is correct
Thanks for any help.
Hi Jimmy,
I try to change uvc to back camera, and apply media_profiles_1080p.xml settings, but get the same result.
Is there anything I missed?
In my test case, I want to take 2592 x 1944 and 1920x1080 pictures, not video record.
Thanks.
Yenyu
Hello all,
Does anyone have experience or idea about this issue?
Thanks.
Yenyu