Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
KODI 19 - Best way for implement HW Audio Decoder (HW Video Decoder is OK)
#1
Hi guys, I'm working on my hisilicon STB SoC Hi3798Cv200.
I maked a full rootfs Debian Buster for developer and added Enigma2, RetroArch and now KODI 19-alpha.
For now, I added support for HW Video Decoding on KODI and it's working good and I want add HW Audio Decoder too but my problem is, if I add support in DVDCodecs\Audio how I can handle AddData function? is possible get Audio ES?

Info
Image


Whitout HW Video Decoding
Image


With HW Video Decoding
Image
Reply
#2
Post a link to the source code would be a good start Smile

I assume it's the proprietory method to do decoding as it's a super old vendor kernel being used.
"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
Reply
#3
(2020-02-24, 16:56)lrusak Wrote: Post a link to the source code would be a good start Smile

I assume it's the proprietory method to do decoding as it's a super old vendor kernel being used.

No, decode method is recente but I'm using a external player to use in both (Enigma2 and Kodi).
The correct is use VDEC Driver direct for decoding and get compatibility with any system running with hisilicon soc, but for now I choose short path and with this I have possibility to me play channels and files using one instance for all.

Maybe after implement HW Audio Decoder I use the correct method.
But for now I think is possible use the same code in any Hisilicon with Enigma2, because I'm using DVB-API protocol for play files.

You can check code here: KODI for Hisilicon (Enigma2)
But I'm not input nothing for Audio yet.

My project is simple.
Debian as OS to use and compile any software.
Enigma2 as principal software, to view TV (You can open KODI or RetroArch from Enigma2)
AVServer as player, this is used by Enigma2, Kodi and gstreamer.

And if I want is possible change Kodi to principal software like a LibreELEC.

So, I hope this can help.
Reply
#4
You know that KODI does support PVR and retroArch kernels to play games, right? So instead of basing everything on Enigma you could just directly run KODI and basically do the same. Yes, there is no games library yet, but instead of working on this odd hybrid you could work on the games library as well Smile
Reply
#5
I don't really understand, you said you are using an external player but you have implemented CHiCodec and CDVDVideoCodecHisilicon? So are you not using those classes at all? As for audio you don't really need a hw audio decoder as ffmpeg will do all the decoding for you.

Unfortunately we don't accept custom decoder methods anymore as most vendors provide decoding methods via a central api (v4l2) and windowing through a generic EGL method. I'm not really sure what the state is for hi-silicon in the upstream kernel but for the most part if it doesn't run on the latest kernel it won't get support in Kodi Smile

I'm still interested in helping you out but I need to know what exactly you are wanting to implement.
"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
Reply
#6
(2020-02-24, 21:11)da-anda Wrote: You know that KODI does support PVR and retroArch kernels to play games, right? So instead of basing everything on Enigma you could just directly run KODI and basically do the same. Yes, there is no games library yet, but instead of working on this odd hybrid you could work on the games library as well Smile

Yes I know, but KODI not have full retroarch kernels support yet is still in development progress.
And for PVR, tvheadend works of course. But open channel by stream not is so fast like direct open by hisilicon demux api.

My focus not is RetroArch, he is very easy for compile I only maked a small patch and it's working.
I tink about use only KODI but for this I need make changes in tvheadend for use to direct play by hisilicon demux api and make a bypass on kodi.
This is in my plan too.
Reply
#7
(2020-02-24, 21:26)lrusak Wrote: I don't really understand, you said you are using an external player but you have implemented CHiCodec and CDVDVideoCodecHisilicon? So are you not using those classes at all? As for audio you don't really need a hw audio decoder as ffmpeg will do all the decoding for you.

Unfortunately we don't accept custom decoder methods anymore as most vendors provide decoding methods via a central api (v4l2) and windowing through a generic EGL method. I'm not really sure what the state is for hi-silicon in the upstream kernel but for the most part if it doesn't run on the latest kernel it won't get support in Kodi Smile

I'm still interested in helping you out but I need to know what exactly you are wanting to implement.

The class CHiCodec write in external player: /dev/player/video0
Yes, the KODI ffmpeg is decoding audio by cost of CPU usage, it's the same for video if I use KODI ffmpeg (but the video not will work good).
I want HW Audio Decode to save more CPU usage.

Is possible I receive Audio ES on DVDAudioCodec ?
Reply
#8
If you want I can explain bether the class CHiCodec.
In the future I will see to use the kernel driver directly, who knows hisilicon will not release support for v4l2 before that.
Reply
#9
Hi @leandrotsampa , not sure if you're still working on this but I added hardware video and audio acceleration for the Steam Link. You can see my work here: https://github.com/garbear/kodi-steamlin...eamlink-18
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#10
(2020-03-29, 17:41)garbear Wrote: Hi @leandrotsampa , not sure if you're still working on this but I added hardware video and audio acceleration for the Steam Link. You can see my work here: https://github.com/garbear/kodi-steamlin...eamlink-18
Hi @garbear, yes I'm still working on this.
I'm will check bether more late, but in one rapid check your implementation only supports h264 content?

Thanks for sharing Big Grin
Reply
#11
(2020-03-30, 05:03)leandrotsampa Wrote:
(2020-03-29, 17:41)garbear Wrote: Hi @leandrotsampa , not sure if you're still working on this but I added hardware video and audio acceleration for the Steam Link. You can see my work here: https://github.com/garbear/kodi-steamlin...eamlink-18
Hi @garbear, yes I'm still working on this.
I'm will check bether more late, but in one rapid check your implementation only supports h264 content?

Thanks for sharing Big Grin 

 
Yes, the SL, being built for game streaming, only needs h264 decoding.

Still, I figured the SL work might be useful to you, as our past gsoc student used it as the base of an attempt to port kodi to the switch. The code falls into place once you know where everything goes.
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#12
Yes, It's useful and easy for undestand.
I will check if I can use this as base, a big problem for me is the the hisiliicon is more equal AMLogic but api is more closed and limited. Big Grin
Thanks
Reply
#13
(2020-02-24, 05:28)leandrotsampa Wrote: Hi guys, I'm working on my hisilicon STB SoC Hi3798Cv200.
I maked a full rootfs Debian Buster for developer and added Enigma2, RetroArch and now KODI 19-alpha.
For now, I added support for HW Video Decoding on KODI and it's working good and I want add HW Audio Decoder too but my problem is, if I add support in DVDCodecs\Audio how I can handle AddData function? is possible get Audio ES?

Info
Image


Whitout HW Video Decoding
Image


With HW Video Decoding
Image

Hello Sir

can you tell me what is the model of your STb ??

and do you run kodi as plugin from Enigma2 or as seperate os ( openeleec , libreleec , etc ) ?

do you use Multiboot to boot different OS than Enigam2 ?

Thanks sir
Reply
#14
How did you loaded Enigma2 from Debian ?

or you need to switch between them ??
Reply
#15
(2020-07-02, 23:55)Midozalouk Wrote: How did you loaded Enigma2 from Debian ?

or you need to switch between them ??

Hi, I'm using STB Atto Pixel (SoC: Hi3798Cv200) but I will add compatibility with STB Atto Pixel Premium (SoC: Hi3798Mv200) too.
All this is very simple, I put Debian without interface and install all the rest as a systemd service.
And yes, from Enigma2 you can open KODI or RetroArch (and can install anything in Debian too ;P).
You can change to boot KODI with TVheadend or RetroArch if you not want Enigma2.
You can see more info here: GitHub
Reply

Logout Mark Read Team Forum Stats Members Help
KODI 19 - Best way for implement HW Audio Decoder (HW Video Decoder is OK)0