Codec 2.0 support in VIM3

Hi, I am planning to flash Android 11 on Khadas VIM 3. Does VIM3 support Codec 2.0? Or do I have to live with OMX until Khadas comes up with a newer board with Codec 2.0 support? Any help is apprecieated.

@terry @goenjoy @jasonl @tenk.wang Please help to check.

1 Like

@Anoop 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.

1 Like

Thank you @tenk.wang. This helps!

@Tenk.Wang: While building Android 11 for VIM3, I could find that the Codec 2 source is available - frameworks/av/media/codec2. I am using r38. I am trying to understand if you have codec2 based hw avc/hevc implementation in the VIM3 reference board?

@Anoop I’m test Android 12 next week on VIM3 board,and feedback about Codec 2.

2 Likes

@Anoop You can try this patch.

I tested Android 12, is not support Codec 2 yet.and some error report.

1 Like

OK. With Android 11, we could get the service up. But when trying to play a sample AVC file, it crashed.

06-28 11:33:40.647 474 2246 D C2PlatformStorePluginLoader: Failed to load library: libc2plugin_store.so (dlopen failed: library “libc2plugin_store.so” not found)
--------- beginning of crash
06-28 11:33:40.647 474 2246 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2246 (CodecLooper), pid 474 (mediaserver)

Did a work around - Copied all dynamic libraries to /system/lib64/ as below.

  1. cp /vendor/lib64/libc2plugin_store.so /system/lib64/
  2. cp /vendor/lib64/libstagefright_bufferpool@1.0.so /system/lib64/
  3. cp ./apex/com.android.vndk.v30/lib64/android.hardware.media.bufferpool@1.0.so /system/lib64/

After above step, playback is failing as below.

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
06-28 11:52:10.960 383 2435 I chatty : uid=1013(media) V4L2DecodeCompo identical 1 line
06-28 11:52:10.960 383 2435 W V4L2DecodeComponent: Could not pump C2Work at state: ERROR
06-28 11:52:10.968 383 1110 E V4L2DecodeComponent: Could not queue at state: ERROR
06-28 11:52:10.968 2384 2433 W MediaCodec: Log queueInputBuffer error: 1
06-28 11:52:10.968 2384 2402 D PipelineWatcher: onInputBufferReleased: frameIndex not found (8); ignored
06-28 11:52:10.968 2384 2432 E NuPlayerDecoder: onInputBufferFetched: queueInputBuffer failed for [c2.v4l2.avc.decoder] (err=1, )
06-28 11:52:10.968 2384 2428 E NuPlayer: received error(0x1) from video decoder, flushing(0), now shutting down
06-28 11:52:10.969 1916 2263 E MediaPlayerNative: error (1, 1)
06-28 11:52:10.969 1916 1916 E MediaPlayer: Error (1,1)
06-28 11:52:10.969 1916 1916 D VideoView: Error: 1,1
06-28 11:52:10.969 383 1110 E V4L2DecodeComponent: Could not flush at state: ERROR
06-28 11:52:10.970 2384 2433 E MediaCodec: Codec reported err 0x80000000, actionCode 0, while in state 7

Any suggestion? - Thank you. - Any other method to test Codec2 playback?

Hi,

Is there any active progress in codec 2 support for VIM3 board? Is it supported? I am also looking at codec 2 support in VIM3 board.

@rajiv Codec 2.0 HW decoder failure Android 11 - #3 by Anoop