[libbluray-devel] JRE for Android part 3

Petri Hintukainen phintuka at users.sourceforge.net
Sun Jan 31 15:14:44 UTC 2021


su, 2021-01-31 kello 11:06 -0300, Vitor Dall'Acqua kirjoitti:
> Already tested your latest commits, Petri. Much faster and the logs
> are much cleaner. Thank you.

I wrote those changes long time ago, but I didn't notice any measurable
speedup (not even when playing .iso over SMB). I guess the difference
is you're not using mounted filesystem, so you don't have any OS level
caching.

> I'm still working my way with the hardware rendering. 
> Sadly I can't debug this on windows with visual studio,
> bitstreamconverter isn't used neither androidmediacodec obviously. 
> So, I'm back at changing things with a notepad, compiling and
> testing. 
> 
> 
> Here is a log of how the m2ts stream played from a playlist should
> work:
> 2021-01-31 10:45:20.913 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height
> 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile
> 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 115
> 2021-01-31 10:45:20.913 T:19521    INFO <general>:
> CBitstreamConverter::Open Invalid hvcC
> 2021-01-31 10:45:20.913 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.mp2.decoder
> 2021-01-31 10:45:20.917 T:13323    INFO <general>: [WHITELIST]
> Searching the whitelist for: width: 3840, height: 2160, fps: 23.976,
> 3D: false
> 2021-01-31 10:45:20.917 T:13323   DEBUG <general>: [WHITELIST] Using
> the default whitelist because the user whitelist is empty
> 2021-01-31 10:45:20.919 T:13323   DEBUG <general>: [WHITELIST]
> Searching for an exact resolution with an exact refresh rate
> 2021-01-31 10:45:20.920 T:13323   DEBUG <general>: [WHITELIST]
> Matched an exact resolution with an exact refresh rate 3840x2160 @
> 23.976025 - Full Screen (27)
> 2021-01-31 10:45:20.920 T:13323    INFO <general>: Display resolution
> ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)
> 2021-01-31 10:45:20.924 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.wma.decoder
> 2021-01-31 10:45:20.924 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.h264.decode
> 2021-01-31 10:45:20.925 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.DOVI.decode
> 2021-01-31 10:45:20.925 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.h263.decode
> 2021-01-31 10:45:20.926 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec::Open Testing
> codec:OMX.Nvidia.h265.decode
> 2021-01-31 10:45:20.927 T:13332   DEBUG <general>: Could not acquire
> timestamp
> 2021-01-31 10:45:21.073 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::Open
> m_codecname(OMX.Nvidia.h265.decode), colorFormat(2135033992)
> 2021-01-31 10:45:21.073 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::Open
> m_codecname(OMX.Nvidia.h265.decode), colorFormat(21)
> 2021-01-31 10:45:21.163 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::InjectExtraData
> 2021-01-31 10:45:21.220 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec:: width(3840), height(2160),
> stride(0), slice-height(0), color-format(0)
> 2021-01-31 10:45:21.220 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec:: crop-left(0), crop-top(0), crop-
> right(3839), crop-bottom(2159)
> 2021-01-31 10:45:21.220 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec:: Multi-Surface Rendering
> 2021-01-31 10:45:21.220 T:19521    INFO <general>:
> CDVDVideoCodecAndroidMediaCodec:: Open Android MediaCodec
> OMX.Nvidia.h265.decode
> 2021-01-31 10:45:21.220 T:19521   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::UpdateFpsDuration fpsRate:24000
> fpsscale:1001, fpsDur:41708
> 2021-01-31 10:45:21.221 T:19521   DEBUG <general>:
> CVideoPlayerVideo::OpenStream - open stream with codec id: 173
> 
> and this is how it works during a menu:
> 
> 
> 2021-01-31 10:33:58.032 T:13409    INFO <general>:
> ffmpeg[0x2965bbd040X]:   Duration: N/A, start: 600.000000, bitrate:
> N/A
> 2021-01-31 10:33:58.032 T:13409    INFO <general>:
> ffmpeg[0x2965bbd040X]:   Program 1 
> 2021-01-31 10:33:58.033 T:13409    INFO <general>:
> ffmpeg[0x2965bbd040X]:     Stream #0:0[0x1011]: Video: hevc (Main 10)
> (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084),
> 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98
> tbc
> 2021-01-31 10:33:58.033 T:13409   DEBUG <general>:
> CDVDDemuxFFmpeg::AddStream ID: 0
> 2021-01-31 10:33:58.033 T:13409    INFO <general>: Opening stream: 0
> source: 256
> 2021-01-31 10:33:58.033 T:13409    INFO <general>: [WHITELIST]
> Searching the whitelist for: width: 3840, height: 2160, fps: 23.976,
> 3D: false
> 2021-01-31 10:33:58.033 T:13409   DEBUG <general>: [WHITELIST] Using
> the default whitelist because the user whitelist is empty
> 2021-01-31 10:33:58.034 T:13409   DEBUG <general>: [WHITELIST]
> Searching for an exact resolution with an exact refresh rate
> 2021-01-31 10:33:58.034 T:13409   DEBUG <general>: [WHITELIST]
> Matched an exact resolution with an exact refresh rate 3840x2160 @
> 23.976025 - Full Screen (27)
> 2021-01-31 10:33:58.034 T:13409    INFO <general>: Display resolution
> ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)
> 2021-01-31 10:33:58.069 T:13409    INFO <general>: Creating video
> codec with codec id: 173
> 2021-01-31 10:33:58.071 T:13409   DEBUG <general>:
> CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height
> 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile
> 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 114
> 2021-01-31 10:33:58.071 T:13409    INFO <general>:
> CBitstreamConverter::Open Invalid hvcC
> 2021-01-31 10:33:58.073 T:13409   ERROR <general>:
> CDVDVideoCodecAndroidMediaCodec:: Failed to create Android MediaCodec
> 2021-01-31 10:33:58.074 T:13409    INFO <general>:
> CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video
> Coding)
> 2021-01-31 10:33:58.074 T:13409   DEBUG <general>:
> CDVDVideoCodecFFmpeg - Updated codec: ff-hevc
> 2021-01-31 10:33:58.074 T:13409   DEBUG <general>:
> CVideoPlayerVideo::OpenStream - open stream with codec id: 173
> 
> It's not the exact same stream but you get the idea. 
> It is failing to use the nvidia decoder: OMX.Nvidia.h265.decode and
> using ffmpeg as software rendering. 
> 
>  
> https://github.com/xbmc/xbmc/blob/c01b0f5778c7397325e29238a861d8dc62289e2b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
> 
> removing the goto fail results in crash. 
> basically it is failing to get m_codec. 
> 
> But as you can see the invalid hvcC isn't the problem. It must be
> something in this decoder instructions.

In some of the older logs it looks like codec extradata is missing when
opening the codec ?
And, in this log, there is one byte difference in extradata size.

Maybe you could log extradata size and few first bytes in
InjectExtradata() ?




More information about the libbluray-devel mailing list