2 * V210 decoder DSP init
4 * Copyright (C) 2009 Michael Niedermayer <michaelni@gmx.at>
5 * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot com>
7 * This file is part of FFmpeg.
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef AVCODEC_V210DEC_INIT_H
25 #define AVCODEC_V210DEC_INIT_H
30 #include "libavutil/attributes.h"
31 #include "libavutil/bswap.h"
34 #define READ_PIXELS(a, b, c) \
36 val = av_le2ne32(*src++); \
38 *b++ = (val >> 10) & 0x3FF; \
39 *c++ = (val >> 20) & 0x3FF; \
42 static void v210_planar_unpack_c(const uint32_t *src
, uint16_t *y
, uint16_t *u
, uint16_t *v
, int width
)
46 for (int i
= 0; i
< width
- 5; i
+= 6) {
54 static av_unused av_cold
void ff_v210dec_init(V210DecContext
*s
)
56 s
->unpack_frame
= v210_planar_unpack_c
;
62 #endif /* AVCODEC_V210DEC_INIT_H */