Closed Bug 820236 Opened 9 years ago Closed 4 years ago
Implement color conversion routine for OMX format 0x2c used by some Samsung GB devices to enable hardware acceleration on Android
This is a followup to bug 787228 and 803384. Some Samsung Gingerbread based Android devices use color conversion format 0x2c. To enable playback using the hardware decoder we'd need to implement this. Currently playback is done using the stagefright software decoder on these devices. Two known devices are: Samsung Galaxy S II running GB 2.3.4 Galaxy Note running GB 2.3.5
I've looked into the approach I took with Gingerbread-based B2G on the Galaxy S2, but the Android permissions system doesn't allow it. Specifically, I was mapping the virtual addresses handed back by the decoder into the /dev/s3c-mfc device, which is owned by system/graphics. Unfortunately Android doesn't provide any way to add ourselves to the graphics group. The decoder also gives us the memory location of the android_native_buffer_t which contains the decoded frame, but we can't do anything about that; again due to Android security. So back at square 1. Will investigate other options.
Okay. I've looked into it a little bit further and it looks like there's a way to do this which might take a bit of doing. We can extend Android's ISurface, which we can then pass to a remote renderer which will draw into that surface for us. I didn't think this was possible before due to terrible (read: no) documentation, but after some experimentation it looks like it's a thing. Appears to be <=Gingerbread only though. Will experiment more on Monday.
VLC source has code for SGS 2 that does: OMX_BOOL enable = OMX_TRUE; /* Needed on Samsung Galaxy S II */ omx_error = OMX_SetConfig(omx_handle, OMX_IndexVendorSetYUV420pMode, &enable); if (omx_error == OMX_ErrorNone) msg_Dbg(p_dec, "Set OMX_IndexVendorSetYUV420pMode successfully"); else msg_Dbg(p_dec, "Unable to set OMX_IndexVendorSetYUV420pMode: %x", omx_error); Do you know what IndexVendorSetYUV420pMode is, and if it can be tested via the stagefright interfaces we use? Something in IOMX?
Nice find. From the commit message: > omxil: Try to enable YUV420p mode on Samsung Galaxy S II > > This is similar to the ThumbnailMode on Nexus S, except that > the index doesn't seem to be queryable dynamically > (I don't seem to find any string in the binaries that > would be the right one at least). Badass. Looks very much like it could be what we need. Will try tomorrow when I have access to the device.
Mass closing do to inactivity. Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.