~siretart/x264/trunk

« back to all changes in this revision

Viewing changes to common/mips/predict.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:
26
26
#ifndef X264_MIPS_PREDICT_H
27
27
#define X264_MIPS_PREDICT_H
28
28
 
 
29
#define x264_intra_predict_dc_16x16_msa x264_template(intra_predict_dc_16x16_msa)
29
30
void x264_intra_predict_dc_16x16_msa( uint8_t *p_src );
 
31
#define x264_intra_predict_dc_left_16x16_msa x264_template(intra_predict_dc_left_16x16_msa)
30
32
void x264_intra_predict_dc_left_16x16_msa( uint8_t *p_src );
 
33
#define x264_intra_predict_dc_top_16x16_msa x264_template(intra_predict_dc_top_16x16_msa)
31
34
void x264_intra_predict_dc_top_16x16_msa( uint8_t *p_src );
 
35
#define x264_intra_predict_dc_128_16x16_msa x264_template(intra_predict_dc_128_16x16_msa)
32
36
void x264_intra_predict_dc_128_16x16_msa( uint8_t *p_src );
 
37
#define x264_intra_predict_hor_16x16_msa x264_template(intra_predict_hor_16x16_msa)
33
38
void x264_intra_predict_hor_16x16_msa( uint8_t *p_src );
 
39
#define x264_intra_predict_vert_16x16_msa x264_template(intra_predict_vert_16x16_msa)
34
40
void x264_intra_predict_vert_16x16_msa( uint8_t *p_src );
 
41
#define x264_intra_predict_plane_16x16_msa x264_template(intra_predict_plane_16x16_msa)
35
42
void x264_intra_predict_plane_16x16_msa( uint8_t *p_src );
 
43
#define x264_intra_predict_dc_4blk_8x8_msa x264_template(intra_predict_dc_4blk_8x8_msa)
36
44
void x264_intra_predict_dc_4blk_8x8_msa( uint8_t *p_src );
 
45
#define x264_intra_predict_hor_8x8_msa x264_template(intra_predict_hor_8x8_msa)
37
46
void x264_intra_predict_hor_8x8_msa( uint8_t *p_src );
 
47
#define x264_intra_predict_vert_8x8_msa x264_template(intra_predict_vert_8x8_msa)
38
48
void x264_intra_predict_vert_8x8_msa( uint8_t *p_src );
 
49
#define x264_intra_predict_plane_8x8_msa x264_template(intra_predict_plane_8x8_msa)
39
50
void x264_intra_predict_plane_8x8_msa( uint8_t *p_src );
 
51
#define x264_intra_predict_ddl_8x8_msa x264_template(intra_predict_ddl_8x8_msa)
40
52
void x264_intra_predict_ddl_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] );
 
53
#define x264_intra_predict_dc_8x8_msa x264_template(intra_predict_dc_8x8_msa)
41
54
void x264_intra_predict_dc_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] );
 
55
#define x264_intra_predict_h_8x8_msa x264_template(intra_predict_h_8x8_msa)
42
56
void x264_intra_predict_h_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] );
 
57
#define x264_intra_predict_v_8x8_msa x264_template(intra_predict_v_8x8_msa)
43
58
void x264_intra_predict_v_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] );
 
59
#define x264_intra_predict_dc_4x4_msa x264_template(intra_predict_dc_4x4_msa)
44
60
void x264_intra_predict_dc_4x4_msa( uint8_t *p_src );
 
61
#define x264_intra_predict_hor_4x4_msa x264_template(intra_predict_hor_4x4_msa)
45
62
void x264_intra_predict_hor_4x4_msa( uint8_t *p_src );
 
63
#define x264_intra_predict_vert_4x4_msa x264_template(intra_predict_vert_4x4_msa)
46
64
void x264_intra_predict_vert_4x4_msa( uint8_t *p_src );
47
65
 
48
66
#endif