Revision 8787d837

View differences:

Changelog
95 95
- Matroska muxer
96 96
- Slice-based parallel H.264 decoding
97 97
- Monkey's Audio demuxer and decoder
98
- AMV audio decoder
98
- AMV audio and video decoder
99 99

  
100 100
version 0.4.9-pre1:
101 101

  
doc/general.texi
231 231
@item THP                    @tab     @tab  X @tab Used on the Nintendo GameCube.
232 232
@item Bethsoft VID           @tab     @tab  X @tab Used in some games from Bethesda Softworks.
233 233
@item Renderware TXD         @tab     @tab  X @tab Texture dictionaries used by the Renderware Engine.
234
@item AMV                    @tab     @tab  X @tab Used in chinese MP3 players
234 235
@end multitable
235 236

  
236 237
@code{X} means that encoding (resp. decoding) is supported.
libavcodec/Makefile
35 35
OBJS-$(CONFIG_AC3_DECODER)             += ac3dec.o ac3tab.o ac3.o mdct.o fft.o
36 36
OBJS-$(CONFIG_AC3_ENCODER)             += ac3enc.o ac3tab.o ac3.o
37 37
OBJS-$(CONFIG_ALAC_DECODER)            += alac.o
38
OBJS-$(CONFIG_AMV_DECODER)             += sp5xdec.o mjpegdec.o mjpeg.o
38 39
OBJS-$(CONFIG_APE_DECODER)             += apedec.o
39 40
OBJS-$(CONFIG_ASV1_DECODER)            += asv1.o
40 41
OBJS-$(CONFIG_ASV1_ENCODER)            += asv1.o
libavcodec/allcodecs.c
61 61

  
62 62
    /* video codecs */
63 63
    REGISTER_DECODER (AASC, aasc);
64
    REGISTER_DECODER (AMV, amv);
64 65
    REGISTER_ENCDEC  (ASV1, asv1);
65 66
    REGISTER_ENCDEC  (ASV2, asv2);
66 67
    REGISTER_DECODER (AVS, avs);
libavcodec/avcodec.h
167 167
    CODEC_ID_PTX,
168 168
    CODEC_ID_TXD,
169 169
    CODEC_ID_VP6A,
170
    CODEC_ID_AMV,
170 171

  
171 172
    /* various PCM "codecs" */
172 173
    CODEC_ID_PCM_S16LE= 0x10000,
libavcodec/mjpegdec.c
669 669
        int c = s->comp_index[i];
670 670
        data[c] = s->picture.data[c];
671 671
        linesize[c]=s->linesize[c];
672
        if(s->avctx->codec->id==CODEC_ID_AMV) {
673
            //picture should be flipped upside-down for this codec
674
            data[c] += (linesize[c] * (s->v_scount[i] * 8 * s->mb_height - 1));
675
            linesize[c] *= -1;
676
        }
672 677
    }
673 678

  
674 679
    for(mb_y = 0; mb_y < s->mb_height; mb_y++) {
libavcodec/sp5xdec.c
72 72
    memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos));
73 73
    j += sizeof(sp5x_data_sos);
74 74

  
75
    if(avctx->codec_id==CODEC_ID_AMV)
76
        for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
77
            recoded[j++] = buf[i];
78
    else
75 79
    for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
76 80
    {
77 81
        recoded[j++] = buf[i];
......
194 198
    CODEC_CAP_DR1,
195 199
    NULL
196 200
};
201

  
202
AVCodec amv_decoder = {
203
    "amv",
204
    CODEC_TYPE_VIDEO,
205
    CODEC_ID_AMV,
206
    sizeof(MJpegDecodeContext),
207
    ff_mjpeg_decode_init,
208
    NULL,
209
    ff_mjpeg_decode_end,
210
    sp5x_decode_frame,
211
    CODEC_CAP_DR1
212
};

Also available in: Unified diff