48 if (width <= 1 || avctx->
height <= 0) {
55 && avpkt->
size / avctx->
height * 3 >= width * 8)
71 for (line = 0; line < avctx->
height; line++) {
72 uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};
73 uint16_t u_temp[3] = {0x8000, 0x8000, 0x8000};
74 uint16_t v_temp[3] = {0x8000, 0x8000, 0x8000};
76 y = (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
77 u = (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
78 v = (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
80 for (x = 0; x <
width; x += 6) {
83 if (width - x < 6 || line_end - src < 16) {
89 if (line_end - src < 4)
94 *u++ = t << 6 & 0xFFC0;
95 *y++ = t >> 4 & 0xFFC0;
96 *v++ = t >> 14 & 0xFFC0;
98 if (line_end - src < 4)
103 *y++ = t << 6 & 0xFFC0;
104 *u++ = t >> 4 & 0xFFC0;
105 *y++ = t >> 14 & 0xFFC0;
107 if (line_end - src < 4)
112 *v++ = t << 6 & 0xFFC0;
113 *y++ = t >> 4 & 0xFFC0;
114 *u++ = t >> 14 & 0xFFC0;
116 if (line_end - src < 4)
121 *y++ = t << 6 & 0xFFC0;
122 *v++ = t >> 4 & 0xFFC0;
123 *y++ = t >> 14 & 0xFFC0;
130 y = x + (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
131 u = x/2 + (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
132 v = x/2 + (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
133 memcpy(y, y_temp,
sizeof(*y) * (width - x));
134 memcpy(u, u_temp,
sizeof(*u) * (width - x + 1) / 2);
135 memcpy(v, v_temp,
sizeof(*v) * (width - x + 1) / 2);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static av_cold int zero12v_decode_init(AVCodecContext *avctx)
#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.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
GLint GLenum GLboolean GLsizei stride
AVCodec ff_zero12v_decoder
common internal api header.
int key_frame
1 -> keyframe, 0-> not
#define MKTAG(a, b, c, d)
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.
#define AV_PIX_FMT_YUV422P16
static int zero12v_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)