Codec 2.0 HW decoder failure Android 11

Hi,

I see V4L2 errors when trying to play AVC in Android 11 ported VIM3 and using Codec 2.0 decoder.

06-28 11:52:09.904 2384 2433 I MediaCodec: MediaCodec will operate in async mode
06-28 11:52:09.907 2384 2434 W Codec2Client: query – param skipped: index = 1342179345.
06-28 11:52:09.907 2384 2434 W Codec2Client: query – param skipped: index = 2415921170.
06-28 11:52:09.907 2384 2434 W Codec2Client: query – param skipped: index = 1073743886.
06-28 11:52:09.907 2384 2434 W Codec2Client: query – param skipped: index = 1610614798.
06-28 11:52:09.908 2384 2434 W Codec2Client: query – param skipped: index = 2684356609.
06-28 11:52:09.908 2384 2434 D CCodecBufferChannel: [c2.v4l2.avc.decoder#131] Using basic input block pool with poolID 0 => got 0 - OK (0)
06-28 11:52:09.908 2384 2434 I V4L2PluginStore: createAllocator(): Fallback to create C2AllocatorGralloc (id=21)
06-28 11:52:09.908 2384 2434 I V4L2PluginStore: createAllocator(): Fallback to create C2AllocatorGralloc (id=20)
06-28 11:52:09.908 2384 2434 D CCodecBufferChannel: [c2.v4l2.avc.decoder#131] Configured output block pool ids 1 => OK
06-28 11:52:09.908 2384 2434 D Codec2-OutputBufferQueue: remote graphic buffer migration 0/0
06-28 11:52:09.908 2384 2434 D Codec2Client: generation remote change 2441218
06-28 11:52:09.909 2384 2433 W ResourceManagerService: Ignoring request to add new resource entry with value <= 0
06-28 11:52:09.900 383 383 I HwBinder:383_6: type=1400 audit(0.0:60): avc: denied { search } for name="/" dev=“cgroup2” ino=1 scontext=u:r:mediacodec:s0 tcontext=u:object_r:cgroup_bpf:s0 tclass=dir permissive=1
06-28 11:52:09.921 383 2435 I V4L2Decoder: Set state Idle => Decoding
06-28 11:52:10.011 2131 2131 W Choreographer: Frame time is 0.017993 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
06-28 11:52:10.285 403 416 E BufferQueueProducer: com.android.documentsui/com.android.documentsui.files.FilesActivity#0 disconnect: not connected (req=1)
06-28 11:52:10.285 2131 2159 W libEGL : EGLNativeWindowType 0xb400ee297b898a50 disconnect failed
06-28 11:52:10.581 573 1068 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
06-28 11:52:10.959 383 2435 W V4L2Decoder: ioctl() VIDIOC_G_CROP failed
06-28 11:52:10.959 383 2435 I V4L2Decoder: Need 13 output buffers. coded size: 480x270, visible rect: (0,0) 480x270
06-28 11:52:10.959 383 2435 I V4L2DecodeComponent: Using C2BlockPool ID = 1 for allocating output buffers
06-28 11:52:10.959 383 2435 E VideoFramePool: requestNewBufferSet(): unknown allocator ID: 17
06-28 11:52:10.959 383 2435 E V4L2Decoder: Failed to get block pool with size: 480x270
06-28 11:52:10.960 383 2435 I V4L2Decoder: Set state Decoding => Error
06-28 11:52:10.960 383 2435 E V4L2DecodeComponent: reportError(error=14)
06-28 11:52:10.960 383 2435 W V4L2DecodeComponent: Could not pump C2Work at state: ERROR

Tried using Android’s SW codec and it works fine. The issue seems to be only with HW decoder. I am putting the VIM3 in debug mode to capture logs. Also, playing AVC from UI. Any suggestions to work this around? Thank you.

Adding the full logs here:

/***************************************/
07-06 09:08:51.352 1813 1813 D MediaPlayerNative: getMetadata
07-06 09:08:51.355 478 1866 I GenericSource: start
07-06 09:08:51.358 478 1872 D CCodec : allocate(c2.v4l2.avc.decoder)
07-06 09:08:51.359 478 1872 I CCodec : setting up ‘default’ as default (vendor) store
07-06 09:08:51.364 378 378 V V4L2DecodeComponent: V4L2DecodeComponent(c2.v4l2.avc.decoder)
07-06 09:08:51.365 378 378 V V4L2DecodeComponent: setListener_vb()
07-06 09:08:51.367 478 1872 I CCodec : Created component [c2.v4l2.avc.decoder]
07-06 09:08:51.367 478 1872 D CCodecConfig: Query domain & kind failed => BAD_INDEX
07-06 09:08:51.368 478 1872 D CCodecConfig: read media type: video/avc
07-06 09:08:51.368 478 1872 D CCodecConfig: read media type: video/avc
07-06 09:08:51.369 478 1872 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
07-06 09:08:51.369 478 1872 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
07-06 09:08:51.369 478 1872 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
07-06 09:08:51.369 478 1872 D CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported
07-06 09:08:51.370 478 1872 D CCodecConfig: ignoring local param raw.color (0xd2001809) as it is already supported
07-06 09:08:51.370 478 1872 D ReflectedParamUpdater: ignored struct field raw.hdr-static-info.mastering
07-06 09:08:51.370 478 1872 I CCodecConfig: query failed after returning 9 values (BAD_INDEX)
07-06 09:08:51.370 478 1872 D CCodecConfig: c2 config diff is Dict {
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.pl.level = 20491
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.pl.profile = 20482
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.vui.color.matrix = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.vui.color.primaries = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.vui.color.range = 2
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 coded.vui.color.transfer = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 default.color.matrix = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 default.color.primaries = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 default.color.range = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 default.color.transfer = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 input.buffers.max-size.value = 1048576
07-06 09:08:51.370 478 1872 D CCodecConfig: string input.media-type.value = “video/avc”
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 output.delay.value = 16
07-06 09:08:51.370 478 1872 D CCodecConfig: string output.media-type.value = “video/raw”
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.color.matrix = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.color.primaries = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.color.range = 2
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.color.transfer = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::i32 raw.rotation.flip = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::i32 raw.rotation.value = 0
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.sar.height = 1
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.sar.width = 1
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.size.height = 240
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.size.width = 320
07-06 09:08:51.370 478 1872 D CCodecConfig: c2::u32 raw.surface-scaling.value = 1
07-06 09:08:51.370 478 1872 D CCodecConfig: }
07-06 09:08:51.371 478 1872 W ColorUtils: expected specified color aspects (2:0:0:0)
07-06 09:08:51.372 478 1870 D SurfaceUtils: disconnecting from surface 0xb400e1947c098230, reason onConfigure
07-06 09:08:51.372 478 1871 D SurfaceUtils: connecting to surface 0xb400e1947c098230, reason connectToSurface
07-06 09:08:51.372 478 1871 I MediaCodec: [c2.v4l2.avc.decoder] setting surface generation to 489473
07-06 09:08:51.372 478 1871 D SurfaceUtils: disconnecting from surface 0xb400e1947c098230, reason connectToSurface(reconnect)
07-06 09:08:51.372 478 1871 D SurfaceUtils: connecting to surface 0xb400e1947c098230, reason connectToSurface(reconnect)
07-06 09:08:51.373 478 1872 D CCodec : [c2.v4l2.avc.decoder] buffers are bound to CCodec for this session
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for durationUs
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for frame-count
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for track-id
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for language
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for display-width
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for display-height
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for csd-1
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for native-window
07-06 09:08:51.373 478 1872 D CCodecConfig: no c2 equivalents for flags
07-06 09:08:51.373 478 1872 D CCodecConfig: c2 config diff is c2::u32 coded.pl.level = 20488
07-06 09:08:51.373 478 1872 D CCodecConfig: c2::u32 coded.pl.profile = 20481
07-06 09:08:51.373 478 1872 D CCodecConfig: c2::u32 raw.size.height = 270
07-06 09:08:51.373 478 1872 D CCodecConfig: c2::u32 raw.size.width = 480
07-06 09:08:51.374 478 1872 D CCodec : client requested max input size 14850, which is smaller than what component recommended (1048576); overriding with component recommendation.
07-06 09:08:51.374 478 1872 W CCodec : This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
07-06 09:08:51.374 478 1872 D CCodec : setup formats input: AMessage(what = 0x00000000) = {
07-06 09:08:51.374 478 1872 D CCodec : int32_t height = 270
07-06 09:08:51.374 478 1872 D CCodec : int32_t level = 256
07-06 09:08:51.374 478 1872 D CCodec : int32_t max-input-size = 1048576
07-06 09:08:51.374 478 1872 D CCodec : string mime = “video/avc”
07-06 09:08:51.374 478 1872 D CCodec : int32_t profile = 65536
07-06 09:08:51.374 478 1872 D CCodec : int32_t width = 480
07-06 09:08:51.374 478 1872 D CCodec : Rect crop(0, 0, 479, 269)
07-06 09:08:51.374 478 1872 D CCodec : } and output: AMessage(what = 0x00000000) = {
07-06 09:08:51.374 478 1872 D CCodec : int32_t android._video-scaling = 1
07-06 09:08:51.374 478 1872 D CCodec : Rect crop(0, 0, 479, 269)
07-06 09:08:51.374 478 1872 D CCodec : int32_t color-standard = 4
07-06 09:08:51.374 478 1872 D CCodec : int32_t color-range = 2
07-06 09:08:51.374 478 1872 D CCodec : int32_t color-transfer = 3
07-06 09:08:51.374 478 1872 D CCodec : int32_t height = 270
07-06 09:08:51.374 478 1872 D CCodec : string mime = “video/raw”
07-06 09:08:51.374 478 1872 D CCodec : int32_t rotation-degrees = 0
07-06 09:08:51.374 478 1872 D CCodec : int32_t sar-height = 1
07-06 09:08:51.374 478 1872 D CCodec : int32_t sar-width = 1
07-06 09:08:51.374 478 1872 D CCodec : int32_t width = 480
07-06 09:08:51.374 478 1872 D CCodec : int32_t android._dataspace = 259
07-06 09:08:51.374 478 1872 D CCodec : int32_t color-format = 2130708361
07-06 09:08:51.374 478 1872 D CCodec : }
07-06 09:08:51.374 478 1871 I MediaCodec: MediaCodec will operate in async mode
07-06 09:08:51.374 378 960 V V4L2DecodeComponent: start()
07-06 09:08:51.377 378 1873 V V4L2DecodeComponent: startTask()
07-06 09:08:51.378 378 1873 V V4L2Decoder: V4L2Decoder()
07-06 09:08:51.378 378 1873 V V4L2Decoder: start(codec=H264, inputBufferSize=1048576)
07-06 09:08:51.379 378 1873 V V4L2Decoder: setupInputFormat(inputPixelFormat=875967048, inputBufferSize=1048576)
07-06 09:08:51.380 378 1873 V V4L2Decoder: setState(Idle)
07-06 09:08:51.380 378 1873 V V4L2Decoder: serviceDeviceTask(event=0) state=Idle InputQueue(streamon):16+0/16, OutputQueue(streamoff):0+0/0
07-06 09:08:51.380 478 1872 W Codec2Client: query – param skipped: index = 1342179345.
07-06 09:08:51.380 478 1872 W Codec2Client: query – param skipped: index = 2415921170.
07-06 09:08:51.380 478 1872 W Codec2Client: query – param skipped: index = 1073743886.
07-06 09:08:51.380 478 1872 W Codec2Client: query – param skipped: index = 1610614798.
07-06 09:08:51.381 478 1872 W Codec2Client: query – param skipped: index = 2684356609.
07-06 09:08:51.381 478 1872 D CCodecBufferChannel: [c2.v4l2.avc.decoder#61] Using basic input block pool with poolID 0 => got 0 - OK (0)
07-06 09:08:51.372 378 378 I HwBinder:378_4: type=1400 audit(0.0:24): avc: denied { search } for name="/" dev=“cgroup2” ino=1 scontext=u:r:mediacodec:s0 tcontext=u:object_r:cgroup_bpf:s0 tclass=dir permissive=1
07-06 09:08:51.394 478 1872 I VendorAllocatorLoader: Create(): Failed to load library: libv4l2_codec2_vendor_allocator.so
07-06 09:08:51.394 478 1872 I V4L2PluginStore: createAllocator(): Fallback to create C2AllocatorGralloc (id=21)
07-06 09:08:51.395 478 1872 I V4L2PluginStore: createAllocator(): Fallback to create C2AllocatorGralloc (id=20)
07-06 09:08:51.395 478 1872 D CCodecBufferChannel: [c2.v4l2.avc.decoder#61] Configured output block pool ids 1 => OK
07-06 09:08:51.395 478 1872 D Codec2-OutputBufferQueue: remote graphic buffer migration 0/0
07-06 09:08:51.396 478 1872 D Codec2Client: generation remote change 489473
07-06 09:08:51.396 478 1871 W ResourceManagerService: Ignoring request to add new resource entry with value <= 0
07-06 09:08:51.408 378 960 E ion : ioctl c0044901 failed with code -1: Inappropriate ioctl for device
07-06 09:08:51.409 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:51.409 378 1873 V V4L2DecodeComponent: queueTask(): flags=0x80000000, index=0, timestamp=0
07-06 09:08:51.409 378 1873 V V4L2DecodeComponent: pumpPendingWorks()
07-06 09:08:51.409 378 1873 V V4L2DecodeComponent: Process C2Work bitstreamId=0 isCSDWork=1, isEmptyWork=0
07-06 09:08:51.409 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:51.409 378 1873 V V4L2DecodeComponent: No Color Description in SPS
07-06 09:08:51.409 378 1873 V V4L2Decoder: decode(id=0)
07-06 09:08:51.409 378 1873 V V4L2Decoder: setState(Decoding)
07-06 09:08:51.409 378 1873 I V4L2Decoder: Set state Idle => Decoding
07-06 09:08:51.410 378 1873 V V4L2Decoder: pumpDecodeRequest()
07-06 09:08:51.410 378 1873 V V4L2Decoder: QBUF to input queue, bitstreadId=0
07-06 09:08:51.410 378 1873 V V4L2Decoder: Set bytes_used=29, offset=0
07-06 09:08:51.410 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:51.410 378 378 V V4L2DecodeComponent: queue_nb()
07-06 09:08:51.450 378 1873 V V4L2DecodeComponent: queueTask(): flags=0x80000000, index=1, timestamp=0
07-06 09:08:51.450 378 1873 V V4L2DecodeComponent: pumpPendingWorks()
07-06 09:08:51.450 378 1873 V V4L2DecodeComponent: Process C2Work bitstreamId=1 isCSDWork=1, isEmptyWork=0
07-06 09:08:51.450 378 1873 V V4L2DecodeComponent: NALU is not SPS
07-06 09:08:51.450 378 1873 V V4L2Decoder: decode(id=1)
07-06 09:08:51.451 378 1873 V V4L2Decoder: pumpDecodeRequest()
07-06 09:08:51.451 378 1873 V V4L2Decoder: QBUF to input queue, bitstreadId=1
07-06 09:08:51.451 378 1873 V V4L2Decoder: Set bytes_used=8, offset=0
07-06 09:08:51.655 378 1873 V V4L2DecodeComponent: queueTask(): flags=0x0, index=2, timestamp=0
07-06 09:08:51.655 378 1873 V V4L2DecodeComponent: pumpPendingWorks()
07-06 09:08:51.655 378 1873 V V4L2DecodeComponent: Process C2Work bitstreamId=2 isCSDWork=0, isEmptyWork=0
07-06 09:08:51.655 378 1873 V V4L2Decoder: decode(id=2)
07-06 09:08:51.655 378 1873 V V4L2Decoder: pumpDecodeRequest()
07-06 09:08:51.656 378 1873 V V4L2Decoder: QBUF to input queue, bitstreadId=2
07-06 09:08:51.656 378 1873 V V4L2Decoder: Set bytes_used=13740, offset=0
01-01 00:00:52.422 0 0 I chatty : uid=0(root) logd identical 1 line
01-01 00:00:53.728 0 0 E mmc0 : error -84 whilst initialising SD card
01-01 00:00:54.781 0 0 W meson-vdec ff620000.video-decoder: esparser: input parsing error
07-06 09:08:51.718 395 572 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.GalleryActivity#0 disconnect: not connected (req=1)
07-06 09:08:51.718 1813 1839 W libEGL : EGLNativeWindowType 0xe51958c89440 disconnect failed
07-06 09:08:51.728 1813 1813 V StateManager: saveState
07-06 09:08:51.728 1813 1813 V StateManager: saveState class com.android.gallery3d.app.AlbumSetPage
07-06 09:08:51.729 1813 1813 V StateManager: saveState class com.android.gallery3d.app.FilmstripPage
07-06 09:08:51.740 574 1250 E TaskPersister: File error accessing recents directory (directory doesn’t exist?).
07-06 09:08:51.863 378 1873 V V4L2DecodeComponent: queueTask(): flags=0x0, index=3, timestamp=33333
07-06 09:08:51.865 378 1873 V V4L2DecodeComponent: pumpPendingWorks()
07-06 09:08:51.865 378 1873 V V4L2DecodeComponent: Process C2Work bitstreamId=3 isCSDWork=0, isEmptyWork=0
07-06 09:08:51.865 378 1873 V V4L2Decoder: decode(id=3)
07-06 09:08:51.865 378 1873 V V4L2Decoder: pumpDecodeRequest()
07-06 09:08:51.865 378 1873 V V4L2Decoder: QBUF to input queue, bitstreadId=3
07-06 09:08:51.865 378 1873 V V4L2Decoder: Set bytes_used=276, offset=0
01-01 00:00:54.985 0 0 W meson-vdec ff620000.video-decoder: esparser: input parsing error
01-01 00:00:55.044 0 0 E mmc0 : error -84 whilst initialising SD card
01-01 00:00:55.193 0 0 W meson-vdec ff620000.video-decoder: esparser: input parsing error
07-06 09:08:52.078 378 1873 V V4L2Decoder: serviceDeviceTask(event=0) state=Decoding InputQueue(streamon):12+4/16, OutputQueue(streamoff):0+0/0
07-06 09:08:52.279 378 1873 V V4L2Decoder: DQBUF from input queue, bitstreamId=0
07-06 09:08:52.280 378 1873 V V4L2DecodeComponent: onDecodeDone(bitstreamId=0, status=OK)
07-06 09:08:52.282 378 1873 V V4L2DecodeComponent: pumpReportWork()
07-06 09:08:52.282 378 1873 V V4L2DecodeComponent: reportWorkIfFinished(bitstreamId = 0)
07-06 09:08:52.282 378 1873 V V4L2DecodeComponent: work(0): inputReleased: 1, outputReturned: 0, ignoreOutput: 1
07-06 09:08:52.282 378 1873 V V4L2DecodeComponent: reportWork(work=0)
07-06 09:08:52.283 378 1873 V V4L2Decoder: DQBUF from input queue, bitstreamId=1
07-06 09:08:52.283 378 1873 V V4L2DecodeComponent: onDecodeDone(bitstreamId=1, status=OK)
07-06 09:08:52.283 378 1873 V V4L2DecodeComponent: pumpReportWork()
07-06 09:08:52.283 378 1873 V V4L2DecodeComponent: reportWorkIfFinished(bitstreamId = 1)
07-06 09:08:52.284 378 1873 V V4L2DecodeComponent: work(1): inputReleased: 1, outputReturned: 0, ignoreOutput: 1
07-06 09:08:52.284 378 1873 V V4L2DecodeComponent: reportWork(work=1)
07-06 09:08:52.285 378 1873 V V4L2Decoder: DQBUF from input queue, bitstreamId=2
07-06 09:08:52.285 378 1873 V V4L2DecodeComponent: onDecodeDone(bitstreamId=2, status=OK)
07-06 09:08:52.285 378 1873 V V4L2DecodeComponent: pumpReportWork()
07-06 09:08:52.285 378 1873 V V4L2Decoder: DQBUF from input queue, bitstreamId=3
07-06 09:08:52.285 378 1873 V V4L2DecodeComponent: onDecodeDone(bitstreamId=3, status=OK)
07-06 09:08:52.286 378 1873 V V4L2DecodeComponent: pumpReportWork()
07-06 09:08:52.286 378 1873 V V4L2Decoder: serviceDeviceTask(event=0) state=Decoding InputQueue(streamon):16+0/16, OutputQueue(streamoff):0+0/0
07-06 09:08:52.286 378 1873 V V4L2Decoder: serviceDeviceTask(event=1) state=Decoding InputQueue(streamon):16+0/16, OutputQueue(streamoff):0+0/0
07-06 09:08:52.286 378 1873 V V4L2Decoder: dequeueResolutionChangeEvent()
07-06 09:08:52.286 378 1873 V V4L2Decoder: changeResolution()
07-06 09:08:52.286 378 1873 V V4L2Decoder: getFormatInfo()
07-06 09:08:52.287 378 1873 V V4L2Decoder: getNumOutputBuffers()
07-06 09:08:52.287 378 1873 V V4L2Decoder: getNumOutputBuffers() V4L2_CID_MIN_BUFFERS_FOR_CAPTURE returns 9
07-06 09:08:52.287 378 1873 V V4L2Decoder: getVisibleRect()
07-06 09:08:52.287 378 1873 V V4L2Decoder: Fallback to VIDIOC_G_CROP
07-06 09:08:52.287 378 1873 W V4L2Decoder: ioctl() VIDIOC_G_CROP failed
07-06 09:08:52.287 378 1873 I V4L2Decoder: Need 13 output buffers. coded size: 480x270, visible rect: (0,0) 480x270
07-06 09:08:52.287 478 1587 D PipelineWatcher: onInputBufferReleased: frameIndex not found (0); ignored
07-06 09:08:52.289 378 1873 V V4L2DecodeComponent: getVideoFramePool()
07-06 09:08:52.289 378 1873 I V4L2DecodeComponent: Using C2BlockPool ID = 1 for allocating output buffers
07-06 09:08:52.290 378 1873 V VideoFramePool: requestNewBufferSet() blockPool.getAllocatorId() = 17
07-06 09:08:52.290 378 1873 E VideoFramePool: requestNewBufferSet() blockPool.getAllocatorId() = 17 21 18 22 17 19 Rajiv
07-06 09:08:52.290 378 1873 E VideoFramePool: requestNewBufferSet(): unknown allocator ID: 17
07-06 09:08:52.290 378 1873 E V4L2Decoder: Failed to get block pool with size: 480x270
07-06 09:08:52.290 378 1873 V V4L2Decoder: onError()
07-06 09:08:52.290 378 1873 V V4L2Decoder: setState(Error)
07-06 09:08:52.290 378 1873 I V4L2Decoder: Set state Decoding => Error
07-06 09:08:52.290 378 1873 E V4L2DecodeComponent: reportError(error=14)
07-06 09:08:52.290 378 1873 V V4L2Decoder: serviceDeviceTask(event=1) state=Error InputQueue(streamon):16+0/16, OutputQueue(streamon):13+0/13
07-06 09:08:52.291 378 1873 I chatty : uid=1013(media) V4L2DecodeCompo identical 2 lines
07-06 09:08:52.291 378 1873 V V4L2Decoder: serviceDeviceTask(event=1) state=Error InputQueue(streamon):16+0/16, OutputQueue(streamon):13+0/13
07-06 09:08:52.291 378 1873 V V4L2Decoder: pumpDecodeRequest()
07-06 09:08:52.293 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:52.293 378 960 E V4L2DecodeComponent: Could not queue at state: ERROR
07-06 09:08:52.293 478 1871 W MediaCodec: Log queueInputBuffer error: 1
07-06 09:08:52.293 478 1587 D PipelineWatcher: onInputBufferReleased: frameIndex not found (4); ignored
07-06 09:08:52.294 478 1870 E NuPlayerDecoder: onInputBufferFetched: queueInputBuffer failed for [c2.v4l2.avc.decoder] (err=1, )
07-06 09:08:52.295 478 1866 E NuPlayer: received error(0x1) from video decoder, flushing(0), now shutting down
07-06 09:08:52.295 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:52.295 378 960 E V4L2DecodeComponent: Could not queue at state: ERROR
07-06 09:08:52.296 1813 1877 E MediaPlayerNative: error (1, 1)
07-06 09:08:52.296 478 1871 W MediaCodec: Log queueInputBuffer error: 1
07-06 09:08:52.296 478 1870 E NuPlayerDecoder: onInputBufferFetched: queueInputBuffer failed for [c2.v4l2.avc.decoder] (err=1, )
07-06 09:08:52.296 478 1866 E NuPlayer: received error(0x1) from video decoder, flushing(2), now shutting down
07-06 09:08:52.296 1813 1877 E MediaPlayerNative: error (1, 1)
07-06 09:08:52.296 1813 1813 E MediaPlayer: Error (1,1)
07-06 09:08:52.296 1813 1813 D VideoView: Error: 1,1
07-06 09:08:52.297 478 1587 D PipelineWatcher: onInputBufferReleased: frameIndex not found (5); ignored
07-06 09:08:52.301 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:52.302 378 960 E V4L2DecodeComponent: Could not queue at state: ERROR
07-06 09:08:52.302 478 1871 W MediaCodec: Log queueInputBuffer error: 1
07-06 09:08:52.302 478 1870 E NuPlayerDecoder: onInputBufferFetched: queueInputBuffer failed for [c2.v4l2.avc.decoder] (err=1, )
07-06 09:08:52.302 478 1587 D PipelineWatcher: onInputBufferReleased: frameIndex not found (6); ignored
07-06 09:08:52.302 478 1866 E NuPlayer: received error(0x1) from video decoder, flushing(2), now shutting down
07-06 09:08:52.303 1813 1877 E MediaPlayerNative: error (1, 1)
07-06 09:08:52.304 378 960 V V4L2DecodeComponent: queue_nb()
07-06 09:08:52.304 378 960 E V4L2DecodeComponent: Could not queue at state: ERROR
07-06 09:08:52.305 478 1871 W MediaCodec: Log queueInputBuffer error: 1
07-06 09:08:52.305 478 1870 E NuPlayerDecoder: onInputBufferFetched: queueInputBuffer failed for [c2.v4l2.avc.decoder] (err=1, )
07-06 09:08:52.305 478 1587 D PipelineWatcher: onInputBufferReleased: frameIndex not found (7); ignored
07-06 09:08:52.305 478 1866 E NuPlayer: received error(0x1) from video decoder, flushing(2), now shutting down
07-06 09:08:52.305 1813 1877 E MediaPlayerNative: error (1, 1)
07-06 09:08:52.306 378 960 V V4L2DecodeComponent: flush_sm()
07-06 09:08:52.307 378 960 E V4L2DecodeComponent: Could not flush at state: ERROR
07-06 09:08:52.308 478 1871 E MediaCodec: Codec reported err 0x80000000, actionCode 0, while in state 7
07-06 09:08:52.308 478 1871 D SurfaceUtils: disconnecting from surface 0xb400e1947c098230, reason disconnectFromSurface
07-06 09:08:52.309 478 1871 W MediaCodec: received FlushCompleted message in state 0
07-06 09:08:52.309 478 1870 E NuPlayerDecoder: failed to flush [c2.v4l2.avc.decoder] (err=-2147483648)
07-06 09:08:52.309 478 1866 E NuPlayer: received error(0x80000000) from video decoder, flushing(2), now shutting down
07-06 09:08:52.310 1813 1877 E MediaPlayerNative: error (1, -2147483648)
07-06 09:08:52.311 378 960 V V4L2DecodeComponent: release()
07-06 09:08:52.312 378 960 V V4L2DecodeComponent: reset()
07-06 09:08:52.312 378 960 V V4L2DecodeComponent: stop()
07-06 09:08:52.313 378 1873 V V4L2DecodeComponent: stopTask()
07-06 09:08:52.313 378 1873 V V4L2DecodeComponent: reportAbandonedWorks()
07-06 09:08:52.314 378 1873 V V4L2Decoder: ~V4L2Decoder()
07-06 09:08:52.327 478 1872 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
07-06 09:08:52.327 378 960 V V4L2DecodeComponent: ~V4L2DecodeComponent()
07-06 09:08:52.327 378 960 V V4L2DecodeComponent: ~V4L2DecodeComponent() done
07-06 09:08:52.329 478 1870 D SurfaceUtils: connecting to surface 0xb400e1947c098230, reason onShutdown
07-06 09:08:52.343 1813 1813 E MediaPlayer: Error (1,1)
07-06 09:08:52.343 1813 1813 D VideoView: Error: 1,1
07-06 09:08:52.390 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.409 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.422 1813 1813 E MediaPlayer: Error (1,1)
07-06 09:08:52.422 1813 1813 D VideoView: Error: 1,1
07-06 09:08:52.439 1813 1813 E MediaPlayer: Error (1,1)
07-06 09:08:52.439 1813 1813 D VideoView: Error: 1,1
07-06 09:08:52.452 1813 1813 E MediaPlayer: Error (1,-2147483648)
07-06 09:08:52.452 1813 1813 D VideoView: Error: 1,-2147483648
07-06 09:08:52.484 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.507 1813 1839 I chatty : uid=10100(com.android.gallery3d) RenderThread identical 1 line
07-06 09:08:52.524 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.559 395 572 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.MovieActivity#1 disconnect: not connected (req=1)
07-06 09:08:52.559 1813 1839 W libEGL : EGLNativeWindowType 0xe51958c89440 disconnect failed
07-06 09:08:52.559 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.572 395 572 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.MovieActivity#2 disconnect: not connected (req=1)
07-06 09:08:52.572 1813 1839 W libEGL : EGLNativeWindowType 0xe51958d15c60 disconnect failed
07-06 09:08:52.572 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.591 395 407 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.MovieActivity#3 disconnect: not connected (req=1)
07-06 09:08:52.591 1813 1839 W libEGL : EGLNativeWindowType 0xe51958d0b210 disconnect failed
07-06 09:08:52.592 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.609 395 1249 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.MovieActivity#4 disconnect: not connected (req=1)
07-06 09:08:52.609 1813 1839 W libEGL : EGLNativeWindowType 0xe51958d09000 disconnect failed
07-06 09:08:52.610 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
07-06 09:08:52.624 395 407 E BufferQueueProducer: com.android.gallery3d/com.android.gallery3d.app.MovieActivity#5 disconnect: not connected (req=1)
07-06 09:08:52.624 1813 1839 W libEGL : EGLNativeWindowType 0xe51958d206b0 disconnect failed
07-06 09:08:52.624 1813 1839 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
01-01 00:00:55.405 0 0 W meson-vdec ff620000.video-decoder: esparser: input parsing error
01-01 00:00:56.351 0 0 E mmc0 : error -84 whilst initialising SD card
07-06 09:08:54.271 574 1295 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
07-06 09:09:00.010 743 743 D KeyguardClockSwitch: Updating clock: 909
07-06 09:09:21.949 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.093 574 1880 I chatty : uid=1000(system) BackgroundDexOp identical 29 lines
07-06 09:09:22.101 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.135 1643 1662 I PermissionControllerServiceImpl: Updating user sensitive for user 0
07-06 09:09:22.142 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.155 574 1880 I chatty : uid=1000(system) BackgroundDexOp identical 3 lines
07-06 09:09:22.160 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.163 1643 1883 I LancherPackagesLiveData: updating LauncherPackageLiveData
07-06 09:09:22.163 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.165 1643 1882 I UserPackageInfos: updating UserPackageInfosLiveData for user 0
07-06 09:09:22.169 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.293 574 1880 I chatty : uid=1000(system) BackgroundDexOp identical 35 lines
07-06 09:09:22.297 574 1880 I system_server: The ClassLoaderContext is a special shared library.
07-06 09:09:22.298 574 1880 I BackgroundDexOptService: Pinning optimized code {}
/
/

@tenk.wang, @jasonl, @goenjoy

Hi, Seeking help here. I am kind of stuck to proceed further and did not get much info from the Android 11 support forums as well. Kindly provide any suggestions. Thank you.

Also, from another thread, I know that Codec 2.0 testing is being done on Android 12 in VIM3 platform. Am eager to know if that has been successful as well.

Yes, it’s under development.

Hi Tenk,

Is there a timeline on when this will be available? Really waiting for this as there are couple of customers looking for this and we are evaluating platforms with this support.

Codec2. Android11 does not yet support Codec2. Our kernel is
ready for Codec2, but Android11 does not have a working Codec2 HAL
implementation yet. We are hoping that Google will have this fully
ready for Android12, but do not know for sure yet if this will happen.

2 Likes

Hi Tenk,

Thanks for the update, looking for further progress in this.

Could you let me know how we can test codec 2 from kernel without using HAL? It will help us in showcasing the same.

Hi,

Is there any update on Codec2 support in VIM3 with the latest release of Android 12 from Google?

Regards,
Anoop G

@Anoop At present,Still testing.
You can test it.
commands:

$ export MANIFEST=https://android.googlesource.com/platform/manifest
$ repo init --config-name -u $MANIFEST -b android-12.0.0_r7 --partial-clone --clone-filter=blob:limit=10M
$ repo sync -cd -j5

$ source build/envsetup.sh
$ lunch yukawa-userdebug
$ make TARGET_USE_TABLET_LAUNCHER=true TARGET_VIM3=true TARGET_KERNEL_USE=5.4 //make TARGET_USE_TABLET_LAUNCHER=true TARGET_VIM3L=true TARGET_KERNEL_USE=5.4

@tenk.wang Is this limited to the r7 branch? I’m on r13 and I still see sw decoding - I don’t see it trying hardware:

PID USER PR NI VIRT RES SHR S[%CPU] %MEM TIME+ ARGS
527 mediacodec 20 0 11G 31M 20M S 90.0 0.8 0:20.21 media.swcodec oid.media.swcodec/bin/mediaswcodec
1958 u0_a47 10 -10 48G 357M 265M R 64.6 9.3 0:42.29 org.chromium.webview_shell
1986 u0_i9000 20 0 1.3G 171M 89M S 42.6 4.4 0:34.47 com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService+
435 system -3 -8 11G 61M 39M S 32.3 1.5 0:38.01 surfaceflinger

Additionally are these required: --partial-clone --clone-filter=blob:limit=10M ? I’ve never included them in my builds.

Thanks

@Gustavo
First, to make sure we talk about the same thing. Can you Post your build commands?

@tenk.wang

Here’s what I’m doing:

2054 . ./build/envsetup.sh
2055 lunch yukawa-userdebug
2056 make TARGET_USE_TABLET_LAUNCHER=true TARGET_VIM3=true TARGET_KERNEL_USE=5.4 -j40

I’m thinking I need to add Codec 2.0 to device/amlogic/yukawa/manifest.xml ?

Is there any progress on this? I have managed to enable v4l2 codecs and get them loaded but have failed to decode h264 with either 5.4 or 5.10 kernel