• Martin Storsjö's avatar
    libavfilter: vf_scale: Properly take in->color_range into account · e645a1dd
    Martin Storsjö authored
    While swscale can be reconfigured with sws_setColorspaceDetails,
    the in/out ranges also need to be set before calling
    sws_init_context, otherwise the initialization might choose
    fastpaths that don't take the ranges into account.
    
    Therefore, look at in->color_range too, when deciding on whether
    the scaler needs to be reconfigured.
    
    Add a new member variable for keeping track of this, for being
    able to differentiate between whether the scale filter parameter
    "in_range" has been set (which should override whatever the input
    frame has set) or whether it has been configured based on the
    latest frame (which should trigger reconfiguring the scaler if
    the input frame ranges change).
    
    Fixes: Ticket #9576
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    e645a1dd
vf_scale.c 38.1 KB