52 int min_stride = 2 * avctx->
width;
64 min_stride = (avctx->
width + 15) / 16 * 20;
76 for (y = 0; y < avctx->
height; y++) {
82 memcpy(line, buf + src_y*stride, 2*avctx->
width);
85 uint16_t *luma = (uint16_t*)&frame->
data[0][y*frame->
linesize[0]];
88 for (block = 0; 16*block < avctx->
width; block ++) {
90 for (x = 0; x < 16 && x + 16*block < avctx->
width; x++) {
91 int xd = x + 16*
block;
93 luma [xd] = (4*buf_src[2*x + 0]) + ((buf_src[32 + (x>>1)]>>4)&3);
95 luma [xd] = (4*buf_src[2*x + 0]) + (buf_src[32 + (x>>1)] &3);
96 cb[xd>>1] = (4*buf_src[2*x + 1]) + ((buf_src[32 + (x>>1)]>>2)&3);
97 cr[xd>>1] = (4*buf_src[2*x + 3]) + (buf_src[32 + (x>>1)]>>6);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int m101_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int m101_decode_init(AVCodecContext *avctx)
static double cb(void *priv, double x, double y)
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int interlaced_frame
The content of the picture is interlaced.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
#define AV_PIX_FMT_YUV422P10
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
GLint GLenum GLboolean GLsizei stride
common internal api header.
int top_field_first
If the content is interlaced, is top field displayed first.
int key_frame
1 -> keyframe, 0-> not
static double cr(void *priv, double x, double y)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.