FFmpeg
vf_fsppdsp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
3  * Copyright (C) 2005 Nikolaj Poroshin <porosh3@psu.ru>
4  * Copyright (c) 2014 Arwa Arif <arwaarif1994@gmail.com>
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (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
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef AVFILTER_FSPPDSP_H
24 #define AVFILTER_FSPPDSP_H
25 
26 #include <stddef.h>
27 #include <stdint.h>
28 
29 #include "config.h"
30 
32 
33 typedef struct FSPPDSPContext {
34  void (*store_slice)(uint8_t *restrict dst, int16_t *restrict src /* align 16 */,
35  ptrdiff_t dst_stride, ptrdiff_t src_stride,
36  ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
37 
38  void (*store_slice2)(uint8_t *restrict dst, int16_t *restrict src /* align 16 */,
39  ptrdiff_t dst_stride, ptrdiff_t src_stride,
40  ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
41 
42  void (*mul_thrmat)(const int16_t *restrict thr_adr_noq /* align 16 */,
43  int16_t *restrict thr_adr /* align 16 */, int q);
44 
45  void (*column_fidct)(const int16_t *restrict thr_adr, const int16_t *restrict data,
46  int16_t *restrict output, int cnt);
47 
48  void (*row_idct)(const int16_t *restrict workspace, int16_t *restrict output_adr,
49  ptrdiff_t output_stride, int cnt);
50 
51  void (*row_fdct)(int16_t *restrict data, const uint8_t *restrict pixels,
52  ptrdiff_t line_size, int cnt);
54 
56 extern const uint8_t ff_fspp_dither[8][8];
57 
58 void ff_store_slice_c(uint8_t *restrict dst, int16_t *restrict src,
59  ptrdiff_t dst_stride, ptrdiff_t src_stride,
60  ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
61 void ff_store_slice2_c(uint8_t *restrict dst, int16_t *restrict src,
62  ptrdiff_t dst_stride, ptrdiff_t src_stride,
63  ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale);
64 void ff_mul_thrmat_c(const int16_t *restrict thr_adr_noq, int16_t *restrict thr_adr, int q);
65 void ff_column_fidct_c(const int16_t *restrict thr_adr, const int16_t *restrict data,
66  int16_t *restrict output, int cnt);
67 void ff_row_idct_c(const int16_t *restrict workspace, int16_t *restrict output_adr,
68  ptrdiff_t output_stride, int cnt);
69 void ff_row_fdct_c(int16_t *restrict data, const uint8_t *restrict pixels,
70  ptrdiff_t line_size, int cnt);
71 
74 
75 static inline void ff_fsppdsp_init(FSPPDSPContext *fspp)
76 {
81  fspp->row_idct = ff_row_idct_c;
82  fspp->row_fdct = ff_row_fdct_c;
83 
84 #if ARCH_X86
85  ff_fsppdsp_init_x86(fspp);
86 #endif
87 }
88 
89 #endif /* AVFILTER_FSPPDSP_H */
ff_store_slice_c
void ff_store_slice_c(uint8_t *restrict dst, int16_t *restrict src, ptrdiff_t dst_stride, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale)
Definition: vf_fsppdsp.c:67
ff_mul_thrmat_c
void ff_mul_thrmat_c(const int16_t *restrict thr_adr_noq, int16_t *restrict thr_adr, int q)
Definition: vf_fsppdsp.c:124
FF_VISIBILITY_PUSH_HIDDEN
#define FF_VISIBILITY_PUSH_HIDDEN
Definition: attributes_internal.h:30
output
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
Definition: filter_design.txt:226
FSPPDSPContext::store_slice
void(* store_slice)(uint8_t *restrict dst, int16_t *restrict src, ptrdiff_t dst_stride, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale)
Definition: vf_fsppdsp.h:34
data
const char data[16]
Definition: mxf.c:149
ff_fspp_dither
const FF_VISIBILITY_PUSH_HIDDEN uint8_t ff_fspp_dither[8][8]
Definition: vf_fsppdsp.c:55
FSPPDSPContext::mul_thrmat
void(* mul_thrmat)(const int16_t *restrict thr_adr_noq, int16_t *restrict thr_adr, int q)
Definition: vf_fsppdsp.h:42
ff_row_fdct_c
void ff_row_fdct_c(int16_t *restrict data, const uint8_t *restrict pixels, ptrdiff_t line_size, int cnt)
Definition: vf_fsppdsp.c:311
FSPPDSPContext
Definition: vf_fsppdsp.h:33
attributes_internal.h
FSPPDSPContext::column_fidct
void(* column_fidct)(const int16_t *restrict thr_adr, const int16_t *restrict data, int16_t *restrict output, int cnt)
Definition: vf_fsppdsp.h:45
ff_column_fidct_c
void ff_column_fidct_c(const int16_t *restrict thr_adr, const int16_t *restrict data, int16_t *restrict output, int cnt)
Definition: vf_fsppdsp.c:130
FSPPDSPContext::store_slice2
void(* store_slice2)(uint8_t *restrict dst, int16_t *restrict src, ptrdiff_t dst_stride, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale)
Definition: vf_fsppdsp.h:38
FSPPDSPContext::row_fdct
void(* row_fdct)(int16_t *restrict data, const uint8_t *restrict pixels, ptrdiff_t line_size, int cnt)
Definition: vf_fsppdsp.h:51
ff_store_slice2_c
void ff_store_slice2_c(uint8_t *restrict dst, int16_t *restrict src, ptrdiff_t dst_stride, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale)
Definition: vf_fsppdsp.c:96
height
#define height
Definition: dsp.h:89
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:87
FF_VISIBILITY_POP_HIDDEN
#define FF_VISIBILITY_POP_HIDDEN
Definition: attributes_internal.h:31
ff_fsppdsp_init_x86
void ff_fsppdsp_init_x86(FSPPDSPContext *fspp)
Definition: vf_fspp_init.c:37
ff_row_idct_c
void ff_row_idct_c(const int16_t *restrict workspace, int16_t *restrict output_adr, ptrdiff_t output_stride, int cnt)
Definition: vf_fsppdsp.c:250
ff_fsppdsp_init
static FF_VISIBILITY_POP_HIDDEN void ff_fsppdsp_init(FSPPDSPContext *fspp)
Definition: vf_fsppdsp.h:75
width
#define width
Definition: dsp.h:89
src
#define src
Definition: vp8dsp.c:248
FSPPDSPContext::row_idct
void(* row_idct)(const int16_t *restrict workspace, int16_t *restrict output_adr, ptrdiff_t output_stride, int cnt)
Definition: vf_fsppdsp.h:48