Go to the documentation of this file.
45 const uint8_t *line_end, *
src = avpkt->
data;
48 if (width <= 1 || avctx->
height <= 0) {
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};
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;
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));
static av_cold int zero12v_decode_init(AVCodecContext *avctx)
#define u(width, name, range_min, range_max)
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, int *got_frame, AVPacket *avpkt)
int key_frame
1 -> keyframe, 0-> not
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_PIX_FMT_YUV422P16
#define FF_CODEC_DECODE_CB(func)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
#define CODEC_LONG_NAME(str)
@ AV_PICTURE_TYPE_I
Intra.
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.
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
main external API structure.
const FFCodec ff_zero12v_decoder
#define avpriv_request_sample(...)
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
This structure stores compressed data.
int width
picture width / height.
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.
#define MKTAG(a, b, c, d)
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line