FFmpeg
Loading...
Searching...
No Matches
diracdsp.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 David Conrad
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#ifndef AVCODEC_DIRACDSP_H
22#define AVCODEC_DIRACDSP_H
23
24#include <stdint.h>
25#include <stddef.h>
26
27typedef void (*dirac_weight_func)(uint8_t *block, ptrdiff_t stride, int log2_denom, int weight, int h);
28typedef void (*dirac_biweight_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
29 int log2_denom, int weightd, int weights, int h);
30
31typedef struct {
32 void (*dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc,
33 const uint8_t *src, ptrdiff_t stride, int width, int height);
34 /**
35 * dirac_pixels_tab[width][subpel]
36 * width is 2 for 32, 1 for 16, 0 for 8
37 * subpel is 0 for fpel and hpel (only need to copy from the first plane in src)
38 * 1 if an average of the first 2 planes is needed (TODO: worth it?)
39 * 2 for general qpel (avg of 4)
40 * 3 for general epel (biweight of 4 using the weights in src[4])
41 * src[0-3] is each of the hpel planes
42 * src[4] is the 1/8 pel weights if needed
43 */
44 void (*put_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h);
45 void (*avg_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h);
46
47 void (*put_signed_rect_clamped[3])(uint8_t *dst/*align 16*/, ptrdiff_t dst_stride,
48 const uint8_t *src/*align 16*/, ptrdiff_t src_stride,
49 int width, int height/*mod 2*/);
50 void (*put_rect_clamped)(uint8_t *dst/*align 16*/, ptrdiff_t dst_stride,
51 const uint8_t *src/*align 16*/, ptrdiff_t src_stride,
52 int width, int height/*mod 2*/);
53 void (*add_rect_clamped)(uint8_t *dst/*align 16*/, const uint16_t *src/*align 16*/,
54 ptrdiff_t stride, const int16_t *idwt/*align 16*/,
55 ptrdiff_t idwt_stride, int width, int height/*mod 2*/);
56 void (*add_dirac_obmc[3])(uint16_t *dst, const uint8_t *src, ptrdiff_t stride,
57 const uint8_t *obmc_weight, int yblen);
58
59 /* 0-1: int16_t and int32_t asm/c, 2-3: int16 and int32_t, C only */
60 void (*dequant_subband[4])(uint8_t *src, uint8_t *dst, ptrdiff_t stride, const int qf, const int qs, int tot_v, int tot_h);
61
65
66#define DECL_DIRAC_PIXOP(PFX, EXT) \
67 void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h); \
68 void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h); \
69 void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h)
70
77
80
81#endif /* AVCODEC_DIRACDSP_H */
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
#define avg(a, b, c, d)
static int16_t block[64]
Definition dct.c:125
#define DECL_DIRAC_PIXOP(PFX, EXT)
Definition diracdsp.h:66
void(* dirac_biweight_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int log2_denom, int weightd, int weights, int h)
Definition diracdsp.h:28
void ff_diracdsp_init_x86(DiracDSPContext *c)
void ff_diracdsp_init(DiracDSPContext *c)
Definition diracdsp.c:226
void(* dirac_weight_func)(uint8_t *block, ptrdiff_t stride, int log2_denom, int weight, int h)
Definition diracdsp.h:27
static const int weights[]
Definition hevc_pel.c:32
const h264_weight_func weight
void(* avg_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h)
Definition diracdsp.h:45
void(* put_rect_clamped)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int width, int height)
Definition diracdsp.h:50
dirac_biweight_func biweight_dirac_pixels_tab[3]
Definition diracdsp.h:63
void(* put_signed_rect_clamped[3])(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int width, int height)
Definition diracdsp.h:47
void(* put_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], ptrdiff_t stride, int h)
dirac_pixels_tab[width][subpel] width is 2 for 32, 1 for 16, 0 for 8 subpel is 0 for fpel and hpel (o...
Definition diracdsp.h:44
dirac_weight_func weight_dirac_pixels_tab[3]
Definition diracdsp.h:62
void(* dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src, ptrdiff_t stride, int width, int height)
Definition diracdsp.h:32
void(* add_dirac_obmc[3])(uint16_t *dst, const uint8_t *src, ptrdiff_t stride, const uint8_t *obmc_weight, int yblen)
Definition diracdsp.h:56
void(* add_rect_clamped)(uint8_t *dst, const uint16_t *src, ptrdiff_t stride, const int16_t *idwt, ptrdiff_t idwt_stride, int width, int height)
Definition diracdsp.h:53
void(* dequant_subband[4])(uint8_t *src, uint8_t *dst, ptrdiff_t stride, const int qf, const int qs, int tot_v, int tot_h)
Definition diracdsp.h:60
#define stride
#define src
Definition vp8dsp.c:248
#define height
Definition dsp.h:89
#define width
Definition dsp.h:89
static double c[64]