Go to the documentation of this file.
45 const uint8_t *line_end, *
src = avpkt->
data;
48 if (width <= 1 || avctx->
height <= 0) {
69 uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};
70 uint16_t u_temp[3] = {0x8000, 0x8000, 0x8000};
71 uint16_t v_temp[3] = {0x8000, 0x8000, 0x8000};
77 for (x = 0; x <
width; x += 6) {
80 if (
width - x < 6 || line_end -
src < 16) {
86 if (line_end -
src < 4)
91 *
u++ = t << 6 & 0xFFC0;
92 *y++ = t >> 4 & 0xFFC0;
93 *v++ = t >> 14 & 0xFFC0;
95 if (line_end -
src < 4)
100 *y++ = t << 6 & 0xFFC0;
101 *
u++ = t >> 4 & 0xFFC0;
102 *y++ = t >> 14 & 0xFFC0;
104 if (line_end -
src < 4)
109 *v++ = t << 6 & 0xFFC0;
110 *y++ = t >> 4 & 0xFFC0;
111 *
u++ = t >> 14 & 0xFFC0;
113 if (line_end -
src < 4)
118 *y++ = t << 6 & 0xFFC0;
119 *v++ = t >> 4 & 0xFFC0;
120 *y++ = t >> 14 & 0xFFC0;
130 memcpy(y, y_temp,
sizeof(*y) * (
width - x));
131 memcpy(
u, u_temp,
sizeof(*
u) * ((
width - x + 1) / 2));
132 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)
#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)
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