| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (c) 2026 Devin Heitmueller <dheitmueller@ltnglobal.com> | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <stdint.h> | ||
| 22 | |||
| 23 | #include "libavutil/attributes.h" | ||
| 24 | #include "libavutil/x86/cpu.h" | ||
| 25 | #include "libavcodec/bitpacked_dec.h" | ||
| 26 | |||
| 27 | void ff_bitpacked_unpack_yuv422p10_ssse3(const uint8_t *src, | ||
| 28 | uint16_t *y, uint16_t *u, uint16_t *v, | ||
| 29 | int width); | ||
| 30 | #if HAVE_AVX2_EXTERNAL | ||
| 31 | void ff_bitpacked_unpack_yuv422p10_avx2(const uint8_t *src, | ||
| 32 | uint16_t *y, uint16_t *u, uint16_t *v, | ||
| 33 | int width); | ||
| 34 | #endif | ||
| 35 | #if HAVE_AVX512ICL_EXTERNAL | ||
| 36 | void ff_bitpacked_unpack_yuv422p10_avx512icl(const uint8_t *src, | ||
| 37 | uint16_t *y, uint16_t *u, | ||
| 38 | uint16_t *v, int width); | ||
| 39 | #endif | ||
| 40 | |||
| 41 | 14 | av_cold void ff_bitpacked_init_x86(struct BitpackedContext *s) | |
| 42 | { | ||
| 43 | 14 | int cpu_flags = av_get_cpu_flags(); | |
| 44 | |||
| 45 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 6 times.
|
14 | if (EXTERNAL_SSSE3(cpu_flags)) |
| 46 | 8 | s->unpack_yuv422p10 = ff_bitpacked_unpack_yuv422p10_ssse3; | |
| 47 | |||
| 48 | #if HAVE_AVX2_EXTERNAL | ||
| 49 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 13 times.
|
14 | if (EXTERNAL_AVX2(cpu_flags)) |
| 50 | 1 | s->unpack_yuv422p10 = ff_bitpacked_unpack_yuv422p10_avx2; | |
| 51 | #endif | ||
| 52 | |||
| 53 | #if HAVE_AVX512ICL_EXTERNAL | ||
| 54 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | if (EXTERNAL_AVX512ICL(cpu_flags)) |
| 55 | ✗ | s->unpack_yuv422p10 = ff_bitpacked_unpack_yuv422p10_avx512icl; | |
| 56 | #endif | ||
| 57 | 14 | } | |
| 58 |