FFmpeg
tpeldsp.h
Go to the documentation of this file.
1 /*
2  * thirdpel DSP functions
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 /**
22  * @file
23  * thirdpel DSP functions
24  */
25 
26 #ifndef AVCODEC_TPELDSP_H
27 #define AVCODEC_TPELDSP_H
28 
29 #include <stdint.h>
30 
31 /* add and put pixel (decoding) */
32 // blocksizes for hpel_pixels_func are 8x4,8x8 16x8 16x16
33 // h for hpel_pixels_func is limited to {width/2, width} but never larger
34 // than 16 and never smaller than 4
35 typedef void (*tpel_mc_func)(uint8_t *block /* align width (8 or 16) */,
36  const uint8_t *pixels /* align 1 */,
37  int line_size, int w, int h);
38 
39 /**
40  * thirdpel DSP context
41  */
42 typedef struct TpelDSPContext {
43  /**
44  * Thirdpel motion compensation with rounding (a + b + 1) >> 1.
45  * this is an array[12] of motion compensation functions for the
46  * 9 thirdpel positions<br>
47  * *pixels_tab[xthirdpel + 4 * ythirdpel]
48  * @param block destination where the result is stored
49  * @param pixels source
50  * @param line_size number of bytes in a horizontal line of block
51  * @param h height
52  */
53  tpel_mc_func put_tpel_pixels_tab[11]; // FIXME individual func ptr per width?
54  tpel_mc_func avg_tpel_pixels_tab[11]; // FIXME individual func ptr per width?
56 
58 
59 #endif /* AVCODEC_TPELDSP_H */
ff_tpeldsp_init
void ff_tpeldsp_init(TpelDSPContext *c)
Definition: tpeldsp.c:312
w
uint8_t w
Definition: llviddspenc.c:38
TpelDSPContext
thirdpel DSP context
Definition: tpeldsp.h:42
tpel_mc_func
void(* tpel_mc_func)(uint8_t *block, const uint8_t *pixels, int line_size, int w, int h)
Definition: tpeldsp.h:35
TpelDSPContext::put_tpel_pixels_tab
tpel_mc_func put_tpel_pixels_tab[11]
Thirdpel motion compensation with rounding (a + b + 1) >> 1.
Definition: tpeldsp.h:53
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
TpelDSPContext::avg_tpel_pixels_tab
tpel_mc_func avg_tpel_pixels_tab[11]
Definition: tpeldsp.h:54
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
h
h
Definition: vp9dsp_template.c:2038