Commit 91879863 authored by Simon Morlat's avatar Simon Morlat

set android specific settings for encoder

parent 6a155a1a
......@@ -348,3 +348,4 @@ MSScalerDesc ms_android_scaler={
android_scaler_process,
android_scaler_context_free
};
......@@ -240,4 +240,28 @@ function line_yuv2rgb
bx lr
.endfunc
/*float interpolate_product_single(const float* a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac)*/
function interpolate_product_single
push {r4-r7}
vld1.f32 r4, [sp#16] /*load frac*/
veor q0, q0 /*set q0 to zero */
add r5 , r0, #4 /*r5=r0+4*/
add r6 , r1, #4 /*r6=r1+4*/
shl r3 , r3, #2 /*r3=oversample*sizeof(float)*/
1:
vld1.f32 {d2[],d3[]}, [r0] !
vld1.f32 {d4[],d5[]}, [r5] !
vld1.f32 q3, [r1], r3
vld1.f32 q4, [r6], r3
vmla.f32 q0, q1 , q3
vmla.f32 q0, q2, q4
subs r2, r2, #2
bne 1f
vmul.f32 q0, q4, q0
vpadd.f32 q0, q0, q0
vpadd.f32 q0, q0, q0
/* vmov.32 r0, d0[0] */
pop {r4-r7}
bx lr
.endif
......@@ -867,6 +867,10 @@ static int enc_set_br(MSFilter *f, void *arg){
s->fps=5;
s->qmin=5;
}
#ifdef ANDROID
/* we have to limit the fps on android due to limited CPU */
if (s->fps>7) s->fps=7;
#endif
if (s->av_context.codec!=NULL){
/*apply new settings dynamically*/
ms_filter_lock(f);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment