annotate ffmpeg/libavcodec/diracdsp.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Copyright (C) 2010 David Conrad
yading@10 3 *
yading@10 4 * This file is part of FFmpeg.
yading@10 5 *
yading@10 6 * FFmpeg is free software; you can redistribute it and/or
yading@10 7 * modify it under the terms of the GNU Lesser General Public
yading@10 8 * License as published by the Free Software Foundation; either
yading@10 9 * version 2.1 of the License, or (at your option) any later version.
yading@10 10 *
yading@10 11 * FFmpeg is distributed in the hope that it will be useful,
yading@10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 14 * Lesser General Public License for more details.
yading@10 15 *
yading@10 16 * You should have received a copy of the GNU Lesser General Public
yading@10 17 * License along with FFmpeg; if not, write to the Free Software
yading@10 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 19 */
yading@10 20
yading@10 21 #ifndef AVCODEC_DIRACDSP_H
yading@10 22 #define AVCODEC_DIRACDSP_H
yading@10 23
yading@10 24 #include <stdint.h>
yading@10 25
yading@10 26 typedef void (*dirac_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int h);
yading@10 27 typedef void (*dirac_biweight_func)(uint8_t *dst, const uint8_t *src, int stride, int log2_denom, int weightd, int weights, int h);
yading@10 28
yading@10 29 typedef struct {
yading@10 30 void (*dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src, int stride, int width, int height);
yading@10 31 /**
yading@10 32 * dirac_pixels_tab[width][subpel]
yading@10 33 * width is 2 for 32, 1 for 16, 0 for 8
yading@10 34 * subpel is 0 for fpel and hpel (only need to copy from the first plane in src)
yading@10 35 * 1 if an average of the first 2 planes is needed (TODO: worth it?)
yading@10 36 * 2 for general qpel (avg of 4)
yading@10 37 * 3 for general epel (biweight of 4 using the weights in src[4])
yading@10 38 * src[0-3] is each of the hpel planes
yading@10 39 * src[4] is the 1/8 pel weights if needed
yading@10 40 */
yading@10 41 void (*put_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h);
yading@10 42 void (*avg_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h);
yading@10 43
yading@10 44 void (*put_signed_rect_clamped)(uint8_t *dst/*align 16*/, int dst_stride, const int16_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/);
yading@10 45 void (*put_rect_clamped)(uint8_t *dst/*align 16*/, int dst_stride, const int16_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/);
yading@10 46 void (*add_rect_clamped)(uint8_t *dst/*align 16*/, const uint16_t *src/*align 16*/, int stride, const int16_t *idwt/*align 16*/, int idwt_stride, int width, int height/*mod 2*/);
yading@10 47 void (*add_dirac_obmc[3])(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
yading@10 48
yading@10 49 dirac_weight_func weight_dirac_pixels_tab[3];
yading@10 50 dirac_biweight_func biweight_dirac_pixels_tab[3];
yading@10 51 } DiracDSPContext;
yading@10 52
yading@10 53 #define DECL_DIRAC_PIXOP(PFX, EXT) \
yading@10 54 void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
yading@10 55 void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
yading@10 56 void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)
yading@10 57
yading@10 58 DECL_DIRAC_PIXOP(put, c);
yading@10 59 DECL_DIRAC_PIXOP(avg, c);
yading@10 60 DECL_DIRAC_PIXOP(put, l2_c);
yading@10 61 DECL_DIRAC_PIXOP(avg, l2_c);
yading@10 62 DECL_DIRAC_PIXOP(put, l4_c);
yading@10 63 DECL_DIRAC_PIXOP(avg, l4_c);
yading@10 64
yading@10 65 void ff_diracdsp_init(DiracDSPContext *c);
yading@10 66
yading@10 67 #endif /* AVCODEC_DIRACDSP_H */