[x264-devel] Doubt in Trellis Algorithm for SlicePath analysis

Nageswara Gunupudi Nageswara.Gunupudi at harmonicinc.com
Wed May 26 01:41:03 CEST 2010


Hi,


I have doubt in x264_slicetype_analyse function which try to find the best GOP structure with B frames when X264_B_ADAPT_TRELLIS is used.

When analyzing the each slicetype path, the best paths are initialized and the frame type analysis is carried over the number of frames in lookahead using following loop.

for( int j = 2; j < num_frames; j++ )
     x264_slicetype_path( h, &a, frames, j, best_paths );


Then in x264_slicetype_path, the possible paths are initialized and best costs are estimated over every path in the following loop


for( int path = 0; path < num_paths; path++ )
  {
        int len = length - (path + 1);
        memcpy( paths[idx], best_paths[len % (X264_BFRAME_MAX+1)], len );
        memset( paths[idx]+len, 'B', path );
        strcpy( paths[idx]+len+path, "P" );
        int cost = x264_slicetype_path_cost( h, a, frames, paths[idx], best_cost );

              ................
       }

My doubt is, when looking the two loops, is not there are some paths iterated more than once redundantly? Since the number possible paths are considered the later loop in the available lookahead frames. Please correct me if I am wrong.


Regards,
Nag
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20100525/7a73d531/attachment.htm>


More information about the x264-devel mailing list