Function sws_frame_start

pub unsafe extern "C" fn sws_frame_start(
    c: *mut SwsContext,
    dst: *mut AVFrame,
    src: *const AVFrame,
) -> i32
Expand description

Initialize the scaling process for a given pair of source/destination frames. Must be called before any calls to sws_send_slice() and sws_receive_slice().

This function will retain references to src and dst, so they must both use refcounted buffers (if allocated by the caller, in case of dst).

@param c The scaling context @param dst The destination frame.

       The data buffers may either be already allocated by the caller or
       left clear, in which case they will be allocated by the scaler.
       The latter may have performance advantages - e.g. in certain cases
       some output planes may be references to input planes, rather than
       copies.

       Output data will be written into this frame in successful
       sws_receive_slice() calls.

@param src The source frame. The data buffers must be allocated, but the frame data does not have to be ready at this point. Data availability is then signalled by sws_send_slice(). @return 0 on success, a negative AVERROR code on failure

@see sws_frame_end()