Go to the documentation of this file.
32 #define READ_PIXELS(a, b, c) \
34 val = av_le2ne32(*src++); \
36 *b++ = (val >> 10) & 0x3FF; \
37 *c++ = (val >> 20) & 0x3FF; \
83 if (
s->custom_stride )
86 int aligned_width = ((avctx->
width + 47) / 48) * 48;
87 stride = aligned_width * 8 / 3;
91 if ((((avctx->
width + 23) / 24) * 24 * 8) / 3 * avctx->
height == avpkt->
size) {
93 if (!
s->stride_warning_shown)
95 s->stride_warning_shown = 1;
107 aligned_input = !((uintptr_t)psrc & 0x1f) && !(
stride & 0x1f);
108 if (aligned_input !=
s->aligned_input) {
109 s->aligned_input = aligned_input;
116 y = (uint16_t*)pic->
data[0];
117 u = (uint16_t*)pic->
data[1];
118 v = (uint16_t*)pic->
data[2];
123 const uint32_t *
src = (
const uint32_t*)psrc;
126 w = (avctx->
width / 12) * 12;
127 s->unpack_frame(
src, y,
u, v,
w);
134 if (w < avctx->
width - 5) {
142 if (w < avctx->
width - 1) {
147 if (w < avctx->
width - 3) {
148 *
u++ = (
val >> 10) & 0x3FF;
149 *y++ = (
val >> 20) & 0x3FF;
153 *y++ = (
val >> 10) & 0x3FF;
175 #define V210DEC_FLAGS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
static const AVOption v210dec_options[]
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width)
#define u(width, name, range_min, range_max)
#define MKTAG(a, b, c, d)
static av_cold int decode_init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
enum AVFieldOrder field_order
Field order.
int top_field_first
If the content is interlaced, is top field displayed first.
#define READ_PIXELS(a, b, c)
av_cold void ff_v210dec_init(V210DecContext *s)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int key_frame
1 -> keyframe, 0-> not
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
@ AV_PICTURE_TYPE_I
Intra.
#define AV_PIX_FMT_YUV422P10
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
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() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const char const char void * val
static const AVClass v210dec_class
int interlaced_frame
The content of the picture is interlaced.
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
main external API structure.
void ff_v210_x86_init(V210DecContext *s)
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, size in bytes of each picture line.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.