~siretart/x264/trunk

« back to all changes in this revision

Viewing changes to common/ppc/dct.h

  • Committer: Anton Mitrofanov
  • Author(s): Vittorio Giovara
  • Date: 2017-12-24 20:47:24 UTC
  • Revision ID: git-v1:71ed44c7312438fac7c5c5301e45522e57127db4
Unify 8-bit and 10-bit CLI and libraries

Add 'i_bitdepth' to x264_param_t with the corresponding '--output-depth' CLI
option to set the bit depth at runtime.

Drop the 'x264_bit_depth' global variable. Rather than hardcoding it to an
incorrect value, it's preferable to induce a linking failure. If applications
relies on this symbol this will make it more obvious where the problem is.

Add Makefile rules that compiles modules with different bit depths. Assembly
on x86 is prefixed with the 'private_prefix' define, while all other archs
modify their function prefix internally.

Templatize the main C library, x86/x86_64 assembly, ARM assembly, AARCH64
assembly, PowerPC assembly, and MIPS assembly.

The depth and cache CLI filters heavily depend on bit depth size, so they
need to be duplicated for each value. This means having to rename these
filters, and adjust the callers to use the right version.

Unfortunately the threaded input CLI module inherits a common.h dependency
(input/frame -> common/threadpool -> common/frame -> common/common) which
is extremely complicated to address in a sensible way. Instead duplicate
the module and select the appropriate one at run time.

Each bitdepth needs different checkasm compilation rules, so split the main
checkasm target into two executables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#ifndef X264_PPC_DCT_H
28
28
#define X264_PPC_DCT_H
29
29
 
 
30
#define x264_sub4x4_dct_altivec x264_template(sub4x4_dct_altivec)
30
31
void x264_sub4x4_dct_altivec( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 );
 
32
#define x264_sub8x8_dct_altivec x264_template(sub8x8_dct_altivec)
31
33
void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 );
 
34
#define x264_sub16x16_dct_altivec x264_template(sub16x16_dct_altivec)
32
35
void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 );
33
36
 
 
37
#define x264_add8x8_idct_dc_altivec x264_template(add8x8_idct_dc_altivec)
34
38
void x264_add8x8_idct_dc_altivec( uint8_t *p_dst, int16_t dct[4] );
35
39
 
 
40
#define x264_add4x4_idct_altivec x264_template(add4x4_idct_altivec)
36
41
void x264_add4x4_idct_altivec( uint8_t *p_dst, int16_t dct[16] );
 
42
#define x264_add8x8_idct_altivec x264_template(add8x8_idct_altivec)
37
43
void x264_add8x8_idct_altivec( uint8_t *p_dst, int16_t dct[4][16] );
 
44
#define x264_add16x16_idct_altivec x264_template(add16x16_idct_altivec)
38
45
void x264_add16x16_idct_altivec( uint8_t *p_dst, int16_t dct[16][16] );
39
46
 
 
47
#define x264_sub8x8_dct_dc_altivec x264_template(sub8x8_dct_dc_altivec)
40
48
void x264_sub8x8_dct_dc_altivec( int16_t dct[4], uint8_t *pix1, uint8_t *pix2 );
 
49
#define x264_sub8x8_dct8_altivec x264_template(sub8x8_dct8_altivec)
41
50
void x264_sub8x8_dct8_altivec( int16_t dct[64], uint8_t *pix1, uint8_t *pix2 );
 
51
#define x264_sub16x16_dct8_altivec x264_template(sub16x16_dct8_altivec)
42
52
void x264_sub16x16_dct8_altivec( int16_t dct[4][64], uint8_t *pix1, uint8_t *pix2 );
43
53
 
 
54
#define x264_add8x8_idct8_altivec x264_template(add8x8_idct8_altivec)
44
55
void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[64] );
 
56
#define x264_add16x16_idct8_altivec x264_template(add16x16_idct8_altivec)
45
57
void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][64] );
46
58
 
 
59
#define x264_zigzag_scan_4x4_frame_altivec x264_template(zigzag_scan_4x4_frame_altivec)
47
60
void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[16] );
 
61
#define x264_zigzag_scan_4x4_field_altivec x264_template(zigzag_scan_4x4_field_altivec)
48
62
void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[16] );
 
63
#define x264_zigzag_scan_8x8_frame_altivec x264_template(zigzag_scan_8x8_frame_altivec)
49
64
void x264_zigzag_scan_8x8_frame_altivec( int16_t level[64], int16_t dct[64] );
 
65
#define x264_zigzag_interleave_8x8_cavlc_altivec x264_template(zigzag_interleave_8x8_cavlc_altivec)
50
66
void x264_zigzag_interleave_8x8_cavlc_altivec( int16_t *dst, int16_t *src, uint8_t *nnz );
51
67
 
52
68
#endif