[FFmpeg-devel] [PATCH]Basic XSUB encoder (take 5)

Stefano Sabatini stefano.sabatini-lala
Thu Jun 18 23:59:42 CEST 2009


On date Saturday 2009-05-23 23:03:31 +0200, Reimar D?ffinger encoded:
[...]
> Index: libavcodec/xsubenc.c
> ===================================================================
> --- libavcodec/xsubenc.c	(revision 0)
> +++ libavcodec/xsubenc.c	(revision 0)
[...]
> +/**
> + * Encode a single color run. At most 16 bits will be used.
> + * \param len length of the run, values > 255 mean "until end of line", may not be < 0.
> + * \param color color to encode, only the lowest two bits are used and all others must be 0.
> + */

Encodes.

Also @param is predominant over \param.

> +static void put_xsub_rle(PutBitContext *pb, int len, int color)
> +{
> +    if (len <= 255)
> +        put_bits(pb, 2 + ((ff_log2_tab[len] >> 1) << 2), len);
> +    else
> +        put_bits(pb, 14, 0);
> +    put_bits(pb, 2, color);
> +}
> +
> +/**
> + * Encode a 4-colour bitmap with XSUB rle.

Again.

Regards.
-- 
FFmpeg = Fantastic & Funny Monstrous Problematic Evanescent Gospel



More information about the ffmpeg-devel mailing list