1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * thirdpel DSP functions 3cabdff1aSopenharmony_ci * 4cabdff1aSopenharmony_ci * This file is part of FFmpeg. 5cabdff1aSopenharmony_ci * 6cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 7cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 8cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 9cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 10cabdff1aSopenharmony_ci * 11cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 12cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 13cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14cabdff1aSopenharmony_ci * Lesser General Public License for more details. 15cabdff1aSopenharmony_ci * 16cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 17cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 18cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19cabdff1aSopenharmony_ci */ 20cabdff1aSopenharmony_ci 21cabdff1aSopenharmony_ci/** 22cabdff1aSopenharmony_ci * @file 23cabdff1aSopenharmony_ci * thirdpel DSP functions 24cabdff1aSopenharmony_ci */ 25cabdff1aSopenharmony_ci 26cabdff1aSopenharmony_ci#ifndef AVCODEC_TPELDSP_H 27cabdff1aSopenharmony_ci#define AVCODEC_TPELDSP_H 28cabdff1aSopenharmony_ci 29cabdff1aSopenharmony_ci#include <stdint.h> 30cabdff1aSopenharmony_ci 31cabdff1aSopenharmony_ci/* add and put pixel (decoding) */ 32cabdff1aSopenharmony_ci// blocksizes for hpel_pixels_func are 8x4,8x8 16x8 16x16 33cabdff1aSopenharmony_ci// h for hpel_pixels_func is limited to {width/2, width} but never larger 34cabdff1aSopenharmony_ci// than 16 and never smaller than 4 35cabdff1aSopenharmony_citypedef void (*tpel_mc_func)(uint8_t *block /* align width (8 or 16) */, 36cabdff1aSopenharmony_ci const uint8_t *pixels /* align 1 */, 37cabdff1aSopenharmony_ci int line_size, int w, int h); 38cabdff1aSopenharmony_ci 39cabdff1aSopenharmony_ci/** 40cabdff1aSopenharmony_ci * thirdpel DSP context 41cabdff1aSopenharmony_ci */ 42cabdff1aSopenharmony_citypedef struct TpelDSPContext { 43cabdff1aSopenharmony_ci /** 44cabdff1aSopenharmony_ci * Thirdpel motion compensation with rounding (a + b + 1) >> 1. 45cabdff1aSopenharmony_ci * this is an array[12] of motion compensation functions for the 46cabdff1aSopenharmony_ci * 9 thirdpel positions<br> 47cabdff1aSopenharmony_ci * *pixels_tab[xthirdpel + 4 * ythirdpel] 48cabdff1aSopenharmony_ci * @param block destination where the result is stored 49cabdff1aSopenharmony_ci * @param pixels source 50cabdff1aSopenharmony_ci * @param line_size number of bytes in a horizontal line of block 51cabdff1aSopenharmony_ci * @param h height 52cabdff1aSopenharmony_ci */ 53cabdff1aSopenharmony_ci tpel_mc_func put_tpel_pixels_tab[11]; // FIXME individual func ptr per width? 54cabdff1aSopenharmony_ci tpel_mc_func avg_tpel_pixels_tab[11]; // FIXME individual func ptr per width? 55cabdff1aSopenharmony_ci} TpelDSPContext; 56cabdff1aSopenharmony_ci 57cabdff1aSopenharmony_civoid ff_tpeldsp_init(TpelDSPContext *c); 58cabdff1aSopenharmony_ci 59cabdff1aSopenharmony_ci#endif /* AVCODEC_TPELDSP_H */ 60