digiKam
fallback-motion.h
Go to the documentation of this file.
1 /*
2  * H.265 video codec.
3  * Copyright (c) 2013-2014 struktur AG, Dirk Farin <farin@struktur.de>
4  *
5  * This file is part of libde265.
6  *
7  * libde265 is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * libde265 is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with libde265. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef FALLBACK_MOTION_H
22 #define FALLBACK_MOTION_H
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 
27 
28 void put_weighted_pred_avg_8_fallback(uint8_t *dst, ptrdiff_t dststride,
29  const int16_t *src1, const int16_t *src2,
30  ptrdiff_t srcstride, int width,
31  int height);
32 
33 void put_unweighted_pred_8_fallback(uint8_t *_dst, ptrdiff_t dststride,
34  const int16_t *src, ptrdiff_t srcstride,
35  int width, int height);
36 
37 void put_weighted_pred_8_fallback(uint8_t *_dst, ptrdiff_t dststride,
38  const int16_t *src, ptrdiff_t srcstride,
39  int width, int height,
40  int w,int o,int log2WD);
41 void put_weighted_bipred_8_fallback(uint8_t *_dst, ptrdiff_t dststride,
42  const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride,
43  int width, int height,
44  int w1,int o1, int w2,int o2, int log2WD);
45 
46 void put_weighted_pred_avg_16_fallback(uint16_t *dst, ptrdiff_t dststride,
47  const int16_t *src1, const int16_t *src2,
48  ptrdiff_t srcstride, int width,
49  int height, int bit_depth);
50 
51 void put_unweighted_pred_16_fallback(uint16_t *_dst, ptrdiff_t dststride,
52  const int16_t *src, ptrdiff_t srcstride,
53  int width, int height, int bit_depth);
54 
55 void put_weighted_pred_16_fallback(uint16_t *_dst, ptrdiff_t dststride,
56  const int16_t *src, ptrdiff_t srcstride,
57  int width, int height,
58  int w,int o,int log2WD, int bit_depth);
59 void put_weighted_bipred_16_fallback(uint16_t *_dst, ptrdiff_t dststride,
60  const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride,
61  int width, int height,
62  int w1,int o1, int w2,int o2, int log2WD, int bit_depth);
63 
64 
65 
66 void put_epel_8_fallback(int16_t *dst, ptrdiff_t dststride,
67  const uint8_t *_src, ptrdiff_t srcstride,
68  int width, int height,
69  int mx, int my, int16_t* mcbuffer);
70 
71 void put_epel_16_fallback(int16_t *out, ptrdiff_t out_stride,
72  const uint16_t *src, ptrdiff_t src_stride,
73  int width, int height,
74  int mx, int my, int16_t* mcbuffer, int bit_depth);
75 
76 template <class pixel_t>
77 void put_epel_hv_fallback(int16_t *dst, ptrdiff_t dststride,
78  const pixel_t *_src, ptrdiff_t srcstride,
79  int width, int height,
80  int mx, int my, int16_t* mcbuffer, int bit_depth);
81 
82 
83 #define QPEL(x,y) void put_qpel_ ## x ## _ ## y ## _fallback(int16_t *out, ptrdiff_t out_stride, \
84  const uint8_t *src, ptrdiff_t srcstride, \
85  int nPbW, int nPbH, int16_t* mcbuffer)
86 QPEL(0,0); QPEL(0,1); QPEL(0,2); QPEL(0,3);
87 QPEL(1,0); QPEL(1,1); QPEL(1,2); QPEL(1,3);
88 QPEL(2,0); QPEL(2,1); QPEL(2,2); QPEL(2,3);
89 QPEL(3,0); QPEL(3,1); QPEL(3,2); QPEL(3,3);
90 
91 #undef QPEL
92 
93 
94 #define QPEL(x,y) void put_qpel_ ## x ## _ ## y ## _fallback_16(int16_t *out, ptrdiff_t out_stride, \
95  const uint16_t *src, ptrdiff_t srcstride, \
96  int nPbW, int nPbH, int16_t* mcbuffer, int bit_depth)
97 QPEL(0,0); QPEL(0,1); QPEL(0,2); QPEL(0,3);
98 QPEL(1,0); QPEL(1,1); QPEL(1,2); QPEL(1,3);
99 QPEL(2,0); QPEL(2,1); QPEL(2,2); QPEL(2,3);
100 QPEL(3,0); QPEL(3,1); QPEL(3,2); QPEL(3,3);
101 
102 #undef QPEL
103 
104 #endif
void put_weighted_pred_16_fallback(uint16_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int w, int o, int log2WD, int bit_depth)
void put_weighted_bipred_16_fallback(uint16_t *_dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height, int w1, int o1, int w2, int o2, int log2WD, int bit_depth)
void put_epel_8_fallback(int16_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer)
void put_weighted_pred_avg_8_fallback(uint8_t *dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height)
void put_unweighted_pred_16_fallback(uint16_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int bit_depth)
void put_unweighted_pred_8_fallback(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height)
void put_weighted_pred_avg_16_fallback(uint16_t *dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height, int bit_depth)
void put_weighted_pred_8_fallback(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int w, int o, int log2WD)
void put_weighted_bipred_8_fallback(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height, int w1, int o1, int w2, int o2, int log2WD)
#define QPEL(x, y)
Definition: fallback-motion.h:94
void put_epel_16_fallback(int16_t *out, ptrdiff_t out_stride, const uint16_t *src, ptrdiff_t src_stride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
void put_epel_hv_fallback(int16_t *dst, ptrdiff_t dststride, const pixel_t *_src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)