[x264-devel] Optimization of the x264

Gabriel Bouvigne gabriel.bouvigne at joost.com
Tue Oct 9 13:40:46 CEST 2007


Victor Mateevitsi a écrit :

> x264_macroblock_cache_load
> x264_macroblock_cache_save
> x264_macroblock_analyse
> 
> Reading cache_load, I realized that there is a struct named cache, that 
> stores the cached data.
> Why not use pointers in this struct, without having to copy the data 
> from one struct to the other ?
> I think we will gain some FPS there.

The purpose is to have "compact" data within the CPU cache. If your 
source data was already within the CPU cache, copy will be very fast 
(assuming there is still available space within the cache). If your 
source data was not already within CPU cache, you will have a slower 
copy, but future access will be fast. By using pointers, you would have 
to use a lot of CPU prefetch hints in order to avoid being stalled 
because of a cache miss during computing-intensive parts.



More information about the x264-devel mailing list