Skip to content
  • Tero Rintaluoma's avatar
    Fixed point reference picture scaling · 86bb6df0
    Tero Rintaluoma authored
    Fixed point scaling factors are calculated once for each
    reference frame by using integer division. Otherwise fixed point
    scaling routines are used in all scaling calculations. This makes it
    possible to calculate fixed point scaling factors on device driver
    software and pass them to hardware and thus avoid division on hardware.
    
    TODO:
     - Missing check for maximum frame dimensions
       (currently scaling uses 14 bits)
     - Missing check for maximum scaling ratio
       (upscaling 16:1, downscaling 2:1)
    
    Problems:
     - Straightforward fixed point implementation can cause error +-1
       compared to integer division (i.e. in x_step_q4). Should only
       be an issue for frames larger than 16k.
    
    Change-Id: I3cf4dabd610a4dc18da3bdb31ae244ebaf5d579c
    86bb6df0