FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
hevc_macros_msa.h File Reference

Go to the source code of this file.

Macros

#define HEVC_PCK_SW_SB2(in0, in1, out)
 
#define HEVC_PCK_SW_SB4(in0, in1, in2, in3, out)
 
#define HEVC_PCK_SW_SB8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1)
 
#define HEVC_PCK_SW_SB12(in0, in1, in2, in3, in4, in5, in6, in7,in8, in9, in10, in11, out0, out1, out2)
 
#define HEVC_FILT_8TAP(in0, in1, in2, in3,filt0, filt1, filt2, filt3)
 
#define HEVC_FILT_4TAP(in0, in1, filt0, filt1)
 

Macro Definition Documentation

#define HEVC_PCK_SW_SB2 (   in0,
  in1,
  out 
)
Value:
{ \
v8i16 tmp0_m; \
\
tmp0_m = __msa_pckev_h((v8i16) in0, (v8i16) in1); \
out = (v4i32) __msa_pckev_b((v16i8) tmp0_m, (v16i8) tmp0_m); \
}
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out

Definition at line 24 of file hevc_macros_msa.h.

Referenced by hevc_biwgt_copy_4w_msa(), hevc_hv_bi_8t_4w_msa(), hevc_hv_biwgt_4t_4x2_msa(), hevc_hv_biwgt_8t_4w_msa(), hevc_hv_uni_8t_4w_msa(), hevc_hv_uniwgt_4t_4x2_msa(), hevc_hv_uniwgt_8t_4w_msa(), hevc_hz_biwgt_4t_4x2_msa(), hevc_hz_biwgt_8t_24w_msa(), hevc_hz_biwgt_8t_48w_msa(), hevc_hz_uniwgt_4t_4x2_msa(), hevc_uniwgt_copy_4w_msa(), hevc_vt_biwgt_4t_4x2_msa(), hevc_vt_biwgt_8t_12w_msa(), and hevc_vt_uniwgt_4t_4x2_msa().

#define HEVC_PCK_SW_SB4 (   in0,
  in1,
  in2,
  in3,
  out 
)
Value:
{ \
v8i16 tmp0_m, tmp1_m; \
PCKEV_H2_SH(in0, in1, in2, in3, tmp0_m, tmp1_m); \
out = (v4i32) __msa_pckev_b((v16i8) tmp1_m, (v16i8) tmp0_m); \
}
#define PCKEV_H2_SH(...)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out

Definition at line 32 of file hevc_macros_msa.h.

Referenced by hevc_biwgt_copy_4w_msa(), hevc_biwgt_copy_8w_msa(), hevc_hv_bi_8t_8multx2mult_msa(), hevc_hv_biwgt_4t_4x4_msa(), hevc_hv_biwgt_4t_8x2_msa(), hevc_hv_biwgt_4t_8x6_msa(), hevc_hv_biwgt_8t_8multx2mult_msa(), hevc_hv_uni_8t_8multx2mult_msa(), hevc_hv_uniwgt_4t_4multx8mult_msa(), hevc_hv_uniwgt_4t_4x4_msa(), hevc_hv_uniwgt_4t_8x2_msa(), hevc_hv_uniwgt_8t_8multx2mult_msa(), hevc_hz_biwgt_4t_24w_msa(), hevc_hz_biwgt_4t_4x4_msa(), hevc_hz_biwgt_4t_8x2_msa(), hevc_hz_biwgt_8t_24w_msa(), hevc_hz_biwgt_8t_48w_msa(), hevc_hz_biwgt_8t_4w_msa(), hevc_hz_uniwgt_4t_24w_msa(), hevc_hz_uniwgt_4t_4x4_msa(), hevc_hz_uniwgt_4t_8x2_msa(), hevc_hz_uniwgt_8t_24w_msa(), hevc_uniwgt_copy_4w_msa(), hevc_uniwgt_copy_8w_msa(), hevc_vt_biwgt_4t_24w_msa(), hevc_vt_biwgt_4t_4x4_msa(), hevc_vt_biwgt_4t_8x2_msa(), hevc_vt_biwgt_8t_12w_msa(), hevc_vt_uniwgt_4t_24w_msa(), hevc_vt_uniwgt_4t_4x4_msa(), and hevc_vt_uniwgt_4t_8x2_msa().

#define HEVC_PCK_SW_SB8 (   in0,
  in1,
  in2,
  in3,
  in4,
  in5,
  in6,
  in7,
  out0,
  out1 
)
Value:
{ \
v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \
PCKEV_H4_SH(in0, in1, in2, in3, in4, in5, in6, in7, \
tmp0_m, tmp1_m, tmp2_m, tmp3_m); \
PCKEV_B2_SW(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out1); \
}
#define PCKEV_B2_SW(...)
#define PCKEV_H4_SH(...)

Definition at line 40 of file hevc_macros_msa.h.

Referenced by hevc_biwgt_copy_16multx4mult_msa(), hevc_biwgt_copy_4w_msa(), hevc_biwgt_copy_6w_msa(), hevc_biwgt_copy_8w_msa(), hevc_hv_biwgt_4t_4multx8mult_msa(), hevc_hv_biwgt_4t_6w_msa(), hevc_hv_biwgt_4t_8multx4mult_msa(), hevc_hv_biwgt_4t_8x6_msa(), hevc_hv_uniwgt_4t_6w_msa(), hevc_hv_uniwgt_4t_8multx4mult_msa(), hevc_hz_biwgt_4t_16w_msa(), hevc_hz_biwgt_4t_24w_msa(), hevc_hz_biwgt_4t_32w_msa(), hevc_hz_biwgt_4t_4x8multiple_msa(), hevc_hz_biwgt_4t_6w_msa(), hevc_hz_biwgt_4t_8x4multiple_msa(), hevc_hz_biwgt_8t_16w_msa(), hevc_hz_biwgt_8t_32w_msa(), hevc_hz_biwgt_8t_64w_msa(), hevc_hz_biwgt_8t_8w_msa(), hevc_hz_uniwgt_4t_16w_msa(), hevc_hz_uniwgt_4t_24w_msa(), hevc_hz_uniwgt_4t_32w_msa(), hevc_hz_uniwgt_4t_4x8multiple_msa(), hevc_hz_uniwgt_4t_6w_msa(), hevc_hz_uniwgt_4t_8x4multiple_msa(), hevc_hz_uniwgt_8t_16w_msa(), hevc_hz_uniwgt_8t_24w_msa(), hevc_hz_uniwgt_8t_32w_msa(), hevc_hz_uniwgt_8t_4w_msa(), hevc_hz_uniwgt_8t_64w_msa(), hevc_hz_uniwgt_8t_8w_msa(), hevc_uniwgt_copy_16multx4mult_msa(), hevc_uniwgt_copy_4w_msa(), hevc_uniwgt_copy_6w_msa(), hevc_uniwgt_copy_8w_msa(), hevc_vt_biwgt_4t_16w_msa(), hevc_vt_biwgt_4t_24w_msa(), hevc_vt_biwgt_4t_32w_msa(), hevc_vt_biwgt_4t_4x8multiple_msa(), hevc_vt_biwgt_4t_6w_msa(), hevc_vt_biwgt_4t_8x4multiple_msa(), hevc_vt_biwgt_8t_16multx2mult_msa(), hevc_vt_biwgt_8t_4w_msa(), hevc_vt_biwgt_8t_8w_msa(), hevc_vt_uniwgt_4t_16w_msa(), hevc_vt_uniwgt_4t_24w_msa(), hevc_vt_uniwgt_4t_32w_msa(), hevc_vt_uniwgt_4t_4x8multiple_msa(), hevc_vt_uniwgt_4t_6w_msa(), hevc_vt_uniwgt_4t_8x4multiple_msa(), hevc_vt_uniwgt_8t_16multx2mult_msa(), hevc_vt_uniwgt_8t_4w_msa(), and hevc_vt_uniwgt_8t_8w_msa().

#define HEVC_PCK_SW_SB12 (   in0,
  in1,
  in2,
  in3,
  in4,
  in5,
  in6,
  in7,
  in8,
  in9,
  in10,
  in11,
  out0,
  out1,
  out2 
)
Value:
{ \
v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m, tmp4_m, tmp5_m; \
PCKEV_H4_SH(in0, in1, in2, in3, in4, in5, in6, in7, \
tmp0_m, tmp1_m, tmp2_m, tmp3_m); \
PCKEV_H2_SH(in8, in9, in10, in11, tmp4_m, tmp5_m); \
PCKEV_B2_SW(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out1); \
out2 = (v4i32) __msa_pckev_b((v16i8) tmp5_m, (v16i8) tmp4_m); \
}
#define PCKEV_H2_SH(...)
#define PCKEV_B2_SW(...)
#define PCKEV_H4_SH(...)

Definition at line 49 of file hevc_macros_msa.h.

Referenced by hevc_biwgt_copy_12w_msa(), hevc_biwgt_copy_8w_msa(), hevc_hv_uniwgt_4t_8x6_msa(), hevc_hz_biwgt_4t_12w_msa(), hevc_hz_biwgt_4t_8x6_msa(), hevc_hz_uniwgt_4t_12w_msa(), hevc_hz_uniwgt_4t_8x6_msa(), hevc_hz_uniwgt_8t_48w_msa(), hevc_uniwgt_copy_12w_msa(), hevc_uniwgt_copy_8w_msa(), hevc_vt_biwgt_4t_12w_msa(), hevc_vt_biwgt_4t_8x6_msa(), hevc_vt_uniwgt_4t_12w_msa(), hevc_vt_uniwgt_4t_8x6_msa(), and hevc_vt_uniwgt_8t_12w_msa().

#define HEVC_FILT_8TAP (   in0,
  in1,
  in2,
  in3,
  filt0,
  filt1,
  filt2,
  filt3 
)
Value:
( { \
v4i32 out_m; \
\
out_m = __msa_dotp_s_w((v8i16) in0, (v8i16) filt0); \
out_m = __msa_dpadd_s_w(out_m, (v8i16) in1, (v8i16) filt1); \
DPADD_SH2_SW(in2, in3, filt2, filt3, out_m, out_m); \
out_m; \
} )
#define DPADD_SH2_SW(...)

Definition at line 61 of file hevc_macros_msa.h.

Referenced by hevc_hv_8t_4w_msa(), hevc_hv_8t_8multx2mult_msa(), hevc_hv_bi_8t_4w_msa(), hevc_hv_bi_8t_8multx2mult_msa(), hevc_hv_biwgt_8t_4w_msa(), hevc_hv_biwgt_8t_8multx2mult_msa(), hevc_hv_uni_8t_4w_msa(), hevc_hv_uni_8t_8multx2mult_msa(), hevc_hv_uniwgt_8t_4w_msa(), and hevc_hv_uniwgt_8t_8multx2mult_msa().

#define HEVC_FILT_4TAP (   in0,
  in1,
  filt0,
  filt1 
)