[FFmpeg-devel] [PATCH] LucasArts-SMUSH playback

compn tempn at twmi.rr.com
Thu May 3 18:00:35 CEST 2012


On Thu, 3 May 2012 12:06:01 +0000, Paul B Mahol wrote:
>--- a/libavcodec/allcodecs.c
>+++ b/libavcodec/allcodecs.c
>@@ -392,6 +392,7 @@ void avcodec_register_all(void)
>     REGISTER_DECODER (ADPCM_THP, adpcm_thp);
>     REGISTER_DECODER (ADPCM_XA, adpcm_xa);
>     REGISTER_ENCDEC  (ADPCM_YAMAHA, adpcm_yamaha);
>+    REGISTER_DECODER (VIMA, vima);

>--- a/libavcodec/avcodec.h
>+++ b/libavcodec/avcodec.h
>@@ -330,6 +330,7 @@ enum CodecID {
>     CODEC_ID_ADPCM_IMA_ISS,
>     CODEC_ID_ADPCM_G722,
>     CODEC_ID_ADPCM_IMA_APC,
>+    CODEC_ID_VIMA,

if its adpcm it should be called adpcm_vima. if its not adpcm it should
go under audio codecs list. i think.



>+ * LucasArt VIMA decoder
>+ * Copyright (c) 2012 Paul B Mahol

is VIMA just the name or an acronym?


>+++ b/libavcodec/avcodec.h
>@@ -257,6 +257,7 @@ enum CodecID {
>     CODEC_ID_CDXL,
>     CODEC_ID_XBM,
>     CODEC_ID_ZEROCODEC,
>+    CODEC_ID_SANM,
>     CODEC_ID_Y41P       = MKBETAG('Y','4','1','P'),
>     CODEC_ID_ESCAPE130  = MKBETAG('E','1','3','0'),
>     CODEC_ID_EXR        = MKBETAG('0','E','X','R'),


this list is in order to keep backwards compatable with api.
you have to follow these rules, at the top of the enum in avcodec.h:

 * If you add a codec ID to this list, add it so that
 * 1. no value of a existing codec ID changes (that would break ABI),
 * 2. Give it a value which when taken as ASCII is recognized uniquely
by a human as this specific codec.
 *    This ensures that 2 forks can independently add CodecIDs without
producing conflicts.

-compn


More information about the ffmpeg-devel mailing list