• Adrian Grange's avatar
    Fix bug in convolution functions (filter selection) · 3f108313
    Adrian Grange authored
    (In response to Issue 604:
     https://code.google.com/p/webm/issues/detail?id=604)
    
    There were bugs in the convolution code for two cases:
    
    1. Where the filter table was assumed to be aligned to a
       256 byte boundary. The offset of the pixel in the
       source buffer was computed incorrectly.
    
    2. Where no such alignment assumption was made. An
       incorrect address for the filter table base was used.
    
    To fix both problems, I now assume that the filter table is
    256-byte aligned and modify the pixel offset calculation to
    match.
    
    A later patch should remove the restriction that the filter
    table is aligned to a 256-byte boundary.
    
    There was also a bug in the ConvolveTest unit test
    (convolve_test.cc).
    
    (Bug & initial fix suggestion submitted by Tero Rintaluoma
    and Sami Pietilä).
    
    Change-Id: I71985551e62846e55e40de9e7e3959d4805baa82
    3f108313