Log in

View Full Version : Optimize x264 based remote desktop by dirty regions


Useprxf
23rd November 2016, 09:58
I was using x264 to achieve remote desktop, but had some problems on handling P_SKIP detection.

Dirty regions indicate changed areas. I would like to encode those macroblocks which don't intersect any dirty region as P_SKIP types.

I inserted the following code into x264_macroblock_prob_skip_internal function:

if (! h->isdirty[h->mb.i_mb_x][h->mb.i_mb_y] && ! M32(h->mb.cache.pskip_mv))
return 1;

but there is almost no speed-up. I think it may be the information preparation for the macroblock analysis that takes influence.

My question is how to speed up x264 by considering dirty regions?

Balling
8th August 2023, 19:17
There is now support for that in ffmpeg: https://github.com/FFmpeg/FFmpeg/commit/418c954e318a79f77eae1b4d6b29d40daee4284a