geekman / t20-rtspd

RTSP server + Ingenic T20 SDK
28 stars 16 forks source link

What do IMP_OSD_SetPoolSize and IMP_Encoder_SetPoolSize do? #5

Open Yannik opened 4 years ago

Yannik commented 4 years ago

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?

geekman commented 4 years ago

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.

Yannik commented 4 years ago

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

geekman commented 4 years ago

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

Yannik commented 4 years ago

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

geekman commented 4 years ago

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.