Path: blob/master/dep/ffmpeg/include/libavcodec/avdct.h
4216 views
/*1* This file is part of FFmpeg.2*3* FFmpeg is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* FFmpeg is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with FFmpeg; if not, write to the Free Software15* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16*/1718#ifndef AVCODEC_AVDCT_H19#define AVCODEC_AVDCT_H2021#include "libavutil/opt.h"2223/**24* AVDCT context.25* @note function pointers can be NULL if the specific features have been26* disabled at build time.27*/28typedef struct AVDCT {29const AVClass *av_class;3031void (*idct)(int16_t *block /* align 16 */);3233/**34* IDCT input permutation.35* Several optimized IDCTs need a permutated input (relative to the36* normal order of the reference IDCT).37* This permutation must be performed before the idct_put/add.38* Note, normally this can be merged with the zigzag/alternate scan<br>39* An example to avoid confusion:40* - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...)41* - (x -> reference DCT -> reference IDCT -> x)42* - (x -> reference DCT -> simple_mmx_perm = idct_permutation43* -> simple_idct_mmx -> x)44* - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant45* -> simple_idct_mmx -> ...)46*/47uint8_t idct_permutation[64];4849void (*fdct)(int16_t *block /* align 16 */);505152/**53* DCT algorithm.54* must use AVOptions to set this field.55*/56int dct_algo;5758/**59* IDCT algorithm.60* must use AVOptions to set this field.61*/62int idct_algo;6364void (*get_pixels)(int16_t *block /* align 16 */,65const uint8_t *pixels /* align 8 */,66ptrdiff_t line_size);6768int bits_per_sample;6970void (*get_pixels_unaligned)(int16_t *block /* align 16 */,71const uint8_t *pixels,72ptrdiff_t line_size);73} AVDCT;7475/**76* Allocates a AVDCT context.77* This needs to be initialized with avcodec_dct_init() after optionally78* configuring it with AVOptions.79*80* To free it use av_free()81*/82AVDCT *avcodec_dct_alloc(void);83int avcodec_dct_init(AVDCT *);8485const AVClass *avcodec_dct_get_class(void);8687#endif /* AVCODEC_AVDCT_H */888990