FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
vp9_intra_msa.c File Reference
#include "libavcodec/vp9dsp.h"
#include "libavutil/mips/generic_macros_msa.h"
#include "vp9dsp_mips.h"

Go to the source code of this file.

Macros

#define IPRED_SUBS_UH2_UH(in0, in1, out0, out1)
 
#define INTRA_DC_TL_4x4(dir)
 
#define INTRA_DC_TL_8x8(dir)
 
#define INTRA_DC_TL_16x16(dir)
 
#define INTRA_DC_TL_32x32(dir)
 
#define INTRA_PREDICT_VALDC_16X16_MSA(val)
 
#define INTRA_PREDICT_VALDC_32X32_MSA(val)
 

Functions

void ff_vert_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *left, const uint8_t *src)
 
void ff_vert_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *left, const uint8_t *src)
 
void ff_hor_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, const uint8_t *top)
 
void ff_hor_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, const uint8_t *top)
 
void ff_dc_4x4_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_4x4 (top)
 
 INTRA_DC_TL_4x4 (left)
 
void ff_dc_8x8_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_8x8 (top)
 
 INTRA_DC_TL_8x8 (left)
 
void ff_dc_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_16x16 (top)
 
 INTRA_DC_TL_16x16 (left)
 
void ff_dc_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_32x32 (top)
 
 INTRA_DC_TL_32x32 (left)
 
 INTRA_PREDICT_VALDC_16X16_MSA (127)
 
 INTRA_PREDICT_VALDC_16X16_MSA (128)
 
 INTRA_PREDICT_VALDC_16X16_MSA (129)
 
 INTRA_PREDICT_VALDC_32X32_MSA (127)
 
 INTRA_PREDICT_VALDC_32X32_MSA (128)
 
 INTRA_PREDICT_VALDC_32X32_MSA (129)
 
void ff_tm_4x4_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_8x8_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 

Macro Definition Documentation

#define IPRED_SUBS_UH2_UH (   in0,
  in1,
  out0,
  out1 
)
Value:
{ \
out0 = __msa_subs_u_h(out0, in0); \
out1 = __msa_subs_u_h(out1, in1); \
}

Definition at line 25 of file vp9_intra_msa.c.

Referenced by ff_tm_16x16_msa(), ff_tm_32x32_msa(), ff_tm_4x4_msa(), and ff_tm_8x8_msa().

#define INTRA_DC_TL_4x4 (   dir)
Value:
void ff_dc_##dir##_4x4_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint32_t val0; \
v16i8 store, data = { 0 }; \
v8u16 sum_h; \
v4u32 sum_w; \
\
val0 = LW(dir); \
data = (v16i8) __msa_insert_w((v4i32) data, 0, val0); \
sum_h = __msa_hadd_u_h((v16u8) data, (v16u8) data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_w, 2); \
store = __msa_splati_b((v16i8) sum_w, 0); \
val0 = __msa_copy_u_w((v4i32) store, 0); \
SW4(val0, val0, val0, val0, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
#define LW(psrc)
uint8_t
#define SW4(in0, in1, in2, in3, pdst, stride)

Definition at line 130 of file vp9_intra_msa.c.

#define INTRA_DC_TL_8x8 (   dir)
Value:
void ff_dc_##dir##_8x8_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint64_t val0; \
v16i8 store; \
v16u8 data = { 0 }; \
v8u16 sum_h; \
v4u32 sum_w; \
v2u64 sum_d; \
\
val0 = LD(dir); \
data = (v16u8) __msa_insert_d((v2i64) data, 0, val0); \
sum_h = __msa_hadd_u_h(data, data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 3); \
store = __msa_splati_b((v16i8) sum_w, 0); \
val0 = __msa_copy_u_d((v2i64) store, 0); \
SD4(val0, val0, val0, val0, dst, dst_stride); \
dst += (4 * dst_stride); \
SD4(val0, val0, val0, val0, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
uint8_t
#define LD(psrc)
#define SD4(in0, in1, in2, in3, pdst, stride)

Definition at line 180 of file vp9_intra_msa.c.

#define INTRA_DC_TL_16x16 (   dir)
Value:
void ff_dc_##dir##_16x16_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
v16u8 data, out; \
v8u16 sum_h; \
v4u32 sum_w; \
v2u64 sum_d; \
\
data = LD_UB(dir); \
sum_h = __msa_hadd_u_h(data, data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_pckev_w((v4i32) sum_d, (v4i32) sum_d); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 4); \
out = (v16u8) __msa_splati_b((v16i8) sum_w, 0); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
dst += (8 * dst_stride); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
uint8_t
#define ST_UB8(...)
#define LD_UB(...)
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 233 of file vp9_intra_msa.c.

#define INTRA_DC_TL_32x32 (   dir)
Value:
void ff_dc_##dir##_32x32_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint32_t row; \
v16u8 data0, data1, out; \
v8u16 sum_h, sum_data0, sum_data1; \
v4u32 sum_w; \
v2u64 sum_d; \
LD_UB2(dir, 16, data0, data1); \
HADD_UB2_UH(data0, data1, sum_data0, sum_data1); \
sum_h = sum_data0 + sum_data1; \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_pckev_w((v4i32) sum_d, (v4i32) sum_d); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 5); \
out = (v16u8) __msa_splati_b((v16i8) sum_w, 0); \
for (row = 16; row--;) \
{ \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
} \
}
uint8_t
#define LD_UB2(...)
#define ST_UB2(...)
#define HADD_UB2_UH(...)
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
for(j=16;j >0;--j)

Definition at line 290 of file vp9_intra_msa.c.

#define INTRA_PREDICT_VALDC_16X16_MSA (   val)
Value:
void ff_dc_##val##_16x16_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, const uint8_t *top) \
{ \
v16u8 out = (v16u8) __msa_ldi_b(val); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
dst += (8 * dst_stride); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
}
const char const char void * val
Definition: avisynth_c.h:634
uint8_t
#define ST_UB8(...)
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 322 of file vp9_intra_msa.c.

#define INTRA_PREDICT_VALDC_32X32_MSA (   val)
Value:
void ff_dc_##val##_32x32_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, const uint8_t *top) \
{ \
uint32_t row; \
v16u8 out = (v16u8) __msa_ldi_b(val); \
for (row = 16; row--;) \
{ \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
} \
}
const char const char void * val
Definition: avisynth_c.h:634
uint8_t
#define ST_UB2(...)
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
for(j=16;j >0;--j)

Definition at line 337 of file vp9_intra_msa.c.

Function Documentation

void ff_vert_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t left,
const uint8_t src 
)

Definition at line 31 of file vp9_intra_msa.c.

void ff_vert_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t left,
const uint8_t src 
)

Definition at line 45 of file vp9_intra_msa.c.

void ff_hor_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
const uint8_t top 
)

Definition at line 60 of file vp9_intra_msa.c.

void ff_hor_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
const uint8_t top 
)

Definition at line 81 of file vp9_intra_msa.c.

void ff_dc_4x4_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 108 of file vp9_intra_msa.c.

INTRA_DC_TL_4x4 ( top  )
INTRA_DC_TL_4x4 ( left  )
void ff_dc_8x8_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 153 of file vp9_intra_msa.c.

INTRA_DC_TL_8x8 ( top  )
INTRA_DC_TL_8x8 ( left  )
void ff_dc_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 209 of file vp9_intra_msa.c.

INTRA_DC_TL_16x16 ( top  )
INTRA_DC_TL_16x16 ( left  )
void ff_dc_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 259 of file vp9_intra_msa.c.

INTRA_DC_TL_32x32 ( top  )
INTRA_DC_TL_32x32 ( left  )
INTRA_PREDICT_VALDC_16X16_MSA ( 127  )
INTRA_PREDICT_VALDC_16X16_MSA ( 128  )
INTRA_PREDICT_VALDC_16X16_MSA ( 129  )
INTRA_PREDICT_VALDC_32X32_MSA ( 127  )
INTRA_PREDICT_VALDC_32X32_MSA ( 128  )
INTRA_PREDICT_VALDC_32X32_MSA ( 129  )
void ff_tm_4x4_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 357 of file vp9_intra_msa.c.

void ff_tm_8x8_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 384 of file vp9_intra_msa.c.

void ff_tm_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 417 of file vp9_intra_msa.c.

void ff_tm_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 468 of file vp9_intra_msa.c.