Go to the documentation of this file.
32 void *
data,
int *got_frame,
35 const uint8_t *buf = avpkt->
data;
36 int buf_size = avpkt->
size;
39 unsigned int x, y,
width = (avctx->
width + 7) / 8;
42 if (buf_size <= 2 * avctx->
height)
55 buf_size -= 2 * avctx->
height;
57 for (y = 0; y < avctx->
height; y++) {
58 unsigned int pkt_size = bytestream2_get_le16(&idx);
64 if (pkt_size > buf_size) {
72 int size = bytestream2_get_byte(&gb);
79 size = bytestream2_get_byte(&gb);
82 value = bytestream2_get_byte(&gb);
#define AV_LOG_WARNING
Something somehow does not look correct.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
int key_frame
1 -> keyframe, 0-> not
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
@ AV_PICTURE_TYPE_I
Intra.
static int msp2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
enum AVPictureType pict_type
Picture type of the frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const AVCodec ff_msp2_decoder
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
main external API structure.
#define avpriv_request_sample(...)
This structure stores compressed data.
int width
picture width / height.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.