[Ffmpeg-devel] [PATCH] flash screen video encoder
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.
> + * have their compressed size represented with 16bits in the beginnig.
> + * 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
> + * block sizes should give a better result then to just use a fixed size.
> +/* TODO:
> + * Don't reencode the frame in bruteforece mode if the frame is a dupe. Speed up.
> + av_log(avctx, AV_LOG_ERROR, "Input dimensions to large, input must be max 4096x4096 !\n");
> + //copy the block to the temp buffer before compression (if it differs from the previous frames block)
> + av_log(s->avctx, AV_LOG_ERROR, "error while compressing of block %dx%d\n", i, j);
> + //Search for the smallest framesize and encode the frame with those parameters
> + av_log(avctx, AV_LOG_ERROR, "[%d][%d]optimsize = %d, res = %d|\n", opt_w, opt_h, smallest_size, res);
> + //mark the frame so the muxer can set correct frametype
More information about the ffmpeg-devel