[Ffmpeg-devel] [PATCH] flash screen video encoder

Diego Biurrun diego
Sun Jan 21 20:47:27 CET 2007


On Sun, Jan 21, 2007 at 07:44:07PM +0100, Benjamin Larsson wrote:
> 
> And new patch attached.

.. some nitpicks ..

> --- libavcodec/flashsvenc.c	(revision 0)
> +++ libavcodec/flashsvenc.c	(revision 0)
> @@ -0,0 +1,340 @@
> +
> +/* Encoding development sponsored by http://fh-campuswien.ac.at
> + */

You could save a line here by putting */ at the end of the line ;)

> + * The picture is divided into blocks that are zlib compressed.

zlib-compressed

> + * have their compressed size represented with 16bits in the beginnig.

begining

> + * If the size = 0 then the block is unchanged from the previous frame.
> + * All blocks are decompressed until the buffer is consumed.
> + *
> + * Encoding ideas, a basic encoder would just use a fixed block size.
> + * Block sizes can be multipels of 16, from 16 to 256. The blocks don't
> + * have to be quadratic. A brute force search with a set of diffrent

different

> + * block sizes should give a better result then to just use a fixed size.

thAn

> +/* TODO:
> + * Don't reencode the frame in bruteforece mode if the frame is a dupe. Speed up.

brute force

> +        av_log(avctx, AV_LOG_ERROR, "Input dimensions to large, input must be max 4096x4096 !\n");

too

> +            //copy the block to the temp buffer before compression (if it differs from the previous frames block)

frame's

> +                    av_log(s->avctx, AV_LOG_ERROR, "error while compressing of block %dx%d\n", i, j);

compressing block

> +    //Search for the smallest framesize and encode the frame with those parameters

frame size

> +    av_log(avctx, AV_LOG_ERROR, "[%d][%d]optimsize = %d, res = %d|\n", opt_w, opt_h, smallest_size, res);

optimize?  optim_size?

> +    //mark the frame so the muxer can set correct frametype

frame type

Diego




More information about the ffmpeg-devel mailing list