On Sun, Aug 29, 2021 at 06:38:58PM +0200, Anton Khirnov wrote:
> ---
> Now with a new public function to query required slice alignment, which
> fixes the yuv410p->yuv420p conversion issue reported by Michael.
{...]
> +/**
> + * Indicate that a horizontal slice of input data is available in the source
> + * frame previously provided to sws_frame_start(). The slices may be
> provided in
> + * any order, but may not overlap. For vertically subsampled pixel formats,
> the
> + * slices must be aligned according to subsampling.
> + *
> + * @param slice_start first row of the slice
> + * @param slice_height number of rows in the slice
> + *
> + * @return a non-negative number on success, a negative AVERROR code on
> failure.
> + */
> +int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
> + unsigned int slice_height);
> +
> +/**
> + * Request a horizontal slice of the output data to be written into the frame
> + * previously provided to sws_frame_start().
> + *> + * When a slice smaller than the whole output frame is requested, both > + * slice_start and slice_height must be multiples of > + * sws_receive_slice_alignment(). the image height might not be a multiple of sws_receive_slice_alignment() in that case the last slice would violate this rule > + * > + * @param slice_start first row of the slice > + * @param slice_height number of rows in the slice > + * > + * @return a non-negative number if the data was successfully written into > the output > + * AVERROR(EAGAIN) if more input data needs to be provided before the > + * output can be produced > + * another negative AVERROR code on other kinds of scaling failure > + */ > +int sws_receive_slice(struct SwsContext *c, unsigned int slice_start, > + unsigned int slice_height); > + > +/** > + * Query required alignment on output data requested with > sws_receive_slice(). > + */ > +unsigned int sws_receive_slice_alignment(const struct SwsContext *c); I think this one line documentation taken alone is insufficient to understand this [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Nations do behave wisely once they have exhausted all other alternatives. -- Abba Eban
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
