]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dsputil.h
fate: Add dependencies for dct/fft/mdct/rdft tests
[ffmpeg] / libavcodec / dsputil.h
index 7f467d16ff2d3d134c010616cc791bb377a31eb7..1dbc784fbb25036513c7861cf38b68ee8844191f 100644 (file)
 
 #include "avcodec.h"
 
-/* encoding scans */
-extern const uint8_t ff_alternate_horizontal_scan[64];
-extern const uint8_t ff_alternate_vertical_scan[64];
-extern const uint8_t ff_zigzag248_direct[64];
-
 extern uint32_t ff_square_tab[512];
 
-void ff_put_pixels8x8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride);
-void ff_avg_pixels8x8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride);
-void ff_put_pixels16x16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride);
-void ff_avg_pixels16x16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride);
-
-void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy,
-              int dxx, int dxy, int dyx, int dyy, int shift, int r,
-              int width, int height);
-
-/* minimum alignment rules ;)
- * If you notice errors in the align stuff, need more alignment for some ASM code
- * for some CPU or need to use a function with less aligned data then send a mail
- * to the libav-devel mailing list, ...
- *
- * !warning These alignments might not match reality, (missing attribute((align))
- * stuff somewhere possible).
- * I (Michael) did not check them, these are just the alignments which I think
- * could be reached easily ...
- *
- * !future video codecs might need functions with less strict alignment
- */
-
-/* add and put pixel (decoding)
- * Block sizes for op_pixels_func are 8x4,8x8 16x8 16x16.
- * h for op_pixels_func is limited to { width / 2, width },
- * but never larger than 16 and never smaller than 4. */
-typedef void (*qpel_mc_func)(uint8_t *dst /* align width (8 or 16) */,
-                             uint8_t *src /* align 1 */, ptrdiff_t stride);
-
-typedef void (*op_fill_func)(uint8_t *block /* align width (8 or 16) */,
-                             uint8_t value, int line_size, int h);
-
-#define DEF_OLD_QPEL(name)                                                     \
-    void ff_put_        ## name(uint8_t *dst /* align width (8 or 16) */,      \
-                                uint8_t *src /* align 1 */, ptrdiff_t stride); \
-    void ff_put_no_rnd_ ## name(uint8_t *dst /* align width (8 or 16) */,      \
-                                uint8_t *src /* align 1 */, ptrdiff_t stride); \
-    void ff_avg_        ## name(uint8_t *dst /* align width (8 or 16) */,      \
-                                uint8_t *src /* align 1 */, ptrdiff_t stride);
-
-DEF_OLD_QPEL(qpel16_mc11_old_c)
-DEF_OLD_QPEL(qpel16_mc31_old_c)
-DEF_OLD_QPEL(qpel16_mc12_old_c)
-DEF_OLD_QPEL(qpel16_mc32_old_c)
-DEF_OLD_QPEL(qpel16_mc13_old_c)
-DEF_OLD_QPEL(qpel16_mc33_old_c)
-DEF_OLD_QPEL(qpel8_mc11_old_c)
-DEF_OLD_QPEL(qpel8_mc31_old_c)
-DEF_OLD_QPEL(qpel8_mc12_old_c)
-DEF_OLD_QPEL(qpel8_mc32_old_c)
-DEF_OLD_QPEL(qpel8_mc13_old_c)
-DEF_OLD_QPEL(qpel8_mc33_old_c)
-
 struct MpegEncContext;
 /* Motion estimation:
  * h is limited to { width / 2, width, 2 * width },
@@ -137,22 +79,8 @@ typedef struct DSPContext {
     void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
                                uint8_t *pixels /* align 8 */,
                                int line_size);
-    void (*add_pixels8)(uint8_t *pixels, int16_t *block, int line_size);
     int (*sum_abs_dctelem)(int16_t *block /* align 16 */);
-    /**
-     * translational global motion compensation.
-     */
-    void (*gmc1)(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */,
-                 int srcStride, int h, int x16, int y16, int rounder);
-    /**
-     * global motion compensation.
-     */
-    void (*gmc)(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */,
-                int stride, int h, int ox, int oy,
-                int dxx, int dxy, int dyx, int dyy,
-                int shift, int r, int width, int height);
-    void (*clear_block)(int16_t *block /* align 16 */);
-    void (*clear_blocks)(int16_t *blocks /* align 16 */);
+
     int (*pix_sum)(uint8_t *pix, int line_size);
     int (*pix_norm1)(uint8_t *pix, int line_size);
 
@@ -176,47 +104,8 @@ typedef struct DSPContext {
     me_cmp_func ildct_cmp[6]; // only width 16 used
     me_cmp_func frame_skip_cmp[6]; // only width 8 used
 
-    int (*ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2,
-                             int size);
-
-    qpel_mc_func put_qpel_pixels_tab[2][16];
-    qpel_mc_func avg_qpel_pixels_tab[2][16];
-    qpel_mc_func put_no_rnd_qpel_pixels_tab[2][16];
-    qpel_mc_func put_mspel_pixels_tab[8];
-
     me_cmp_func pix_abs[2][4];
 
-    /* HuffYUV specific */
-    void (*add_bytes)(uint8_t *dst /* align 16 */,
-                      uint8_t *src /* align 16 */,
-                      int w);
-    void (*diff_bytes)(uint8_t *dst /* align 16 */,
-                       uint8_t *src1 /* align 16 */,
-                       uint8_t *src2 /* align 1 */,
-                       int w);
-    /**
-     * Subtract HuffYUV's variant of median prediction.
-     * Note, this might read from src1[-1], src2[-1].
-     */
-    void (*sub_hfyu_median_prediction)(uint8_t *dst, const uint8_t *src1,
-                                       const uint8_t *src2, int w,
-                                       int *left, int *left_top);
-    void (*add_hfyu_median_prediction)(uint8_t *dst, const uint8_t *top,
-                                       const uint8_t *diff, int w,
-                                       int *left, int *left_top);
-    int (*add_hfyu_left_prediction)(uint8_t *dst, const uint8_t *src,
-                                    int w, int left);
-    void (*add_hfyu_left_prediction_bgr32)(uint8_t *dst, const uint8_t *src,
-                                           int w, int *red, int *green,
-                                           int *blue, int *alpha);
-    void (*bswap_buf)(uint32_t *dst, const uint32_t *src, int w);
-    void (*bswap16_buf)(uint16_t *dst, const uint16_t *src, int len);
-
-    /* assume len is a multiple of 8, and arrays are 16-byte aligned */
-    void (*vector_clipf)(float *dst /* align 16 */,
-                         const float *src /* align 16 */,
-                         float min, float max, int len /* align 16 */);
-
     /* (I)DCT */
     void (*fdct)(int16_t *block /* align 16 */);
     void (*fdct248)(int16_t *block /* align 16 */);
@@ -276,42 +165,6 @@ typedef struct DSPContext {
 
     void (*shrink[4])(uint8_t *dst, int dst_wrap, const uint8_t *src,
                       int src_wrap, int width, int height);
-
-    /**
-     * Calculate scalar product of two vectors.
-     * @param len length of vectors, should be multiple of 16
-     */
-    int32_t (*scalarproduct_int16)(const int16_t *v1,
-                                   const int16_t *v2 /* align 16 */, int len);
-    /* ape functions */
-    /**
-     * Calculate scalar product of v1 and v2,
-     * and v1[i] += v3[i] * mul
-     * @param len length of vectors, should be multiple of 16
-     */
-    int32_t (*scalarproduct_and_madd_int16)(int16_t *v1 /* align 16 */,
-                                            const int16_t *v2,
-                                            const int16_t *v3,
-                                            int len, int mul);
-
-    /**
-     * Clip each element in an array of int32_t to a given minimum and
-     * maximum value.
-     * @param dst  destination array
-     *             constraints: 16-byte aligned
-     * @param src  source array
-     *             constraints: 16-byte aligned
-     * @param min  minimum value
-     *             constraints: must be in the range [-(1 << 24), 1 << 24]
-     * @param max  maximum value
-     *             constraints: must be in the range [-(1 << 24), 1 << 24]
-     * @param len  number of elements in the array
-     *             constraints: multiple of 32 greater than zero
-     */
-    void (*vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min,
-                              int32_t max, unsigned int len);
-
-    op_fill_func fill_block_tab[2];
 } DSPContext;
 
 void ff_dsputil_static_init(void);
@@ -321,8 +174,6 @@ void ff_set_cmp(DSPContext *c, me_cmp_func *cmp, int type);
 
 void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx,
                          unsigned high_bit_depth);
-void ff_dsputil_init_bfin(DSPContext *c, AVCodecContext *avctx,
-                          unsigned high_bit_depth);
 void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx,
                          unsigned high_bit_depth);
 void ff_dsputil_init_x86(DSPContext *c, AVCodecContext *avctx,