t20-rtspd icon indicating copy to clipboard operation
t20-rtspd copied to clipboard

What do IMP_OSD_SetPoolSize and IMP_Encoder_SetPoolSize do?

Open Yannik opened this issue 4 years ago • 5 comments

Hi, I'm trying to port your modifications to the v4l2rtspserver used in the Xiaomi-Dafang-Hacks project.

Can you explain what the IMP_OSD_SetPoolSize and IMP_Encoder_SetPoolSize do? What purpose does this "pool size" have?

How did you determine the values used in your patch?

Yannik avatar Apr 12 '20 12:04 Yannik

To be honest, I have no idea -- these are undocumented functions that don't even exist officially in the provided SDK. The values used are the same values used by the Xiaofang firmware. It's likely that the manufacturer worked with Ingenic to get this information. As the name of the function implies, one is for the OSD layer and the other for Encoder.

I suspect that these numbers are lower than what is usually allocated in the models with more memory, because without them, memory allocation always seems to fail somewhere in the SDK.

geekman avatar Apr 13 '20 05:04 geekman

Okay, thanks. With how much rmem has this worked for you?

Yannik avatar Apr 13 '20 15:04 Yannik

What is this rmem, and where can I query it?

geekman avatar Apr 14 '20 09:04 geekman

cat /proc/cmdline i guess you're using the default setting if you have not changed this.

I explained what it is here: https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/pull/1323#issuecomment-612580385

Yannik avatar Apr 14 '20 09:04 Yannik

I didn't change the kernel cmdline. The default settings on the Xiaofang 1S firmware is:

mem=41700K@0x0 ispmem=8M@0x28B9000 rmem=15644K@0x30B9000

I specifically didn't want to change the memory splits or flash a modified U-Boot to "fix" this, because we know the Xiaofang 1S obviously works at 1080p without resorting to all those hacks suggested.

geekman avatar Apr 14 '20 10:04 geekman