• Rupert Swarbrick's avatar
    Pack InterpFilters into a single integer · 27e90295
    Rupert Swarbrick authored
    Before this patch, if CONFIG_DUAL_FILTER was true then an MB_MODE_INFO
    stored its filter choices as an array of four numbers, each of which
    was between 0 and 10. It also seems that elements 2 and 3 of the array
    were always the same as elements 0 and 1 when used.
    
    This patch defines a new type(def) called InterpFilters together with
    constructor and extractor functions. When CONFIG_DUAL_FILTER is zero,
    InterpFilters is a synonym for InterpFilter and the constructor and
    extractor functions should compile away to nothing. When it is
    nonzero, InterpFilters is a uint32_t which stores the x filter in the
    high part and the y filter in the low part (this looks strange, but
    matches the old numbering).
    
    Making this change allows us to get rid of lots of special case code
    that was dependent on CONFIG_DUAL_FILTER. The uniform
    extract/make/broadcast interface also actually shortens code in
    general.
    
    Change-Id: I6b24a61bac3e4b220d8d46d0b27cfe865dcfba81
    27e90295
rd.c 60.4 KB