[FFmpeg-devel] [PATCH] encoder for adobe's flash ScreenVideo2 codec
Daniel Verkamp
daniel
Tue Jul 21 20:13:55 CEST 2009
On Tue, Jul 21, 2009 at 10:57 AM, Joshua Warner<joshuawarner32 at gmail.com> wrote:
> Hi all,
>
> I've developed an encoder for Adobe's Flash ScreenVideo2 format, which is
> stored in flv files. ?My encoder currently only supports a large subset of
> the format. ?The only player that supports this codec (so far) is Adobe
> Flash Player itself, but ScreenVideo2 makes dramatic improvement in file
> size over ScreenVideo (currently in ffmpeg as flashsv) - and should be very
> useful for uploading screencasts, etc. ?Most options (block size, etc) now
> just fall back on defaults because I couldn't find a general algorithm that
> produced consistantly better results than these. ?All the code is in place
> to be able to change these parameters dynamically, so future improvements
> there should be easy. ?The patch is attached.
>
> The codec is listed as flashsv2 in ffmpeg.
>
> Joshua Warner
Minor nitpicks:
- "palette" is misspelled as "pallet" throughout
- trailing whitespace on 2 lines
- plenty of warnings from tools/patcheck
Major problem:
libavcodec/flashsv2enc.c:338: warning: passing argument 2 of
?compress2? from incompatible pointer type
This is on a x86_64 Linux box; it prevents the encoder from working at
all for me.
Attached patch (on top of your patch) fixes this.
Thanks,
-- Daniel Verkamp
-------------- next part --------------
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 7faf514..bddaf87 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -64,7 +64,7 @@ typedef struct Block {
uint8_t *sl_begin, *sl_end;
int enc_size;
uint8_t *data;
- int data_size;
+ unsigned long data_size;
uint8_t start, len;
uint8_t dirty;
@@ -331,7 +331,7 @@ static int write_block(Block * b, uint8_t * buf, int buf_size)
return buf_pos;
}
-static int encode_zlib(Block * b, uint8_t * buf, int *buf_size, int comp)
+static int encode_zlib(Block * b, uint8_t * buf, unsigned long *buf_size, int comp)
{
int res =
compress2(buf, buf_size, b->sl_begin, b->sl_end - b->sl_begin,
More information about the ffmpeg-devel
mailing list