annotate ffmpeg/libavcodec/ivi_dsp.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 * DSP functions for Indeo Video Interactive codecs (Indeo4 and Indeo5)
yading@10 3 *
yading@10 4 * Copyright (c) 2009-2011 Maxim Poliakovski
yading@10 5 *
yading@10 6 * This file is part of FFmpeg.
yading@10 7 *
yading@10 8 * FFmpeg is free software; you can redistribute it and/or
yading@10 9 * modify it under the terms of the GNU Lesser General Public
yading@10 10 * License as published by the Free Software Foundation; either
yading@10 11 * version 2.1 of the License, or (at your option) any later version.
yading@10 12 *
yading@10 13 * FFmpeg is distributed in the hope that it will be useful,
yading@10 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 16 * Lesser General Public License for more details.
yading@10 17 *
yading@10 18 * You should have received a copy of the GNU Lesser General Public
yading@10 19 * License along with FFmpeg; if not, write to the Free Software
yading@10 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 21 */
yading@10 22
yading@10 23 /**
yading@10 24 * @file
yading@10 25 * DSP functions (inverse transforms, motion compensations, wavelet recompostion)
yading@10 26 * for Indeo Video Interactive codecs.
yading@10 27 */
yading@10 28
yading@10 29 #ifndef AVCODEC_IVI_DSP_H
yading@10 30 #define AVCODEC_IVI_DSP_H
yading@10 31
yading@10 32 #include "avcodec.h"
yading@10 33 #include "ivi_common.h"
yading@10 34
yading@10 35 /**
yading@10 36 * 5/3 wavelet recomposition filter for Indeo5
yading@10 37 *
yading@10 38 * @param[in] plane pointer to the descriptor of the plane being processed
yading@10 39 * @param[out] dst pointer to the destination buffer
yading@10 40 * @param[in] dst_pitch pitch of the destination buffer
yading@10 41 */
yading@10 42 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
yading@10 43 const int dst_pitch);
yading@10 44
yading@10 45 /**
yading@10 46 * Haar wavelet recomposition filter for Indeo 4
yading@10 47 *
yading@10 48 * @param[in] plane pointer to the descriptor of the plane being processed
yading@10 49 * @param[out] dst pointer to the destination buffer
yading@10 50 * @param[in] dst_pitch pitch of the destination buffer
yading@10 51 */
yading@10 52 void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
yading@10 53 const int dst_pitch);
yading@10 54
yading@10 55 /**
yading@10 56 * two-dimensional inverse Haar 8x8 transform for Indeo 4
yading@10 57 *
yading@10 58 * @param[in] in pointer to the vector of transform coefficients
yading@10 59 * @param[out] out pointer to the output buffer (frame)
yading@10 60 * @param[in] pitch pitch to move to the next y line
yading@10 61 * @param[in] flags pointer to the array of column flags:
yading@10 62 * != 0 - non_empty column, 0 - empty one
yading@10 63 * (this array must be filled by caller)
yading@10 64 */
yading@10 65 void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 66 const uint8_t *flags);
yading@10 67
yading@10 68 /**
yading@10 69 * DC-only two-dimensional inverse Haar transform for Indeo 4.
yading@10 70 * Performing the inverse transform in this case is equivalent to
yading@10 71 * spreading DC_coeff >> 3 over the whole block.
yading@10 72 *
yading@10 73 * @param[in] in pointer to the dc coefficient
yading@10 74 * @param[out] out pointer to the output buffer (frame)
yading@10 75 * @param[in] pitch pitch to move to the next y line
yading@10 76 * @param[in] blk_size transform block size
yading@10 77 */
yading@10 78 void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 79 int blk_size);
yading@10 80
yading@10 81 /**
yading@10 82 * two-dimensional inverse slant 8x8 transform
yading@10 83 *
yading@10 84 * @param[in] in pointer to the vector of transform coefficients
yading@10 85 * @param[out] out pointer to the output buffer (frame)
yading@10 86 * @param[in] pitch pitch to move to the next y line
yading@10 87 * @param[in] flags pointer to the array of column flags:
yading@10 88 * != 0 - non_empty column, 0 - empty one
yading@10 89 * (this array must be filled by caller)
yading@10 90 */
yading@10 91 void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 92 const uint8_t *flags);
yading@10 93
yading@10 94 /**
yading@10 95 * two-dimensional inverse slant 4x4 transform
yading@10 96 *
yading@10 97 * @param[in] in pointer to the vector of transform coefficients
yading@10 98 * @param[out] out pointer to the output buffer (frame)
yading@10 99 * @param[in] pitch pitch to move to the next y line
yading@10 100 * @param[in] flags pointer to the array of column flags:
yading@10 101 * != 0 - non_empty column, 0 - empty one
yading@10 102 * (this array must be filled by caller)
yading@10 103 */
yading@10 104 void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 105 const uint8_t *flags);
yading@10 106
yading@10 107 /**
yading@10 108 * DC-only two-dimensional inverse slant transform.
yading@10 109 * Performing the inverse slant transform in this case is equivalent to
yading@10 110 * spreading (DC_coeff + 1)/2 over the whole block.
yading@10 111 * It works much faster than performing the slant transform on a vector of zeroes.
yading@10 112 *
yading@10 113 * @param[in] in pointer to the dc coefficient
yading@10 114 * @param[out] out pointer to the output buffer (frame)
yading@10 115 * @param[in] pitch pitch to move to the next y line
yading@10 116 * @param[in] blk_size transform block size
yading@10 117 */
yading@10 118 void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
yading@10 119
yading@10 120 /**
yading@10 121 * inverse 1D row slant transform
yading@10 122 *
yading@10 123 * @param[in] in pointer to the vector of transform coefficients
yading@10 124 * @param[out] out pointer to the output buffer (frame)
yading@10 125 * @param[in] pitch pitch to move to the next y line
yading@10 126 * @param[in] flags pointer to the array of column flags (unused here)
yading@10 127 */
yading@10 128 void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 129 const uint8_t *flags);
yading@10 130
yading@10 131 /**
yading@10 132 * inverse 1D column slant transform
yading@10 133 *
yading@10 134 * @param[in] in pointer to the vector of transform coefficients
yading@10 135 * @param[out] out pointer to the output buffer (frame)
yading@10 136 * @param[in] pitch pitch to move to the next y line
yading@10 137 * @param[in] flags pointer to the array of column flags:
yading@10 138 * != 0 - non_empty column, 0 - empty one
yading@10 139 * (this array must be filled by caller)
yading@10 140 */
yading@10 141 void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch,
yading@10 142 const uint8_t *flags);
yading@10 143
yading@10 144 /**
yading@10 145 * DC-only inverse row slant transform
yading@10 146 */
yading@10 147 void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
yading@10 148
yading@10 149 /**
yading@10 150 * DC-only inverse column slant transform
yading@10 151 */
yading@10 152 void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
yading@10 153
yading@10 154 /**
yading@10 155 * Copy the pixels into the frame buffer.
yading@10 156 */
yading@10 157 void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags);
yading@10 158
yading@10 159 /**
yading@10 160 * Copy the DC coefficient into the first pixel of the block and
yading@10 161 * zero all others.
yading@10 162 */
yading@10 163 void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
yading@10 164
yading@10 165 /**
yading@10 166 * 8x8 block motion compensation with adding delta
yading@10 167 *
yading@10 168 * @param[in,out] buf pointer to the block in the current frame buffer containing delta
yading@10 169 * @param[in] ref_buf pointer to the corresponding block in the reference frame
yading@10 170 * @param[in] pitch pitch for moving to the next y line
yading@10 171 * @param[in] mc_type interpolation type
yading@10 172 */
yading@10 173 void ff_ivi_mc_8x8_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type);
yading@10 174
yading@10 175 /**
yading@10 176 * 4x4 block motion compensation with adding delta
yading@10 177 *
yading@10 178 * @param[in,out] buf pointer to the block in the current frame buffer containing delta
yading@10 179 * @param[in] ref_buf pointer to the corresponding block in the reference frame
yading@10 180 * @param[in] pitch pitch for moving to the next y line
yading@10 181 * @param[in] mc_type interpolation type
yading@10 182 */
yading@10 183 void ff_ivi_mc_4x4_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type);
yading@10 184
yading@10 185 /**
yading@10 186 * motion compensation without adding delta
yading@10 187 *
yading@10 188 * @param[in,out] buf pointer to the block in the current frame receiving the result
yading@10 189 * @param[in] ref_buf pointer to the corresponding block in the reference frame
yading@10 190 * @param[in] pitch pitch for moving to the next y line
yading@10 191 * @param[in] mc_type interpolation type
yading@10 192 */
yading@10 193 void ff_ivi_mc_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type);
yading@10 194
yading@10 195 /**
yading@10 196 * 4x4 block motion compensation without adding delta
yading@10 197 *
yading@10 198 * @param[in,out] buf pointer to the block in the current frame receiving the result
yading@10 199 * @param[in] ref_buf pointer to the corresponding block in the reference frame
yading@10 200 * @param[in] pitch pitch for moving to the next y line
yading@10 201 * @param[in] mc_type interpolation type
yading@10 202 */
yading@10 203 void ff_ivi_mc_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type);
yading@10 204
yading@10 205 #endif /* AVCODEC_IVI_DSP_H */