Browse files

Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'

* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f':
  Drop DCTELEM typedef

Conflicts:
	libavcodec/alpha/dsputil_alpha.h
	libavcodec/alpha/motion_est_alpha.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/bfin/dsputil_bfin.h
	libavcodec/bfin/pixels_bfin.S
	libavcodec/cavs.c
	libavcodec/cavsdec.c
	libavcodec/dct-test.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/eamad.c
	libavcodec/h264_cavlc.c
	libavcodec/h264idct_template.c
	libavcodec/mpeg12.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/proresdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents a793a58 + 88bd7fd commit ac8987591f5503768e7587c25693928f26fcb3d1 @michaelni michaelni committed Jan 23, 2013
Showing with 929 additions and 907 deletions.
  1. +1 −1 doc/optimization.txt
  2. +5 −5 libavcodec/4xm.c
  3. +6 −6 libavcodec/alpha/dsputil_alpha.c
  4. +11 −11 libavcodec/alpha/dsputil_alpha.h
  5. +2 −2 libavcodec/alpha/dsputil_alpha_asm.S
  6. +3 −3 libavcodec/alpha/motion_est_alpha.c
  7. +4 −4 libavcodec/alpha/mpegvideo_alpha.c
  8. +6 −6 libavcodec/alpha/simple_idct_alpha.c
  9. +9 −9 libavcodec/arm/dsputil_init_arm.c
  10. +3 −3 libavcodec/arm/dsputil_init_armv5te.c
  11. +7 −7 libavcodec/arm/dsputil_init_armv6.c
  12. +8 −8 libavcodec/arm/dsputil_init_neon.c
  13. +8 −8 libavcodec/arm/h264dsp_init_arm.c
  14. +1 −1 libavcodec/arm/jrevdct_arm.S
  15. +2 −2 libavcodec/arm/mpegvideo_arm.c
  16. +4 −4 libavcodec/arm/mpegvideo_armv5te.c
  17. +3 −3 libavcodec/arm/rv34dsp_init_arm.c
  18. +3 −3 libavcodec/arm/rv34dsp_neon.S
  19. +3 −3 libavcodec/arm/simple_idct_armv6.S
  20. +3 −3 libavcodec/arm/simple_idct_neon.S
  21. +3 −3 libavcodec/arm/vp3dsp_init_arm.c
  22. +1 −1 libavcodec/arm/vp8.h
  23. +6 −6 libavcodec/arm/vp8dsp_armv6.S
  24. +6 −6 libavcodec/arm/vp8dsp_init_armv6.c
  25. +5 −5 libavcodec/arm/vp8dsp_init_neon.c
  26. +1 −1 libavcodec/asv.h
  27. +4 −4 libavcodec/asvdec.c
  28. +4 −4 libavcodec/asvenc.c
  29. +1 −1 libavcodec/bfin/config_bfin.h
  30. +3 −3 libavcodec/bfin/dsputil_bfin.c
  31. +11 −10 libavcodec/bfin/dsputil_bfin.h
  32. +4 −4 libavcodec/bfin/fdct_bfin.S
  33. +2 −2 libavcodec/bfin/idct_bfin.S
  34. +1 −1 libavcodec/bfin/mpegvideo_bfin.c
  35. +4 −4 libavcodec/bfin/pixels_bfin.S
  36. +2 −2 libavcodec/bfin/vp3_bfin.c
  37. +2 −2 libavcodec/bfin/vp3_idct_bfin.S
  38. +3 −3 libavcodec/bink.c
  39. +1 −1 libavcodec/cavs.c
  40. +1 −1 libavcodec/cavs.h
  41. +4 −4 libavcodec/cavsdec.c
  42. +2 −2 libavcodec/cavsdsp.c
  43. +1 −1 libavcodec/cavsdsp.h
  44. +20 −19 libavcodec/dct-test.c
  45. +7 −7 libavcodec/dnxhddec.c
  46. +10 −10 libavcodec/dnxhdenc.c
  47. +2 −2 libavcodec/dnxhdenc.h
  48. +27 −28 libavcodec/dsputil.c
  49. +48 −49 libavcodec/dsputil.h
  50. +7 −7 libavcodec/dsputil_template.c
  51. +2 −2 libavcodec/dv.c
  52. +3 −3 libavcodec/dvdata.h
  53. +4 −4 libavcodec/dvdec.c
  54. +3 −3 libavcodec/eaidct.c
  55. +1 −2 libavcodec/eaidct.h
  56. +3 −3 libavcodec/eamad.c
  57. +3 −3 libavcodec/eatgq.c
  58. +3 −3 libavcodec/eatqi.c
  59. +3 −3 libavcodec/faandct.c
  60. +3 −3 libavcodec/faandct.h
  61. +4 −4 libavcodec/faanidct.c
  62. +3 −4 libavcodec/faanidct.h
  63. +2 −2 libavcodec/h261dec.c
  64. +4 −4 libavcodec/h261enc.c
  65. +1 −1 libavcodec/h263.c
  66. +4 −4 libavcodec/h263.h
  67. +5 −5 libavcodec/h264.c
  68. +3 −4 libavcodec/h264.h
  69. +28 −8 libavcodec/h264_cabac.c
  70. +3 −3 libavcodec/h264_cavlc.c
  71. +1 −1 libavcodec/h264_mb_template.c
  72. +11 −13 libavcodec/h264dsp.h
  73. +16 −16 libavcodec/h264idct_template.c
  74. +6 −6 libavcodec/h264pred.h
  75. +10 −10 libavcodec/h264pred_template.c
  76. +3 −3 libavcodec/ituh263dec.c
  77. +2 −2 libavcodec/ituh263enc.c
  78. +9 −9 libavcodec/jfdctfst.c
  79. +14 −14 libavcodec/jfdctint_template.c
  80. +25 −25 libavcodec/jrevdct.c
  81. +4 −4 libavcodec/mdec.c
  82. +2 −2 libavcodec/mimic.c
  83. +6 −6 libavcodec/mjpegdec.c
  84. +2 −2 libavcodec/mjpegdec.h
  85. +2 −2 libavcodec/mjpegenc.c
  86. +3 −2 libavcodec/mjpegenc.h
  87. +10 −10 libavcodec/mpeg12.c
  88. +1 −1 libavcodec/mpeg12.h
  89. +4 −4 libavcodec/mpeg12enc.c
  90. +2 −2 libavcodec/mpeg4video.h
  91. +4 −4 libavcodec/mpeg4videodec.c
  92. +8 −8 libavcodec/mpeg4videoenc.c
  93. +22 −22 libavcodec/mpegvideo.c
  94. +25 −25 libavcodec/mpegvideo.h
  95. +17 −17 libavcodec/mpegvideo_enc.c
  96. +1 −1 libavcodec/mpegvideo_xvmc.c
  97. +3 −3 libavcodec/msmpeg4.c
  98. +3 −4 libavcodec/msmpeg4.h
  99. +2 −2 libavcodec/msmpeg4enc.c
  100. +3 −3 libavcodec/ppc/dsputil_altivec.c
  101. +7 −7 libavcodec/ppc/dsputil_ppc.c
  102. +9 −9 libavcodec/ppc/h264_altivec.c
  103. +1 −1 libavcodec/ppc/mpegvideo_altivec.c
  104. +2 −2 libavcodec/ppc/vc1dsp_altivec.c
  105. +2 −2 libavcodec/ppc/vp3dsp_altivec.c
  106. +7 −7 libavcodec/proresdec2.c
  107. +6 −5 libavcodec/proresdec_lgpl.c
  108. +4 −3 libavcodec/proresdsp.c
  109. +3 −3 libavcodec/proresdsp.h
  110. +5 −5 libavcodec/proresenc_anatoliy.c
  111. +9 −8 libavcodec/proresenc_kostya.c
  112. +3 −3 libavcodec/rtjpeg.c
  113. +1 −1 libavcodec/rtjpeg.h
  114. +10 −10 libavcodec/rv34.c
  115. +6 −6 libavcodec/rv34dsp.c
  116. +2 −2 libavcodec/rv34dsp.h
  117. +4 −4 libavcodec/sh4/dsputil_sh4.c
  118. +1 −1 libavcodec/sh4/dsputil_sh4.h
  119. +1 −1 libavcodec/sh4/idct_sh4.c
  120. +9 −9 libavcodec/simple_idct.c
  121. +11 −12 libavcodec/simple_idct.h
  122. +7 −7 libavcodec/simple_idct_template.c
  123. +3 −4 libavcodec/sparc/dsputil_vis.h
  124. +3 −3 libavcodec/sparc/simple_idct_vis.c
  125. +3 −3 libavcodec/svq3.c
  126. +1 −1 libavcodec/vc1.h
  127. +5 −5 libavcodec/vc1dec.c
  128. +14 −14 libavcodec/vc1dsp.c
  129. +10 −10 libavcodec/vc1dsp.h
  130. +4 −4 libavcodec/vp3.c
  131. +8 −3 libavcodec/vp3dsp.c
  132. +3 −4 libavcodec/vp3dsp.h
  133. +3 −3 libavcodec/vp56.h
  134. +2 −2 libavcodec/vp8.c
  135. +2 −2 libavcodec/vp8.h
  136. +7 −7 libavcodec/vp8dsp.c
  137. +8 −7 libavcodec/vp8dsp.h
  138. +2 −2 libavcodec/wmv2.c
  139. +1 −1 libavcodec/wmv2.h
  140. +2 −2 libavcodec/wmv2dec.c
  141. +3 −2 libavcodec/wmv2dsp.c
  142. +2 −3 libavcodec/wmv2dsp.h
  143. +1 −1 libavcodec/wmv2enc.c
  144. +1 −1 libavcodec/x86/dnxhdenc.c
  145. +12 −12 libavcodec/x86/dsputil_mmx.c
  146. +5 −5 libavcodec/x86/dsputil_mmx.h
  147. +2 −2 libavcodec/x86/dsputilenc.asm
  148. +4 −4 libavcodec/x86/dsputilenc_mmx.c
  149. +13 −13 libavcodec/x86/h264_idct.asm
  150. +1 −0 libavcodec/x86/h264_intrapred_init.c
  151. +4 −4 libavcodec/x86/h264dsp_init.c
  152. +4 −4 libavcodec/x86/idct_mmx_xvid.c
  153. +4 −6 libavcodec/x86/idct_xvid.h
  154. +8 −8 libavcodec/x86/mpegvideo.c
  155. +1 −1 libavcodec/x86/mpegvideoenc_template.c
  156. +1 −1 libavcodec/x86/proresdsp.asm
  157. +4 −3 libavcodec/x86/proresdsp_init.c
  158. +1 −1 libavcodec/x86/rv34dsp.asm
  159. +3 −3 libavcodec/x86/rv34dsp_init.c
  160. +2 −2 libavcodec/x86/simple_idct.c
  161. +4 −4 libavcodec/x86/vc1dsp_mmx.c
  162. +6 −5 libavcodec/x86/vp3dsp_init.c
  163. +5 −5 libavcodec/x86/vp8dsp.asm
  164. +9 −9 libavcodec/x86/vp8dsp_init.c
  165. +21 −21 libavfilter/libmpcodecs/vf_fspp.c
  166. +14 −14 libavfilter/libmpcodecs/vf_pp7.c
  167. +10 −10 libavfilter/libmpcodecs/vf_spp.c
  168. +1 −1 libavfilter/vf_decimate.c
  169. +1 −1 tools/patcheck
View
2 doc/optimization.txt
@@ -148,7 +148,7 @@ Alignment:
Some instructions on some architectures have strict alignment restrictions,
for example most SSE/SSE2 instructions on x86.
The minimum guaranteed alignment is written in the .h files, for example:
- void (*put_pixels_clamped)(const DCTELEM *block/*align 16*/, UINT8 *pixels/*align 8*/, int line_size);
+ void (*put_pixels_clamped)(const int16_t *block/*align 16*/, UINT8 *pixels/*align 8*/, int line_size);
General Tips:
View
10 libavcodec/4xm.c
@@ -138,7 +138,7 @@ typedef struct FourXContext {
int mv[256];
VLC pre_vlc;
int last_dc;
- DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
+ DECLARE_ALIGNED(16, int16_t, block)[6][64];
void *bitstream_buffer;
unsigned int bitstream_buffer_size;
int version;
@@ -153,7 +153,7 @@ typedef struct FourXContext {
#define MULTIPLY(var, const) (((var) * (const)) >> 16)
-static void idct(DCTELEM block[64])
+static void idct(int16_t block[64])
{
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
int tmp10, tmp11, tmp12, tmp13;
@@ -471,7 +471,7 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length)
* decode block and dequantize.
* Note this is almost identical to MJPEG.
*/
-static int decode_i_block(FourXContext *f, DCTELEM *block)
+static int decode_i_block(FourXContext *f, int16_t *block)
{
int code, i, j, level, val;
@@ -521,7 +521,7 @@ static int decode_i_block(FourXContext *f, DCTELEM *block)
static inline void idct_put(FourXContext *f, int x, int y)
{
- DCTELEM (*block)[64] = f->block;
+ int16_t (*block)[64] = f->block;
int stride = f->current_picture->linesize[0] >> 1;
int i;
uint16_t *dst = ((uint16_t*)f->current_picture->data[0]) + y * stride + x;
@@ -542,7 +542,7 @@ static inline void idct_put(FourXContext *f, int x, int y)
* cr = (-1b - 4g + 5r) / 14 */
for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) {
- DCTELEM *temp = block[(x >> 2) + 2 * (y >> 2)] +
+ int16_t *temp = block[(x >> 2) + 2 * (y >> 2)] +
2 * (x & 3) + 2 * 8 * (y & 3); // FIXME optimize
int cb = block[4][x + 8 * y];
int cr = block[5][x + 8 * y];
View
12 libavcodec/alpha/dsputil_alpha.c
@@ -23,15 +23,15 @@
#include "dsputil_alpha.h"
#include "asm.h"
-void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
+void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
-void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
+void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
#if 0
/* These functions were the base for the optimized assembler routines,
and remain here for documentation purposes. */
-static void put_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels,
+static void put_pixels_clamped_mvi(const int16_t *block, uint8_t *pixels,
int line_size)
{
int i = 8;
@@ -55,7 +55,7 @@ static void put_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels,
} while (--i);
}
-void add_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels,
+void add_pixels_clamped_mvi(const int16_t *block, uint8_t *pixels,
int line_size)
{
int h = 8;
@@ -100,9 +100,9 @@ void add_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels,
}
#endif
-static void clear_blocks_axp(DCTELEM *blocks) {
+static void clear_blocks_axp(int16_t *blocks) {
uint64_t *p = (uint64_t *) blocks;
- int n = sizeof(DCTELEM) * 6 * 64;
+ int n = sizeof(int16_t) * 6 * 64;
do {
p[0] = 0;
View
22 libavcodec/alpha/dsputil_alpha.h
@@ -19,26 +19,26 @@
#ifndef AVCODEC_ALPHA_DSPUTIL_ALPHA_H
#define AVCODEC_ALPHA_DSPUTIL_ALPHA_H
-#include "libavcodec/dsputil.h"
+#include <stdint.h>
-void ff_simple_idct_axp(DCTELEM *block);
-void ff_simple_idct_put_axp(uint8_t *dest, int line_size, DCTELEM *block);
-void ff_simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block);
+void ff_simple_idct_axp(int16_t *block);
+void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block);
+void ff_simple_idct_add_axp(uint8_t *dest, int line_size, int16_t *block);
void put_pixels_axp_asm(uint8_t *block, const uint8_t *pixels,
int line_size, int h);
-void put_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels,
+void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
int line_size);
-void add_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels,
+void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
int line_size);
-extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
+extern void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
-extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
+extern void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
-void get_pixels_mvi(DCTELEM *av_restrict block,
- const uint8_t *av_restrict pixels, int line_size);
-void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2,
+void get_pixels_mvi(int16_t *restrict block,
+ const uint8_t *restrict pixels, int line_size);
+void diff_pixels_mvi(int16_t *block, const uint8_t *s1, const uint8_t *s2,
int stride);
int pix_abs8x8_mvi(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h);
int pix_abs16x16_mvi_asm(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h);
View
4 libavcodec/alpha/dsputil_alpha_asm.S
@@ -135,7 +135,7 @@ $aligned:
.end put_pixels_axp_asm
/************************************************************************
- * void put_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels,
+ * void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
* int line_size)
*/
.align 6
@@ -185,7 +185,7 @@ put_pixels_clamped_mvi_asm:
.end put_pixels_clamped_mvi_asm
/************************************************************************
- * void add_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels,
+ * void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
* int line_size)
*/
.align 6
View
6 libavcodec/alpha/motion_est_alpha.c
@@ -23,8 +23,8 @@
#include "dsputil_alpha.h"
#include "asm.h"
-void get_pixels_mvi(DCTELEM *av_restrict block,
- const uint8_t *av_restrict pixels, int line_size)
+void get_pixels_mvi(int16_t *restrict block,
+ const uint8_t *restrict pixels, int line_size)
{
int h = 8;
@@ -40,7 +40,7 @@ void get_pixels_mvi(DCTELEM *av_restrict block,
} while (--h);
}
-void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2,
+void diff_pixels_mvi(int16_t *block, const uint8_t *s1, const uint8_t *s2,
int stride) {
int h = 8;
uint64_t mask = 0x4040;
View
8 libavcodec/alpha/mpegvideo_alpha.c
@@ -23,7 +23,7 @@
#include "libavcodec/mpegvideo.h"
#include "asm.h"
-static void dct_unquantize_h263_axp(DCTELEM *block, int n_coeffs,
+static void dct_unquantize_h263_axp(int16_t *block, int n_coeffs,
uint64_t qscale, uint64_t qadd)
{
uint64_t qmul = qscale << 1;
@@ -69,12 +69,12 @@ static void dct_unquantize_h263_axp(DCTELEM *block, int n_coeffs,
}
}
-static void dct_unquantize_h263_intra_axp(MpegEncContext *s, DCTELEM *block,
+static void dct_unquantize_h263_intra_axp(MpegEncContext *s, int16_t *block,
int n, int qscale)
{
int n_coeffs;
uint64_t qadd;
- DCTELEM block0 = block[0];
+ int16_t block0 = block[0];
if (!s->h263_aic) {
if (n < 4)
@@ -96,7 +96,7 @@ static void dct_unquantize_h263_intra_axp(MpegEncContext *s, DCTELEM *block,
block[0] = block0;
}
-static void dct_unquantize_h263_inter_axp(MpegEncContext *s, DCTELEM *block,
+static void dct_unquantize_h263_inter_axp(MpegEncContext *s, int16_t *block,
int n, int qscale)
{
int n_coeffs = s->inter_scantable.raster_end[s->block_last_index[n]];
View
12 libavcodec/alpha/simple_idct_alpha.c
@@ -44,7 +44,7 @@
#define COL_SHIFT 20
/* 0: all entries 0, 1: only first entry nonzero, 2: otherwise */
-static inline int idct_row(DCTELEM *row)
+static inline int idct_row(int16_t *row)
{
int a0, a1, a2, a3, b0, b1, b2, b3, t;
uint64_t l, r, t2;
@@ -152,7 +152,7 @@ static inline int idct_row(DCTELEM *row)
return 2;
}
-static inline void idct_col(DCTELEM *col)
+static inline void idct_col(int16_t *col)
{
int a0, a1, a2, a3, b0, b1, b2, b3;
@@ -229,7 +229,7 @@ static inline void idct_col(DCTELEM *col)
/* If all rows but the first one are zero after row transformation,
all rows will be identical after column transformation. */
-static inline void idct_col2(DCTELEM *col)
+static inline void idct_col2(int16_t *col)
{
int i;
uint64_t l, r;
@@ -251,7 +251,7 @@ static inline void idct_col2(DCTELEM *col)
stq(l, col + 14 * 4); stq(r, col + 15 * 4);
}
-void ff_simple_idct_axp(DCTELEM *block)
+void ff_simple_idct_axp(int16_t *block)
{
int i;
@@ -291,13 +291,13 @@ void ff_simple_idct_axp(DCTELEM *block)
}
}
-void ff_simple_idct_put_axp(uint8_t *dest, int line_size, DCTELEM *block)
+void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block)
{
ff_simple_idct_axp(block);
put_pixels_clamped_axp_p(block, dest, line_size);
}
-void ff_simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block)
+void ff_simple_idct_add_axp(uint8_t *dest, int line_size, int16_t *block)
{
ff_simple_idct_axp(block);
add_pixels_clamped_axp_p(block, dest, line_size);
View
18 libavcodec/arm/dsputil_init_arm.c
@@ -23,12 +23,12 @@
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
-void ff_j_rev_dct_arm(DCTELEM *data);
-void ff_simple_idct_arm(DCTELEM *data);
+void ff_j_rev_dct_arm(int16_t *data);
+void ff_simple_idct_arm(int16_t *data);
/* XXX: local hack */
-static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
-static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
+static void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
+static void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
void ff_put_pixels8_arm(uint8_t *block, const uint8_t *pixels, int line_size, int h);
void ff_put_pixels8_x2_arm(uint8_t *block, const uint8_t *pixels, int line_size, int h);
@@ -48,27 +48,27 @@ CALL_2X_PIXELS(ff_put_no_rnd_pixels16_x2_arm, ff_put_no_rnd_pixels8_x2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_y2_arm, ff_put_no_rnd_pixels8_y2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_xy2_arm, ff_put_no_rnd_pixels8_xy2_arm,8)
-void ff_add_pixels_clamped_arm(const DCTELEM *block, uint8_t *dest,
+void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
int line_size);
/* XXX: those functions should be suppressed ASAP when all IDCTs are
converted */
-static void j_rev_dct_arm_put(uint8_t *dest, int line_size, DCTELEM *block)
+static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block)
{
ff_j_rev_dct_arm (block);
ff_put_pixels_clamped(block, dest, line_size);
}
-static void j_rev_dct_arm_add(uint8_t *dest, int line_size, DCTELEM *block)
+static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block)
{
ff_j_rev_dct_arm (block);
ff_add_pixels_clamped(block, dest, line_size);
}
-static void simple_idct_arm_put(uint8_t *dest, int line_size, DCTELEM *block)
+static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block)
{
ff_simple_idct_arm (block);
ff_put_pixels_clamped(block, dest, line_size);
}
-static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block)
+static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
{
ff_simple_idct_arm (block);
ff_add_pixels_clamped(block, dest, line_size);
View
6 libavcodec/arm/dsputil_init_armv5te.c
@@ -21,9 +21,9 @@
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
-void ff_simple_idct_armv5te(DCTELEM *data);
-void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, DCTELEM *data);
-void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, DCTELEM *data);
+void ff_simple_idct_armv5te(int16_t *data);
+void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, int16_t *data);
+void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, int16_t *data);
av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx)
{
View
14 libavcodec/arm/dsputil_init_armv6.c
@@ -24,9 +24,9 @@
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
-void ff_simple_idct_armv6(DCTELEM *data);
-void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data);
-void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data);
+void ff_simple_idct_armv6(int16_t *data);
+void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data);
+void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data);
void ff_put_pixels16_armv6(uint8_t *, const uint8_t *, int, int);
void ff_put_pixels16_x2_armv6(uint8_t *, const uint8_t *, int, int);
@@ -46,12 +46,12 @@ void ff_put_pixels8_y2_no_rnd_armv6(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_armv6(uint8_t *, const uint8_t *, int, int);
-void ff_add_pixels_clamped_armv6(const DCTELEM *block,
- uint8_t *av_restrict pixels,
+void ff_add_pixels_clamped_armv6(const int16_t *block,
+ uint8_t *restrict pixels,
int line_size);
-void ff_get_pixels_armv6(DCTELEM *block, const uint8_t *pixels, int stride);
-void ff_diff_pixels_armv6(DCTELEM *block, const uint8_t *s1,
+void ff_get_pixels_armv6(int16_t *block, const uint8_t *pixels, int stride);
+void ff_diff_pixels_armv6(int16_t *block, const uint8_t *s1,
const uint8_t *s2, int stride);
int ff_pix_abs16_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
View
16 libavcodec/arm/dsputil_init_neon.c
@@ -25,12 +25,12 @@
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
-void ff_simple_idct_neon(DCTELEM *data);
-void ff_simple_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
-void ff_simple_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
+void ff_simple_idct_neon(int16_t *data);
+void ff_simple_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
+void ff_simple_idct_add_neon(uint8_t *dest, int line_size, int16_t *data);
-void ff_clear_block_neon(DCTELEM *block);
-void ff_clear_blocks_neon(DCTELEM *blocks);
+void ff_clear_block_neon(int16_t *block);
+void ff_clear_blocks_neon(int16_t *blocks);
void ff_put_pixels16_neon(uint8_t *, const uint8_t *, int, int);
void ff_put_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
@@ -62,9 +62,9 @@ void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
-void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
-void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
-void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
+void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int);
+void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
+void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, int);
void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
View
16 libavcodec/arm/h264dsp_init_arm.c
@@ -50,22 +50,22 @@ void ff_biweight_h264_pixels_4_neon(uint8_t *dst, uint8_t *src, int stride,
int height, int log2_den, int weightd,
int weights, int offset);
-void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
-void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
+void ff_h264_idct_add_neon(uint8_t *dst, int16_t *block, int stride);
+void ff_h264_idct_dc_add_neon(uint8_t *dst, int16_t *block, int stride);
void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset,
- DCTELEM *block, int stride,
+ int16_t *block, int stride,
const uint8_t nnzc[6*8]);
void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset,
- DCTELEM *block, int stride,
+ int16_t *block, int stride,
const uint8_t nnzc[6*8]);
void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
- DCTELEM *block, int stride,
+ int16_t *block, int stride,
const uint8_t nnzc[6*8]);
-void ff_h264_idct8_add_neon(uint8_t *dst, DCTELEM *block, int stride);
-void ff_h264_idct8_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
+void ff_h264_idct8_add_neon(uint8_t *dst, int16_t *block, int stride);
+void ff_h264_idct8_dc_add_neon(uint8_t *dst, int16_t *block, int stride);
void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset,
- DCTELEM *block, int stride,
+ int16_t *block, int stride,
const uint8_t nnzc[6*8]);
static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
View
2 libavcodec/arm/jrevdct_arm.S
@@ -66,7 +66,7 @@ row_loop:
ldrsh r2, [lr, # 2] @ r2 = 'd2'
@ Optimization for row that have all items except the first set to 0
- @ (this works as the DCTELEMS are always 4-byte aligned)
+ @ (this works as the int16_t are always 4-byte aligned)
ldr r5, [lr, # 0]
ldr r6, [lr, # 4]
ldr r3, [lr, # 8]
View
4 libavcodec/arm/mpegvideo_arm.c
@@ -34,9 +34,9 @@ CHK_OFFS(MpegEncContext, inter_scantable.raster_end, INTER_SCANTAB_RASTER_END);
CHK_OFFS(MpegEncContext, h263_aic, H263_AIC);
#endif
-void ff_dct_unquantize_h263_inter_neon(MpegEncContext *s, DCTELEM *block,
+void ff_dct_unquantize_h263_inter_neon(MpegEncContext *s, int16_t *block,
int n, int qscale);
-void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, DCTELEM *block,
+void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, int16_t *block,
int n, int qscale);
void ff_MPV_common_init_arm(MpegEncContext *s)
View
8 libavcodec/arm/mpegvideo_armv5te.c
@@ -25,15 +25,15 @@
#include "libavcodec/mpegvideo.h"
#include "mpegvideo_arm.h"
-void ff_dct_unquantize_h263_armv5te(DCTELEM *block, int qmul, int qadd, int count);
+void ff_dct_unquantize_h263_armv5te(int16_t *block, int qmul, int qadd, int count);
#ifdef ENABLE_ARM_TESTS
/**
* h263 dequantizer supplementary function, it is performance critical and needs to
* have optimized implementations for each architecture. Is also used as a reference
* implementation in regression tests
*/
-static inline void dct_unquantize_h263_helper_c(DCTELEM *block, int qmul, int qadd, int count)
+static inline void dct_unquantize_h263_helper_c(int16_t *block, int qmul, int qadd, int count)
{
int i, level;
for (i = 0; i < count; i++) {
@@ -51,7 +51,7 @@ static inline void dct_unquantize_h263_helper_c(DCTELEM *block, int qmul, int qa
#endif
static void dct_unquantize_h263_intra_armv5te(MpegEncContext *s,
- DCTELEM *block, int n, int qscale)
+ int16_t *block, int n, int qscale)
{
int level, qmul, qadd;
int nCoeffs;
@@ -80,7 +80,7 @@ static void dct_unquantize_h263_intra_armv5te(MpegEncContext *s,
}
static void dct_unquantize_h263_inter_armv5te(MpegEncContext *s,
- DCTELEM *block, int n, int qscale)
+ int16_t *block, int n, int qscale)
{
int qmul, qadd;
int nCoeffs;
View
6 libavcodec/arm/rv34dsp_init_arm.c
@@ -24,11 +24,11 @@
#include "libavcodec/rv34dsp.h"
#include "libavutil/arm/cpu.h"
-void ff_rv34_inv_transform_noround_neon(DCTELEM *block);
+void ff_rv34_inv_transform_noround_neon(int16_t *block);
-void ff_rv34_inv_transform_noround_dc_neon(DCTELEM *block);
+void ff_rv34_inv_transform_noround_dc_neon(int16_t *block);
-void ff_rv34_idct_add_neon(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
+void ff_rv34_idct_add_neon(uint8_t *dst, ptrdiff_t stride, int16_t *block);
void ff_rv34_idct_dc_add_neon(uint8_t *dst, ptrdiff_t stride, int dc);
void ff_rv34dsp_init_arm(RV34DSPContext *c, DSPContext* dsp)
View
6 libavcodec/arm/rv34dsp_neon.S
@@ -67,7 +67,7 @@
vsub.s32 q15, q14, q9 @ z0 - z3
.endm
-/* void rv34_idct_add_c(uint8_t *dst, int stride, DCTELEM *block) */
+/* void rv34_idct_add_c(uint8_t *dst, int stride, int16_t *block) */
function ff_rv34_idct_add_neon, export=1
mov r3, r0
rv34_inv_transform r2
@@ -97,7 +97,7 @@ function ff_rv34_idct_add_neon, export=1
bx lr
endfunc
-/* void rv34_inv_transform_noround_neon(DCTELEM *block); */
+/* void rv34_inv_transform_noround_neon(int16_t *block); */
function ff_rv34_inv_transform_noround_neon, export=1
rv34_inv_transform r0
vshl.s32 q11, q2, #1
@@ -142,7 +142,7 @@ function ff_rv34_idct_dc_add_neon, export=1
bx lr
endfunc
-/* void rv34_inv_transform_dc_noround_c(DCTELEM *block) */
+/* void rv34_inv_transform_dc_noround_c(int16_t *block) */
function ff_rv34_inv_transform_noround_dc_neon, export=1
vld1.16 {d28[]}, [r0,:16] @ block[0]
vmov.i16 d4, #251
View
6 libavcodec/arm/simple_idct_armv6.S
@@ -375,7 +375,7 @@ endfunc
sub r0, r0, #(16*7)
.endm
-/* void ff_simple_idct_armv6(DCTELEM *data); */
+/* void ff_simple_idct_armv6(int16_t *data); */
function ff_simple_idct_armv6, export=1
push {r4-r11, lr}
sub sp, sp, #128
@@ -390,7 +390,7 @@ function ff_simple_idct_armv6, export=1
pop {r4-r11, pc}
endfunc
-/* ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data); */
+/* ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data); */
function ff_simple_idct_add_armv6, export=1
push {r0, r1, r4-r11, lr}
sub sp, sp, #128
@@ -407,7 +407,7 @@ function ff_simple_idct_add_armv6, export=1
pop {r4-r11, pc}
endfunc
-/* ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data); */
+/* ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data); */
function ff_simple_idct_put_armv6, export=1
push {r0, r1, r4-r11, lr}
sub sp, sp, #128
View
6 libavcodec/arm/simple_idct_neon.S
@@ -261,7 +261,7 @@ endconst
pop {r4-r7, pc}
.endm
-/* void ff_simple_idct_put_neon(uint8_t *dst, int line_size, DCTELEM *data); */
+/* void ff_simple_idct_put_neon(uint8_t *dst, int line_size, int16_t *data); */
function ff_simple_idct_put_neon, export=1
idct_start r2
@@ -316,7 +316,7 @@ function idct_col4_add8_neon
bx lr
endfunc
-/* void ff_simple_idct_add_neon(uint8_t *dst, int line_size, DCTELEM *data); */
+/* void ff_simple_idct_add_neon(uint8_t *dst, int line_size, int16_t *data); */
function ff_simple_idct_add_neon, export=1
idct_start r2
@@ -355,7 +355,7 @@ function idct_col4_st16_neon
bx lr
endfunc
-/* void ff_simple_idct_neon(DCTELEM *data); */
+/* void ff_simple_idct_neon(int16_t *data); */
function ff_simple_idct_neon, export=1
idct_start r0
View
6 libavcodec/arm/vp3dsp_init_arm.c
@@ -24,9 +24,9 @@
#include "libavcodec/dsputil.h"
#include "libavcodec/vp3dsp.h"
-void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
-void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
-void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, const DCTELEM *data);
+void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
+void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, int16_t *data);
+void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, const int16_t *data);
void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *);
void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *);
View
2 libavcodec/arm/vp8.h
@@ -23,7 +23,7 @@
#if HAVE_ARMV6_EXTERNAL
#define decode_block_coeffs_internal ff_decode_block_coeffs_armv6
-int ff_decode_block_coeffs_armv6(VP56RangeCoder *rc, DCTELEM block[16],
+int ff_decode_block_coeffs_armv6(VP56RangeCoder *rc, int16_t block[16],
uint8_t probs[8][3][NUM_DCT_TOKENS-1],
int i, uint8_t *token_prob, int16_t qmul[2]);
#endif
View
12 libavcodec/arm/vp8dsp_armv6.S
@@ -56,7 +56,7 @@
@ idct
-@ void vp8_luma_dc_wht(DCTELEM block[4][4][16], DCTELEM dc[16])
+@ void vp8_luma_dc_wht(int16_t block[4][4][16], int16_t dc[16])
function ff_vp8_luma_dc_wht_armv6, export=1
push {r4-r10, lr}
@@ -179,7 +179,7 @@ function ff_vp8_luma_dc_wht_armv6, export=1
pop {r4-r10, pc}
endfunc
-@ void vp8_luma_dc_wht_dc(DCTELEM block[4][4][16], DCTELEM dc[16])
+@ void vp8_luma_dc_wht_dc(int16_t block[4][4][16], int16_t dc[16])
function ff_vp8_luma_dc_wht_dc_armv6, export=1
ldrsh r2, [r1]
mov r3, #0
@@ -192,7 +192,7 @@ function ff_vp8_luma_dc_wht_dc_armv6, export=1
bx lr
endfunc
-@ void vp8_idct_add(uint8_t *dst, DCTELEM block[16], int stride)
+@ void vp8_idct_add(uint8_t *dst, int16_t block[16], int stride)
function ff_vp8_idct_add_armv6, export=1
push {r4-r12, lr}
sub sp, sp, #32
@@ -314,7 +314,7 @@ function ff_vp8_idct_add_armv6, export=1
pop {r4-r12, pc}
endfunc
-@ void vp8_idct_dc_add(uint8_t *dst, DCTELEM block[16], int stride)
+@ void vp8_idct_dc_add(uint8_t *dst, int16_t block[16], int stride)
function ff_vp8_idct_dc_add_armv6, export=1
push {r4-r6, lr}
add r6, r0, r2, lsl #1
@@ -355,7 +355,7 @@ function ff_vp8_idct_dc_add_armv6, export=1
pop {r4-r6, pc}
endfunc
-@ void vp8_idct_dc_add4uv(uint8_t *dst, DCTELEM block[4][16], int stride)
+@ void vp8_idct_dc_add4uv(uint8_t *dst, int16_t block[4][16], int stride)
function ff_vp8_idct_dc_add4uv_armv6, export=1
push {r4, lr}
@@ -371,7 +371,7 @@ function ff_vp8_idct_dc_add4uv_armv6, export=1
pop {r4, pc}
endfunc
-@ void vp8_idct_dc_add4y(uint8_t *dst, DCTELEM block[4][16], int stride)
+@ void vp8_idct_dc_add4y(uint8_t *dst, int16_t block[4][16], int stride)
function ff_vp8_idct_dc_add4y_armv6, export=1
push {r4, lr}
View
12 libavcodec/arm/vp8dsp_init_armv6.c
@@ -22,13 +22,13 @@
#include "libavcodec/vp8dsp.h"
#include "vp8dsp.h"
-void ff_vp8_luma_dc_wht_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]);
-void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]);
+void ff_vp8_luma_dc_wht_armv6(int16_t block[4][4][16], int16_t dc[16]);
+void ff_vp8_luma_dc_wht_dc_armv6(int16_t block[4][4][16], int16_t dc[16]);
-void ff_vp8_idct_add_armv6(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add_armv6(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add4y_armv6(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add4uv_armv6(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride);
+void ff_vp8_idct_add_armv6(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add_armv6(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add4y_armv6(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add4uv_armv6(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
VP8_LF(armv6);
View
10 libavcodec/arm/vp8dsp_init_neon.c
@@ -22,12 +22,12 @@
#include "libavcodec/vp8dsp.h"
#include "vp8dsp.h"
-void ff_vp8_luma_dc_wht_neon(DCTELEM block[4][4][16], DCTELEM dc[16]);
+void ff_vp8_luma_dc_wht_neon(int16_t block[4][4][16], int16_t dc[16]);
-void ff_vp8_idct_add_neon(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add_neon(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add4y_neon(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride);
-void ff_vp8_idct_dc_add4uv_neon(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride);
+void ff_vp8_idct_add_neon(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add_neon(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add4y_neon(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
+void ff_vp8_idct_dc_add4uv_neon(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
VP8_LF(neon);
View
2 libavcodec/asv.h
@@ -48,7 +48,7 @@ typedef struct ASV1Context{
int mb_height;
int mb_width2;
int mb_height2;
- DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
+ DECLARE_ALIGNED(16, int16_t, block)[6][64];
uint16_t intra_matrix[64];
int q_intra_matrix[64];
uint8_t *bitstream_buffer;
View
8 libavcodec/asvdec.c
@@ -94,7 +94,7 @@ static inline int asv2_get_level(GetBitContext *gb)
return code - 31;
}
-static inline int asv1_decode_block(ASV1Context *a, DCTELEM block[64])
+static inline int asv1_decode_block(ASV1Context *a, int16_t block[64])
{
int i;
@@ -125,7 +125,7 @@ static inline int asv1_decode_block(ASV1Context *a, DCTELEM block[64])
return 0;
}
-static inline int asv2_decode_block(ASV1Context *a, DCTELEM block[64])
+static inline int asv2_decode_block(ASV1Context *a, int16_t block[64])
{
int i, count, ccp;
@@ -161,7 +161,7 @@ static inline int asv2_decode_block(ASV1Context *a, DCTELEM block[64])
return 0;
}
-static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64])
+static inline int decode_mb(ASV1Context *a, int16_t block[6][64])
{
int i;
@@ -183,7 +183,7 @@ static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64])
static inline void idct_put(ASV1Context *a, int mb_x, int mb_y)
{
- DCTELEM (*block)[64] = a->block;
+ int16_t (*block)[64] = a->block;
int linesize = a->picture.linesize[0];
uint8_t *dest_y = a->picture.data[0] + (mb_y * 16* linesize ) + mb_x * 16;
View
8 libavcodec/asvenc.c
@@ -56,7 +56,7 @@ static inline void asv2_put_level(PutBitContext *pb, int level){
}
}
-static inline void asv1_encode_block(ASV1Context *a, DCTELEM block[64]){
+static inline void asv1_encode_block(ASV1Context *a, int16_t block[64]){
int i;
int nc_count=0;
@@ -89,7 +89,7 @@ static inline void asv1_encode_block(ASV1Context *a, DCTELEM block[64]){
put_bits(&a->pb, ff_asv_ccp_tab[16][1], ff_asv_ccp_tab[16][0]);
}
-static inline void asv2_encode_block(ASV1Context *a, DCTELEM block[64]){
+static inline void asv2_encode_block(ASV1Context *a, int16_t block[64]){
int i;
int count=0;
@@ -130,7 +130,7 @@ static inline void asv2_encode_block(ASV1Context *a, DCTELEM block[64]){
#define MAX_MB_SIZE (30*16*16*3/2/8)
-static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){
+static inline int encode_mb(ASV1Context *a, int16_t block[6][64]){
int i;
if (a->pb.buf_end - a->pb.buf - (put_bits_count(&a->pb)>>3) < MAX_MB_SIZE) {
@@ -149,7 +149,7 @@ static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){
}
static inline void dct_get(ASV1Context *a, int mb_x, int mb_y){
- DCTELEM (*block)[64]= a->block;
+ int16_t (*block)[64]= a->block;
int linesize= a->picture.linesize[0];
int i;
View
2 libavcodec/bfin/config_bfin.h
@@ -21,7 +21,7 @@
low level assembler interface wrapper
DEFUN(put_pixels_clamped,mL1,
- (DCTELEM *block, uint8_t *dest, int line_size)):
+ (int16_t *block, uint8_t *dest, int line_size)):
body
View
6 libavcodec/bfin/dsputil_bfin.c
@@ -27,20 +27,20 @@
int off;
-static void bfin_idct_add (uint8_t *dest, int line_size, DCTELEM *block)
+static void bfin_idct_add (uint8_t *dest, int line_size, int16_t *block)
{
ff_bfin_idct (block);
ff_bfin_add_pixels_clamped (block, dest, line_size);
}
-static void bfin_idct_put (uint8_t *dest, int line_size, DCTELEM *block)
+static void bfin_idct_put (uint8_t *dest, int line_size, int16_t *block)
{
ff_bfin_idct (block);
ff_bfin_put_pixels_clamped (block, dest, line_size);
}
-static void bfin_clear_blocks (DCTELEM *blocks)
+static void bfin_clear_blocks (int16_t *blocks)
{
// This is just a simple memset.
//
View
21 libavcodec/bfin/dsputil_bfin.h
@@ -24,8 +24,9 @@
#ifndef AVCODEC_BFIN_DSPUTIL_BFIN_H
#define AVCODEC_BFIN_DSPUTIL_BFIN_H
+#include <stdint.h>
+
#include "config.h"
-#include "libavcodec/dsputil.h"
#if defined(__FDPIC__) && CONFIG_SRAM
#define attribute_l1_text __attribute__ ((l1_text))
@@ -35,15 +36,15 @@
#define attribute_l1_data_b
#endif
-void ff_bfin_idct (DCTELEM *block) attribute_l1_text;
-void ff_bfin_fdct (DCTELEM *block) attribute_l1_text;
-void ff_bfin_vp3_idct (DCTELEM *block);
-void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block);
-void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block);
-void ff_bfin_add_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
-void ff_bfin_put_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
-void ff_bfin_diff_pixels (DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride) attribute_l1_text;
-void ff_bfin_get_pixels (DCTELEM *av_restrict block, const uint8_t *pixels, int line_size) attribute_l1_text;
+void ff_bfin_idct (int16_t *block) attribute_l1_text;
+void ff_bfin_fdct (int16_t *block) attribute_l1_text;
+void ff_bfin_vp3_idct (int16_t *block);
+void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, int16_t *block);
+void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, int16_t *block);
+void ff_bfin_add_pixels_clamped (const int16_t *block, uint8_t *dest, int line_size) attribute_l1_text;
+void ff_bfin_put_pixels_clamped (const int16_t *block, uint8_t *dest, int line_size) attribute_l1_text;
+void ff_bfin_diff_pixels (int16_t *block, const uint8_t *s1, const uint8_t *s2, int stride) attribute_l1_text;
+void ff_bfin_get_pixels (int16_t *restrict block, const uint8_t *pixels, int line_size) attribute_l1_text;
int ff_bfin_pix_norm1 (uint8_t * pix, int line_size) attribute_l1_text;
int ff_bfin_z_sad8x8 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
View
8 libavcodec/bfin/fdct_bfin.S
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
- void ff_bfin_fdct (DCTELEM *buf);
+ void ff_bfin_fdct (int16_t *buf);
This implementation works only for 8x8 input. The range of input
must be -256 to 255 i.e. 8bit input represented in a 16bit data
@@ -61,9 +61,9 @@ Notation
Other registers used:
I0, I1, I2, I3, B0, B2, B3, M0, M1, L3 registers and LC0.
- Input - r0 - pointer to start of DCTELEM *block
+ Input - r0 - pointer to start of int16_t *block
- Output - The DCT output coefficients in the DCTELEM *block
+ Output - The DCT output coefficients in the int16_t *block
Register constraint:
This code is called from jpeg_encode.
@@ -147,7 +147,7 @@ vtmp: .space 128
.text
DEFUN(fdct,mL1,
- (DCTELEM *block)):
+ (int16_t *block)):
[--SP] = (R7:4, P5:3); // Push the registers onto the stack.
b0 = r0;
View
4 libavcodec/bfin/idct_bfin.S
@@ -22,7 +22,7 @@
/*
This blackfin DSP code implements an 8x8 inverse type II DCT.
-Prototype : void ff_bfin_idct(DCTELEM *in)
+Prototype : void ff_bfin_idct(int16_t *in)
Registers Used : A0, A1, R0-R7, I0-I3, B0, B2, B3, M0-M2, L0-L3, P0-P5, LC0.
@@ -90,7 +90,7 @@ vtmp: .space 256
.text
DEFUN(idct,mL1,
- (DCTELEM *block)):
+ (int16_t *block)):
/********************** Function Prologue *********************************/
link 16;
View
2 libavcodec/bfin/mpegvideo_bfin.c
@@ -26,7 +26,7 @@
#include "dsputil_bfin.h"
static int dct_quantize_bfin (MpegEncContext *s,
- DCTELEM *block, int n,
+ int16_t *block, int n,
int qscale, int *overflow)
{
int last_non_zero, q, start_i;
View
8 libavcodec/bfin/pixels_bfin.S
@@ -21,7 +21,7 @@
#include "config_bfin.h"
DEFUN(put_pixels_clamped,mL1,
- (DCTELEM *block, uint8_t *dest, int line_size)):
+ (int16_t *block, uint8_t *dest, int line_size)):
[--SP] = (R7:4);
R4 = 0;
R5.l = 0x00ff;
@@ -51,7 +51,7 @@ ppc$1: R2 = Max(R0, R4) (V) || [I1++M1] = R6;
DEFUN_END(put_pixels_clamped)
DEFUN(add_pixels_clamped,mL1,
- (DCTELEM *block, uint8_t *dest, int line_size)):
+ (int16_t *block, uint8_t *dest, int line_size)):
[-- SP] = (R7:4);
R4 = 0;
I0 = 0;
@@ -442,7 +442,7 @@ LE$8OT: DISALGNEXCPT || R2 =[I1++] || [I3++M2] = R5;
rts;
DEFUN(diff_pixels,mL1,
- (DCTELEM *block, uint8_t *s1, uint8_t *s2, int stride)):
+ (int16_t *block, uint8_t *s1, uint8_t *s2, int stride)):
link 0;
[--sp] = (r7:4);
p0=8;
@@ -518,7 +518,7 @@ DEFUN_END(pix_sum)
DEFUN(get_pixels,mL1,
- (DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)):
+ (int16_t *av_restrict block, const uint8_t *pixels, int line_size)):
[--sp] = (r7:4);
i3=r0; // dest
i0=r1; // src0
View
4 libavcodec/bfin/vp3_bfin.c
@@ -23,7 +23,7 @@
#include "dsputil_bfin.h"
/* Intra iDCT offset 128 */
-void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block)
+void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, int16_t *block)
{
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + 128;
int i,j;
@@ -36,7 +36,7 @@ void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block)
}
/* Inter iDCT */
-void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block)
+void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, int16_t *block)
{
ff_bfin_vp3_idct (block);
ff_bfin_add_pixels_clamped (block, dest, line_size);
View
4 libavcodec/bfin/vp3_idct_bfin.S
@@ -22,7 +22,7 @@
/*
This blackfin DSP code implements an 8x8 inverse type II DCT.
-Prototype : void ff_bfin_vp3_idct(DCTELEM *in)
+Prototype : void ff_bfin_vp3_idct(int16_t *in)
Registers Used : A0, A1, R0-R7, I0-I3, B0, B2, B3, M0-M2, L0-L3, P0-P5, LC0.
@@ -63,7 +63,7 @@ vtmp: .space 256
.text
DEFUN(vp3_idct,mL1,
- (DCTELEM *block)):
+ (int16_t *block)):
/********************** Function Prologue *********************************/
link 16;
View
6 libavcodec/bink.c
@@ -700,7 +700,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
* @param masks_count number of masks to decode
* @return 0 on success, negative value in other cases
*/
-static int read_residue(GetBitContext *gb, DCTELEM block[64], int masks_count)
+static int read_residue(GetBitContext *gb, int16_t block[64], int masks_count)
{
int coef_list[128];
int mode_list[128];
@@ -804,7 +804,7 @@ static int binkb_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
int v, col[2];
const uint8_t *scan;
int xoff, yoff;
- LOCAL_ALIGNED_16(DCTELEM, block, [64]);
+ LOCAL_ALIGNED_16(int16_t, block, [64]);
LOCAL_ALIGNED_16(int32_t, dctblock, [64]);
int coordmap[64];
int ybias = is_key ? -15 : 0;
@@ -950,7 +950,7 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
int v, col[2];
const uint8_t *scan;
int xoff, yoff;
- LOCAL_ALIGNED_16(DCTELEM, block, [64]);
+ LOCAL_ALIGNED_16(int16_t, block, [64]);
LOCAL_ALIGNED_16(uint8_t, ublock, [64]);
LOCAL_ALIGNED_16(int32_t, dctblock, [64]);
int coordmap[64];
View
2 libavcodec/cavs.c
@@ -715,7 +715,7 @@ void ff_cavs_init_top_lines(AVSContext *h) {
/* alloc space for co-located MVs and types */
h->col_mv = av_mallocz( h->mb_width*h->mb_height*4*sizeof(cavs_vector));
h->col_type_base = av_mallocz(h->mb_width*h->mb_height);
- h->block = av_mallocz(64*sizeof(DCTELEM));
+ h->block = av_mallocz(64*sizeof(int16_t));
}
av_cold int ff_cavs_init(AVCodecContext *avctx) {
View
2 libavcodec/cavs.h
@@ -234,7 +234,7 @@ typedef struct AVSContext {
uint8_t *edge_emu_buffer;
int got_keyframe;
- DCTELEM *block;
+ int16_t *block;
} AVSContext;
extern const uint8_t ff_cavs_partition_flags[30];
View
8 libavcodec/cavsdec.c
@@ -517,8 +517,8 @@ static inline int get_ue_code(GetBitContext *gb, int order)
return get_ue_golomb(gb);
}
-static inline int dequant(AVSContext *h, DCTELEM *level_buf, uint8_t *run_buf,
- DCTELEM *dst, int mul, int shift, int coeff_num)
+static inline int dequant(AVSContext *h, int16_t *level_buf, uint8_t *run_buf,
+ int16_t *dst, int mul, int shift, int coeff_num)
{
int round = 1 << (shift - 1);
int pos = -1;
@@ -553,9 +553,9 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
{
int i, esc_code, level, mask;
unsigned int level_code, run;
- DCTELEM level_buf[65];
+ int16_t level_buf[65];
uint8_t run_buf[65];
- DCTELEM *block = h->block;
+ int16_t *block = h->block;
for (i = 0; i < 65; i++) {
level_code = get_ue_code(gb, r->golomb_order);
View
4 libavcodec/cavsdsp.c
@@ -183,9 +183,9 @@ static void cavs_filter_ch_c(uint8_t *d, int stride, int alpha, int beta, int tc
*
****************************************************************************/
-static void cavs_idct8_add_c(uint8_t *dst, DCTELEM *block, int stride) {
+static void cavs_idct8_add_c(uint8_t *dst, int16_t *block, int stride) {
int i;
- DCTELEM (*src)[8] = (DCTELEM(*)[8])block;
+ int16_t (*src)[8] = (int16_t(*)[8])block;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
src[0][0] += 8;
View
2 libavcodec/cavsdsp.h
@@ -32,7 +32,7 @@ typedef struct CAVSDSPContext {
void (*cavs_filter_lh)(uint8_t *pix, int stride, int alpha, int beta, int tc, int bs1, int bs2);
void (*cavs_filter_cv)(uint8_t *pix, int stride, int alpha, int beta, int tc, int bs1, int bs2);
void (*cavs_filter_ch)(uint8_t *pix, int stride, int alpha, int beta, int tc, int bs1, int bs2);
- void (*cavs_idct8_add)(uint8_t *dst, DCTELEM *block, int stride);
+ void (*cavs_idct8_add)(uint8_t *dst, int16_t *block, int stride);
int idct_perm;
} CAVSDSPContext;
View
39 libavcodec/dct-test.c
@@ -39,6 +39,7 @@
#include "libavutil/lfg.h"
#include "libavutil/time.h"
+#include "dsputil.h"
#include "simple_idct.h"
#include "aandcttab.h"
#include "faandct.h"
@@ -48,28 +49,28 @@
#undef printf
-void ff_mmx_idct(DCTELEM *data);
-void ff_mmxext_idct(DCTELEM *data);
+void ff_mmx_idct(int16_t *data);
+void ff_mmxext_idct(int16_t *data);
// BFIN
-void ff_bfin_idct(DCTELEM *block);
-void ff_bfin_fdct(DCTELEM *block);
+void ff_bfin_idct(int16_t *block);
+void ff_bfin_fdct(int16_t *block);
// ALTIVEC
-void ff_fdct_altivec(DCTELEM *block);
+void ff_fdct_altivec(int16_t *block);
// ARM
-void ff_j_rev_dct_arm(DCTELEM *data);
-void ff_simple_idct_arm(DCTELEM *data);
-void ff_simple_idct_armv5te(DCTELEM *data);
-void ff_simple_idct_armv6(DCTELEM *data);
-void ff_simple_idct_neon(DCTELEM *data);
+void ff_j_rev_dct_arm(int16_t *data);
+void ff_simple_idct_arm(int16_t *data);
+void ff_simple_idct_armv5te(int16_t *data);
+void ff_simple_idct_armv6(int16_t *data);
+void ff_simple_idct_neon(int16_t *data);
-void ff_simple_idct_axp(DCTELEM *data);
+void ff_simple_idct_axp(int16_t *data);
struct algo {
const char *name;
- void (*func)(DCTELEM *block);
+ void (*func)(int16_t *block);
enum formattag { NO_PERM, MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM,
SSE2_PERM, PARTTRANS_PERM, TRANSPOSE_PERM } format;
int mm_support;
@@ -103,9 +104,9 @@ static const struct algo fdct_tab[] = {
#if ARCH_X86_64 && HAVE_MMX && HAVE_YASM
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
- DCTELEM *block, int16_t *qmat);
+ int16_t *block, int16_t *qmat);
-static void ff_prores_idct_put_10_sse2_wrap(DCTELEM *dst){
+static void ff_prores_idct_put_10_sse2_wrap(int16_t *dst){
DECLARE_ALIGNED(16, static int16_t, qmat)[64];
DECLARE_ALIGNED(16, static int16_t, tmp)[64];
int i;
@@ -193,10 +194,10 @@ static void idct_mmx_init(void)
}
}
-DECLARE_ALIGNED(16, static DCTELEM, block)[64];
-DECLARE_ALIGNED(8, static DCTELEM, block1)[64];
+DECLARE_ALIGNED(16, static int16_t, block)[64];
+DECLARE_ALIGNED(8, static int16_t, block1)[64];
-static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng, int vals)
+static void init_block(int16_t block[64], int test, int is_idct, AVLFG *prng, int vals)
{
int i, j;
@@ -226,7 +227,7 @@ static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng, in
}
}
-static void permute(DCTELEM dst[64], const DCTELEM src[64], int perm)
+static void permute(int16_t dst[64], const int16_t src[64], int perm)
{
int i;
@@ -253,7 +254,7 @@ static void permute(DCTELEM dst[64], const DCTELEM src[64], int perm)
static int dct_error(const struct algo *dct, int test, int is_idct, int speed, const int bits)
{
- void (*ref)(DCTELEM *block) = is_idct ? ff_ref_idct : ff_ref_fdct;
+ void (*ref)(int16_t *block) = is_idct ? ff_ref_idct : ff_ref_fdct;
int it, i, scale;
int err_inf, v;
int64_t err2, ti, ti1, it1, err_sum = 0;
View
14 libavcodec/dnxhddec.c
@@ -45,11 +45,11 @@ typedef struct DNXHDContext {
VLC ac_vlc, dc_vlc, run_vlc;
int last_dc[3];
DSPContext dsp;
- DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64];
+ DECLARE_ALIGNED(16, int16_t, blocks)[8][64];
ScanTable scantable;
const CIDEntry *cid_table;
int bit_depth; // 8, 10 or 0 if not initialized at all.
- void (*decode_dct_block)(struct DNXHDContext *ctx, DCTELEM *block,
+ void (*decode_dct_block)(struct DNXHDContext *ctx, int16_t *block,
int n, int qscale);
int last_qscale;
int luma_scale[64];
@@ -59,8 +59,8 @@ typedef struct DNXHDContext {
#define DNXHD_VLC_BITS 9
#define DNXHD_DC_VLC_BITS 7
-static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, DCTELEM *block, int n, int qscale);
-static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, DCTELEM *block, int n, int qscale);
+static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, int16_t *block, int n, int qscale);
+static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, int16_t *block, int n, int qscale);
static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
{
@@ -190,7 +190,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
}
static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
- DCTELEM *block, int n,
+ int16_t *block, int n,
int qscale,
int index_bits,
int level_bias,
@@ -272,13 +272,13 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
CLOSE_READER(bs, &ctx->gb);
}
-static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, DCTELEM *block,
+static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, int16_t *block,
int n, int qscale)
{
dnxhd_decode_dct_block(ctx, block, n, qscale, 4, 32, 6);
}
-static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, DCTELEM *block,
+static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, int16_t *block,
int n, int qscale)
{
dnxhd_decode_dct_block(ctx, block, n, qscale, 6, 8, 4);
View
20 libavcodec/dnxhdenc.c
@@ -51,7 +51,7 @@ static const AVClass class = {
#define LAMBDA_FRAC_BITS 10
-static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)
+static void dnxhd_8bit_get_pixels_8x4_sym(int16_t *av_restrict block, const uint8_t *pixels, int line_size)
{
int i;
for (i = 0; i < 4; i++) {
@@ -68,7 +68,7 @@ static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint
memcpy(block + 24, block - 32, sizeof(*block) * 8);
}
-static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)
+static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(int16_t *av_restrict block, const uint8_t *pixels, int line_size)
{
int i;
const uint16_t* pixels16 = (const uint16_t*)pixels;
@@ -88,7 +88,7 @@ static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *av_restrict
memcpy(block + 24, block - 32, sizeof(*block) * 8);
}
-static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, DCTELEM *block,
+static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, int16_t *block,
int n, int qscale, int *overflow)
{
const uint8_t *scantable= ctx->intra_scantable.scantable;
@@ -392,7 +392,7 @@ static av_always_inline void dnxhd_encode_dc(DNXHDEncContext *ctx, int diff)
(ctx->cid_table->dc_codes[nbits]<<nbits) + (diff & ((1 << nbits) - 1)));
}
-static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, DCTELEM *block, int last_index, int n)
+static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, int16_t *block, int last_index, int n)
{
int last_non_zero = 0;
int slevel, i, j;
@@ -415,7 +415,7 @@ static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, DCTELEM *b
put_bits(&ctx->m.pb, ctx->vlc_bits[0], ctx->vlc_codes[0]); // EOB
}
-static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, DCTELEM *block, int n, int qscale, int last_index)
+static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, int16_t *block, int n, int qscale, int last_index)
{
const uint8_t *weight_matrix;
int level;
@@ -456,7 +456,7 @@ static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, DCTELEM *b
}
}
-static av_always_inline int dnxhd_ssd_block(DCTELEM *qblock, DCTELEM *block)
+static av_always_inline int dnxhd_ssd_block(int16_t *qblock, int16_t *block)
{
int score = 0;
int i;
@@ -465,7 +465,7 @@ static av_always_inline int dnxhd_ssd_block(DCTELEM *qblock, DCTELEM *block)
return score;
}
-static av_always_inline int dnxhd_calc_ac_bits(DNXHDEncContext *ctx, DCTELEM *block, int last_index)
+static av_always_inline int dnxhd_calc_ac_bits(DNXHDEncContext *ctx, int16_t *block, int last_index)
{
int last_non_zero = 0;
int bits = 0;
@@ -527,7 +527,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i
DNXHDEncContext *ctx = avctx->priv_data;
int mb_y = jobnr, mb_x;
int qscale = ctx->qscale;
- LOCAL_ALIGNED_16(DCTELEM, block, [64]);
+ LOCAL_ALIGNED_16(int16_t, block, [64]);
ctx = ctx->thread[threadnr];
ctx->m.last_dc[0] =
@@ -544,7 +544,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i
dnxhd_get_blocks(ctx, mb_x, mb_y);
for (i = 0; i < 8; i++) {
- DCTELEM *src_block = ctx->blocks[i];
+ int16_t *src_block = ctx->blocks[i];
int overflow, nbits, diff, last_index;
int n = dnxhd_switch_matrix(ctx, i);
@@ -593,7 +593,7 @@ static int dnxhd_encode_thread(AVCodecContext *avctx, void *arg, int jobnr, int
dnxhd_get_blocks(ctx, mb_x, mb_y);
for (i = 0; i < 8; i++) {
- DCTELEM *block = ctx->blocks[i];
+ int16_t *block = ctx->blocks[i];
int overflow, n = dnxhd_switch_matrix(ctx, i);
int last_index = ctx->m.dct_quantize(&ctx->m, block, 4&(2*i), qscale, &overflow);
//START_TIMER;
View
4 libavcodec/dnxhdenc.h
@@ -64,7 +64,7 @@ typedef struct DNXHDEncContext {
int nitris_compat;
unsigned min_padding;
- DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64];
+ DECLARE_ALIGNED(16, int16_t, blocks)[8][64];
int (*qmatrix_c) [64];
int (*qmatrix_l) [64];
@@ -90,7 +90,7 @@ typedef struct DNXHDEncContext {
RCCMPEntry *mb_cmp;
RCEntry (*mb_rc)[8160];
- void (*get_pixels_8x4_sym)(DCTELEM * /*align 16*/, const uint8_t *, int);
+ void (*get_pixels_8x4_sym)(int16_t * /*align 16*/, const uint8_t *, int);
} DNXHDEncContext;
void ff_dnxhdenc_init_x86(DNXHDEncContext *ctx);
View
55 libavcodec/dsputil.c
@@ -351,7 +351,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
return s;
}
-static void diff_pixels_c(DCTELEM *av_restrict block, const uint8_t *s1,
+static void diff_pixels_c(int16_t *av_restrict block, const uint8_t *s1,
const uint8_t *s2, int stride){