25 #include "libavutil/intreadwrite.h"
55 && avpkt->
size / avctx->
height * 3 >= width * 8)
70 y = (uint16_t *)pic->
data[0];
71 u = (uint16_t *)pic->
data[1];
72 v = (uint16_t *)pic->
data[2];
73 line_end = avpkt->
data + stride;
75 while (line++ < avctx->
height) {
79 *u++ = t << 6 & 0xFFC0;
80 *y++ = t >> 4 & 0xFFC0;
81 *v++ = t >> 14 & 0xFFC0;
83 if (src >= line_end - 1) {
87 y = (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
88 u = (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
89 v = (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
95 *y++ = t << 6 & 0xFFC0;
96 *u++ = t >> 4 & 0xFFC0;
97 *y++ = t >> 14 & 0xFFC0;
98 if (src >= line_end - 2) {
104 y = (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
105 u = (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
106 v = (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
112 *v++ = t << 6 & 0xFFC0;
113 *y++ = t >> 4 & 0xFFC0;
114 *u++ = t >> 14 & 0xFFC0;
116 if (src >= line_end - 1) {
120 y = (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
121 u = (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
122 v = (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
128 *y++ = t << 6 & 0xFFC0;
129 *v++ = t >> 4 & 0xFFC0;
130 *y++ = t >> 14 & 0xFFC0;
132 if (src >= line_end - 2) {
138 y = (uint16_t *)(pic->
data[0] + line * pic->
linesize[0]);
139 u = (uint16_t *)(pic->
data[1] + line * pic->
linesize[1]);
140 v = (uint16_t *)(pic->
data[2] + line * pic->
linesize[2]);
#define AV_PIX_FMT_YUV422P16
This structure describes decoded (raw) audio or video data.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
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.
const char * name
Name of the codec implementation.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
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. ...
Libavcodec external API header.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
#define MKTAG(a, b, c, d)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
AVCodec ff_zero12v_decoder
common internal api header.
#define AVERROR_INVALIDDATA
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int zero12v_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)