FFmpeg
Loading...
Searching...
No Matches
bitpacked_dec_init.h
Go to the documentation of this file.
1/*
2 * Bitpacked decoder DSP init
3 * Copyright (c) 2017 Savoir-faire Linux, Inc
4 * Copyright (c) 2026 Devin Heitmueller <dheitmueller@ltnglobal.com>
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef AVCODEC_BITPACKED_DEC_INIT_H
24#define AVCODEC_BITPACKED_DEC_INIT_H
25
26#include <stdint.h>
27
28#include "config.h"
30#include "bitpacked_dec.h"
31
32static void bitpacked_unpack_yuv422p10_c(const uint8_t *src,
33 uint16_t *y, uint16_t *u, uint16_t *v,
34 int width)
35{
36 for (int i = 0; i < width; i += 2) {
37 *u++ = (src[0] << 2) | (src[1] >> 6);
38 *v++ = ((src[2] << 6) | (src[3] >> 2)) & 0x3ff;
39 *y++ = ((src[1] << 4) | (src[2] >> 4)) & 0x3ff;
40 *y++ = ((src[3] << 8) | src[4]) & 0x3ff;
41 src += 5;
42 }
43}
44
46{
47 s->unpack_yuv422p10 = bitpacked_unpack_yuv422p10_c;
48
49#if ARCH_AARCH64
51#elif ARCH_X86 && HAVE_X86ASM
53#endif
54}
55
56#endif /* AVCODEC_BITPACKED_DEC_INIT_H */
void ff_bitpacked_init_x86(struct BitpackedContext *s)
static void bitpacked_unpack_yuv422p10_c(const uint8_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width)
static av_unused av_cold void ff_bitpackeddec_init(struct BitpackedContext *s)
av_cold void ff_bitpacked_init_aarch64(struct BitpackedContext *s)
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define s(width, name)
Definition cbs_vp9.c:198
#define u(width, name, range_min, range_max)
Definition cbs_apv.c:68
Macro definitions for various function/variable attributes.
#define av_unused
Definition attributes.h:164
#define av_cold
Definition attributes.h:117
#define src
Definition vp8dsp.c:248
#define width
Definition dsp.h:99