33 #define READ_PIXELS(a, b, c) \ 35 val = av_le2ne32(*src++); \ 37 *b++ = (val >> 10) & 0x3FF; \ 38 *c++ = (val >> 20) & 0x3FF; \ 52 for( i = 0; i < width-5; i += 6 ){
90 uint8_t *psrc = td->
buf + stride * slice_start;
93 y = (uint16_t*)frame->
data[0] + slice_start * frame->
linesize[0] / 2;
94 u = (uint16_t*)frame->
data[1] + slice_start * frame->
linesize[1] / 2;
95 v = (uint16_t*)frame->
data[2] + slice_start * frame->
linesize[2] / 2;
96 for (h = slice_start; h <
slice_end; h++) {
97 const uint32_t *
src = (
const uint32_t*)psrc;
100 w = (avctx->
width / 12) * 12;
108 if (w < avctx->
width - 5) {
116 if (w < avctx->
width - 1) {
121 if (w < avctx->
width - 3) {
122 *
u++ = (val >> 10) & 0x3FF;
123 *y++ = (val >> 20) & 0x3FF;
127 *y++ = (val >> 10) & 0x3FF;
145 int ret,
stride, aligned_input;
153 int aligned_width = ((avctx->
width + 47) / 48) * 48;
154 stride = aligned_width * 8 / 3;
158 if ((((avctx->
width + 23) / 24) * 24 * 8) / 3 * avctx->
height == avpkt->
size) {
172 && avpkt->
size - 64 >= stride * avctx->
height)
175 aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f);
203 #define V210DEC_FLAGS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM 228 .priv_class = &v210dec_class,
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_cold int decode_init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
av_cold void ff_v210dec_init(V210DecContext *s)
#define READ_PIXELS(a, b, c)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
Memory handling functions.
static av_cold int init(AVCodecContext *avctx)
const char * av_default_item_name(void *ptr)
Return the context name.
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.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Multithreading support functions.
#define u(width, name, range_min, range_max)
int interlaced_frame
The content of the picture is interlaced.
#define i(width, name, range_min, range_max)
#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.
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
common internal API header
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
void(* unpack_frame)(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width)
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static const AVClass v210dec_class
double * data[MAX_DATA][NUM_PLANES]
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
int(* execute2)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count)
The codec may call this to execute several independent things.
Libavcodec external API header.
Used for passing data between threads.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
Wrapper around get_buffer() for frame-multithreaded codecs.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
Describe the class of an AVClass context structure.
void ff_v210_x86_init(V210DecContext *s)
#define AV_PIX_FMT_YUV422P10
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
static int v210_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
int top_field_first
If the content is interlaced, is top field displayed first.
static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width)
int key_frame
1 -> keyframe, 0-> not
enum AVFieldOrder field_order
Field order.
#define MKTAG(a, b, c, d)
static double val(void *priv, double ch)
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static const AVOption v210dec_options[]