Project

General

Profile

Hardware video encoding/decoding on i9100

Added by Anton Fischer over 10 years ago

Hello everyone,

I've installed Replicant 4.2 on my Galaxy S2, and I am becoming a fan of the project :)
However, as there is currently no free implementation of hardware media encoding/decoding, I installed the proprietary firmware mfc_fw.bin from the corresponding version of CyanogenMod (10.1.3 if I am not mistaken). However, I still can't play videos on my device, nor record any video using the built-in camera. Trying to understand why, I noticed that when I try to play a video, logs complain about the graphical buffer:

W/GraphicBufferAllocator( 1842): WOW! gralloc alloc failed, waiting for pending frees!
W/GraphicBufferAllocator( 1842): alloc(848, 480, 842094169, 21002930, ...) failed -22 (Invalid argument)
E/SurfaceFlinger( 1842): GraphicBufferAlloc::createGraphicBuffer(w=848, h=480) failed (Invalid argument), handle=0x0

followed by many warnings and errors from BufferQueue and SoftwareRenderer.

Is anybody able to play/record videos on an i9100?

Thank you very much in advance!


Replies (4)

RE: Hardware video encoding/decoding on i9100 - Added by looking_for freedom over 10 years ago

Probably Paul will know some technical details, so please wait for his answer.

I just would like to comment that a little piece of closed source/propietary/privative software is a risk for the freedom of whole the operating system, and destroys the tarjet of building a 100% free software operating system. Replicant users use Replicant because freedom/privacy is more important for them than other points.

I mean, if having hardware video acceleration is more important for you than having a 100% free software operating system, then probably Replicant is not for you. Perhaps you could consider using other operating systems that already have hardware video acceleration by default, but are not centered in freedom.

RE: Hardware video encoding/decoding on i9100 - Added by Zrab Zrab about 10 years ago

Most probably Paul K will tell you that Replicant doesn't provide support for blobs, nor that it encourages it.

I am not 100% sure, but I think the problem is that the EGL implementation of Android is less than imcomplete (normally only a fallback solution). Thus, your blob asks for features which are not/bad implemented. Thus, nothing works actually.

RE: Hardware video encoding/decoding on i9100 - Added by Paul Kocialkowski about 10 years ago

Probably Paul will know some technical details, so please wait for his answer.

I'm behind on answering emails and posts, as usual.

I just would like to comment that a little piece of closed source/propietary/privative software is a risk for the freedom of whole the operating system, and destroys the tarjet of building a 100% free software operating system. Replicant users use Replicant because freedom/privacy is more important for them than other points.

Keep in mind that he's talking about a firmware, not software running on the main CPU. It might be a risk for security/privacy as it very likely can access DMA, but I bet there are plenty other firmwares (preinstalled in the chips) that have access to that as well and present the same risks. These other firmwares are also an issue for freedom, unless you decided to make an exception for them as they are read-only. Even with Replicant, there are such proprietary firmwares running!

The thing with the MFC firmware is that it has to be loaded by the system and shipped with the system, which we don't do for the sake of not encouraging and distributing proprietary software.

You shouldn't assume that Replicant makes your device 100% free, because it does not. Devices running Replicant all still run proprietary software, to a different extent. Some still have proprietary bootloaders, some don't (e.g. GTA04) but all of them have chips that run preinstalled proprietary firmwares and a proprietary modem operating system. As a side note, to be complete on that topic, on Samsung devices, the modem firmware (non-free) is actually loaded by Replicant onto the modem (it is not distributed with the system but is rather preinstalled on the phone).

I mean, if having hardware video acceleration is more important for you than having a 100% free software operating system, then probably Replicant is not for you. Perhaps you could consider using other operating systems that already have hardware video acceleration by default, but are not centered in freedom.

I usually reserve that statement for people who want to run proprietary software on the CPU on top of Replicant.

I am not 100% sure, but I think the problem is that the EGL implementation of Android is less than imcomplete (normally only a fallback solution). Thus, your blob asks for features which are not/bad implemented. Thus, nothing works actually.

Yes that's about right, the issue is that the pixel format requested isn't provided by the software implementation. It is already on my road map to try and fix this, but I have other priorities for now.
Note that software video decoding (without proprietary software) doesn't work at all on Replicant 4.2.

RE: Hardware video encoding/decoding on i9100 - Added by Anton Fischer about 10 years ago

Many thanks for all these explanations!

I understand that the firmware is not enough to make hardware video encoding/decoding work; at this time only a proprietary userspace blob will do; and this is to be excluded. I'll wait until a new version of the free EGL implementation supports it, this is not an essential feature anyway.

Thank you for all the good work.

    (1-4/4)