• Marton Balint's avatar
    avformat/electronicarts: add option to return alpha channel in the main video stream in VP6A codec · 98f6c59f
    Marton Balint authored
    VP6 alpha in EA format is a second VP6 encoded video stream where only the Y
    component is used and is interpreted as the alpha channel of the first VP6
    stream. The alpha VP6 stream is muxed separately from the main VP6 stream, has
    its own stream headers and packet headers. In theory the two streams might not
    even have the same resolution (although most likely that is not something that
    is seen or supported in the wild), but the format is capable of doing it.
    
    Merged VP6 alpha (also known as the VP6A codec) means that a packet of the
    video stream contains the corresponding packet of both VP6 substreams like
    this:
    
    {OffsetOfAlpha, DataPacket, AlphaDataPacket}
    
    So data and alpha data of a frame is merged to a single packet, this is how VP6
    video with alpha is muxed in FLV and SWF.
    
    The first approach is more like how the demuxer sees data in the EA format,
    unfortunately it is different to what the FLV or SWF format expects, so -
    having no better place for it in the framework - I decided to do an optional
    format conversion in the EA demuxer.
    Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
    98f6c59f
electronicarts.c 24.7 KB