FFmpeg
Loading...
Searching...
No Matches
pred_init.c
Go to the documentation of this file.
1/*
2 * SIMD-optimized HEVC intra prediction
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 "config.h"
22
24#include "libavutil/cpu.h"
25#include "libavutil/x86/cpu.h"
27
28#define PRED_PLANAR_FUNC(idx, opt) \
29void ff_hevc_pred_planar_ ## idx ## _8_ ## opt(uint8_t *src, \
30 const uint8_t *top, \
31 const uint8_t *left, \
32 ptrdiff_t stride);
33
34PRED_PLANAR_FUNC(0, ssse3)
35PRED_PLANAR_FUNC(1, ssse3)
36PRED_PLANAR_FUNC(2, ssse3)
37PRED_PLANAR_FUNC(3, ssse3)
38
39#define REF_FILTER_3TAP_FUNC(w, opt) \
40void ff_hevc_ref_filter_3tap_ ## w ## x ## w ## _8_ ## opt( \
41 uint8_t *filtered_left, \
42 uint8_t *filtered_top, \
43 const uint8_t *left, \
44 const uint8_t *top, int size);
45
49
51{
53
54 if (bit_depth == 8) {
56 hpc->ref_filter_3tap[0] = ff_hevc_ref_filter_3tap_8x8_8_sse2;
57 hpc->ref_filter_3tap[1] = ff_hevc_ref_filter_3tap_16x16_8_sse2;
58 hpc->ref_filter_3tap[2] = ff_hevc_ref_filter_3tap_32x32_8_sse2;
59 }
61 hpc->pred_planar[0] = ff_hevc_pred_planar_0_8_ssse3;
62 hpc->pred_planar[1] = ff_hevc_pred_planar_1_8_ssse3;
63 hpc->pred_planar[2] = ff_hevc_pred_planar_2_8_ssse3;
64 hpc->pred_planar[3] = ff_hevc_pred_planar_3_8_ssse3;
65 }
66 }
67}
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
Macro definitions for various function/variable attributes.
#define av_cold
Definition attributes.h:117
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
#define EXTERNAL_SSSE3(flags)
Definition cpu.h:59
#define EXTERNAL_SSE2(flags)
Definition cpu.h:53
void ff_hevc_pred_init_x86(HEVCPredContext *hpc, int bit_depth)
Definition pred_init.c:50
#define PRED_PLANAR_FUNC(idx, opt)
Definition pred_init.c:28
#define REF_FILTER_3TAP_FUNC(w, opt)
Definition pred_init.c:39