chromium/third_party/ffmpeg/libavcodec/idctdsp.h

/*
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef AVCODEC_IDCTDSP_H
#define AVCODEC_IDCTDSP_H

#include <stddef.h>
#include <stdint.h>

struct AVCodecContext;

enum idct_permutation_type {};

void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64],
                          const uint8_t permutation[64]);
void ff_init_scantable_permutation(uint8_t *idct_permutation,
                                   enum idct_permutation_type perm_type);
int ff_init_scantable_permutation_x86(uint8_t *idct_permutation,
                                      enum idct_permutation_type perm_type);

IDCTDSPContext;

void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
                             ptrdiff_t line_size);
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
                             ptrdiff_t line_size);

void ff_idctdsp_init(IDCTDSPContext *c, struct AVCodecContext *avctx);

void ff_idctdsp_init_aarch64(IDCTDSPContext *c, struct AVCodecContext *avctx,
                             unsigned high_bit_depth);
void ff_idctdsp_init_alpha(IDCTDSPContext *c, struct AVCodecContext *avctx,
                           unsigned high_bit_depth);
void ff_idctdsp_init_arm(IDCTDSPContext *c, struct AVCodecContext *avctx,
                         unsigned high_bit_depth);
void ff_idctdsp_init_ppc(IDCTDSPContext *c, struct AVCodecContext *avctx,
                         unsigned high_bit_depth);
void ff_idctdsp_init_riscv(IDCTDSPContext *c, struct AVCodecContext *avctx,
                           unsigned high_bit_depth);
void ff_idctdsp_init_x86(IDCTDSPContext *c, struct AVCodecContext *avctx,
                         unsigned high_bit_depth);
void ff_idctdsp_init_mips(IDCTDSPContext *c, struct AVCodecContext *avctx,
                          unsigned high_bit_depth);
void ff_idctdsp_init_loongarch(IDCTDSPContext *c, struct AVCodecContext *avctx,
                               unsigned high_bit_depth);

#endif /* AVCODEC_IDCTDSP_H */