]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jfdctfst.c
avcodec: Move all AVCodecParser.split functions to remove_extradata_bsf
[ffmpeg] / libavcodec / jfdctfst.c
index 804fd5766ed3c3b24403f6b687051445569b1350..bbcf5984901c89798e213eba631f16c11ed6d677 100644 (file)
@@ -1,9 +1,40 @@
 /*
- * jfdctfst.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
  * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
+ *
+ * The authors make NO WARRANTY or representation, either express or implied,
+ * with respect to this software, its quality, accuracy, merchantability, or
+ * fitness for a particular purpose.  This software is provided "AS IS", and
+ * you, its user, assume the entire risk as to its quality and accuracy.
+ *
+ * This software is copyright (C) 1994-1996, Thomas G. Lane.
+ * All Rights Reserved except as specified below.
+ *
+ * Permission is hereby granted to use, copy, modify, and distribute this
+ * software (or portions thereof) for any purpose, without fee, subject to
+ * these conditions:
+ * (1) If any part of the source code for this software is distributed, then
+ * this README file must be included, with this copyright and no-warranty
+ * notice unaltered; and any additions, deletions, or changes to the original
+ * files must be clearly indicated in accompanying documentation.
+ * (2) If only executable code is distributed, then the accompanying
+ * documentation must state that "this software is based in part on the work
+ * of the Independent JPEG Group".
+ * (3) Permission for use of this software is granted only if the user accepts
+ * full responsibility for any undesirable consequences; the authors accept
+ * NO LIABILITY for damages of any kind.
+ *
+ * These conditions apply to any software derived from or based on the IJG
+ * code, not just to the unmodified library.  If you use our work, you ought
+ * to acknowledge us.
+ *
+ * Permission is NOT granted for the use of any IJG author's name or company
+ * name in advertising or publicity relating to this software or products
+ * derived from it.  This software may be referred to only as "the Independent
+ * JPEG Group's software".
+ *
+ * We specifically permit and encourage the use of this software as the basis
+ * of commercial products, provided that all warranty or liability claims are
+ * assumed by the product vendor.
  *
  * This file contains a fast, not so accurate integer implementation of the
  * forward DCT (Discrete Cosine Transform).
  */
 
 /**
- * @file jfdctfst.c
+ * @file
  * Independent JPEG Group's fast AAN dct.
  */
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "common.h"
-#include "dsputil.h"
+#include "libavutil/common.h"
+#include "dct.h"
 
 #define DCTSIZE 8
 #define GLOBAL(x) x
 #define RIGHT_SHIFT(x, n) ((x) >> (n))
-#define SHIFT_TEMPS
 
 /*
  * This module is specialized to the case DCTSIZE = 8.
 #endif
 
 
-/* Multiply a DCTELEM variable by an int32_t constant, and immediately
- * descale to yield a DCTELEM result.
+/* Multiply a int16_t variable by an int32_t constant, and immediately
+ * descale to yield a int16_t result.
  */
 
-#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
+#define MULTIPLY(var,const)  ((int16_t) DESCALE((var) * (const), CONST_BITS))
 
-static always_inline void row_fdct(DCTELEM * data){
-  int_fast16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  int_fast16_t tmp10, tmp11, tmp12, tmp13;
-  int_fast16_t z1, z2, z3, z4, z5, z11, z13;
-  DCTELEM *dataptr;
+static av_always_inline void row_fdct(int16_t * data){
+  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  int tmp10, tmp11, tmp12, tmp13;
+  int z1, z2, z3, z4, z5, z11, z13;
+  int16_t *dataptr;
   int ctr;
-  SHIFT_TEMPS
 
   /* Pass 1: process rows. */
 
@@ -176,14 +205,13 @@ static always_inline void row_fdct(DCTELEM * data){
  */
 
 GLOBAL(void)
-fdct_ifast (DCTELEM * data)
+ff_fdct_ifast (int16_t * data)
 {
-  int_fast16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  int_fast16_t tmp10, tmp11, tmp12, tmp13;
-  int_fast16_t z1, z2, z3, z4, z5, z11, z13;
-  DCTELEM *dataptr;
+  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  int tmp10, tmp11, tmp12, tmp13;
+  int z1, z2, z3, z4, z5, z11, z13;
+  int16_t *dataptr;
   int ctr;
-  SHIFT_TEMPS
 
   row_fdct(data);
 
@@ -243,14 +271,13 @@ fdct_ifast (DCTELEM * data)
  */
 
 GLOBAL(void)
-fdct_ifast248 (DCTELEM * data)
+ff_fdct_ifast248 (int16_t * data)
 {
-  int_fast16_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  int_fast16_t tmp10, tmp11, tmp12, tmp13;
-  int_fast16_t z1;
-  DCTELEM *dataptr;
+  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  int tmp10, tmp11, tmp12, tmp13;
+  int z1;
+  int16_t *dataptr;
   int ctr;
-  SHIFT_TEMPS
 
   row_fdct(data);