avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/86/head
James Almer 10 years ago
parent 6441d522e9
commit c99a882814
  1. 8
      libavcodec/alpha/idctdsp_alpha.c
  2. 4
      libavcodec/alpha/idctdsp_alpha.h
  3. 4
      libavcodec/alpha/idctdsp_alpha_asm.S
  4. 2
      libavcodec/arm/idctdsp_arm.S
  5. 2
      libavcodec/arm/idctdsp_init_arm.c
  6. 2
      libavcodec/arm/idctdsp_init_armv6.c
  7. 6
      libavcodec/arm/idctdsp_init_neon.c
  8. 10
      libavcodec/idctdsp.c
  9. 10
      libavcodec/idctdsp.h
  10. 2
      libavcodec/x86/idctdsp.asm
  11. 8
      libavcodec/x86/idctdsp.h
  12. 5
      libavcodec/x86/idctdsp_mmx.c

@ -24,14 +24,14 @@
#include "asm.h"
void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
#if 0
/* These functions were the base for the optimized assembler routines,

@ -23,9 +23,9 @@
#include <stdint.h>
extern void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
extern void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void ff_simple_idct_axp(int16_t *block);
void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block);

@ -33,7 +33,7 @@
/************************************************************************
* void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
* int line_size)
* ptrdiff_t line_size)
*/
.align 6
.globl put_pixels_clamped_mvi_asm
@ -83,7 +83,7 @@ put_pixels_clamped_mvi_asm:
/************************************************************************
* void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
* int line_size)
* ptrdiff_t line_size)
*/
.align 6
.globl add_pixels_clamped_mvi_asm

@ -22,7 +22,7 @@
#include "config.h"
#include "libavutil/arm/asm.S"
@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, int stride)
@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, ptrdiff_t stride)
function ff_add_pixels_clamped_arm, export=1, align=5
push {r4-r10}
mov r10, #8

@ -30,7 +30,7 @@
#include "idctdsp_arm.h"
void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
int line_size);
ptrdiff_t line_size);
/* XXX: those functions should be suppressed ASAP when all IDCTs are
* converted */

@ -27,7 +27,7 @@
#include "idctdsp_arm.h"
void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)

@ -27,9 +27,9 @@
#include "idct.h"
#include "idctdsp_arm.h"
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_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)

@ -80,11 +80,11 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
}
}
void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
static void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
int line_size)
ptrdiff_t line_size)
{
int i;
@ -138,7 +138,7 @@ static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pix
static void put_signed_pixels_clamped_c(const int16_t *block,
uint8_t *av_restrict pixels,
int line_size)
ptrdiff_t line_size)
{
int i, j;
@ -158,7 +158,7 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
}
static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
int line_size)
ptrdiff_t line_size)
{
int i;

@ -52,13 +52,13 @@ typedef struct IDCTDSPContext {
/* pixel ops : interface with DCT */
void (*put_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
int line_size);
ptrdiff_t line_size);
void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
int line_size);
ptrdiff_t line_size);
void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
int line_size);
ptrdiff_t line_size);
void (*idct)(int16_t *block /* align 16 */);
@ -95,8 +95,8 @@ typedef struct IDCTDSPContext {
enum idct_permutation_type perm_type;
} IDCTDSPContext;
extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx);

@ -31,7 +31,7 @@ SECTION_TEXT
;--------------------------------------------------------------------------
;void ff_put_signed_pixels_clamped(const int16_t *block, uint8_t *pixels,
; int line_size)
; ptrdiff_t line_size)
;--------------------------------------------------------------------------
%macro PUT_SIGNED_PIXELS_CLAMPED_HALF 1

@ -22,12 +22,12 @@
#include <stdint.h>
void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
void ff_put_signed_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels,
int line_size);
ptrdiff_t line_size);
#endif /* AVCODEC_X86_IDCTDSP_H */

@ -25,13 +25,14 @@
#include "config.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/idctdsp.h"
#include "idctdsp.h"
#include "inline_asm.h"
#if HAVE_INLINE_ASM
void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
int line_size)
ptrdiff_t line_size)
{
const int16_t *p;
uint8_t *pix;
@ -89,7 +90,7 @@ void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
}
void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
int line_size)
ptrdiff_t line_size)
{
const int16_t *p;
uint8_t *pix;

Loading…
Cancel
Save