org.jcodec.codecs.mpeg12
Class MPEGDecoder
java.lang.Object
org.jcodec.codecs.mpeg12.MPEGDecoder
- All Implemented Interfaces:
- VideoDecoder
- Direct Known Subclasses:
- Mpeg2Prores
public class MPEGDecoder
- extends Object
- implements VideoDecoder
This class is part of JCodec ( www.jcodec.org ) This software is distributed
under FreeBSD License
MPEG 1/2 Decoder
Supports I/P/B frames, frame/field/interlaced frame encoding
Conforms to H.262 ( ISO/IEC 13818-2, ISO/IEC 11172-2 ) specifications
- Author:
- The JCodec project
|
Method Summary |
Picture |
decodeFrame(ByteBuffer ByteBuffer,
int[][] buf)
Decodes a video frame to an uncompressed picture in codec native
colorspace |
int |
decodeMacroblock(PictureHeader ph,
MPEGDecoder.Context context,
int prevAddr,
int[] qScaleCode,
int[][] buf,
int stride,
BitReader bits,
int vertOff,
int vertStep,
MPEGPred pred)
|
Picture |
decodePicture(MPEGDecoder.Context context,
PictureHeader ph,
ByteBuffer buffer,
int[][] buf,
int vertOff,
int vertStep)
|
void |
decodeSlice(PictureHeader ph,
int verticalPos,
MPEGDecoder.Context context,
int[][] buf,
BitReader in,
int vertOff,
int vertStep)
|
static int |
getCodedHeight(SequenceHeader sh,
PictureHeader ph)
|
static Size |
getSize(ByteBuffer data)
|
int |
probe(ByteBuffer data)
Tests if compressed frame can be decoded with this decoder |
protected void |
put(int[][] mbPix,
int[][] buf,
int stride,
int chromaFormat,
int mbX,
int mbY,
int width,
int height,
int vertOff,
int vertStep)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sh
protected SequenceHeader sh
gh
protected GOPHeader gh
MPEGDecoder
public MPEGDecoder(SequenceHeader sh,
GOPHeader gh)
MPEGDecoder
public MPEGDecoder()
MPEGDecoder
public MPEGDecoder(int maxCoeff)
decodeFrame
public Picture decodeFrame(ByteBuffer ByteBuffer,
int[][] buf)
- Description copied from interface:
VideoDecoder
- Decodes a video frame to an uncompressed picture in codec native
colorspace
- Specified by:
decodeFrame in interface VideoDecoder
- Parameters:
ByteBuffer - Compressed frame data
getCodedHeight
public static int getCodedHeight(SequenceHeader sh,
PictureHeader ph)
decodePicture
public Picture decodePicture(MPEGDecoder.Context context,
PictureHeader ph,
ByteBuffer buffer,
int[][] buf,
int vertOff,
int vertStep)
decodeSlice
public void decodeSlice(PictureHeader ph,
int verticalPos,
MPEGDecoder.Context context,
int[][] buf,
BitReader in,
int vertOff,
int vertStep)
throws IOException
- Throws:
IOException
decodeMacroblock
public int decodeMacroblock(PictureHeader ph,
MPEGDecoder.Context context,
int prevAddr,
int[] qScaleCode,
int[][] buf,
int stride,
BitReader bits,
int vertOff,
int vertStep,
MPEGPred pred)
put
protected void put(int[][] mbPix,
int[][] buf,
int stride,
int chromaFormat,
int mbX,
int mbY,
int width,
int height,
int vertOff,
int vertStep)
probe
public int probe(ByteBuffer data)
- Description copied from interface:
VideoDecoder
- Tests if compressed frame can be decoded with this decoder
- Specified by:
probe in interface VideoDecoder
- Parameters:
data - Compressed frame data
- Returns:
getSize
public static Size getSize(ByteBuffer data)
Copyright © 2013. All Rights Reserved.