21 #ifndef DE265_ACCELERATION_H
22 #define DE265_ACCELERATION_H
32 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
33 int width,
int height);
36 const int16_t *src, ptrdiff_t srcstride,
37 int width,
int height);
40 const int16_t *src, ptrdiff_t srcstride,
41 int width,
int height,
42 int w,
int o,
int log2WD);
44 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
45 int width,
int height,
46 int w1,
int o1,
int w2,
int o2,
int log2WD);
50 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
51 int width,
int height,
int bit_depth);
54 const int16_t *src, ptrdiff_t srcstride,
55 int width,
int height,
int bit_depth);
58 const int16_t *src, ptrdiff_t srcstride,
59 int width,
int height,
60 int w,
int o,
int log2WD,
int bit_depth);
62 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
63 int width,
int height,
64 int w1,
int o1,
int w2,
int o2,
int log2WD,
int bit_depth);
68 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
69 int width,
int height,
int bit_depth)
const;
72 const int16_t *src, ptrdiff_t srcstride,
73 int width,
int height,
int bit_depth)
const;
76 const int16_t *src, ptrdiff_t srcstride,
77 int width,
int height,
78 int w,
int o,
int log2WD,
int bit_depth)
const;
80 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
81 int width,
int height,
82 int w1,
int o1,
int w2,
int o2,
int log2WD,
int bit_depth)
const;
88 const uint8_t *src, ptrdiff_t srcstride,
int width,
int height,
89 int mx,
int my, int16_t* mcbuffer);
91 const uint8_t *src, ptrdiff_t srcstride,
int width,
int height,
92 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
94 const uint8_t *src, ptrdiff_t srcstride,
int width,
int height,
95 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
97 const uint8_t *src, ptrdiff_t srcstride,
int width,
int height,
98 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
101 const uint8_t *src, ptrdiff_t srcstride,
int width,
int height,
106 const uint16_t *src, ptrdiff_t srcstride,
int width,
int height,
107 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
109 const uint16_t *src, ptrdiff_t srcstride,
int width,
int height,
110 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
112 const uint16_t *src, ptrdiff_t srcstride,
int width,
int height,
113 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
115 const uint16_t *src, ptrdiff_t srcstride,
int width,
int height,
116 int mx,
int my, int16_t* mcbuffer,
int bit_depth);
119 const uint16_t *src, ptrdiff_t srcstride,
int width,
int height,
120 int16_t* mcbuffer,
int bit_depth);
124 const void *src, ptrdiff_t srcstride,
int width,
int height,
125 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const;
127 const void *src, ptrdiff_t srcstride,
int width,
int height,
128 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const;
130 const void *src, ptrdiff_t srcstride,
int width,
int height,
131 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const;
133 const void *src, ptrdiff_t srcstride,
int width,
int height,
134 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const;
137 const void *src, ptrdiff_t srcstride,
int width,
int height,
138 int16_t* mcbuffer,
int dX,
int dY,
int bit_depth)
const;
157 void (*
transform_skip_16)(uint16_t *_dst,
const int16_t *coeffs, ptrdiff_t _stride,
int bit_depth);
159 void (*
transform_add_16[4])(uint16_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth);
169 void (*
add_residual_8)(uint8_t *dst, ptrdiff_t stride,
const int32_t* r,
int nT,
int bit_depth);
170 void (*
add_residual_16)(uint16_t *dst,ptrdiff_t stride,
const int32_t* r,
int nT,
int bit_depth);
172 template <
class pixel_t>
173 void add_residual(pixel_t *dst, ptrdiff_t stride,
const int32_t* r,
int nT,
int bit_depth)
const;
175 void (*
rdpcm_v)(int32_t* residual,
const int16_t* coeffs,
int nT,
int tsShift,
int bdShift);
176 void (*
rdpcm_h)(int32_t* residual,
const int16_t* coeffs,
int nT,
int tsShift,
int bdShift);
179 int tsShift,
int bdShift);
182 template <
class pixel_t>
void transform_skip(pixel_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const;
183 template <
class pixel_t>
void transform_skip_rdpcm_v(pixel_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const;
184 template <
class pixel_t>
void transform_skip_rdpcm_h(pixel_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const;
185 template <
class pixel_t>
void transform_4x4_dst_add(pixel_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const;
186 template <
class pixel_t>
void transform_add(
int sizeIdx, pixel_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const;
245 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
246 int width,
int height,
int bit_depth)
const
256 const int16_t *src, ptrdiff_t srcstride,
257 int width,
int height,
int bit_depth)
const
267 const int16_t *src, ptrdiff_t srcstride,
268 int width,
int height,
269 int w,
int o,
int log2WD,
int bit_depth)
const
274 put_weighted_pred_16((uint16_t*)_dst,dststride,src,srcstride,width,height,w,o,log2WD,bit_depth);
279 const int16_t *src1,
const int16_t *src2, ptrdiff_t srcstride,
280 int width,
int height,
281 int w1,
int o1,
int w2,
int o2,
int log2WD,
int bit_depth)
const
284 put_weighted_bipred_8((uint8_t*)_dst,dststride,src1,src2,srcstride, width,height, w1,o1,w2,o2,log2WD);
286 put_weighted_bipred_16((uint16_t*)_dst,dststride,src1,src2,srcstride, width,height, w1,o1,w2,o2,log2WD,bit_depth);
292 const void *src, ptrdiff_t srcstride,
int width,
int height,
293 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const
296 put_hevc_epel_8(dst,dststride,(
const uint8_t*)src,srcstride,width,height,mx,my,mcbuffer);
298 put_hevc_epel_16(dst,dststride,(
const uint16_t*)src,srcstride,width,height,mx,my,mcbuffer, bit_depth);
302 const void *src, ptrdiff_t srcstride,
int width,
int height,
303 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const
306 put_hevc_epel_h_8(dst,dststride,(
const uint8_t*)src,srcstride,width,height,mx,my,mcbuffer,bit_depth);
308 put_hevc_epel_h_16(dst,dststride,(
const uint16_t*)src,srcstride,width,height,mx,my,mcbuffer,bit_depth);
312 const void *src, ptrdiff_t srcstride,
int width,
int height,
313 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const
316 put_hevc_epel_v_8(dst,dststride,(
const uint8_t*)src,srcstride,width,height,mx,my,mcbuffer,bit_depth);
318 put_hevc_epel_v_16(dst,dststride,(
const uint16_t*)src,srcstride,width,height,mx,my,mcbuffer, bit_depth);
322 const void *src, ptrdiff_t srcstride,
int width,
int height,
323 int mx,
int my, int16_t* mcbuffer,
int bit_depth)
const
326 put_hevc_epel_hv_8(dst,dststride,(
const uint8_t*)src,srcstride,width,height,mx,my,mcbuffer,bit_depth);
328 put_hevc_epel_hv_16(dst,dststride,(
const uint16_t*)src,srcstride,width,height,mx,my,mcbuffer, bit_depth);
332 const void *src, ptrdiff_t srcstride,
int width,
int height,
333 int16_t* mcbuffer,
int dX,
int dY,
int bit_depth)
const
336 put_hevc_qpel_8[dX][dY](dst,dststride,(
const uint8_t*)src,srcstride,width,height,mcbuffer);
338 put_hevc_qpel_16[dX][dY](dst,dststride,(
const uint16_t*)src,srcstride,width,height,mcbuffer, bit_depth);
341 template <>
inline void acceleration_functions::transform_skip<uint8_t>(uint8_t *dst,
const int16_t *coeffs,ptrdiff_t stride,
int bit_depth)
const {
transform_skip_8(dst,coeffs,stride); }
342 template <>
inline void acceleration_functions::transform_skip<uint16_t>(uint16_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const {
transform_skip_16(dst,coeffs,stride, bit_depth); }
344 template <>
inline void acceleration_functions::transform_skip_rdpcm_v<uint8_t>(uint8_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const { assert(bit_depth==8);
transform_skip_rdpcm_v_8(dst,coeffs,nT,stride); }
345 template <>
inline void acceleration_functions::transform_skip_rdpcm_h<uint8_t>(uint8_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const { assert(bit_depth==8);
transform_skip_rdpcm_h_8(dst,coeffs,nT,stride); }
346 template <>
inline void acceleration_functions::transform_skip_rdpcm_v<uint16_t>(uint16_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const { assert(
false); }
347 template <>
inline void acceleration_functions::transform_skip_rdpcm_h<uint16_t>(uint16_t *dst,
const int16_t *coeffs,
int nT, ptrdiff_t stride,
int bit_depth)
const { assert(
false); }
350 template <>
inline void acceleration_functions::transform_4x4_dst_add<uint8_t>(uint8_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const {
transform_4x4_dst_add_8(dst,coeffs,stride); }
351 template <>
inline void acceleration_functions::transform_4x4_dst_add<uint16_t>(uint16_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const {
transform_4x4_dst_add_16(dst,coeffs,stride,bit_depth); }
353 template <>
inline void acceleration_functions::transform_add<uint8_t>(
int sizeIdx, uint8_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const {
transform_add_8[sizeIdx](dst,coeffs,stride); }
354 template <>
inline void acceleration_functions::transform_add<uint16_t>(
int sizeIdx, uint16_t *dst,
const int16_t *coeffs, ptrdiff_t stride,
int bit_depth)
const {
transform_add_16[sizeIdx](dst,coeffs,stride,bit_depth); }
Definition: acceleration.h:30
void(* transform_bypass_rdpcm_v)(int32_t *r, const int16_t *coeffs, int nT)
Definition: acceleration.h:144
void put_hevc_epel_h(int16_t *dst, ptrdiff_t dststride, const void *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth) const
Definition: acceleration.h:301
void(* put_weighted_pred_8)(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int w, int o, int log2WD)
Definition: acceleration.h:39
void(* transform_add_16[4])(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth)
Definition: acceleration.h:159
void(* transform_idst_4x4)(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits)
Definition: acceleration.h:164
void put_hevc_qpel(int16_t *dst, ptrdiff_t dststride, const void *src, ptrdiff_t srcstride, int width, int height, int16_t *mcbuffer, int dX, int dY, int bit_depth) const
Definition: acceleration.h:331
void(* put_unweighted_pred_16)(uint16_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int bit_depth)
Definition: acceleration.h:53
void(* put_hevc_epel_16)(int16_t *dst, ptrdiff_t dststride, const uint16_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:105
void(* put_hevc_epel_hv_8)(int16_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:96
void put_unweighted_pred(void *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int bit_depth) const
Definition: acceleration.h:255
void(* transform_4x4_dst_add_8)(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride)
Definition: acceleration.h:152
void(* transform_idct_8x8)(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits)
Definition: acceleration.h:166
void(* fwd_transform_4x4_dst_8)(int16_t *coeffs, const int16_t *src, ptrdiff_t stride)
Definition: acceleration.h:192
void(* add_residual_16)(uint16_t *dst, ptrdiff_t stride, const int32_t *r, int nT, int bit_depth)
Definition: acceleration.h:170
void put_hevc_epel_v(int16_t *dst, ptrdiff_t dststride, const void *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth) const
Definition: acceleration.h:311
void(* put_unweighted_pred_8)(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height)
Definition: acceleration.h:35
void(* transform_skip_residual)(int32_t *residual, const int16_t *coeffs, int nT, int tsShift, int bdShift)
Definition: acceleration.h:178
void(* transform_idct_32x32)(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits)
Definition: acceleration.h:168
void put_weighted_pred(void *_dst, ptrdiff_t dststride, const int16_t *src, ptrdiff_t srcstride, int width, int height, int w, int o, int log2WD, int bit_depth) const
Definition: acceleration.h:266
void put_hevc_epel_hv(int16_t *dst, ptrdiff_t dststride, const void *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth) const
Definition: acceleration.h:321
void(* transform_skip_rdpcm_v_8)(uint8_t *_dst, const int16_t *coeffs, int nT, ptrdiff_t _stride)
Definition: acceleration.h:150
void(* put_hevc_epel_h_16)(int16_t *dst, ptrdiff_t dststride, const uint16_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:108
void(* put_hevc_epel_8)(int16_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer)
Definition: acceleration.h:87
void(* put_weighted_bipred_8)(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)
Definition: acceleration.h:43
void(* transform_skip_16)(uint16_t *_dst, const int16_t *coeffs, ptrdiff_t _stride, int bit_depth)
Definition: acceleration.h:157
void(* transform_add_8[4])(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride)
Definition: acceleration.h:153
void(* transform_skip_rdpcm_h_8)(uint8_t *_dst, const int16_t *coeffs, int nT, ptrdiff_t _stride)
Definition: acceleration.h:151
void(* put_hevc_epel_v_16)(int16_t *dst, ptrdiff_t dststride, const uint16_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:111
void transform_add(int sizeIdx, pixel_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth) const
void(* put_hevc_epel_v_8)(int16_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:93
void(* put_weighted_pred_16)(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)
Definition: acceleration.h:57
void(* transform_idct_4x4)(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits)
Definition: acceleration.h:165
void(* transform_4x4_dst_add_16)(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth)
Definition: acceleration.h:158
void(* transform_bypass_rdpcm_h)(int32_t *r, const int16_t *coeffs, int nT)
Definition: acceleration.h:145
void(* put_hevc_qpel_16[4][4])(int16_t *dst, ptrdiff_t dststride, const uint16_t *src, ptrdiff_t srcstride, int width, int height, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:118
void(* add_residual_8)(uint8_t *dst, ptrdiff_t stride, const int32_t *r, int nT, int bit_depth)
Definition: acceleration.h:169
void(* transform_idct_16x16)(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits)
Definition: acceleration.h:167
void add_residual(pixel_t *dst, ptrdiff_t stride, const int32_t *r, int nT, int bit_depth) const
void(* fwd_transform_8[4])(int16_t *coeffs, const int16_t *src, ptrdiff_t stride)
Definition: acceleration.h:195
void transform_skip_rdpcm_h(pixel_t *dst, const int16_t *coeffs, int nT, ptrdiff_t stride, int bit_depth) const
void(* hadamard_transform_8[4])(int16_t *coeffs, const int16_t *src, ptrdiff_t stride)
Definition: acceleration.h:200
void(* rdpcm_v)(int32_t *residual, const int16_t *coeffs, int nT, int tsShift, int bdShift)
Definition: acceleration.h:175
void(* rdpcm_h)(int32_t *residual, const int16_t *coeffs, int nT, int tsShift, int bdShift)
Definition: acceleration.h:176
void put_weighted_pred_avg(void *_dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height, int bit_depth) const
Definition: acceleration.h:244
void(* put_weighted_pred_avg_16)(uint16_t *_dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height, int bit_depth)
Definition: acceleration.h:49
void put_weighted_bipred(void *_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) const
Definition: acceleration.h:278
void(* rotate_coefficients)(int16_t *coeff, int nT)
Definition: acceleration.h:162
void(* transform_skip_8)(uint8_t *_dst, const int16_t *coeffs, ptrdiff_t _stride)
Definition: acceleration.h:149
void(* put_hevc_qpel_8[4][4])(int16_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int width, int height, int16_t *mcbuffer)
Definition: acceleration.h:100
void(* put_hevc_epel_h_8)(int16_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:90
void(* transform_bypass)(int32_t *residual, const int16_t *coeffs, int nT)
Definition: acceleration.h:143
void(* put_weighted_pred_avg_8)(uint8_t *_dst, ptrdiff_t dststride, const int16_t *src1, const int16_t *src2, ptrdiff_t srcstride, int width, int height)
Definition: acceleration.h:31
void transform_skip(pixel_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth) const
void put_hevc_epel(int16_t *dst, ptrdiff_t dststride, const void *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth) const
Definition: acceleration.h:291
void(* put_weighted_bipred_16)(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)
Definition: acceleration.h:61
void(* put_hevc_epel_hv_16)(int16_t *dst, ptrdiff_t dststride, const uint16_t *src, ptrdiff_t srcstride, int width, int height, int mx, int my, int16_t *mcbuffer, int bit_depth)
Definition: acceleration.h:114
void transform_4x4_dst_add(pixel_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth) const
void transform_skip_rdpcm_v(pixel_t *dst, const int16_t *coeffs, int nT, ptrdiff_t stride, int bit_depth) const