Go to the documentation of this file.
35 const uint8_t *buf = avpkt->
data;
36 int buf_size = avpkt->
size;
38 unsigned int x, y,
width = (avctx->
width + 7) / 8;
41 if (buf_size <= 2 * avctx->
height)
54 buf_size -= 2 * avctx->
height;
56 for (y = 0; y < avctx->
height; y++) {
57 unsigned int pkt_size = bytestream2_get_le16(&idx);
63 if (pkt_size > buf_size) {
71 int size = bytestream2_get_byte(&gb);
78 size = bytestream2_get_byte(&gb);
81 value = bytestream2_get_byte(&gb);
#define AV_LOG_WARNING
Something somehow does not look correct.
This structure describes decoded (raw) audio or video data.
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
const FFCodec ff_msp2_decoder
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
AVCodec p
The public AVCodec.
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
@ 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 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.
static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
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.