Skip to content
  • Víctor Manuel Jáquez Leal's avatar
    va: mpeg2dec: refactor the picture reference filling · 4625ac92
    Víctor Manuel Jáquez Leal authored
    Add the helper function _get_surface_id() which extracts the
    VASurfaceID from the passed picture. This function gets the surface of
    the next and previous reference picture.
    
    Instead of if-statements, this refactor uses a switch-statement with a
    fall-through, for P-type pictures, making the code a bit more readable.
    
    Also it adds quirks for gallium driver, which cannot handle invalid
    surfaces as forwarding nor backwarding references, so the function fails.
    Also iHD cannot handle them, but to avoid failing, the current picture
    is used as self-reference.
    
    Part-of: <!1939>
    4625ac92