diff --git a/builds/jsvpx.js b/builds/jsvpx.js index 33b9302..d55f4b6 100644 --- a/builds/jsvpx.js +++ b/builds/jsvpx.js @@ -1,107 +1,107 @@ -(function(a){function e(c){if(b[c])return b[c].exports;var f=b[c]={exports:{},id:c,loaded:!1};a[c].call(f.exports,f,f.exports,e);f.loaded=!0;return f.exports}var b={};e.m=a;e.c=b;e.p="";return e(0)})([function(a,e,b){a.exports=b(1)},function(a,e,b){var c=b(2),f=b(33).vpx_codec_ctx_t;e=function(){this.iface=c.ifaces[0].iface;this.decoder=new f;c.vpx_codec_dec_init(this.decoder,this.iface,null,null)};e.prototype.decode=function(f){f=new Uint8Array(f);c.vpx_codec_decode(this.decoder,f,f.length,void 0, -void 0);if(f=c.vpx_codec_get_frame(this.decoder,null))return f};window&&(window.JsVpx=e);a.exports=e},function(a,e,b){function c(f,c,d,b,a){f.iface=c;f.name=c.name;f.priv=null;f.init_flags=b;f.config.dec=d;f.iface.init(f,null)}e=[{name:"jsvp8",iface:b(3)}];a.exports={ifaces:e,vpx_codec_dec_init:function(f,b,d,a){return c(f,b,d,a,4)},vpx_codec_dec_init_ver:c,vpx_codec_peek_stream_info:function(){},vpx_codec_get_stream_info:function(){},vpx_codec_decode:function(f,c,d,b,a){f.iface.dec.decode(f.priv, -c,d,b,a)},vpx_codec_get_frame:function(c,b){return c.iface.dec.get_frame(c,b)},vpx_codec_put_frame_cb_fn_t:function(){},vpx_codec_register_put_frame_cb:function(){},vpx_codec_register_put_slice_cb:function(){}}},function(a,e,b){var c=b(4),f=b(11).vp8dx_receive_compressed_data,t=function(){this.base;this.cfg;this.si;this.decoder_init;this.postproc_cfg_set;this.postproc_cfg;this.decrypt_cb;this.decrypt_state;this.img;this.img_setup;this.yv12_frame_buffers;this.user_priv;this.fragments;this.temp_pbi= -null};a.exports={name:"jscodec VP8 Decoder",abi_version:0,caps:null,destroy:null,dec:{peek_si:function(){},get_si:function(){},decode:function(d,b,a,e,t){d.temp_pbi||(e=new c,d.temp_pbi=e);f(d.temp_pbi,a,b,t);return 0},get_frame:function(d,c){return d.priv.temp_pbi.common.show_frame?d.priv.temp_pbi.ref_frames[0].img:null}},init:function(d,c){if(!d.priv){var f=new t;d.priv=f;d.priv.init_flags=d.init_flags;d.priv.decrypt_cb=null;d.priv.decrypt_state=null;d.config.dec&&(f.cfg=d.config.dec,d.config.dec= -f.cfg)}}}},function(a,e,b){var c=b(5),f=b(6).BOOL_DECODER;e=b(8);var t=e.MACROBLOCKD,d=e.FRAGMENT_DATA,x=e.MODE_INFO,u=b(10).vpx_image_t;Uint8Array.prototype.ptr=0;var v=function(){this.img=new u;this.ref_cnt=0},y=function(){this.quant_idx=0;this.factor=[new Int16Array([0,0]),new Int16Array([0,0]),new Int16Array([0,0])]},q=function(){this.bool=new f;this.left_token_entropy_ctx=new Int32Array(9);this.coeffs=0};b=function(){this.saved_entropy_valid=this.cpuTime=this.frame_cnt=0;this.mb_info_rows_storage= -null;this.mb_info_rows_storage_off=0;this.mb_info_rows_storage_object=x;this.mb_info_rows=null;this.mb_info_rows_off=0;this.above_token_entropy_ctx=null;this.common=new c;this.boolDecoder=new f;this.segment_hdr=new t(this);this.token_hdr=new d(this);this.tokens=Array(8);for(var b=0;8>b;b++)this.tokens[b]=new q;this.frame_strg=[{img:new u,ref_cnt:0},{img:new u,ref_cnt:0},{img:new u,ref_cnt:0},{img:new u,ref_cnt:0}];this.ref_frames=Array(4);for(b=0;4>b;b++)this.ref_frames[b]=new v;this.dequant_factors= -Array(4);for(b=0;4>b;b++)this.dequant_factors[b]=new y;this.ref_frame_offsets=new Uint32Array([0,0,0,0]);this.ref_frame_offsets_=[0,0,0,0];this.subpixel_filters=null;this.img_avail;this.img};b.prototype.modemv_init=function(){var d,c,g;d=this.mb_cols+1;c=this.mb_rows+1;this.common.mode_info_stride=this.mb_cols+1;1===this.common.frame_size_updated&&(this.mb_info_rows_storage=this.mb_info_storage=null);if(null===this.mb_info_storage){var k=d*c;this.mb_info_storage=Array(k);for(g=0;gc;c++)this.tokens[c]=new r;this.frame_strg=[{img:new u,ref_cnt:0},{img:new u,ref_cnt:0},{img:new u,ref_cnt:0},{img:new u,ref_cnt:0}];this.ref_frames=Array(4);for(c=0;4>c;c++)this.ref_frames[c]=new v;this.dequant_factors= +Array(4);for(c=0;4>c;c++)this.dequant_factors[c]=new y;this.ref_frame_offsets=new Uint32Array([0,0,0,0]);this.ref_frame_offsets_=[0,0,0,0];this.subpixel_filters=null;this.img_avail;this.img};c.prototype.modemv_init=function(){var d,f,l;d=this.mb_cols+1;f=this.mb_rows+1;this.common.mode_info_stride=this.mb_cols+1;1===this.common.frame_size_updated&&(this.mb_info_rows_storage=this.mb_info_storage=null);if(null===this.mb_info_storage){var h=d*f;this.mb_info_storage=Array(h);for(l=0;l>8),f=d<<8,a;c.value>=f?(a=1,c.range-=d,c.value-=f):(a=0,c.range=d);for(;128>c.range;)c.value<<=1,c.range<<=1,8===++c.bit_count&& -(c.bit_count=0,c.input_len&&(c.value|=c.input[c.ptr++],c.input_len--));return a}function c(c){return b(c,128)}a.exports={};a.exports.vpx_read_bit=c;a.exports.vpx_read=b;a.exports.vpx_read_literal=function(b,a){var d=0,f;for(f=a-1;0<=f;f--)d|=c(b)<>3+a*c.stride[0])|0:(d=c.img_data_off,c.fmt&1024&&(c.planes_off[3]=d+b+a*c.stride[3],d+=c.h*c.stride[3]),c.planes_off[0]=d+b+a*c.stride[0], -d+=c.h*c.stride[0],c.fmt&512?(c.planes_off[2]=d+(b>>c.x_chroma_shift)+(a>>c.y_chroma_shift)*c.stride[2],d+=(c.h>>c.y_chroma_shift)*c.stride[2],c.planes_off[1]=d+(b>>c.x_chroma_shift)+(a>>c.y_chroma_shift)*c.stride[1]):(c.planes_off[1]=d+(b>>c.x_chroma_shift)+(a>>c.y_chroma_shift)*c.stride[1],d+=(c.h>>c.y_chroma_shift)*c.stride[1],c.planes_off[2]=d+(b>>c.x_chroma_shift)+(a>>c.y_chroma_shift)*c.stride[2])),0):-1}Uint8ClampedArray.prototype.data_32=null;Uint8Array.prototype.data_32=null;a.exports={}; -a.exports.vpx_img_set_rect=b;a.exports.img_alloc_helper=function(c,a,e,d,x,u){var f,t,q,w,h;x||(x=1);x&x-1&&console.warn("Invalid stride align");switch(a){case 2:case 9:case 10:case 11:h=32;break;case 1:case 8:h=24;break;case 3:case 12:case 4:case 13:case 5:case 6:case 7:h=16;break;case 258:case 769:case 260:case 771:h=12;break;default:h=16}switch(a){case 258:case 769:case 260:case 771:q=1;break;default:q=0}switch(a){case 258:case 769:case 260:case 771:w=1;break;default:w=0}f=(1<>3)|0)+x-1&~(x-1)|0;c.img_data=u;null!==u&&(c.img_data=new Uint8Array(0===(a&256)?f*x:f*t*h>>3),c.img_data.data_32=new Uint32Array(c.img_data.buffer),c.img_data_owner=1);c.fmt=a;c.w=t;c.h=f;c.x_chroma_shift=q;c.y_chroma_shift=w;c.bps=h;c.stride[0]=c.stride[3]=x;c.stride[1]=c.stride[2]=x>>q;if(0===b(c,0,0,e,d))return c};a.exports.vpx_image_t=function(){this.y_chroma_shift=this.x_chroma_shift=this.d_h=this.d_w=this.h=this.w=this.fmt=0;this.planes_off=new Int32Array(4); -this.stride=new Int32Array(4);this.user_priv=this.bps=0;this.img_data=null;this.self_allocd=this.img_data_owner=this.img_data_off=0}},function(a,e,b){function c(c){if(c){if(0===c.ref_cnt)throw"ERROR :(";c.ref_cnt--}}function f(c){c.ref_cnt++;return c}var t=b(12).vp8_decode_frame;a.exports={vp8dx_receive_compressed_data:function(b,a,e,v){t(e,b);1===b.common.copy_arf?(c(b.ref_frames[3]),b.ref_frames[3]=f(b.ref_frames[1])):2===b.common.copy_arf&&(c(b.ref_frames[3]),b.ref_frames[3]=f(b.ref_frames[2])); -1===b.common.copy_gf?(c(b.ref_frames[2]),b.ref_frames[2]=f(b.ref_frames[1])):2===b.common.copy_gf&&(c(b.ref_frames[2]),b.ref_frames[2]=f(b.ref_frames[3]));1===b.common.refresh_gf&&(c(b.ref_frames[2]),b.ref_frames[2]=f(b.ref_frames[0]));1===b.common.refresh_arf&&(c(b.ref_frames[3]),b.ref_frames[3]=f(b.ref_frames[0]));1===b.common.refresh_last&&(c(b.ref_frames[1]),b.ref_frames[1]=f(b.ref_frames[0]))}}},function(a,e,b){function c(c,b,k){var g,a,d,f=1;1===b.enabled&&(f=ia);for(g=0;g=D.y_mode?(U(A.u,A.u_off,A.v,A.v_off, -A.uv_stride,J,N,0),L(A.y,A.y_off,A.stride,J,N,0)):P(r,A,N,0,J,e,n);h++;C.y_off+=16;C.u_off+=8;C.v_off+=8}c.common.level&&g&&(c.common.filter_type?v(c,g-1):y(c,g-1,0,c.mb_cols));m===c.mb_cols&&(f=C.y,h=C.y_off+15*C.stride,f[h]=f[h+1]=f[h+2]=f[h+3]=C.y[C.y_off-1+15*C.stride]);++l===c.token_hdr.partitions&&(l=0)}c.common.level&&(c.common.filter_type?v(c,g-1):y(c,g-1,0,c.mb_cols))}function t(c,b,g,k,a,l){var d=b-1;if(0===l&&a)for(a=b-k,b=0;b>=2;c=c.data_32;k=k|k<<8|k<<16|k<<24;var a=g>>2;for(g=0;g>2)]=k}function u(c,b,k,g){var a,l=c.decoder;c.partitions=1<>1&7;d.show_frame=n>>4&1;r=(n|b[1]<<8|b[2]<<16)>>5;if(p<=r+(d.is_keyframe?10:3))return-1;d.frame_size_updated=0;if(!0===d.is_keyframe){var e= -d.Width,P=d.Height,n=d.vert_scale,K=d.horiz_scale;if(157!==b[3]||1!==b[4]||42!==b[5])return-1;var U=b[7];d.Width=(b[6]|U<<8)&16383;d.horiz_scale=U>>6;d.Height=(b[8]|b[9]<<8)&16383;d.vert_scale=b[9]>>6;if(e!==d.Width||P!==d.Height||n!==d.vert_scale||K!==d.horiz_scale)d.frame_size_updated=1}b.ptr+=M;p-=M;!0===d.is_keyframe&&(b.ptr+=ja,p-=ja,a.mb_cols=d.Width+15>>4|0,a.mb_rows=d.Height+15>>4|0);N(l,b,b.ptr,r);d.is_keyframe&&l.get_uint(2);n=a.common;if(!0===n.is_keyframe){for(e=0;19>e;e++)n.entropy_hdr.mv_probs[0][e]= -g[0][e];for(e=0;19>e;e++)n.entropy_hdr.mv_probs[1][e]=g[1][e];F(n);k(n)}m.enabled=h(l);if(1===m.enabled){m.update_map=h(l);m.update_data=h(l);if(1===m.update_data){m.abs=h(l);for(n=0;nn;n++)1===h(l)?m.tree_probs[n]=l.get_uint(8):m.tree_probs[n]=255}else m.update_map=0,m.update_data=0;!0===d.is_keyframe&&(d.filter_type=0,d.level=0,d.sharpness=0,d.delta_enabled=0,d.ref_delta[0]= -0,d.ref_delta[1]=0,d.ref_delta[2]=0,d.ref_delta[3]=0,d.mode_delta[0]=0,d.mode_delta[1]=0,d.mode_delta[2]=0,d.mode_delta[3]=0);d.filter_type=h(l);d.level=l.get_uint(6);d.sharpness=l.get_uint(3);d.delta_enabled=h(l);n=d.ref_delta;1===d.delta_enabled&&1===h(l)&&(n[0]=l.maybe_get_int(6),n[1]=l.maybe_get_int(6),n[2]=l.maybe_get_int(6),n[3]=l.maybe_get_int(6),d.mode_delta[0]=l.maybe_get_int(6),d.mode_delta[1]=l.maybe_get_int(6),d.mode_delta[2]=l.maybe_get_int(6),d.mode_delta[3]=l.maybe_get_int(6));u(a.token_hdr, -b,b.ptr+r,p-r);p=d.mbmi_qindex;d.mbmi_qindex=l.get_uint(7);p=(p!==d.mbmi_qindex)+0;p|=d.y1dc_delta_q=l.maybe_get_int(4);p|=d.y2dc_delta_q=l.maybe_get_int(4);p|=d.y2ac_delta_q=l.maybe_get_int(4);p|=d.uvdc_delta_q=l.maybe_get_int(4);p|=d.uvac_delta_q=l.maybe_get_int(4);d.delta_update=p;p=d.is_keyframe;d.refresh_gf=!0===p?1:h(l);d.refresh_arf=!0===p?1:h(l);d.copy_gf=!0===p?0:d.refresh_gf?0:l.get_uint(2);d.copy_arf=!0===p?0:d.refresh_arf?0:l.get_uint(2);d.sign_bias[J]=!0===p?0:h(l);d.sign_bias[I]=!0=== -p?0:h(l);d.refresh_entropy_probs=h(l);d.refresh_last=!0===p?1:h(l);0===d.refresh_entropy_probs&&(X(d.saved_entropy,d.entropy_hdr),a.saved_entropy_valid=1);a.modemv_init();p=a.token_hdr.partitions;if(1===d.frame_size_updated){r=400*a.mb_cols;for(n=0;nk&&(k=0);c=k;b.common.sharpness&&(c>>=49-b.common.sharpness&&(c=9-b.common.sharpness));1>c&&(c=1);g=15<=k?1:0;40<=k&&g++;20<=k&&!b.common.is_keyframe&& -g++;d[0]=k;a[0]=c;l[0]=g}function f(b){return r(m(b,0),255)}function t(b,c,d,a){var k=b[c],g=b[c+d];return l(b[c-2*d]-b[c-d])>a||l(g-k)>a}function d(b,c,d,a,k){var g=b[c-4*d],n=b[c-3*d],p=b[c-2*d],m=b[c-d],f=b[c],h=b[c+d],r=b[c+2*d],e=b[c+3*d];a=2*a+k;var P=b[c-(d<<1)],K=b[c+d];return 2*l(b[c-d]-b[c])+(l(P-K)>>1)<=a|0&&l(g-n)<=k&&l(n-p)<=k&&l(p-m)<=k&&l(e-r)<=k&&l(r-h)<=k&&l(h-f)<=k}function x(b,c,a,k,l,g,n){var p=n<<3;for(n=0;n>7;q=f(q+u);F=f(F-u);u=18*G+63>>7;A=f(A+u);N=f(N-u);u=9*G+63>>7;L=f(L+u);w=f(w-u);h[e-U]=L;h[e-K]=A;h[e-P]=q;h[e]=F;h[e+P]=N;h[e+K]=w}c+=1}}function u(b,c,a,k,l,g,n){var p=n<<3;for(n=0;n>3;g=b(g+(127>3));e=b(e-L);f||(q=L+1>>1,l=b(l+q),r=b(r-q));c[a-k]=l;c[a-d]=g;c[a]=e;c[a+d]=r}function f(b,a,d,f){var k;for(k=0;16>k;k++)1===t(b,a,d,f)&&c(b,a,d,1),a+=1}function t(b,c,a,d){var k=b[c-(a<<1)],l=b[c+a];return(q(b[c-a]-b[c])<<1)+(q(k-l)>>1)<=d|0}function d(b,a,d,f){var k;for(k=0;16>k;k++)t(b,a,1,f)&&c(b,a,1,1),a+=d}function x(a,d,l,f,m,p,n){var k=n<<3;for(n=0;n>7;t=b(t+V);x=b(x-V);V=18*E+63>>7;q=b(q+V);G=b(G-V);V=9*E+63>>7;r=b(r+V);y=b(y-V);g[e-3]=r;g[e-2]=q;g[e-1]=t;g[e]=x;g[e+1]=G;g[e+2]=y}d+=l}}function u(b,c,a,d,f){var k=b[c-4*a],l=b[c-3*a],g=b[c-2*a],e=b[c-a],h=b[c],m=b[c+a],r=b[c+2*a],w=b[c+3*a];return t(b,c,a,2*d+f)&&q(k-l)<=f&&q(l-g)<=f&&q(g-e)<=f&&q(w-r)<=f&&q(r-m)<=f&&q(m-h)<=f}function v(b,c,a,d){var k=b[c],l= -b[c+a];return q(b[c-2*a]-b[c-a])>d||q(l-k)>d}function y(b,a,d,f,e,h,n){var k=8*n;for(n=0;nl)return P[U+w[l]]=m,++l,E=1;P[U+w[15]]=m;E=12;return 1}function z(c,a){p+=x(b,q[c].probs[a])<l?(++l,F+=y[l]| -0,E=2):E=12,u=1);if(1===u)continue;if(1===f(A[F+2],11))continue;if(1===f(A[F+3],8))continue;if(1===f(A[F+6],6))continue;if(1===f(A[F+8],4))continue;if(1===f(A[F+10],3))continue;p=q[10].min_val;n=q[10].length;do z(10,n),n--;while(0<=n);if(1===D(p))continue}if(3===E&&(p=q[9].min_val,z(9,4),z(9,3),z(9,2),z(9,1),z(9,0),1===D(p)))continue;if(4===E){if(1===f(A[F+9],5))continue;p=q[8].min_val;z(8,3);z(8,2);z(8,1);z(8,0);if(1===D(p))continue}if(5===E&&(p=q[7].min_val,z(7,2),z(7,1),z(7,0),1===D(p)))continue; -if(6===E){if(1===f(A[F+7],7))continue;p=q[6].min_val;z(6,1);z(6,0);if(1===D(p))continue}if(7===E&&(p=q[5].min_val,z(5,0),1===D(p)))continue;if(8===E){if(f(A[F+4],10))continue;if(f(A[F+5],9))continue;if(D(4))continue}if(9!==E||!D(3))if(10!==E||!D(2)){if(11===E){c(1);F=N+11;if(15>l){P[U+w[l]]=m;++l;E=1;continue}P[U+w[15]]=m;E=12}if(12===E){K=(K|(1>>0;r=(l!=!k)+0;K=(K|r<<31)>>>0;a[t[h]]=e[d[h]]=r;U+=16;h++;if(hd;d++)e[d]=a[d];a=c.mv_probs;for(d=0;19>d;d++)b.mv_probs[0][d]=a[0][d];for(d=0;19>d;d++)b.mv_probs[1][d]=a[1][d];a=c.y_mode_probs_32;b.y_mode_probs_32[0]=a[0];a=c.uv_mode_probs;b.uv_mode_probs[0]= -a[0];b.uv_mode_probs[1]=a[1];b.uv_mode_probs[2]=a[2];b.prob_inter=c.prob_inter;b.prob_last=c.prob_inter;b.prob_gf=c.prob_inter};a.exports.memset=function(b,c,a,e){for(;e--;)b[c+e]=a};a.exports.memset_32=function(b,c,a,e){c>>=2;b=b.data_32;a=a|a<<8|a<<16|a<<24;var d=e>>2;for(e=0;e>2)]=a};a.exports.memcpy=function(b,a,e,t,d){for(;d--;)b[a+d]=e[t+d];return b}},function(a,e){var b=[new Uint8Array([237,246,253,253,254,254,254,254,254,254,254,254,254,254,250,250,252,254,254]),new Uint8Array([231, -243,245,253,254,254,254,254,254,254,254,254,254,254,251,251,254,254,254])],c=[new Uint8Array([162,128,225,146,172,147,214,39,156,128,129,132,75,145,178,206,239,254,254]),new Uint8Array([164,128,204,170,119,235,140,230,228,128,130,130,74,148,180,203,236,254,254])];a.exports={};a.exports.vp8_mv_update_probs=b;a.exports.vp8_default_mv_context=c},function(a,e,b){var c=b(19).data_64;a.exports={vp8_default_coef_probs:function(b){b.entropy_hdr.coeff_probs.data_64.set(c)}}},function(a,e){var b=new Uint8Array([128, -128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,253,136,254,255,228,219,128,128,128,128,128,189,129,242,255,227,213,255,219,128,128,128,106,126,227,252,214,209,255,255,128,128,128,1,98,248,255,236,226,255,255,128,128,128,181,133,238,254,221,234,255,154,128,128,128,78,134,202,247,198,180,255,219,128,128,128,1,185,249,255,243,255,128,128,128,128,128,184,150,247,255,236,224,128,128,128,128,128,77,110,216,255,236,230,128, -128,128,128,128,1,101,251,255,241,255,128,128,128,128,128,170,139,241,252,236,209,255,255,128,128,128,37,116,196,243,228,255,255,255,128,128,128,1,204,254,255,245,255,128,128,128,128,128,207,160,250,255,238,128,128,128,128,128,128,102,103,231,255,211,171,128,128,128,128,128,1,152,252,255,240,255,128,128,128,128,128,177,135,243,255,234,225,128,128,128,128,128,80,129,211,255,194,224,128,128,128,128,128,1,1,255,128,128,128,128,128,128,128,128,246,1,255,128,128,128,128,128,128,128,128,255,128,128,128, -128,128,128,128,128,128,128,198,35,237,223,193,187,162,160,145,155,62,131,45,198,221,172,176,220,157,252,221,1,68,47,146,208,149,167,221,162,255,223,128,1,149,241,255,221,224,255,255,128,128,128,184,141,234,253,222,220,255,199,128,128,128,81,99,181,242,176,190,249,202,255,255,128,1,129,232,253,214,197,242,196,255,255,128,99,121,210,250,201,198,255,202,128,128,128,23,91,163,242,170,187,247,210,255,255,128,1,200,246,255,234,255,128,128,128,128,128,109,178,241,255,231,245,255,255,128,128,128,44,130, -201,253,205,192,255,255,128,128,128,1,132,239,251,219,209,255,165,128,128,128,94,136,225,251,218,190,255,255,128,128,128,22,100,174,245,186,161,255,199,128,128,128,1,182,249,255,232,235,128,128,128,128,128,124,143,241,255,227,234,128,128,128,128,128,35,77,181,251,193,211,255,205,128,128,128,1,157,247,255,236,231,255,255,128,128,128,121,141,235,255,225,227,255,255,128,128,128,45,99,188,251,195,217,255,224,128,128,128,1,1,251,255,213,255,128,128,128,128,128,203,1,248,255,255,128,128,128,128,128,128, -137,1,177,255,224,255,128,128,128,128,128,253,9,248,251,207,208,255,192,128,128,128,175,13,224,243,193,185,249,198,255,255,128,73,17,171,221,161,179,236,167,255,234,128,1,95,247,253,212,183,255,255,128,128,128,239,90,244,250,211,209,255,255,128,128,128,155,77,195,248,188,195,255,255,128,128,128,1,24,239,251,218,219,255,205,128,128,128,201,51,219,255,196,186,128,128,128,128,128,69,46,190,239,201,218,255,228,128,128,128,1,191,251,255,255,128,128,128,128,128,128,223,165,249,255,213,255,128,128,128,128, -128,141,124,248,255,255,128,128,128,128,128,128,1,16,248,255,255,128,128,128,128,128,128,190,36,230,255,236,255,128,128,128,128,128,149,1,255,128,128,128,128,128,128,128,128,1,226,255,128,128,128,128,128,128,128,128,247,192,255,128,128,128,128,128,128,128,128,240,128,255,128,128,128,128,128,128,128,128,1,134,252,255,255,128,128,128,128,128,128,213,62,250,255,255,128,128,128,128,128,128,55,93,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, -128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,202,24,213,235,186,191,220,160,240,175,255,126,38,182,232,169,184,228,174,255,187,128,61,46,138,219,151,178,240,170,255,216,128,1,112,230,250,199,191,247,159,255,255,128,166,109,228,252,211,215,255,174,128,128,128,39,77,162,232,172,180,245,178,255,255,128,1,52,220,246,198,199,249,220,255,255,128,124,74,191,243,183,193,250,221,255,255,128,24,71,130,219,154,170,243,182,255,255,128,1,182,225,249,219,240,255,224,128,128,128,149,150,226,252,216, -205,255,171,128,128,128,28,108,170,242,183,194,254,223,255,255,128,1,81,230,252,204,203,255,192,128,128,128,123,102,209,247,188,196,255,233,128,128,128,20,95,153,243,164,173,255,203,128,128,128,1,222,248,255,216,213,128,128,128,128,128,168,175,246,252,235,205,255,255,128,128,128,47,116,215,255,211,212,255,255,128,128,128,1,121,236,253,212,214,255,255,128,128,128,141,84,213,252,201,202,255,219,128,128,128,42,80,160,240,162,185,255,205,128,128,128,1,1,255,128,128,128,128,128,128,128,128,244,1,255,128, -128,128,128,128,128,128,128,238,1,255,128,128,128,128,128,128,128,128]);b.data_32=new Uint32Array(b.buffer);b.data_64=new Float64Array(b.buffer);a.exports=b},function(a,e){var b=new Int32Array([4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102, -104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157]),c=new Int32Array([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229, -234,239,245,249,254,259,264,269,274,279,284]),f=Math.min,t=Math.max;a.exports={};a.exports.vp8_dc_quant=function(a,c){a+=c;127a&&(a=0);a=f(t(a,0),127);return b[a]};a.exports.vp8_dc2quant=function(a,c){a+=c;127a&&(a=0);return b[a]<<1};a.exports.vp8_dc_uv_quant=function(a,c){var d;a+=c;127a&&(a=0);d=b[a];132b&&(b=0);return c[b]};a.exports.vp8_ac2quant=function(b,a){var d;b+=a;127b&&(b= -0);d=101581*c[b]>>16;8>d&&(d=8);return d};a.exports.vp8_ac_uv_quant=function(b,a){b+=a;127b&&(b=0);return c[b]}},function(a,e,b){function c(b,a,c,e,g,n,f){var k=b.frame_strg[0].img.img_data,l=b.frame_strg[0].img.img_data_off,m,p,r,q,w,K,t,u,x,z;m=g.mbmi.ref_frame;var v=a.u,y=a.v,H=a.u_off,J=a.v_off;u=n<<4;x=f<<4;K=b.mb_cols<<4;t=b.mb_rows<<4;r=a.y;q=a.y_off;w=b.ref_frame_offsets[m];p=q+w;var I=g.mbmi.y_mode,D=g.bmi.mvs;w=b.ref_frame_offsets[m];m=b.ref_frame_offsets_[m];for(z=0;16>z;z++)d(r, -q,k,l,m,p,a.stride,9!==I?g.mbmi.mv:D[z],b.subpixel_filters,c,e,g,u,x,K,t,z),u+=4,q+=4,p+=4,3===(z&3)&&(u-=16,x+=4,q+=(a.stride<<2)-16,p+=(a.stride<<2)-16);u=n<<4>>1;x=f<<4>>1;K>>=1;t>>=1;n=4*a.uv_stride-8;for(z=0;4>z;z++)d(v,H,k,l,m,H+w,a.uv_stride,h[z],b.subpixel_filters,c,e,g,u,x,K,t,z+16),d(y,J,k,l,m,J+w,a.uv_stride,h[z],b.subpixel_filters,c,e,g,u,x,K,t,z+20),H+=4,J+=4,u+=4,1===(z&1)&&(u-=8,x+=4,H+=n,J+=n)}function f(b,a,c,d,e){var g,k,f;g=k=f=a.y;var l=a.y_off,m=a.u_off,p=a.v_off,r,q,w=e.mbmi, -u=w.y_mode;q=b.ref_frame_offsets[e.mbmi.ref_frame];r=b.ref_frame_offsets_[e.mbmi.ref_frame];var x=a.stride,v=b.subpixel_filters,y=e.bmi.mvs;for(b=0;16>b;b++)t(g,l,r,l+q,x,9!==u?w.mv:y[b],v,c,d,e,b),l+=4,3===(b&3)&&(l+=(a.stride<<2)-16);a=a.uv_stride;for(b=0;4>b;b++)t(k,m,r,m+q,a,h[b],v,c,d,e,b+16),t(f,p,r,p+q,a,h[b],v,c,d,e,b+20),m+=4,p+=4,1===(b&1)&&(m+=(a<<2)-8,p+=(a<<2)-8)}function t(b,a,c,d,e,g,f,h,q,w,t){w=c;var k;g.as_int?(w=g.x&7,k=g.y&7,d+=(g.y>>3)*e+(g.x>>3),x(b,a,e,c,d,e,4,4,w,k,f),w=b, -c=a):c=d;y(b,a,w,c,e,h,q+16*t)}function d(b,a,c,d,e,g,f,h,t,u,v,A,F,G,W,E,V){F+=h.x>>3;G+=h.y>>3;if(2>F||F+4-1+3>=W||2>G||G+4-1+3>=E){g+=(h.x>>3)+(h.y>>3)*f;A=d;F-=2;G-=2;var k=9;g=g-2-(f<<1)-F-G*f;G>=E?g+=(E-1)*f:0F?-F:0;9W&&(n=F+9-W);9>3)+(h.y>>3)*f)}h.as_int?(c=h.x&7,d=h.y&7,g+=(h.y>>3)*f+(h.x>>3),x(b,a, -f,e,g,f,4,4,c,d,t),h=b,t=a):(g+=(h.y>>3)*f+(h.x>>3),h=e,t=g);y(b,a,h,t,f,u,v+16*V)}e=b(9);var x=b(22).filter_block2d,u=b(23),v=u.vp8_short_inv_walsh4x4_c,y=u.vp8_short_idct4x4llm_c;b=b(16);var q=b.memset,w=b.memcpy,h=[new e,new e,new e,new e],g=new e;a.exports={};a.exports.predict_inter_emulated_edge=c;a.exports.predict_inter=f;a.exports.vp8_build_inter_predictors_mb=function(b,a,d,e,p,n,q){var l=(3===b.common.version)+0;if(9!==p.mbmi.y_mode){v(d,e+384,e);g.as_int=p.mbmi.mv.as_int;if(1===p.mbmi.need_mc_border){var k= -g.x,m=g.y;g.x=k+1+(k>>31<<1);g.y=m+1+(m>>31<<1);g.x/=2;g.y/=2}else g.x=g.x+1>>1,g.y=g.y+1>>1;l&&(g.as_int&=4294508536);h[0].as_int=h[1].as_int=h[2].as_int=h[3].as_int=g.as_int}else for(k=p.bmi.mvs,m=0;2>m;++m)for(var r=0;2>r;++r){var w=(m<<3)+(r<<1),t=h[(m<<1)+r],u;u=k[w].x+k[w+1].x+k[w+4].x+k[w+5].x;u=0>u?u-4:u+4;t.x=u/8|0;u=k[w].y+k[w+1].y+k[w+4].y+k[w+5].y;u=0>u?u-4:u+4;t.y=u/8|0;1===l&&(t.as_int&=4294508536)}1===p.mbmi.need_mc_border?c(b,a,d,e,p,n,q):f(b,a,d,e,p)}},function(a,e){function b(b, -a,c,d,e,h,g,f,l){var k,m,p=l[0]|0,n=l[1]|0,q=l[2]|0,w=l[3]|0,t=l[4]|0,u=l[5]|0;for(l=0;l>=7,0>m?m=0:255>=7,0>m?m=0:255>=7,0>v?v=0:255>=7,0>A?A=0:255>=7,0>n?n=0:255>=7,0>q?q=0:255a;a++)g=r[m],l=r[m+4],h=r[m+8],k=r[m+12],d=g+k|0,e=l+h|0,h=l-h|0,g=g-k|0,f[p]=d+e,f[p+4]=h+g,f[p+8]=d-e,f[p+12]=g-h,m++,p++;r=f;p=m=0;r=r.data_32;for(a=0;4>a;a++)d=r[m>>1],h=d>>16,g=d<<16>>16,d=r[m+2>>1],k=d>>16,l=d<<16>>16,d=g+k,e=h+l,h-=l,g-=k,k=d+e,l=h+g,d-=e,e=g-h,t[p>>1]=k+3>>3&65535|l+3>>3<<16,t[p+2>>1]=d+3>>3&65535| -e+3>>3<<16,m+=4,p+=4;for(a=0;16>a;a++)b[c+(a<<4)]=f[a]};a.exports.vp8_short_idct4x4llm_c=function(a,d,e,f,t,h,g){var k,l,r,m,p,n,q=0;for(k=0;4>k;k++){r=h[g];var u=h[g+4],w=h[g+12];m=h[g+8];l=r+m;r-=m;p=35468*u>>16;n=w+(20091*w>>16);m=p-n;p=u+(20091*u>>16);n=35468*w>>16;p+=n;x[q]=l+p;x[q+12]=l-p;x[q+4]=r+m;x[q+8]=r-m;g++;q++}h=x;g=0;a=a.data_32;for(k=0;4>k;k++)r=h[g],q=h[g+1],m=h[g+2],u=h[g+3],l=r+m,r-=m,p=35468*q>>16,n=u+(20091*u>>16),m=p-n,p=q+(20091*q>>16),n=35468*u>>16,p+=n,n=e[f],u=e[f+1],w=e[f+ -2],q=e[f+3],n=b(c(n+(l+p+4>>3),0),255),u=b(c(u+(r+m+4>>3),0),255),r=b(c(w+(r-m+4>>3),0),255),l=b(c(q+(l-p+4>>3),0),255),a[d>>2]=n|u<<8|r<<16|l<<24,g+=4,d+=t,f+=t}},function(a,e,b){function c(b,a,c){x(b,a,c,8)}function c(b,a,c){x(b,a,c,8)}function f(b,a,c,d){var e=a-c|0,f,g,h;for(f=0;f>5;break;case 8:h=h+8>>4;break;case 4:h=h+4>>3}for(g=0;gm;m++)y(b,a,b,a,r,p,n),n+=16,a+=4,m&1&&(a+=g);for(m=20;24>m;m++)y(e,l,e,l,r,p,n),n+=16,l+=4,m&1&&(l+=g)};a.exports.predict_intra_luma=function(b,a,c,e,r,m){if(4===e.mbmi.y_mode){var g=a,h=m,l;u(b,g,c);for(l=0;16>l;l++){var k=b,q=g+((l&3)<<2);switch(e.bmi.modes[l]){case 0:d(k,q,c,4);break;case 1:x(k,q,c,4);break;case 2:var w=void 0,N=void 0,A=void 0,F=k,G=q,W=c,E=G-W,V=F.data_32[E>> -2]|0,X=V&255,z=V>>8&255,M=V>>16&255,ja=V>>24&255;F.data_32[G>>2]=F[E-1]+(X<<1)+z+2>>2|X+(z<<1)+M+2>>2<<8|z+(M<<1)+ja+2>>2<<16|M+(ja<<1)+F[E+4]+2>>2<<24;for(A=1;4>A;A++)for(w=A*W,N=0;4>N;N++)F[G+w+N]=F[G+N];break;case 3:var H=k,J=q,I=c,D=J-1,ia=H.data_32,S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;D+=I;S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;D+=I;S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;D+=I;S=H[D-I]+2*H[D]+H[D+0]+2>>2;ia[J+I>>2]=S|S<<8|S<<16|S<< -24;break;case 4:var sa=void 0,ta=void 0,C=void 0,ha=void 0,ua=void 0,na=k,R=q,O=c,Q=R-O,Hb=na.data_32,B=Hb[Q>>2],Yb=B&255,fa=B>>8&255,ca=B>>16&255,da=B>>24&255,B=Hb[(Q>>2)+1],ea=B&255,Z=B>>8&255,T=B>>16&255,Y=B>>24&255,ua=fa+(ca<<1)+da+2>>2,ha=ca+(da<<1)+ea+2>>2,C=da+(ea<<1)+na[Q+5]+2>>2;na.data_32[R>>2]=Yb+(fa<<1)+ca+2>>2|ua<<8|ha<<16|C<<24;R+=O;ta=ea+2*Z+T+2>>2;na.data_32[R>>2]=ua|ha<<8|C<<16|ta<<24;R+=O;sa=Z+(T<<1)+Y+2>>2;na.data_32[R>>2]=ha|C<<8|ta<<16|sa<<24;na.data_32[R+O>>2]=C|ta<<8|sa<<16| -T+2*Y+Y+2>>2<<24;break;case 5:var Ba=void 0,Fa=void 0,aa=void 0,la=void 0,Ca=void 0,Ra=void 0,Ga=void 0,ga=k,ma=q,va=c,Ha=ma-1,Sa=ma-va,Ta=ga.data_32[Sa>>2],gb=Ta&255,hb=Ta>>8&255,Ib=Ta>>16&255,Jb=ga[Ha],ib=ga[Ha+va],Kb=ga[Ha+2*va],Ga=ga[Ha+0]+2*ga[Sa-1]+gb+2>>2,Ra=ga[Sa-1]+2*gb+hb+2>>2,Ca=gb+2*hb+Ib+2>>2,la=hb+2*Ib+(Ta>>24&255)+2>>2;ga.data_32[ma>>2]=Ga|Ra<<8|Ca<<16|la<<24;ma+=va;aa=ib+2*Jb+ga[Sa-1]+2>>2;ga.data_32[ma>>2]=aa|Ga<<8|Ra<<16|Ca<<24;ma+=va;Fa=Kb+2*ib+Jb+2>>2;ga.data_32[ma>>2]=Fa|aa<< -8|Ga<<16|Ra<<24;Ba=ga[Ha+3*va]+2*Kb+ib+2>>2;ga.data_32[ma+va>>2]=Ba|Fa<<8|aa<<16|Ga<<24;break;case 6:var Lb=void 0,Mb=void 0,Nb=void 0,jb=void 0,kb=void 0,lb=void 0,Ob=void 0,mb=void 0,nb=void 0,ob=void 0,ba=k,oa=q,wa=c,Ia=oa-1,Da=oa-wa,Ua=ba.data_32[Da>>2],Ja=Ua&255,Ka=Ua>>8&255,Va=Ua>>16&255,Pb=ba[Ia+0],ob=ba[Da-1]+Ja+1>>1,nb=Ja+Ka+1>>1,mb=Ka+Va+1>>1,Ob=Va+(Ua>>24&255)+1>>1;ba.data_32[oa>>2]=ob|nb<<8|mb<<16|Ob<<24;oa+=wa;lb=ba[Ia+0]+2*ba[Da-1]+Ja+2>>2;kb=ba[Da-1]+2*Ja+Ka+2>>2;jb=Ja+2*Ka+Va+2>>2; -Nb=Ka+2*Va+ba[Da+3]+2>>2;ba.data_32[oa>>2]=lb|kb<<8|jb<<16|Nb<<24;oa+=wa;Mb=ba[Ia+wa]+2*Pb+ba[Da-1]+2>>2;ba.data_32[oa>>2]=Mb|ob<<8|nb<<16|mb<<24;Lb=ba[Ia+2*wa]+2*ba[Ia+wa]+Pb+2>>2;ba.data_32[oa+wa>>2]=Lb|lb<<8|kb<<16|jb<<24;break;case 7:var Qb=void 0,pb=void 0,qb=void 0,rb=void 0,sb=void 0,tb=void 0,ub=void 0,pa=k,xa=q,Wa=c,Xa=xa-Wa,ka=pa.data_32[Xa>>2],Rb=ka&255,Ya=ka>>8&255,La=ka>>16&255,Za=ka>>24&255,ka=pa.data_32[(Xa>>2)+1],$a=ka&255,Sb=ka>>8&255,Tb=ka>>16&255,ub=Ya+La+1>>1,tb=La+Za+1>>1,sb= -pa[Xa+3]+$a+1>>1;pa.data_32[xa>>2]=Rb+Ya+1>>1|ub<<8|tb<<16|sb<<24;xa+=Wa;rb=Ya+2*La+Za+2>>2;qb=La+2*Za+$a+2>>2;pb=Za+2*$a+pa[Xa+5]+2>>2;pa.data_32[xa>>2]=Rb+2*Ya+La+2>>2|rb<<8|qb<<16|pb<<24;xa+=Wa;pa.data_32[xa>>2]=ub|tb<<8|sb<<16|$a+2*Sb+Tb+2>>2<<24;Qb=Sb+2*Tb+(ka>>24&255)+2>>2;pa.data_32[xa+Wa>>2]=rb|qb<<8|pb<<16|Qb<<24;break;case 8:var vb=void 0,wb=void 0,xb=void 0,yb=void 0,Ub=void 0,zb=void 0,Ab=void 0,qa=q,ya=c,ab=qa-1,Ma=qa-ya,Bb=k[Ma-1]|0,Cb=k[Ma]|0,Vb=k[Ma+1]|0,Zb=k[Ma+2]|0,Na=k[ab]|0,Oa= -k[ab+ya]|0,bb=k[ab+(ya<<1)]|0,Wb=k[ab+3*ya]|0,cb=k.data_32,Ab=Na+Bb+1>>1,zb=Na+2*Bb+Cb+2>>2,Ub=k[Ma-1]+2*Cb+Vb+2>>2;cb[qa>>2]=Ab|zb<<8|Ub<<16|Cb+(Vb<<1)+Zb+2>>2<<24;qa+=ya;yb=Oa+Na+1>>1;xb=Oa+2*Na+Bb+2>>2;cb[qa>>2]=yb|xb<<8|Ab<<16|zb<<24;qa+=ya;wb=bb+Oa+1>>1;vb=bb+2*Oa+Na+2>>2;cb[qa>>2]=wb|vb<<8|yb<<16|xb<<24;cb[qa+ya>>2]=Wb+bb+1>>1|Wb+2*bb+Oa+2>>2<<8|wb<<16|vb<<24;break;case 9:var za=void 0,Db=void 0,Eb=void 0,Fb=void 0,Gb=void 0,ra=k,Aa=q,Ea=c,db=Aa-1,Xb=ra[db],eb=ra[db+Ea],Pa=ra[db+2*Ea],Qa=ra[db+ -3*Ea],Gb=eb+Pa+1>>1,Fb=eb+2*Pa+Qa+2>>2;ra.data_32[Aa>>2]=Xb+eb+1>>1|Xb+2*eb+Pa+2>>2<<8|Gb<<16|Fb<<24;Aa+=Ea;Eb=Pa+Qa+1>>1;Db=Pa+2*Qa+Qa+2>>2;ra.data_32[Aa>>2]=Gb|Fb<<8|Eb<<16|Db<<24;Aa+=Ea;za=Qa;ra.data_32[Aa>>2]=Eb|Db<<8|za<<16|za<<24;ra.data_32[Aa+Ea>>2]=za|za<<8|za<<16|za<<24;break;default:throw"ERROR :(";}y(k,q,k,q,c,r,h);h+=16;3===(l&3)&&(g+=4*c)}}else{var fb;switch(e.mbmi.y_mode){case 0:d(b,a,c,16);break;case 1:f(b,a,c,16);break;case 2:t(b,a,c,16);break;case 3:x(b,a,c,16)}v(r,m+384,m);for(fb= -0;16>fb;fb++)y(b,a,b,a,c,r,m),m+=16,a+=4,3===(fb&3)&&(a+=(c<<2)-16)}}},function(a,e){a.exports={};a.exports.intra_prediction_down_copy=function(b,a,e){a=a+16-e;b=b.data_32;var c=b[a>>2];a+=e<<2;b[a>>2]=c;a+=e<<2;b[a>>2]=c;b[a+(e<<2)>>2]=c}},function(a,e,b){function c(a,b,c){c.enabled&&c.update_map&&(1===L(a,c.tree_probs[0])?b.mbmi.segment_id=2+L(a,c.tree_probs[2]):b.mbmi.segment_id=L(a,c.tree_probs[1]))}function f(a,b,c,d){a=a.common.mode_info_stride;var e=b[c];e.init_split_mode();var f=e.bmi.modes; -e.mbmi.ref_frame=0;var h=e.mbmi,n=A(d,k,m,0);h.y_mode=n;if(4===e.mbmi.y_mode){h=0;e.mbmi.is_4x4=1;do{var p=y(b,c,h,a),t=v(b,c,h),n=h,p=A(d,g,q[p][t],0);f[n]=p}while(16>++h)}b=e.mbmi;d=A(d,l,r,0);b.uv_mode=d}function t(a,b){a.xb.mb_to_right_edge&&(a.x=b.mb_to_right_edge);a.yb.mb_to_bottom_edge&&(a.y=b.mb_to_bottom_edge)}function d(a,b,c,d,e,f){b+=a.x>>3;c+=a.y>>3;return 2>b>>1||3>e-(b+d)>>1||2>c>>1||3>f-(c+d)>> -1}function x(a,b,c,d){b[a.mbmi.ref_frame]^b[c]&&(d.x*=-1,d.y*=-1)}function u(a,b){var c=0;if(L(a,b[0])){var d;for(d=0;3>d;d++)c+=L(a,b[9+d])<p;p++)1===L(m,w[p])&&(q[p]=m.get_uint(8));a.common.entropy_hdr.coeff_skip_enabled= -N(m);a.common.entropy_hdr.coeff_skip_prob=1===a.common.entropy_hdr.coeff_skip_enabled?m.get_uint(8):0;if(!1===a.common.is_keyframe){a.common.entropy_hdr.prob_inter=m.get_uint(8);a.common.entropy_hdr.prob_last=m.get_uint(8);a.common.entropy_hdr.prob_gf=m.get_uint(8);1===N(m)&&(a.common.entropy_hdr.y_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[2]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[3]=m.get_uint(8));1===N(m)&&(a.common.entropy_hdr.uv_mode_probs[0]= -m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[2]=m.get_uint(8));p=a.common.entropy_hdr.mv_probs;for(var r=0;2>r;r++)for(q=0;19>q;q++)if(L(m,F[r][q])){var v=m.get_uint(7);p[r][q]=0M[1]&&(O=M[1],M[1]=M[2],M[2]=O,O=X[1].as_int,X[1].as_int=X[2].as_int,X[2].as_int=O);M[1]>=M[0]&&(X[0].as_int=X[1].as_int);v.mbmi.need_mc_border=0;R=-B.mb_to_left_edge-128>>3;Q=-B.mb_to_top_edge-128>>3;O=J.mb_cols<<4;J=J.mb_rows<<4;if(L(y,U[M[0]][0]))if(L(y,U[M[1]][1]))if(L(y,U[M[2]][2]))if(L(y,U[M[3]][3])){v.mbmi.y_mode= -9;z[0].as_int=0;z[1].as_int=0;z[2].as_int=0;z[3].as_int=0;I=X[0];t(I,B);B=v;var da=y,Ba=0,Z=3,y=16;L(da,110)&&(Z=2,y=4,L(da,111)&&(Z=L(da,150),y=2));var Y=n[Z],Fa=B.bmi.mvs;do{G.as_int=0;W.as_int=0;E.as_int=0;for(var aa,T=0;Ba!==Y[T];T++);W.as_int=T&3?B.bmi.mvs[T-1].as_int:9===ca.mbmi.y_mode?ca.bmi.mvs[T+3].as_int:ca.mbmi.mv.as_int;E.as_int=T>>2?B.bmi.mvs[T-4].as_int:9===ea.mbmi.y_mode?ea.bmi.mvs[T+12].as_int:ea.mbmi.mv.as_int;aa=W.as_int;var la=E.as_int;aa=V[(0===la)<<2|(0===aa)<<1|aa===la];if(L(da, -aa[0]))if(L(da,aa[1])){if(L(da,aa[2])){aa=da;var la=G,Ca=fa.mv_probs;la.y=u(aa,Ca[0]);la.x=u(aa,Ca[1]);G.x+=I.x;G.y+=I.y}}else G.as_int=E.as_int;else G.as_int=W.as_int;for(;16>T;T++)Ba===Y[T]&&(Fa[T].as_int=G.as_int)}while(++BaB;B++)if(z[(B>>1&1)+(B>>2&2)].x+=y[B].x,z[(B>>1&1)+(B>>2&2)].y+=y[B].y,d(y[B],R+4*(B&3),Q+(B&-4),4,O,J)){v.mbmi.need_mc_border=1;break}for(B=0;4>B;B++)if(z[B].x+=4+(z[B].x>>28)|0,z[B].y+= -4+(z[B].y>>28)|0,z[B].x>>=2,z[B].y>>=2,d(z[B],R+8*(B&1),Q+(B>>1<<3),16,O,J)){v.mbmi.need_mc_border=1;break}}else I=X[0],t(I,B),B=v.mbmi.mv,fa=fa.mv_probs,B.y=u(y,fa[0]),B.x=u(y,fa[1]),v.mbmi.mv.x+=I.x,v.mbmi.mv.y+=I.y,v.mbmi.y_mode=8;else v.mbmi.mv.as_int=X[2].as_int,t(v.mbmi.mv,B),v.mbmi.y_mode=6;else v.mbmi.y_mode=5,v.mbmi.mv.as_int=X[1].as_int,t(v.mbmi.mv,B);else v.mbmi.y_mode=7,v.mbmi.mv.as_int=0;d(v.mbmi.mv,R,Q,16,O,J)&&(v.mbmi.need_mc_border=1)}else{J=A(y,P,fa.y_mode_probs,0);if(4===J)for(ca= -v.bmi.modes,ea=v.bmi.mvs,v=0;16>v;v++)B=A(y,g,K,0),ca[v]=ea[v].x=B;R.y_mode=J;R.uv_mode=A(y,l,fa.uv_mode_probs,0);R.mv.x=O[Q].mbmi.mv.y=0;R.ref_frame=0}}!0!==a.common.is_keyframe&&(H.mb_to_left_edge-=128,H.mb_to_right_edge-=128);r++;p++}}},function(a,e,b){b(9);var c=0,f=1,t=2,d=3,x=4,c=0,f=1,t=2,d=3,x=4;a.exports={};a.exports.left_block_mode=function(a,b,e){if(!(e&3))switch(--b,a[b].mbmi.y_mode){case c:return 0;case f:return 2;case t:return 3;case d:return 1;case x:return a[b].bmi.modes[e+3];default:return 0}return a[b].bmi.modes[e- -1]};a.exports.above_block_mode=function(a,b,e,q){if(!(e>>2))switch(b-=q,a[b].mbmi.y_mode){case x:return a[b].bmi.modes[e+12];case c:return 0;case f:return 2;case t:return 3;case d:return 1;default:return 0}return a[b].bmi.modes[e-4]}},function(a,e){var b=new Uint8Array([112,86,140,37]),c=[[new Uint8Array([231,120,48,89,115,113,120,152,112]),new Uint8Array([152,179,64,126,170,118,46,70,95]),new Uint8Array([175,69,143,80,85,82,72,155,103]),new Uint8Array([56,58,10,171,218,189,17,13,152]),new Uint8Array([144, +this.refresh_gf=this.refresh_last=0;this.sign_bias=new Int32Array(4);this.version=this.current_video_frame=0}},function(a,e,c){function b(b,d){var c=0,a;for(a=d-1;0<=a;a--)c|=f(b)<>8),f=d<<8,a;b.value>=f?(a=1,b.range-=d,b.value-=f):(a=0,b.range=d);for(;128>b.range;)b.value<<=1,b.range<<=1,8===++b.bit_count&& +(b.bit_count=0,b.input_len&&(b.value|=b.input[b.ptr++],b.input_len--));return a}function b(b){return c(b,128)}a.exports={};a.exports.vpx_read_bit=b;a.exports.vpx_read=c;a.exports.vpx_read_literal=function(c,a){var d=0,f;for(f=a-1;0<=f;f--)d|=b(c)<>3+a*b.stride[0])|0:(d=b.img_data_off,b.fmt&1024&&(b.planes_off[3]=d+c+a*b.stride[3],d+=b.h*b.stride[3]),b.planes_off[0]=d+c+a*b.stride[0],d+=b.h*b.stride[0],b.fmt&512?(b.planes_off[2]=d+(c>>b.x_chroma_shift)+(a>>b.y_chroma_shift)*b.stride[2],d+=(b.h>>b.y_chroma_shift)*b.stride[2], +b.planes_off[1]=d+(c>>b.x_chroma_shift)+(a>>b.y_chroma_shift)*b.stride[1]):(b.planes_off[1]=d+(c>>b.x_chroma_shift)+(a>>b.y_chroma_shift)*b.stride[1],d+=(b.h>>b.y_chroma_shift)*b.stride[1],b.planes_off[2]=d+(c>>b.x_chroma_shift)+(a>>b.y_chroma_shift)*b.stride[2])),0):-1}Uint8ClampedArray.prototype.data_32=null;Uint8Array.prototype.data_32=null;a.exports={};a.exports.vpx_img_set_rect=c;a.exports.img_alloc_helper=function(b,a,e,d,x,u){var f,t,r,w,g;x||(x=1);x&x-1&&console.warn("Invalid stride align"); +switch(a){case 2:case 9:case 10:case 11:g=32;break;case 1:case 8:g=24;break;case 3:case 12:case 4:case 13:case 5:case 6:case 7:g=16;break;case 258:case 769:case 260:case 771:g=12;break;default:g=16}switch(a){case 258:case 769:case 260:case 771:r=1;break;default:r=0}switch(a){case 258:case 769:case 260:case 771:w=1;break;default:w=0}f=(1<>3)|0)+x-1&~(x-1)|0;b.img_data=u;null!==u&&(b.img_data=new Uint8Array(0===(a&256)?f*x:f*t*g>>3),b.img_data.data_32= +new Uint32Array(b.img_data.buffer),b.img_data_owner=1);b.fmt=a;b.w=t;b.h=f;b.x_chroma_shift=r;b.y_chroma_shift=w;b.bps=g;b.stride[0]=b.stride[3]=x;b.stride[1]=b.stride[2]=x>>r;if(0===c(b,0,0,e,d))return b};a.exports.vpx_image_t=function(){this.y_chroma_shift=this.x_chroma_shift=this.d_h=this.d_w=this.h=this.w=this.fmt=0;this.planes_off=new Int32Array(4);this.stride=new Int32Array(4);this.user_priv=this.bps=0;this.img_data=null;this.self_allocd=this.img_data_owner=this.img_data_off=0}},function(a, +e,c){function b(b){if(b){if(0===b.ref_cnt)throw"ERROR :(";b.ref_cnt--}}function f(b){b.ref_cnt++;return b}var t=c(12).vp8_decode_frame;a.exports={vp8dx_receive_compressed_data:function(d,c,a,e){t(a,d);1===d.common.copy_arf?(b(d.ref_frames[3]),d.ref_frames[3]=f(d.ref_frames[1])):2===d.common.copy_arf&&(b(d.ref_frames[3]),d.ref_frames[3]=f(d.ref_frames[2]));1===d.common.copy_gf?(b(d.ref_frames[2]),d.ref_frames[2]=f(d.ref_frames[1])):2===d.common.copy_gf&&(b(d.ref_frames[2]),d.ref_frames[2]=f(d.ref_frames[3])); +1===d.common.refresh_gf&&(b(d.ref_frames[2]),d.ref_frames[2]=f(d.ref_frames[0]));1===d.common.refresh_arf&&(b(d.ref_frames[3]),d.ref_frames[3]=f(d.ref_frames[0]));1===d.common.refresh_last&&(b(d.ref_frames[1]),d.ref_frames[1]=f(d.ref_frames[0]))}}},function(a,e,c){function b(b,d,c){var h,l,a,f=1;1===d.enabled&&(f=ia);for(h=0;h=D.y_mode?(U(A.u,A.u_off,A.v,A.v_off,A.uv_stride,J,N,0),L(A.y,A.y_off,A.stride,J,N,0)):P(q,A,N,0,J,e,n);g++;C.y_off+=16;C.u_off+=8;C.v_off+=8}b.common.level&&k&&(b.common.filter_type?v(b,k-1):y(b,k- +1,0,b.mb_cols));m===b.mb_cols&&(f=C.y,g=C.y_off+15*C.stride,f[g]=f[g+1]=f[g+2]=f[g+3]=C.y[C.y_off-1+15*C.stride]);++a===b.token_hdr.partitions&&(a=0)}b.common.level&&(b.common.filter_type?v(b,k-1):y(b,k-1,0,b.mb_cols))}function t(b,h,c,k,d,l){var a=h-1;if(0===l&&d)for(d=h-k,h=0;h>=2;b=b.data_32; +c=c|c<<8|c<<16|c<<24;var k=d>>2;for(d=0;d>2)]=c}function u(b,h,c,d){var k,l=b.decoder;b.partitions=1<>1&7;a.show_frame=n>>4&1;q=(n|k[1]<<8|k[2]<<16)>>5;if(p<=q+(a.is_keyframe?10:3))return-1;a.frame_size_updated=0;if(!0===a.is_keyframe){var e=a.Width,P=a.Height,n=a.vert_scale,K=a.horiz_scale;if(157!==k[3]||1!==k[4]||42!==k[5])return-1;var U=k[7];a.Width=(k[6]|U<<8)&16383;a.horiz_scale=U>>6;a.Height=(k[8]|k[9]<<8)&16383; +a.vert_scale=k[9]>>6;if(e!==a.Width||P!==a.Height||n!==a.vert_scale||K!==a.horiz_scale)a.frame_size_updated=1}k.ptr+=M;p-=M;!0===a.is_keyframe&&(k.ptr+=ja,p-=ja,c.mb_cols=a.Width+15>>4|0,c.mb_rows=a.Height+15>>4|0);N(d,k,k.ptr,q);a.is_keyframe&&d.get_uint(2);n=c.common;if(!0===n.is_keyframe){for(e=0;19>e;e++)n.entropy_hdr.mv_probs[0][e]=l[0][e];for(e=0;19>e;e++)n.entropy_hdr.mv_probs[1][e]=l[1][e];F(n);h(n)}m.enabled=g(d);if(1===m.enabled){m.update_map=g(d);m.update_data=g(d);if(1===m.update_data){m.abs= +g(d);for(n=0;nn;n++)1===g(d)?m.tree_probs[n]=d.get_uint(8):m.tree_probs[n]=255}else m.update_map=0,m.update_data=0;!0===a.is_keyframe&&(a.filter_type=0,a.level=0,a.sharpness=0,a.delta_enabled=0,a.ref_delta[0]=0,a.ref_delta[1]=0,a.ref_delta[2]=0,a.ref_delta[3]=0,a.mode_delta[0]=0,a.mode_delta[1]=0,a.mode_delta[2]=0,a.mode_delta[3]=0);a.filter_type=g(d);a.level=d.get_uint(6);a.sharpness= +d.get_uint(3);a.delta_enabled=g(d);n=a.ref_delta;1===a.delta_enabled&&1===g(d)&&(n[0]=d.maybe_get_int(6),n[1]=d.maybe_get_int(6),n[2]=d.maybe_get_int(6),n[3]=d.maybe_get_int(6),a.mode_delta[0]=d.maybe_get_int(6),a.mode_delta[1]=d.maybe_get_int(6),a.mode_delta[2]=d.maybe_get_int(6),a.mode_delta[3]=d.maybe_get_int(6));u(c.token_hdr,k,k.ptr+q,p-q);p=a.mbmi_qindex;a.mbmi_qindex=d.get_uint(7);p=(p!==a.mbmi_qindex)+0;p|=a.y1dc_delta_q=d.maybe_get_int(4);p|=a.y2dc_delta_q=d.maybe_get_int(4);p|=a.y2ac_delta_q= +d.maybe_get_int(4);p|=a.uvdc_delta_q=d.maybe_get_int(4);p|=a.uvac_delta_q=d.maybe_get_int(4);a.delta_update=p;p=a.is_keyframe;a.refresh_gf=!0===p?1:g(d);a.refresh_arf=!0===p?1:g(d);a.copy_gf=!0===p?0:a.refresh_gf?0:d.get_uint(2);a.copy_arf=!0===p?0:a.refresh_arf?0:d.get_uint(2);a.sign_bias[J]=!0===p?0:g(d);a.sign_bias[I]=!0===p?0:g(d);a.refresh_entropy_probs=g(d);a.refresh_last=!0===p?1:g(d);0===a.refresh_entropy_probs&&(X(a.saved_entropy,a.entropy_hdr),c.saved_entropy_valid=1);c.modemv_init();p= +c.token_hdr.partitions;if(1===a.frame_size_updated){q=400*c.mb_cols;for(n=0;nh&&(h=0);b=h;a.common.sharpness&&(b>>=49-a.common.sharpness&&(b=9-a.common.sharpness));1>b&&(b=1);l=15<=h?1:0;40<=h&&l++;20<=h&&!a.common.is_keyframe&&l++;c[0]=h;d[0]=b;k[0]=l}function f(a){return q(m(a,0),255)}function t(a,b,c,d){var h=a[b],l=a[b+c];return k(a[b-2*c]-a[b-c])>d||k(l-h)>d}function d(a, +b,c,d,h){var l=a[b-4*c],n=a[b-3*c],p=a[b-2*c],m=a[b-c],f=a[b],g=a[b+c],q=a[b+2*c],e=a[b+3*c];d=2*d+h;var P=a[b-(c<<1)],K=a[b+c];return 2*k(a[b-c]-a[b])+(k(P-K)>>1)<=d|0&&k(l-n)<=h&&k(n-p)<=h&&k(p-m)<=h&&k(e-q)<=h&&k(q-g)<=h&&k(g-f)<=h}function x(a,b,c,h,k,l,n){var p=n<<3;for(n=0;n>7;r=f(r+u);F=f(F-u);u=18*G+ +63>>7;A=f(A+u);N=f(N-u);u=9*G+63>>7;L=f(L+u);w=f(w-u);g[e-U]=L;g[e-K]=A;g[e-P]=r;g[e]=F;g[e+P]=N;g[e+K]=w}b+=1}}function u(a,b,c,h,k,l,n){var p=n<<3;for(n=0;n>3;n=c(n+(127>3));l=c(l-r);f||(q=r+1>>1,k=c(k+q),e=c(e-q));a[b-h]=k;a[b-d]=n;a[b]= +l;a[b+d]=e}function f(a,c,d,f){var h;for(h=0;16>h;h++)1===t(a,c,d,f)&&b(a,c,d,1),c+=1}function t(a,b,c,d){var h=a[b-(c<<1)],k=a[b+c];return(r(a[b-c]-a[b])<<1)+(r(h-k)>>1)<=d|0}function d(a,c,d,f){var h;for(h=0;16>h;h++)t(a,c,1,f)&&b(a,c,1,1),c+=d}function x(a,d,k,f,m,p,n){var h=n<<3;for(n=0;n>7;t=c(t+V);x=c(x-V);V=18*E+63>> +7;r=c(r+V);G=c(G-V);V=9*E+63>>7;q=c(q+V);y=c(y-V);l[e-3]=q;l[e-2]=r;l[e-1]=t;l[e]=x;l[e+1]=G;l[e+2]=y}d+=k}}function u(a,b,c,d,f){var h=a[b-4*c],k=a[b-3*c],l=a[b-2*c],e=a[b-c],g=a[b],m=a[b+c],q=a[b+2*c],w=a[b+3*c];return t(a,b,c,2*d+f)&&r(h-k)<=f&&r(k-l)<=f&&r(l-e)<=f&&r(w-q)<=f&&r(q-m)<=f&&r(m-g)<=f}function v(a,b,c,d){var h=a[b],k=a[b+c];return r(a[b-2*c]-a[b-c])>d||r(k-h)>d}function y(a,c,d,f,e,g,n){var h=8*n;for(n=0;nk)return P[U+ +w[k]]=m,++k,E=1;P[U+w[15]]=m;E=12;return 1}function z(b,c){p+=x(a,r[b].probs[c])<k?(++k,F+=y[k]|0,E=2):E=12,u=1);if(1===u)continue;if(1===f(A[F+2],11))continue;if(1===f(A[F+3],8))continue;if(1===f(A[F+6],6))continue;if(1===f(A[F+8],4))continue;if(1===f(A[F+ +10],3))continue;p=r[10].min_val;n=r[10].length;do z(10,n),n--;while(0<=n);if(1===D(p))continue}if(3===E&&(p=r[9].min_val,z(9,4),z(9,3),z(9,2),z(9,1),z(9,0),1===D(p)))continue;if(4===E){if(1===f(A[F+9],5))continue;p=r[8].min_val;z(8,3);z(8,2);z(8,1);z(8,0);if(1===D(p))continue}if(5===E&&(p=r[7].min_val,z(7,2),z(7,1),z(7,0),1===D(p)))continue;if(6===E){if(1===f(A[F+7],7))continue;p=r[6].min_val;z(6,1);z(6,0);if(1===D(p))continue}if(7===E&&(p=r[5].min_val,z(5,0),1===D(p)))continue;if(8===E){if(f(A[F+ +4],10))continue;if(f(A[F+5],9))continue;if(D(4))continue}if(9!==E||!D(3))if(10!==E||!D(2)){if(11===E){b(1);F=N+11;if(15>k){P[U+w[k]]=m;++k;E=1;continue}P[U+w[15]]=m;E=12}if(12===E){K=(K|(1>>0;q=(k!=!h)+0;K=(K|q<<31)>>>0;c[t[g]]=e[d[g]]=q;U+=16;g++;if(gd;d++)e[d]=c[d];c=b.mv_probs;for(d=0;19>d;d++)a.mv_probs[0][d]=c[0][d];for(d=0;19>d;d++)a.mv_probs[1][d]=c[1][d];c=b.y_mode_probs_32;a.y_mode_probs_32[0]=c[0];c=b.uv_mode_probs;a.uv_mode_probs[0]=c[0];a.uv_mode_probs[1]=c[1];a.uv_mode_probs[2]=c[2];a.prob_inter=b.prob_inter;a.prob_last=b.prob_inter;a.prob_gf=b.prob_inter};a.exports.memset=function(a, +b,f,e){for(;e--;)a[b+e]=f};a.exports.memset_32=function(a,b,e,t){b>>=2;a=a.data_32;e=e|e<<8|e<<16|e<<24;var c=t>>2;for(t=0;t>2)]=e};a.exports.memcpy=function(a,b,e,t,d){for(;d--;)a[b+d]=e[t+d];return a}},function(a,e){var c=[new Uint8Array([237,246,253,253,254,254,254,254,254,254,254,254,254,254,250,250,252,254,254]),new Uint8Array([231,243,245,253,254,254,254,254,254,254,254,254,254,254,251,251,254,254,254])],b=[new Uint8Array([162,128,225,146,172,147,214,39,156,128,129,132,75,145, +178,206,239,254,254]),new Uint8Array([164,128,204,170,119,235,140,230,228,128,130,130,74,148,180,203,236,254,254])];a.exports={};a.exports.vp8_mv_update_probs=c;a.exports.vp8_default_mv_context=b},function(a,e,c){var b=c(19).data_64;a.exports={vp8_default_coef_probs:function(a){a.entropy_hdr.coeff_probs.data_64.set(b)}}},function(a,e){var c=new Uint8Array([128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,253,136,254, +255,228,219,128,128,128,128,128,189,129,242,255,227,213,255,219,128,128,128,106,126,227,252,214,209,255,255,128,128,128,1,98,248,255,236,226,255,255,128,128,128,181,133,238,254,221,234,255,154,128,128,128,78,134,202,247,198,180,255,219,128,128,128,1,185,249,255,243,255,128,128,128,128,128,184,150,247,255,236,224,128,128,128,128,128,77,110,216,255,236,230,128,128,128,128,128,1,101,251,255,241,255,128,128,128,128,128,170,139,241,252,236,209,255,255,128,128,128,37,116,196,243,228,255,255,255,128,128, +128,1,204,254,255,245,255,128,128,128,128,128,207,160,250,255,238,128,128,128,128,128,128,102,103,231,255,211,171,128,128,128,128,128,1,152,252,255,240,255,128,128,128,128,128,177,135,243,255,234,225,128,128,128,128,128,80,129,211,255,194,224,128,128,128,128,128,1,1,255,128,128,128,128,128,128,128,128,246,1,255,128,128,128,128,128,128,128,128,255,128,128,128,128,128,128,128,128,128,128,198,35,237,223,193,187,162,160,145,155,62,131,45,198,221,172,176,220,157,252,221,1,68,47,146,208,149,167,221,162, +255,223,128,1,149,241,255,221,224,255,255,128,128,128,184,141,234,253,222,220,255,199,128,128,128,81,99,181,242,176,190,249,202,255,255,128,1,129,232,253,214,197,242,196,255,255,128,99,121,210,250,201,198,255,202,128,128,128,23,91,163,242,170,187,247,210,255,255,128,1,200,246,255,234,255,128,128,128,128,128,109,178,241,255,231,245,255,255,128,128,128,44,130,201,253,205,192,255,255,128,128,128,1,132,239,251,219,209,255,165,128,128,128,94,136,225,251,218,190,255,255,128,128,128,22,100,174,245,186,161, +255,199,128,128,128,1,182,249,255,232,235,128,128,128,128,128,124,143,241,255,227,234,128,128,128,128,128,35,77,181,251,193,211,255,205,128,128,128,1,157,247,255,236,231,255,255,128,128,128,121,141,235,255,225,227,255,255,128,128,128,45,99,188,251,195,217,255,224,128,128,128,1,1,251,255,213,255,128,128,128,128,128,203,1,248,255,255,128,128,128,128,128,128,137,1,177,255,224,255,128,128,128,128,128,253,9,248,251,207,208,255,192,128,128,128,175,13,224,243,193,185,249,198,255,255,128,73,17,171,221,161, +179,236,167,255,234,128,1,95,247,253,212,183,255,255,128,128,128,239,90,244,250,211,209,255,255,128,128,128,155,77,195,248,188,195,255,255,128,128,128,1,24,239,251,218,219,255,205,128,128,128,201,51,219,255,196,186,128,128,128,128,128,69,46,190,239,201,218,255,228,128,128,128,1,191,251,255,255,128,128,128,128,128,128,223,165,249,255,213,255,128,128,128,128,128,141,124,248,255,255,128,128,128,128,128,128,1,16,248,255,255,128,128,128,128,128,128,190,36,230,255,236,255,128,128,128,128,128,149,1,255, +128,128,128,128,128,128,128,128,1,226,255,128,128,128,128,128,128,128,128,247,192,255,128,128,128,128,128,128,128,128,240,128,255,128,128,128,128,128,128,128,128,1,134,252,255,255,128,128,128,128,128,128,213,62,250,255,255,128,128,128,128,128,128,55,93,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,202,24,213,235,186,191,220,160,240,175,255,126,38,182,232,169,184,228,174,255,187, +128,61,46,138,219,151,178,240,170,255,216,128,1,112,230,250,199,191,247,159,255,255,128,166,109,228,252,211,215,255,174,128,128,128,39,77,162,232,172,180,245,178,255,255,128,1,52,220,246,198,199,249,220,255,255,128,124,74,191,243,183,193,250,221,255,255,128,24,71,130,219,154,170,243,182,255,255,128,1,182,225,249,219,240,255,224,128,128,128,149,150,226,252,216,205,255,171,128,128,128,28,108,170,242,183,194,254,223,255,255,128,1,81,230,252,204,203,255,192,128,128,128,123,102,209,247,188,196,255,233, +128,128,128,20,95,153,243,164,173,255,203,128,128,128,1,222,248,255,216,213,128,128,128,128,128,168,175,246,252,235,205,255,255,128,128,128,47,116,215,255,211,212,255,255,128,128,128,1,121,236,253,212,214,255,255,128,128,128,141,84,213,252,201,202,255,219,128,128,128,42,80,160,240,162,185,255,205,128,128,128,1,1,255,128,128,128,128,128,128,128,128,244,1,255,128,128,128,128,128,128,128,128,238,1,255,128,128,128,128,128,128,128,128]);c.data_32=new Uint32Array(c.buffer);c.data_64=new Float64Array(c.buffer); +a.exports=c},function(a,e){var c=new Int32Array([4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157]),b=new Int32Array([4,5,6,7,8,9,10,11,12,13,14, +15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284]),f=Math.min,t=Math.max;a.exports={};a.exports.vp8_dc_quant=function(a,b){a+=b;127a&&(a= +0);a=f(t(a,0),127);return c[a]};a.exports.vp8_dc2quant=function(a,b){a+=b;127a&&(a=0);return c[a]<<1};a.exports.vp8_dc_uv_quant=function(a,b){var d;a+=b;127a&&(a=0);d=c[a];132a&&(a=0);return b[a]};a.exports.vp8_ac2quant=function(a,c){var d;a+=c;127a&&(a=0);d=101581*b[a]>>16;8>d&&(d=8);return d};a.exports.vp8_ac_uv_quant=function(a,c){a+=c;127a&&(a=0);return b[a]}},function(a,e,c){function b(a, +b,c,e,f,n,l){var h=a.frame_strg[0].img.img_data,k=a.frame_strg[0].img.img_data_off,m,p,q,r,w,K,t,u,x,z;m=f.mbmi.ref_frame;var v=b.u,y=b.v,H=b.u_off,J=b.v_off;u=n<<4;x=l<<4;K=a.mb_cols<<4;t=a.mb_rows<<4;q=b.y;r=b.y_off;w=a.ref_frame_offsets[m];p=r+w;var I=f.mbmi.y_mode,D=f.bmi.mvs;w=a.ref_frame_offsets[m];m=a.ref_frame_offsets_[m];for(z=0;16>z;z++)d(q,r,h,k,m,p,b.stride,9!==I?f.mbmi.mv:D[z],a.subpixel_filters,c,e,f,u,x,K,t,z),u+=4,r+=4,p+=4,3===(z&3)&&(u-=16,x+=4,r+=(b.stride<<2)-16,p+=(b.stride<< +2)-16);u=n<<4>>1;x=l<<4>>1;K>>=1;t>>=1;n=4*b.uv_stride-8;for(z=0;4>z;z++)d(v,H,h,k,m,H+w,b.uv_stride,g[z],a.subpixel_filters,c,e,f,u,x,K,t,z+16),d(y,J,h,k,m,J+w,b.uv_stride,g[z],a.subpixel_filters,c,e,f,u,x,K,t,z+20),H+=4,J+=4,u+=4,1===(z&1)&&(u-=8,x+=4,H+=n,J+=n)}function f(a,b,c,d,e){var h,f,k;h=f=k=b.y;var l=b.y_off,m=b.u_off,p=b.v_off,q,r,w=e.mbmi,u=w.y_mode;r=a.ref_frame_offsets[e.mbmi.ref_frame];q=a.ref_frame_offsets_[e.mbmi.ref_frame];var x=b.stride,v=a.subpixel_filters,y=e.bmi.mvs;for(a=0;16> +a;a++)t(h,l,q,l+r,x,9!==u?w.mv:y[a],v,c,d,e,a),l+=4,3===(a&3)&&(l+=(b.stride<<2)-16);b=b.uv_stride;for(a=0;4>a;a++)t(f,m,q,m+r,b,g[a],v,c,d,e,a+16),t(k,p,q,p+r,b,g[a],v,c,d,e,a+20),m+=4,p+=4,1===(a&1)&&(m+=(b<<2)-8,p+=(b<<2)-8)}function t(a,b,c,d,e,f,g,l,r,w,t){w=c;var h;f.as_int[0]?(w=f.x&7,h=f.y&7,d+=(f.y>>3)*e+(f.x>>3),x(a,b,e,c,d,e,4,4,w,h,g),w=a,c=b):c=d;y(a,b,w,c,e,l,r+16*t)}function d(a,b,c,d,e,f,g,l,t,u,v,A,F,G,W,E,V){F+=l.x>>3;G+=l.y>>3;if(2>F||F+4-1+3>=W||2>G||G+4-1+3>=E){f+=(l.x>>3)+(l.y>> +3)*g;A=d;F-=2;G-=2;var h=9;f=f-2-(g<<1)-F-G*g;G>=E?f+=(E-1)*g:0F?-F:0;9W&&(n=F+9-W);9>3)+(l.y>>3)*g)}l.as_int[0]?(c=l.x&7,d=l.y&7,f+=(l.y>>3)*g+(l.x>>3),x(a,b,g,e,f,g,4,4,c,d,t),l=a,t=b):(f+=(l.y>>3)*g+(l.x>>3),l=e,t=f);y(a,b,l,t,g,u,v+16*V)}e=c(9);var x=c(22).filter_block2d,u=c(23),v=u.vp8_short_inv_walsh4x4_c, +y=u.vp8_short_idct4x4llm_c;c=c(16);var r=c.memset,w=c.memcpy,g=[new e,new e,new e,new e],l=new e;a.exports={};a.exports.predict_inter_emulated_edge=b;a.exports.predict_inter=f;a.exports.vp8_build_inter_predictors_mb=function(a,c,d,e,p,n,r){var k=(3===a.common.version)+0;if(9!==p.mbmi.y_mode){v(d,e+384,e);l.as_int[0]=p.mbmi.mv.as_int[0];if(1===p.mbmi.need_mc_border){var h=l.x,m=l.y;l.x=h+1+(h>>31<<1);l.y=m+1+(m>>31<<1);l.x/=2;l.y/=2}else l.x=l.x+1>>1,l.y=l.y+1>>1;k&&(l.as_int[0]&=4294508536);g[0].as_int[0]= +g[1].as_int[0]=g[2].as_int[0]=g[3].as_int[0]=l.as_int[0]}else for(h=p.bmi.mvs,m=0;2>m;++m)for(var q=0;2>q;++q){var w=(m<<3)+(q<<1),t=g[(m<<1)+q],u;u=h[w].x+h[w+1].x+h[w+4].x+h[w+5].x;u=0>u?u-4:u+4;t.x=u/8|0;u=h[w].y+h[w+1].y+h[w+4].y+h[w+5].y;u=0>u?u-4:u+4;t.y=u/8|0;1===k&&(t.as_int[0]&=4294508536)}1===p.mbmi.need_mc_border?b(a,c,d,e,p,n,r):f(a,c,d,e,p)}},function(a,e){function c(a,b,c,d,e,f,l,h,k){var g,m,p=k[0]|0,n=k[1]|0,r=k[2]|0,w=k[3]|0,t=k[4]|0,u=k[5]|0;for(k=0;k>=7,0>m?m=0:255>=7,0>m?m=0:255>=7,0>v?v=0:255>=7,0>A?A=0:255>=7,0>n?n=0:255>=7,0>r?r=0:255b;b++)l=q[m],k=q[m+4],g=q[m+8],h=q[m+12],d=l+h|0,e=k+g|0,g=k-g|0,l=l-h|0,f[p]=d+e,f[p+4]=g+l,f[p+8]=d-e,f[p+12]=l-g,m++,p++;q=f;p=m=0;q=q.data_32;for(b=0;4>b;b++)d=q[m>>1],g=d>>16,l=d<<16>>16,d=q[m+2>>1],h=d>>16,k=d<<16>>16,d=l+h,e=g+k,g-=k,l-=h,h=d+e,k=g+l,d-=e,e=l-g,t[p>>1]=h+3>>3&65535|k+3>>3<<16,t[p+2>>1]=d+3>>3&65535|e+3>>3<<16,m+=4,p+=4;for(b=0;16>b;b++)a[c+(b<<4)]=f[b]};a.exports.vp8_short_idct4x4llm_c=function(a,d,e,f,t,g,l){var h,k,q, +m,p,n,r=0;for(h=0;4>h;h++){q=g[l];var u=g[l+4],w=g[l+12];m=g[l+8];k=q+m;q-=m;p=35468*u>>16;n=w+(20091*w>>16);m=p-n;p=u+(20091*u>>16);n=35468*w>>16;p+=n;x[r]=k+p;x[r+12]=k-p;x[r+4]=q+m;x[r+8]=q-m;l++;r++}g=x;l=0;a=a.data_32;for(h=0;4>h;h++)q=g[l],r=g[l+1],m=g[l+2],u=g[l+3],k=q+m,q-=m,p=35468*r>>16,n=u+(20091*u>>16),m=p-n,p=r+(20091*r>>16),n=35468*u>>16,p+=n,n=e[f],u=e[f+1],w=e[f+2],r=e[f+3],n=c(b(n+(k+p+4>>3),0),255),u=c(b(u+(q+m+4>>3),0),255),q=c(b(w+(q-m+4>>3),0),255),k=c(b(r+(k-p+4>>3),0),255), +a[d>>2]=n|u<<8|q<<16|k<<24,l+=4,d+=t,f+=t}},function(a,e,c){function b(a,b,c){x(a,b,c,8)}function b(a,b,c){x(a,b,c,8)}function f(a,b,c,d){var e=b-c|0,f,g,h;for(f=0;f>5;break;case 8:h=h+8>>4;break;case 4:h=h+4>>3}for(g=0;gm;m++)y(a,c,a,c,q,p,n),n+=16,c+=4,m&1&&(c+=g);for(m=20;24>m;m++)y(e,k,e,k,q,p,n),n+=16,k+=4,m&1&&(k+=g)};a.exports.predict_intra_luma=function(a,b,c,e,q,m){if(4===e.mbmi.y_mode){var g=b,k=m,h;u(a,g,c);for(h=0;16>h;h++){var l=a,r=g+((h&3)<<2);switch(e.bmi.modes[h]){case 0:d(l,r,c,4);break;case 1:x(l,r,c,4);break;case 2:var w=void 0,N=void 0,A=void 0,F=l,G=r,W=c,E=G-W,V=F.data_32[E>>2]|0,X=V&255,z=V>>8&255,M=V>>16&255,ja=V>>24&255;F.data_32[G>>2]=F[E-1]+(X<<1)+z+2>>2|X+(z<<1)+M+2>>2<<8|z+(M<< +1)+ja+2>>2<<16|M+(ja<<1)+F[E+4]+2>>2<<24;for(A=1;4>A;A++)for(w=A*W,N=0;4>N;N++)F[G+w+N]=F[G+N];break;case 3:var H=l,J=r,I=c,D=J-1,ia=H.data_32,S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;D+=I;S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;D+=I;S=H[D-I]+2*H[D]+H[D+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;D+=I;S=H[D-I]+2*H[D]+H[D+0]+2>>2;ia[J+I>>2]=S|S<<8|S<<16|S<<24;break;case 4:var sa=void 0,ta=void 0,C=void 0,ha=void 0,ua=void 0,na=l,R=r,O=c,Q=R-O,Hb=na.data_32,B=Hb[Q>> +2],Yb=B&255,fa=B>>8&255,ca=B>>16&255,da=B>>24&255,B=Hb[(Q>>2)+1],ea=B&255,Z=B>>8&255,T=B>>16&255,Y=B>>24&255,ua=fa+(ca<<1)+da+2>>2,ha=ca+(da<<1)+ea+2>>2,C=da+(ea<<1)+na[Q+5]+2>>2;na.data_32[R>>2]=Yb+(fa<<1)+ca+2>>2|ua<<8|ha<<16|C<<24;R+=O;ta=ea+2*Z+T+2>>2;na.data_32[R>>2]=ua|ha<<8|C<<16|ta<<24;R+=O;sa=Z+(T<<1)+Y+2>>2;na.data_32[R>>2]=ha|C<<8|ta<<16|sa<<24;na.data_32[R+O>>2]=C|ta<<8|sa<<16|T+2*Y+Y+2>>2<<24;break;case 5:var Ba=void 0,Fa=void 0,aa=void 0,la=void 0,Ca=void 0,Ra=void 0,Ga=void 0,ga=l, +ma=r,va=c,Ha=ma-1,Sa=ma-va,Ta=ga.data_32[Sa>>2],gb=Ta&255,hb=Ta>>8&255,Ib=Ta>>16&255,Jb=ga[Ha],ib=ga[Ha+va],Kb=ga[Ha+2*va],Ga=ga[Ha+0]+2*ga[Sa-1]+gb+2>>2,Ra=ga[Sa-1]+2*gb+hb+2>>2,Ca=gb+2*hb+Ib+2>>2,la=hb+2*Ib+(Ta>>24&255)+2>>2;ga.data_32[ma>>2]=Ga|Ra<<8|Ca<<16|la<<24;ma+=va;aa=ib+2*Jb+ga[Sa-1]+2>>2;ga.data_32[ma>>2]=aa|Ga<<8|Ra<<16|Ca<<24;ma+=va;Fa=Kb+2*ib+Jb+2>>2;ga.data_32[ma>>2]=Fa|aa<<8|Ga<<16|Ra<<24;Ba=ga[Ha+3*va]+2*Kb+ib+2>>2;ga.data_32[ma+va>>2]=Ba|Fa<<8|aa<<16|Ga<<24;break;case 6:var Lb=void 0, +Mb=void 0,Nb=void 0,jb=void 0,kb=void 0,lb=void 0,Ob=void 0,mb=void 0,nb=void 0,ob=void 0,ba=l,oa=r,wa=c,Ia=oa-1,Da=oa-wa,Ua=ba.data_32[Da>>2],Ja=Ua&255,Ka=Ua>>8&255,Va=Ua>>16&255,Pb=ba[Ia+0],ob=ba[Da-1]+Ja+1>>1,nb=Ja+Ka+1>>1,mb=Ka+Va+1>>1,Ob=Va+(Ua>>24&255)+1>>1;ba.data_32[oa>>2]=ob|nb<<8|mb<<16|Ob<<24;oa+=wa;lb=ba[Ia+0]+2*ba[Da-1]+Ja+2>>2;kb=ba[Da-1]+2*Ja+Ka+2>>2;jb=Ja+2*Ka+Va+2>>2;Nb=Ka+2*Va+ba[Da+3]+2>>2;ba.data_32[oa>>2]=lb|kb<<8|jb<<16|Nb<<24;oa+=wa;Mb=ba[Ia+wa]+2*Pb+ba[Da-1]+2>>2;ba.data_32[oa>> +2]=Mb|ob<<8|nb<<16|mb<<24;Lb=ba[Ia+2*wa]+2*ba[Ia+wa]+Pb+2>>2;ba.data_32[oa+wa>>2]=Lb|lb<<8|kb<<16|jb<<24;break;case 7:var Qb=void 0,pb=void 0,qb=void 0,rb=void 0,sb=void 0,tb=void 0,ub=void 0,pa=l,xa=r,Wa=c,Xa=xa-Wa,ka=pa.data_32[Xa>>2],Rb=ka&255,Ya=ka>>8&255,La=ka>>16&255,Za=ka>>24&255,ka=pa.data_32[(Xa>>2)+1],$a=ka&255,Sb=ka>>8&255,Tb=ka>>16&255,ub=Ya+La+1>>1,tb=La+Za+1>>1,sb=pa[Xa+3]+$a+1>>1;pa.data_32[xa>>2]=Rb+Ya+1>>1|ub<<8|tb<<16|sb<<24;xa+=Wa;rb=Ya+2*La+Za+2>>2;qb=La+2*Za+$a+2>>2;pb=Za+2*$a+ +pa[Xa+5]+2>>2;pa.data_32[xa>>2]=Rb+2*Ya+La+2>>2|rb<<8|qb<<16|pb<<24;xa+=Wa;pa.data_32[xa>>2]=ub|tb<<8|sb<<16|$a+2*Sb+Tb+2>>2<<24;Qb=Sb+2*Tb+(ka>>24&255)+2>>2;pa.data_32[xa+Wa>>2]=rb|qb<<8|pb<<16|Qb<<24;break;case 8:var vb=void 0,wb=void 0,xb=void 0,yb=void 0,Ub=void 0,zb=void 0,Ab=void 0,qa=r,ya=c,ab=qa-1,Ma=qa-ya,Bb=l[Ma-1]|0,Cb=l[Ma]|0,Vb=l[Ma+1]|0,Zb=l[Ma+2]|0,Na=l[ab]|0,Oa=l[ab+ya]|0,bb=l[ab+(ya<<1)]|0,Wb=l[ab+3*ya]|0,cb=l.data_32,Ab=Na+Bb+1>>1,zb=Na+2*Bb+Cb+2>>2,Ub=l[Ma-1]+2*Cb+Vb+2>>2;cb[qa>> +2]=Ab|zb<<8|Ub<<16|Cb+(Vb<<1)+Zb+2>>2<<24;qa+=ya;yb=Oa+Na+1>>1;xb=Oa+2*Na+Bb+2>>2;cb[qa>>2]=yb|xb<<8|Ab<<16|zb<<24;qa+=ya;wb=bb+Oa+1>>1;vb=bb+2*Oa+Na+2>>2;cb[qa>>2]=wb|vb<<8|yb<<16|xb<<24;cb[qa+ya>>2]=Wb+bb+1>>1|Wb+2*bb+Oa+2>>2<<8|wb<<16|vb<<24;break;case 9:var za=void 0,Db=void 0,Eb=void 0,Fb=void 0,Gb=void 0,ra=l,Aa=r,Ea=c,db=Aa-1,Xb=ra[db],eb=ra[db+Ea],Pa=ra[db+2*Ea],Qa=ra[db+3*Ea],Gb=eb+Pa+1>>1,Fb=eb+2*Pa+Qa+2>>2;ra.data_32[Aa>>2]=Xb+eb+1>>1|Xb+2*eb+Pa+2>>2<<8|Gb<<16|Fb<<24;Aa+=Ea;Eb=Pa+Qa+1>> +1;Db=Pa+2*Qa+Qa+2>>2;ra.data_32[Aa>>2]=Gb|Fb<<8|Eb<<16|Db<<24;Aa+=Ea;za=Qa;ra.data_32[Aa>>2]=Eb|Db<<8|za<<16|za<<24;ra.data_32[Aa+Ea>>2]=za|za<<8|za<<16|za<<24;break;default:throw"ERROR :(";}y(l,r,l,r,c,q,k);k+=16;3===(h&3)&&(g+=4*c)}}else{var fb;switch(e.mbmi.y_mode){case 0:d(a,b,c,16);break;case 1:f(a,b,c,16);break;case 2:t(a,b,c,16);break;case 3:x(a,b,c,16)}v(q,m+384,m);for(fb=0;16>fb;fb++)y(a,b,a,b,c,q,m),m+=16,b+=4,3===(fb&3)&&(b+=(c<<2)-16)}}},function(a,e){a.exports={};a.exports.intra_prediction_down_copy= +function(a,b,e){b=b+16-e;a=a.data_32;var c=a[b>>2];b+=e<<2;a[b>>2]=c;b+=e<<2;a[b>>2]=c;a[b+(e<<2)>>2]=c}},function(a,e,c){function b(a,b,c){c.enabled&&c.update_map&&(1===L(a,c.tree_probs[0])?b.mbmi.segment_id=2+L(a,c.tree_probs[2]):b.mbmi.segment_id=L(a,c.tree_probs[1]))}function f(a,b,c,d){a=a.common.mode_info_stride;var e=b[c];e.init_split_mode();var f=e.bmi.modes;e.mbmi.ref_frame=0;var g=e.mbmi,n=A(d,h,m,0);g.y_mode=n;if(4===e.mbmi.y_mode){g=0;e.mbmi.is_4x4=1;do{var p=y(b,c,g,a),t=v(b,c,g),n=g, +p=A(d,l,r[p][t],0);f[n]=p}while(16>++g)}b=e.mbmi;d=A(d,k,q,0);b.uv_mode=d}function t(a,b){a.xb.mb_to_right_edge&&(a.x=b.mb_to_right_edge);a.yb.mb_to_bottom_edge&&(a.y=b.mb_to_bottom_edge)}function d(a,b,c,d,e,f){b+=a.x>>3;c+=a.y>>3;return 2>b>>1||3>e-(b+d)>>1||2>c>>1||3>f-(c+d)>>1}function x(a,b,c,d){b[a.mbmi.ref_frame]^b[c]&&(d.x*=-1,d.y*=-1)}function u(a,b){var c=0;if(L(a,b[0])){var d;for(d=0;3>d;d++)c+=L(a, +b[9+d])<p;p++)1===L(m,w[p])&&(q[p]=m.get_uint(8));a.common.entropy_hdr.coeff_skip_enabled=N(m);a.common.entropy_hdr.coeff_skip_prob=1===a.common.entropy_hdr.coeff_skip_enabled?m.get_uint(8):0;if(!1===a.common.is_keyframe){a.common.entropy_hdr.prob_inter= +m.get_uint(8);a.common.entropy_hdr.prob_last=m.get_uint(8);a.common.entropy_hdr.prob_gf=m.get_uint(8);1===N(m)&&(a.common.entropy_hdr.y_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[2]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[3]=m.get_uint(8));1===N(m)&&(a.common.entropy_hdr.uv_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[2]=m.get_uint(8));p=a.common.entropy_hdr.mv_probs; +for(var r=0;2>r;r++)for(q=0;19>q;q++)if(L(m,F[r][q])){var v=m.get_uint(7);p[r][q]=0M[1]&&(O=M[1],M[1]=M[2],M[2]=O,O=X[1].as_int[0],X[1].as_int[0]=X[2].as_int[0],X[2].as_int[0]=O);M[1]>=M[0]&&(X[0].as_int[0]=X[1].as_int[0]);v.mbmi.need_mc_border=0;R=-B.mb_to_left_edge-128>>3;Q=-B.mb_to_top_edge-128>>3;O=J.mb_cols<<4;J=J.mb_rows<<4;if(L(y,U[M[0]][0]))if(L(y,U[M[1]][1]))if(L(y,U[M[2]][2]))if(L(y,U[M[3]][3])){v.mbmi.y_mode=9;z[0].as_int[0]=0;z[1].as_int[0]=0;z[2].as_int[0]=0;z[3].as_int[0]=0;I=X[0]; +t(I,B);B=v;var da=y,Ba=0,Z=3,y=16;L(da,110)&&(Z=2,y=4,L(da,111)&&(Z=L(da,150),y=2));var Y=n[Z],Fa=B.bmi.mvs;do{G.as_int[0]=0;W.as_int[0]=0;E.as_int[0]=0;for(var aa,T=0;Ba!==Y[T];T++);W.as_int[0]=T&3?B.bmi.mvs[T-1].as_int[0]:9===ca.mbmi.y_mode?ca.bmi.mvs[T+3].as_int[0]:ca.mbmi.mv.as_int[0];E.as_int[0]=T>>2?B.bmi.mvs[T-4].as_int[0]:9===ea.mbmi.y_mode?ea.bmi.mvs[T+12].as_int[0]:ea.mbmi.mv.as_int[0];aa=W.as_int[0];var la=E.as_int[0];aa=V[(0===la)<<2|(0===aa)<<1|aa===la];if(L(da,aa[0]))if(L(da,aa[1])){if(L(da, +aa[2])){aa=da;var la=G,Ca=fa.mv_probs;la.y=u(aa,Ca[0]);la.x=u(aa,Ca[1]);G.x+=I.x;G.y+=I.y}}else G.as_int[0]=E.as_int[0];else G.as_int[0]=W.as_int[0];for(;16>T;T++)Ba===Y[T]&&(Fa[T].as_int[0]=G.as_int[0])}while(++BaB;B++)if(z[(B>>1&1)+(B>>2&2)].x+=y[B].x,z[(B>>1&1)+(B>>2&2)].y+=y[B].y,d(y[B],R+4*(B&3),Q+(B&-4),4,O,J)){v.mbmi.need_mc_border=1;break}for(B=0;4>B;B++)if(z[B].x+=4+(z[B].x>>28)|0,z[B].y+=4+(z[B].y>> +28)|0,z[B].x>>=2,z[B].y>>=2,d(z[B],R+8*(B&1),Q+(B>>1<<3),16,O,J)){v.mbmi.need_mc_border=1;break}}else I=X[0],t(I,B),B=v.mbmi.mv,fa=fa.mv_probs,B.y=u(y,fa[0]),B.x=u(y,fa[1]),v.mbmi.mv.x+=I.x,v.mbmi.mv.y+=I.y,v.mbmi.y_mode=8;else v.mbmi.mv.as_int[0]=X[2].as_int[0],t(v.mbmi.mv,B),v.mbmi.y_mode=6;else v.mbmi.y_mode=5,v.mbmi.mv.as_int[0]=X[1].as_int[0],t(v.mbmi.mv,B);else v.mbmi.y_mode=7,v.mbmi.mv.as_int[0]=0;d(v.mbmi.mv,R,Q,16,O,J)&&(v.mbmi.need_mc_border=1)}else{J=A(y,P,fa.y_mode_probs,0);if(4===J)for(ca= +v.bmi.modes,ea=v.bmi.mvs,v=0;16>v;v++)B=A(y,l,K,0),ca[v]=ea[v].x=B;R.y_mode=J;R.uv_mode=A(y,k,fa.uv_mode_probs,0);R.mv.x=O[Q].mbmi.mv.y=0;R.ref_frame=0}}!0!==a.common.is_keyframe&&(H.mb_to_left_edge-=128,H.mb_to_right_edge-=128);r++;p++}}},function(a,e,c){c(9);var b=0,f=1,t=2,d=3,x=4,b=0,f=1,t=2,d=3,x=4;a.exports={};a.exports.left_block_mode=function(a,c,e){if(!(e&3))switch(--c,a[c].mbmi.y_mode){case b:return 0;case f:return 2;case t:return 3;case d:return 1;case x:return a[c].bmi.modes[e+3];default:return 0}return a[c].bmi.modes[e- +1]};a.exports.above_block_mode=function(a,c,e,r){if(!(e>>2))switch(c-=r,a[c].mbmi.y_mode){case x:return a[c].bmi.modes[e+12];case b:return 0;case f:return 2;case t:return 3;case d:return 1;default:return 0}return a[c].bmi.modes[e-4]}},function(a,e){var c=new Uint8Array([112,86,140,37]),b=[[new Uint8Array([231,120,48,89,115,113,120,152,112]),new Uint8Array([152,179,64,126,170,118,46,70,95]),new Uint8Array([175,69,143,80,85,82,72,155,103]),new Uint8Array([56,58,10,171,218,189,17,13,152]),new Uint8Array([144, 71,10,38,171,213,144,34,26]),new Uint8Array([114,26,17,163,44,195,21,10,173]),new Uint8Array([121,24,80,195,26,62,44,64,85]),new Uint8Array([170,46,55,19,136,160,33,206,71]),new Uint8Array([63,20,8,114,114,208,12,9,226]),new Uint8Array([81,40,11,96,182,84,29,16,36])],[new Uint8Array([134,183,89,137,98,101,106,165,148]),new Uint8Array([72,187,100,130,157,111,32,75,80]),new Uint8Array([66,102,167,99,74,62,40,234,128]),new Uint8Array([41,53,9,178,241,141,26,8,107]),new Uint8Array([104,79,12,27,217,255, 87,17,7]),new Uint8Array([74,43,26,146,73,166,49,23,157]),new Uint8Array([65,38,105,160,51,52,31,115,128]),new Uint8Array([87,68,71,44,114,51,15,186,23]),new Uint8Array([47,41,14,110,182,183,21,17,194]),new Uint8Array([66,45,25,102,197,189,23,18,22])],[new Uint8Array([88,88,147,150,42,46,45,196,205]),new Uint8Array([43,97,183,117,85,38,35,179,61]),new Uint8Array([39,53,200,87,26,21,43,232,171]),new Uint8Array([56,34,51,104,114,102,29,93,77]),new Uint8Array([107,54,32,26,51,1,81,43,31]),new Uint8Array([39, 28,85,171,58,165,90,98,64]),new Uint8Array([34,22,116,206,23,34,43,166,73]),new Uint8Array([68,25,106,22,64,171,36,225,114]),new Uint8Array([34,19,21,102,132,188,16,76,124]),new Uint8Array([62,18,78,95,85,57,50,48,51])],[new Uint8Array([193,101,35,159,215,111,89,46,111]),new Uint8Array([60,148,31,172,219,228,21,18,111]),new Uint8Array([112,113,77,85,179,255,38,120,114]),new Uint8Array([40,42,1,196,245,209,10,25,109]),new Uint8Array([100,80,8,43,154,1,51,26,71]),new Uint8Array([88,43,29,140,166,213, @@ -111,7 +111,7 @@ v.bmi.modes,ea=v.bmi.mvs,v=0;16>v;v++)B=A(y,g,K,0),ca[v]=ea[v].x=B;R.y_mode=J;R. 67,102,85,55,186,85]),new Uint8Array([56,21,23,111,59,205,45,37,192]),new Uint8Array([55,38,70,124,73,102,1,34,98])],[new Uint8Array([102,61,71,37,34,53,31,243,192]),new Uint8Array([69,60,71,38,73,119,28,222,37]),new Uint8Array([68,45,128,34,1,47,11,245,171]),new Uint8Array([62,17,19,70,146,85,55,62,70]),new Uint8Array([75,15,9,9,64,255,184,119,16]),new Uint8Array([37,43,37,154,100,163,85,160,1]),new Uint8Array([63,9,92,136,28,64,32,201,85]),new Uint8Array([86,6,28,5,64,255,25,248,1]),new Uint8Array([56, 8,17,132,137,255,55,116,128]),new Uint8Array([58,15,20,82,135,57,26,121,40])],[new Uint8Array([164,50,31,137,154,133,25,35,218]),new Uint8Array([51,103,44,131,131,123,31,6,158]),new Uint8Array([86,40,64,135,148,224,45,183,128]),new Uint8Array([22,26,17,131,240,154,14,1,209]),new Uint8Array([83,12,13,54,192,255,68,47,28]),new Uint8Array([45,16,21,91,64,222,7,1,197]),new Uint8Array([56,21,39,155,60,138,23,102,213]),new Uint8Array([85,26,85,85,128,128,32,146,171]),new Uint8Array([18,11,7,63,144,171, 4,4,246]),new Uint8Array([35,27,10,146,174,171,12,26,128])],[new Uint8Array([190,80,35,99,180,80,126,54,45]),new Uint8Array([85,126,47,87,176,51,41,20,32]),new Uint8Array([101,75,128,139,118,146,116,128,85]),new Uint8Array([56,41,15,176,236,85,37,9,62]),new Uint8Array([146,36,19,30,171,255,97,27,20]),new Uint8Array([71,30,17,119,118,255,17,18,138]),new Uint8Array([101,38,60,138,55,70,43,26,142]),new Uint8Array([138,45,61,62,219,1,81,188,64]),new Uint8Array([32,41,20,117,151,142,20,21,163]),new Uint8Array([112, -19,12,61,195,128,48,4,24])]];a.exports={};a.exports.vp8_kf_bmode_prob=c;a.exports.vp8_ymode_prob=b},function(a,e){var b=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,176,246,255,255,255,255,255,255,255,255,255,223,241,252,255,255,255,255,255,255,255,255,249,253,253,255,255,255,255,255,255,255,255,255,244,252,255,255,255,255,255,255,255,255,234,254,254,255,255,255,255,255,255,255,255,253,255,255,255, +19,12,61,195,128,48,4,24])]];a.exports={};a.exports.vp8_kf_bmode_prob=b;a.exports.vp8_ymode_prob=c},function(a,e){var c=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,176,246,255,255,255,255,255,255,255,255,255,223,241,252,255,255,255,255,255,255,255,255,249,253,253,255,255,255,255,255,255,255,255,255,244,252,255,255,255,255,255,255,255,255,234,254,254,255,255,255,255,255,255,255,255,253,255,255,255, 255,255,255,255,255,255,255,255,246,254,255,255,255,255,255,255,255,255,239,253,254,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,248,254,255,255,255,255,255,255,255,255,251,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,251,254,254,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,254,253,255,254,255,255,255,255,255,255,250,255,254,255,254,255,255,255,255, 255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,217,255,255,255,255,255,255,255,255,255,255,225,252,241,253,255,255,254,255,255,255,255,234,250,241,250,253,255,253,254,255,255,255,255,254,255,255,255,255,255,255,255,255,255,223,254,254,255,255,255,255,255,255,255,255,238,253,254,254,255,255,255,255,255,255,255,255,248,254,255,255,255,255,255,255,255,255,249,254,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,255,247,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,253,255,255,255,255,255, @@ -119,8 +119,8 @@ v.bmi.modes,ea=v.bmi.mvs,v=0;16>v;v++)B=A(y,g,K,0),ca[v]=ea[v].x=B;R.y_mode=J;R. 254,255,255,255,255,255,255,255,255,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,248,255,255,255,255,255,255,255,255,255,255,250,254,252,254,255,255,255,255,255,255,255,248,254,249,253,255,255,255,255,255,255,255,255,253,253,255,255,255,255,255,255,255,255,246,253,253,255,255,255,255,255,255,255,255,252, 254,251,254,254,255,255,255,255,255,255,255,254,252,255,255,255,255,255,255,255,255,248,254,253,255,255,255,255,255,255,255,255,253,255,254,254,255,255,255,255,255,255,255,255,251,254,255,255,255,255,255,255,255,255,245,251,254,255,255,255,255,255,255,255,255,253,253,254,255,255,255,255,255,255,255,255,255,251,253,255,255,255,255,255,255,255,255,252,253,254,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,252,255,255,255,255,255,255,255,255,255,249,255,254,255,255,255, -255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,250,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);a.exports=b},function(a,e){var b=new Int32Array([-0,2,-1,4,-2,6,8,12,-3,10,-5,-6,-4,14,-7,16,-8,-9]),c=new Int32Array([-4,2,4,6,-0,-1,-2,-3]),f=new Int32Array([-0,2,4,6,-1, --2,-3,-4]),t=new Int32Array([-0,2,-1,4,-2,-3]),d=new Int32Array([-7,2,-5,4,-6,6,-8,-9]),x=new Int32Array([-10,2,-11,4,-12,-13]),u=new Int32Array([2,8,4,6,-0,-1,-2,-3,10,12,-4,-5,-6,-7]),v=new Int32Array([-3,2,-2,4,-0,-1]),y=[new Int32Array([0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1]),new Int32Array([0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1]),new Int32Array([0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3]),new Int32Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])],q=[new Int32Array([147,136,18]),new Int32Array([106,145,1]),new Int32Array([179, -121,1]),new Int32Array([223,1,34]),new Int32Array([208,1,1])],w=new Uint8Array([110,111,150]),h=new Uint8Array([112,86,140,37]),g=new Uint32Array(h.buffer),k=new Uint8Array([162,101,204]),l=new Uint8Array([142,114,183]),r=new Uint8Array([145,156,163,128]),m=new Uint8Array([120,90,79,133,87,85,80,111,151]);a.exports={};a.exports.vp8_bmode_tree=b;a.exports.vp8_kf_ymode_tree=c;a.exports.vp8_uv_mode_tree=t;a.exports.vp8_kf_uv_mode_prob=l;a.exports.vp8_kf_ymode_prob=r;a.exports.vp8_uv_mode_prob=k;a.exports.vp8_bmode_prob= -m;a.exports.vp8_ymode_prob=h;a.exports.vp8_ymode_tree=f;a.exports.vp8_mbsplit_probs=w;a.exports.vp8_mv_ref_tree=d;a.exports.vp8_sub_mv_ref_tree=x;a.exports.vp8_small_mvtree=u;a.exports.vp8_mbsplit_tree=v;a.exports.vp8_mbsplits=y;a.exports.vp8_sub_mv_ref_prob2=q;a.exports.vp8_init_mbmode_probs=function(a){a.entropy_hdr.y_mode_probs_32[0]=g[0];a.entropy_hdr.uv_mode_probs[0]=k[0];a.entropy_hdr.uv_mode_probs[1]=k[1];a.entropy_hdr.uv_mode_probs[2]=k[2]}},function(a,e){var b=[new Uint8Array([7,1,1,143]), -new Uint8Array([14,18,14,107]),new Uint8Array([135,64,57,68]),new Uint8Array([60,56,128,65]),new Uint8Array([159,134,128,34]),new Uint8Array([234,188,128,28])];a.exports=b},function(a,e,b){var c=b(7).vpx_read;a.exports=function(a,b,d,e){for(var f=0;0<(f=b[f+c(a,d[e+(f>>1)])]););return-f|0}},function(a,e){a.exports={};a.exports.vpx_codec_ctx_t=function(){this.name;this.iface;this.err;this.err_detail;this.config={vpx_codec_dec_cfg:null};this.priv}}]); +255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,250,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);a.exports=c},function(a,e){var c=new Int32Array([-0,2,-1,4,-2,6,8,12,-3,10,-5,-6,-4,14,-7,16,-8,-9]),b=new Int32Array([-4,2,4,6,-0,-1,-2,-3]),f=new Int32Array([-0,2,4,6,-1, +-2,-3,-4]),t=new Int32Array([-0,2,-1,4,-2,-3]),d=new Int32Array([-7,2,-5,4,-6,6,-8,-9]),x=new Int32Array([-10,2,-11,4,-12,-13]),u=new Int32Array([2,8,4,6,-0,-1,-2,-3,10,12,-4,-5,-6,-7]),v=new Int32Array([-3,2,-2,4,-0,-1]),y=[new Int32Array([0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1]),new Int32Array([0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1]),new Int32Array([0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3]),new Int32Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])],r=[new Int32Array([147,136,18]),new Int32Array([106,145,1]),new Int32Array([179, +121,1]),new Int32Array([223,1,34]),new Int32Array([208,1,1])],w=new Uint8Array([110,111,150]),g=new Uint8Array([112,86,140,37]),l=new Uint32Array(g.buffer),h=new Uint8Array([162,101,204]),k=new Uint8Array([142,114,183]),q=new Uint8Array([145,156,163,128]),m=new Uint8Array([120,90,79,133,87,85,80,111,151]);a.exports={};a.exports.vp8_bmode_tree=c;a.exports.vp8_kf_ymode_tree=b;a.exports.vp8_uv_mode_tree=t;a.exports.vp8_kf_uv_mode_prob=k;a.exports.vp8_kf_ymode_prob=q;a.exports.vp8_uv_mode_prob=h;a.exports.vp8_bmode_prob= +m;a.exports.vp8_ymode_prob=g;a.exports.vp8_ymode_tree=f;a.exports.vp8_mbsplit_probs=w;a.exports.vp8_mv_ref_tree=d;a.exports.vp8_sub_mv_ref_tree=x;a.exports.vp8_small_mvtree=u;a.exports.vp8_mbsplit_tree=v;a.exports.vp8_mbsplits=y;a.exports.vp8_sub_mv_ref_prob2=r;a.exports.vp8_init_mbmode_probs=function(a){a.entropy_hdr.y_mode_probs_32[0]=l[0];a.entropy_hdr.uv_mode_probs[0]=h[0];a.entropy_hdr.uv_mode_probs[1]=h[1];a.entropy_hdr.uv_mode_probs[2]=h[2]}},function(a,e){var c=[new Uint8Array([7,1,1,143]), +new Uint8Array([14,18,14,107]),new Uint8Array([135,64,57,68]),new Uint8Array([60,56,128,65]),new Uint8Array([159,134,128,34]),new Uint8Array([234,188,128,28])];a.exports=c},function(a,e,c){var b=c(7).vpx_read;a.exports=function(a,c,d,e){for(var f=0;0<(f=c[f+b(a,d[e+(f>>1)])]););return-f|0}},function(a,e){a.exports={};a.exports.vpx_codec_ctx_t=function(){this.name;this.iface;this.err;this.err_detail;this.config={vpx_codec_dec_cfg:null};this.priv}}]); diff --git a/builds/ogv-decoder-video-vp8.js b/builds/ogv-decoder-video-vp8.js index 6a6f8c6..73762f6 100644 --- a/builds/ogv-decoder-video-vp8.js +++ b/builds/ogv-decoder-video-vp8.js @@ -1,116 +1,116 @@ -(function(b){function c(e){if(a[e])return a[e].exports;var k=a[e]={exports:{},id:e,loaded:!1};b[e].call(k.exports,k,k.exports,c);k.loaded=!0;return k.exports}var a={};c.m=b;c.c=a;c.p="";return c(0)})([function(b,c,a){b.exports=a(1)},function(b,c,a){var e=a(2),k=a(33).vpx_codec_ctx_t,t;t="undefined"===typeof performance||"undefined"===typeof performance.now?Date.now:performance.now.bind(performance);c=function(d){this.cpuTime=0;this.loadedMetadata=!0;this.frameBuffer=null;this.videoFormat=d.videoFormat|| -null;this.iface=e.ifaces[0].iface;this.decoder=new k;e.vpx_codec_dec_init(this.decoder,this.iface,null,null)};c.prototype.init=function(d){console.warn("STARTING CODEC JSVPX");d()};c.prototype.processHeader=function(d,e){this.loadedMetadata=!0;e(0)};c.prototype.processFrame=function(d,k){var a=t(),b=new Uint8Array(d);e.vpx_codec_decode(this.decoder,b,b.length,void 0,void 0);if(b=e.vpx_codec_get_frame(this.decoder,null)){var c=b.planes_off,u=b.img_data,v=this.videoFormat;this.frameBuffer={format:{width:b.d_w+ -2,height:b.d_h,chromaWidth:b.d_w>>1,chromaHeight:b.d_h>>1,cropLeft:v.cropLeft,cropTop:v.cropTop,cropWidth:v.cropWidth,cropHeight:v.cropHeight,displayWidth:v.displayWidth,displayHeight:v.displayHeight},y:{bytes:u.subarray(c[0],c[1]),stride:b.stride[0]},u:{bytes:u.subarray(c[1],c[2]),stride:b.stride[1]},v:{bytes:u.subarray(c[2]),stride:b.stride[2]}}}a=t()-a;this.cpuTime+=a;k(1)};c.prototype.close=function(){};"undefined"!==typeof window?window.OGVDecoderVideoVP8=c:"undefined"!==typeof self&&(self.OGVDecoderVideoVP8= -c);b.exports=c},function(b,c,a){function e(e,a,d,b,c){e.iface=a;e.name=a.name;e.priv=null;e.init_flags=b;e.config.dec=d;e.iface.init(e,null)}c=[{name:"jsvp8",iface:a(3)}];b.exports={ifaces:c,vpx_codec_dec_init:function(a,b,d,c){return e(a,b,d,c,4)},vpx_codec_dec_init_ver:e,vpx_codec_peek_stream_info:function(){},vpx_codec_get_stream_info:function(){},vpx_codec_decode:function(e,a,d,b,c){e.iface.dec.decode(e.priv,a,d,b,c)},vpx_codec_get_frame:function(e,a){return e.iface.dec.get_frame(e,a)},vpx_codec_put_frame_cb_fn_t:function(){}, -vpx_codec_register_put_frame_cb:function(){},vpx_codec_register_put_slice_cb:function(){}}},function(b,c,a){var e=a(4),k=a(11).vp8dx_receive_compressed_data,t=function(){this.base;this.cfg;this.si;this.decoder_init;this.postproc_cfg_set;this.postproc_cfg;this.decrypt_cb;this.decrypt_state;this.img;this.img_setup;this.yv12_frame_buffers;this.user_priv;this.fragments;this.temp_pbi=null};b.exports={name:"jscodec VP8 Decoder",abi_version:0,caps:null,destroy:null,dec:{peek_si:function(){},get_si:function(){}, -decode:function(d,a,b,c,t){d.temp_pbi||(c=new e,d.temp_pbi=c);k(d.temp_pbi,b,a,t);return 0},get_frame:function(d,e){return d.priv.temp_pbi.common.show_frame?d.priv.temp_pbi.ref_frames[0].img:null}},init:function(d,e){if(!d.priv){var a=new t;d.priv=a;d.priv.init_flags=d.init_flags;d.priv.decrypt_cb=null;d.priv.decrypt_state=null;d.config.dec&&(a.cfg=d.config.dec,d.config.dec=a.cfg)}}}},function(b,c,a){var e=a(5),k=a(6).BOOL_DECODER;c=a(8);var t=c.MACROBLOCKD,d=c.FRAGMENT_DATA,u=c.MODE_INFO,z=a(10).vpx_image_t; -Uint8Array.prototype.ptr=0;var w=function(){this.img=new z;this.ref_cnt=0},x=function(){this.quant_idx=0;this.factor=[new Int16Array([0,0]),new Int16Array([0,0]),new Int16Array([0,0])]},p=function(){this.bool=new k;this.left_token_entropy_ctx=new Int32Array(9);this.coeffs=0};a=function(){this.saved_entropy_valid=this.cpuTime=this.frame_cnt=0;this.mb_info_rows_storage=null;this.mb_info_rows_storage_off=0;this.mb_info_rows_storage_object=u;this.mb_info_rows=null;this.mb_info_rows_off=0;this.above_token_entropy_ctx= -null;this.common=new e;this.boolDecoder=new k;this.segment_hdr=new t(this);this.token_hdr=new d(this);this.tokens=Array(8);for(var a=0;8>a;a++)this.tokens[a]=new p;this.frame_strg=[{img:new z,ref_cnt:0},{img:new z,ref_cnt:0},{img:new z,ref_cnt:0},{img:new z,ref_cnt:0}];this.ref_frames=Array(4);for(a=0;4>a;a++)this.ref_frames[a]=new w;this.dequant_factors=Array(4);for(a=0;4>a;a++)this.dequant_factors[a]=new x;this.ref_frame_offsets=new Uint32Array([0,0,0,0]);this.ref_frame_offsets_=[0,0,0,0];this.subpixel_filters= +(function(b){function c(e){if(a[e])return a[e].exports;var h=a[e]={exports:{},id:e,loaded:!1};b[e].call(h.exports,h,h.exports,c);h.loaded=!0;return h.exports}var a={};c.m=b;c.c=a;c.p="";return c(0)})([function(b,c,a){b.exports=a(1)},function(b,c,a){var e=a(2),h=a(33).vpx_codec_ctx_t,t;t="undefined"===typeof performance||"undefined"===typeof performance.now?Date.now:performance.now.bind(performance);c=function(d){this.cpuTime=0;this.loadedMetadata=!0;this.frameBuffer=null;this.videoFormat=d.videoFormat|| +null;this.iface=e.ifaces[0].iface;this.decoder=new h;e.vpx_codec_dec_init(this.decoder,this.iface,null,null)};c.prototype.init=function(d){console.warn("STARTING CODEC JSVPX");d()};c.prototype.processHeader=function(d,e){this.loadedMetadata=!0;e(0)};c.prototype.processFrame=function(d,h){var a=t(),b=new Uint8Array(d);e.vpx_codec_decode(this.decoder,b,b.length,void 0,void 0);if(b=e.vpx_codec_get_frame(this.decoder,null)){var c=b.planes_off,u=b.img_data,v=this.videoFormat;this.frameBuffer={format:{width:b.d_w+ +2,height:b.d_h,chromaWidth:b.d_w>>1,chromaHeight:b.d_h>>1,cropLeft:v.cropLeft,cropTop:v.cropTop,cropWidth:v.cropWidth,cropHeight:v.cropHeight,displayWidth:v.displayWidth,displayHeight:v.displayHeight},y:{bytes:u.subarray(c[0],c[1]),stride:b.stride[0]},u:{bytes:u.subarray(c[1],c[2]),stride:b.stride[1]},v:{bytes:u.subarray(c[2]),stride:b.stride[2]}}}a=t()-a;this.cpuTime+=a;h(1)};c.prototype.close=function(){};"undefined"!==typeof window?window.OGVDecoderVideoVP8=c:"undefined"!==typeof self&&(self.OGVDecoderVideoVP8= +c);b.exports=c},function(b,c,a){function e(e,a,d,b,c){e.iface=a;e.name=a.name;e.priv=null;e.init_flags=b;e.config.dec=d;e.iface.init(e,null)}c=[{name:"jsvp8",iface:a(3)}];b.exports={ifaces:c,vpx_codec_dec_init:function(h,a,d,b){return e(h,a,d,b,4)},vpx_codec_dec_init_ver:e,vpx_codec_peek_stream_info:function(){},vpx_codec_get_stream_info:function(){},vpx_codec_decode:function(e,a,d,b,c){e.iface.dec.decode(e.priv,a,d,b,c)},vpx_codec_get_frame:function(e,a){return e.iface.dec.get_frame(e,a)},vpx_codec_put_frame_cb_fn_t:function(){}, +vpx_codec_register_put_frame_cb:function(){},vpx_codec_register_put_slice_cb:function(){}}},function(b,c,a){var e=a(4),h=a(11).vp8dx_receive_compressed_data,t=function(){this.base;this.cfg;this.si;this.decoder_init;this.postproc_cfg_set;this.postproc_cfg;this.decrypt_cb;this.decrypt_state;this.img;this.img_setup;this.yv12_frame_buffers;this.user_priv;this.fragments;this.temp_pbi=null};b.exports={name:"jscodec VP8 Decoder",abi_version:0,caps:null,destroy:null,dec:{peek_si:function(){},get_si:function(){}, +decode:function(d,a,b,c,t){d.temp_pbi||(c=new e,d.temp_pbi=c);h(d.temp_pbi,b,a,t);return 0},get_frame:function(d,e){return d.priv.temp_pbi.common.show_frame?d.priv.temp_pbi.ref_frames[0].img:null}},init:function(d,e){if(!d.priv){var a=new t;d.priv=a;d.priv.init_flags=d.init_flags;d.priv.decrypt_cb=null;d.priv.decrypt_state=null;d.config.dec&&(a.cfg=d.config.dec,d.config.dec=a.cfg)}}}},function(b,c,a){var e=a(5),h=a(6).BOOL_DECODER;c=a(8);var t=c.MACROBLOCKD,d=c.FRAGMENT_DATA,u=c.MODE_INFO,z=a(10).vpx_image_t; +Uint8Array.prototype.ptr=0;var w=function(){this.img=new z;this.ref_cnt=0},x=function(){this.quant_idx=0;this.factor=[new Int16Array([0,0]),new Int16Array([0,0]),new Int16Array([0,0])]},p=function(){this.bool=new h;this.left_token_entropy_ctx=new Int32Array(9);this.coeffs=0};a=function(){this.saved_entropy_valid=this.cpuTime=this.frame_cnt=0;this.mb_info_rows_storage=null;this.mb_info_rows_storage_off=0;this.mb_info_rows_storage_object=u;this.mb_info_rows=null;this.mb_info_rows_off=0;this.above_token_entropy_ctx= +null;this.common=new e;this.boolDecoder=new h;this.segment_hdr=new t(this);this.token_hdr=new d(this);this.tokens=Array(8);for(var a=0;8>a;a++)this.tokens[a]=new p;this.frame_strg=[{img:new z,ref_cnt:0},{img:new z,ref_cnt:0},{img:new z,ref_cnt:0},{img:new z,ref_cnt:0}];this.ref_frames=Array(4);for(a=0;4>a;a++)this.ref_frames[a]=new w;this.dequant_factors=Array(4);for(a=0;4>a;a++)this.dequant_factors[a]=new x;this.ref_frame_offsets=new Uint32Array([0,0,0,0]);this.ref_frame_offsets_=[0,0,0,0];this.subpixel_filters= null;this.img_avail;this.img};a.prototype.modemv_init=function(){var d,e,a;d=this.mb_cols+1;e=this.mb_rows+1;this.common.mode_info_stride=this.mb_cols+1;1===this.common.frame_size_updated&&(this.mb_info_rows_storage=this.mb_info_storage=null);if(null===this.mb_info_storage){var m=d*e;this.mb_info_storage=Array(m);for(a=0;a>8),b=d<<8,k;a.value>=b?(k=1,a.range-=d,a.value-=b):(k=0,a.range=d);for(;128>a.range;)a.value<<=1,a.range<<=1,8===++a.bit_count&&(a.bit_count=0,a.input_len&&(a.value|=a.input[a.ptr++],a.input_len--));return k}function e(e){return a(e,128)}b.exports={};b.exports.vpx_read_bit=e;b.exports.vpx_read=a; -b.exports.vpx_read_literal=function(a,b){var d=0,k;for(k=b-1;0<=k;k--)d|=e(a)<>8),b=d<<8,h;a.value>=b?(h=1,a.range-=d,a.value-=b):(h=0,a.range=d);for(;128>a.range;)a.value<<=1,a.range<<=1,8===++a.bit_count&&(a.bit_count=0,a.input_len&&(a.value|=a.input[a.ptr++],a.input_len--));return h}function e(e){return a(e,128)}b.exports={};b.exports.vpx_read_bit=e;b.exports.vpx_read=a; +b.exports.vpx_read_literal=function(a,b){var d=0,h;for(h=b-1;0<=h;h--)d|=e(a)<>3+c*a.stride[0])|0:(d=a.img_data_off,a.fmt&1024&&(a.planes_off[3]=d+b+c*a.stride[3],d+=a.h*a.stride[3]),a.planes_off[0]=d+b+c*a.stride[0],d+=a.h*a.stride[0],a.fmt&512?(a.planes_off[2]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[2],d+=(a.h>>a.y_chroma_shift)*a.stride[2],a.planes_off[1]=d+(b>>a.x_chroma_shift)+(c>> -a.y_chroma_shift)*a.stride[1]):(a.planes_off[1]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[1],d+=(a.h>>a.y_chroma_shift)*a.stride[1],a.planes_off[2]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[2])),0):-1}Uint8ClampedArray.prototype.data_32=null;Uint8Array.prototype.data_32=null;b.exports={};b.exports.vpx_img_set_rect=a;b.exports.img_alloc_helper=function(b,c,t,d,u,z){var e,k,p,v,h;u||(u=1);u&u-1&&console.warn("Invalid stride align");switch(c){case 2:case 9:case 10:case 11:h= -32;break;case 1:case 8:h=24;break;case 3:case 12:case 4:case 13:case 5:case 6:case 7:h=16;break;case 258:case 769:case 260:case 771:h=12;break;default:h=16}switch(c){case 258:case 769:case 260:case 771:p=1;break;default:p=0}switch(c){case 258:case 769:case 260:case 771:v=1;break;default:v=0}e=(1<>3)|0)+u-1&~(u-1)|0;b.img_data=z;null!==z&&(b.img_data=new Uint8Array(0===(c&256)?e*u:e*k*h>>3),b.img_data.data_32=new Uint32Array(b.img_data.buffer), -b.img_data_owner=1);b.fmt=c;b.w=k;b.h=e;b.x_chroma_shift=p;b.y_chroma_shift=v;b.bps=h;b.stride[0]=b.stride[3]=u;b.stride[1]=b.stride[2]=u>>p;if(0===a(b,0,0,t,d))return b};b.exports.vpx_image_t=function(){this.y_chroma_shift=this.x_chroma_shift=this.d_h=this.d_w=this.h=this.w=this.fmt=0;this.planes_off=new Int32Array(4);this.stride=new Int32Array(4);this.user_priv=this.bps=0;this.img_data=null;this.self_allocd=this.img_data_owner=this.img_data_off=0}},function(b,c,a){function e(a){if(a){if(0===a.ref_cnt)throw"ERROR :("; -a.ref_cnt--}}function k(a){a.ref_cnt++;return a}var t=a(12).vp8_decode_frame;b.exports={vp8dx_receive_compressed_data:function(a,b,c,w){t(c,a);1===a.common.copy_arf?(e(a.ref_frames[3]),a.ref_frames[3]=k(a.ref_frames[1])):2===a.common.copy_arf&&(e(a.ref_frames[3]),a.ref_frames[3]=k(a.ref_frames[2]));1===a.common.copy_gf?(e(a.ref_frames[2]),a.ref_frames[2]=k(a.ref_frames[1])):2===a.common.copy_gf&&(e(a.ref_frames[2]),a.ref_frames[2]=k(a.ref_frames[3]));1===a.common.refresh_gf&&(e(a.ref_frames[2]),a.ref_frames[2]= -k(a.ref_frames[0]));1===a.common.refresh_arf&&(e(a.ref_frames[3]),a.ref_frames[3]=k(a.ref_frames[0]));1===a.common.refresh_last&&(e(a.ref_frames[1]),a.ref_frames[1]=k(a.ref_frames[0]))}}},function(b,c,a){function e(a,b,m){var d,g,h,c=1;1===b.enabled&&(c=ia);for(d=0;d=E.y_mode?(U(y.u,y.u_off,y.v,y.v_off,y.uv_stride,J,N,0),L(y.y,y.y_off,y.stride,J,N,0)):P(l,y,N,0,J,k,q);c++;D.y_off+=16;D.u_off+=8;D.v_off+=8}a.common.level&&g&&(a.common.filter_type?w(a,g-1):x(a,g-1,0,a.mb_cols));e===a.mb_cols&&(n=D.y,c=D.y_off+ -15*D.stride,n[c]=n[c+1]=n[c+2]=n[c+3]=D.y[D.y_off-1+15*D.stride]);++h===a.token_hdr.partitions&&(h=0)}a.common.level&&(a.common.filter_type?w(a,g-1):x(a,g-1,0,a.mb_cols))}function t(a,b,m,g,f,d){var h=b-1;if(0===d&&f)for(f=b-g,b=0;b>=2;a=a.data_32;m=m|m<<8|m<<16|m<<24;var f=g>>2;for(g=0;g>2)]=m}function z(a,b,m,g){var f,d=a.decoder;a.partitions=1<>1&7;d.show_frame=l>>4&1;r=(l|a[1]<<8|a[2]<<16)>>5;if(c<=r+(d.is_keyframe?10:3))return-1;d.frame_size_updated=0;if(!0===d.is_keyframe){var q=d.Width,P=d.Height,l=d.vert_scale,K=d.horiz_scale;if(157!==a[3]||1!==a[4]||42!==a[5])return-1;var U=a[7];d.Width=(a[6]|U<<8)&16383;d.horiz_scale=U>>6;d.Height=(a[8]|a[9]<<8)&16383; -d.vert_scale=a[9]>>6;if(q!==d.Width||P!==d.Height||l!==d.vert_scale||K!==d.horiz_scale)d.frame_size_updated=1}a.ptr+=M;c-=M;!0===d.is_keyframe&&(a.ptr+=ja,c-=ja,b.mb_cols=d.Width+15>>4|0,b.mb_rows=d.Height+15>>4|0);N(f,a,a.ptr,r);d.is_keyframe&&f.get_uint(2);l=b.common;if(!0===l.is_keyframe){for(q=0;19>q;q++)l.entropy_hdr.mv_probs[0][q]=g[0][q];for(q=0;19>q;q++)l.entropy_hdr.mv_probs[1][q]=g[1][q];G(l);m(l)}n.enabled=h(f);if(1===n.enabled){n.update_map=h(f);n.update_data=h(f);if(1===n.update_data){n.abs= -h(f);for(l=0;ll;l++)1===h(f)?n.tree_probs[l]=f.get_uint(8):n.tree_probs[l]=255}else n.update_map=0,n.update_data=0;!0===d.is_keyframe&&(d.filter_type=0,d.level=0,d.sharpness=0,d.delta_enabled=0,d.ref_delta[0]=0,d.ref_delta[1]=0,d.ref_delta[2]=0,d.ref_delta[3]=0,d.mode_delta[0]=0,d.mode_delta[1]=0,d.mode_delta[2]=0,d.mode_delta[3]=0);d.filter_type=h(f);d.level=f.get_uint(6);d.sharpness= -f.get_uint(3);d.delta_enabled=h(f);l=d.ref_delta;1===d.delta_enabled&&1===h(f)&&(l[0]=f.maybe_get_int(6),l[1]=f.maybe_get_int(6),l[2]=f.maybe_get_int(6),l[3]=f.maybe_get_int(6),d.mode_delta[0]=f.maybe_get_int(6),d.mode_delta[1]=f.maybe_get_int(6),d.mode_delta[2]=f.maybe_get_int(6),d.mode_delta[3]=f.maybe_get_int(6));z(b.token_hdr,a,a.ptr+r,c-r);c=d.mbmi_qindex;d.mbmi_qindex=f.get_uint(7);c=(c!==d.mbmi_qindex)+0;c|=d.y1dc_delta_q=f.maybe_get_int(4);c|=d.y2dc_delta_q=f.maybe_get_int(4);c|=d.y2ac_delta_q= -f.maybe_get_int(4);c|=d.uvdc_delta_q=f.maybe_get_int(4);c|=d.uvac_delta_q=f.maybe_get_int(4);d.delta_update=c;c=d.is_keyframe;d.refresh_gf=!0===c?1:h(f);d.refresh_arf=!0===c?1:h(f);d.copy_gf=!0===c?0:d.refresh_gf?0:f.get_uint(2);d.copy_arf=!0===c?0:d.refresh_arf?0:f.get_uint(2);d.sign_bias[J]=!0===c?0:h(f);d.sign_bias[I]=!0===c?0:h(f);d.refresh_entropy_probs=h(f);d.refresh_last=!0===c?1:h(f);0===d.refresh_entropy_probs&&(W(d.saved_entropy,d.entropy_hdr),b.saved_entropy_valid=1);b.modemv_init();c= -b.token_hdr.partitions;if(1===d.frame_size_updated){r=400*b.mb_cols;for(l=0;lg&&(g=0);b=g;a.common.sharpness&&(b>>=49-a.common.sharpness&&(b=9-a.common.sharpness));1>b&&(b=1);l=15<=g?1:0;40<=g&&l++;20<=g&&!a.common.is_keyframe&&l++;d[0]=g;f[0]=b;m[0]=l}function k(a){return l(n(a,0),255)}function t(a,b,d,g){var m=a[b],l=a[b+d];return f(a[b-2*d]-a[b-d])>g||f(l-m)>g}function d(a, -b,d,g,m){var l=a[b-4*d],c=a[b-3*d],n=a[b-2*d],h=a[b-d],r=a[b],e=a[b+d],q=a[b+2*d],k=a[b+3*d];g=2*g+m;var P=a[b-(d<<1)],K=a[b+d];return 2*f(a[b-d]-a[b])+(f(P-K)>>1)<=g|0&&f(l-c)<=m&&f(c-n)<=m&&f(n-h)<=m&&f(k-q)<=m&&f(q-e)<=m&&f(e-r)<=m}function u(a,b,f,g,m,c,h){var r=h<<3;for(h=0;h>7;p=k(p+A);v=k(v-A);A=18*u+ -63>>7;y=k(y+A);G=k(G-A);A=9*u+63>>7;L=k(L+A);N=k(N-A);e[q-U]=L;e[q-K]=y;e[q-P]=p;e[q]=v;e[q+P]=G;e[q+K]=N}b+=1}}function z(a,b,f,g,m,l,c){var h=c<<3;for(c=0;c>3;c=a(c+(127>3));e=a(e-L);l||(p=L+1>>1,m=a(m+p),k=a(k-p));b[d-g]=m;b[d-f]=c;b[d]= -e;b[d+f]=k}function k(a,b,d,l){var f;for(f=0;16>f;f++)1===t(a,b,d,l)&&e(a,b,d,1),b+=1}function t(a,b,d,l){var f=a[b-(d<<1)],g=a[b+d];return(p(a[b-d]-a[b])<<1)+(p(f-g)>>1)<=l|0}function d(a,b,d,l){var f;for(f=0;16>f;f++)t(a,b,1,l)&&e(a,b,1,1),b+=d}function u(b,d,f,l,c,r,q){var g=q<<3;for(q=0;q>7;y=a(y+x);u=a(u-x);x=18*F+63>> -7;p=a(p+x);A=a(A-x);x=9*F+63>>7;k=a(k+x);t=a(t-x);m[n-3]=k;m[n-2]=p;m[n-1]=y;m[n]=u;m[n+1]=A;m[n+2]=t}d+=f}}function z(a,b,d,c,h){var f=a[b-4*d],m=a[b-3*d],g=a[b-2*d],l=a[b-d],n=a[b],e=a[b+d],k=a[b+2*d],y=a[b+3*d];return t(a,b,d,2*c+h)&&p(f-m)<=h&&p(m-g)<=h&&p(g-l)<=h&&p(y-k)<=h&&p(k-e)<=h&&p(e-n)<=h}function w(a,b,d,c){var f=a[b],m=a[b+d];return p(a[b-2*d]-a[b-d])>c||p(m-f)>c}function x(a,b,d,c,h,r,q){var f=8*q;for(q=0;qf)return P[U+ -v[f]]=n,++f,F=1;P[U+v[15]]=n;F=12;return 1}function B(b,d){r+=u(a,p[b].probs[d])<f?(++f,G+=x[f]|0,F=2):F=12,z=1);if(1===z)continue;if(1===k(y[G+2],11))continue;if(1===k(y[G+3],8))continue;if(1===k(y[G+6],6))continue;if(1===k(y[G+8],4))continue;if(1===k(y[G+ -10],3))continue;r=p[10].min_val;q=p[10].length;do B(10,q),q--;while(0<=q);if(1===E(r))continue}if(3===F&&(r=p[9].min_val,B(9,4),B(9,3),B(9,2),B(9,1),B(9,0),1===E(r)))continue;if(4===F){if(1===k(y[G+9],5))continue;r=p[8].min_val;B(8,3);B(8,2);B(8,1);B(8,0);if(1===E(r))continue}if(5===F&&(r=p[7].min_val,B(7,2),B(7,1),B(7,0),1===E(r)))continue;if(6===F){if(1===k(y[G+7],7))continue;r=p[6].min_val;B(6,1);B(6,0);if(1===E(r))continue}if(7===F&&(r=p[5].min_val,B(5,0),1===E(r)))continue;if(8===F){if(k(y[G+ -4],10))continue;if(k(y[G+5],9))continue;if(E(4))continue}if(9!==F||!E(3))if(10!==F||!E(2)){if(11===F){e(1);G=N+11;if(15>f){P[U+v[f]]=n;++f;F=1;continue}P[U+v[15]]=n;F=12}if(12===F){K=(K|(1>>0;l=(f!=!m)+0;K=(K|l<<31)>>>0;b[t[h]]=c[d[h]]=l;U+=16;h++;if(hd;d++)e[d]=c[d];c=b.mv_probs;for(d=0;19>d;d++)a.mv_probs[0][d]=c[0][d];for(d=0;19>d;d++)a.mv_probs[1][d]=c[1][d];c=b.y_mode_probs_32;a.y_mode_probs_32[0]=c[0];c=b.uv_mode_probs;a.uv_mode_probs[0]=c[0];a.uv_mode_probs[1]=c[1];a.uv_mode_probs[2]=c[2];a.prob_inter=b.prob_inter;a.prob_last=b.prob_inter;a.prob_gf=b.prob_inter};b.exports.memset=function(a, -b,c,t){for(;t--;)a[b+t]=c};b.exports.memset_32=function(a,b,c,t){b>>=2;a=a.data_32;c=c|c<<8|c<<16|c<<24;var d=t>>2;for(t=0;t>2)]=c};b.exports.memcpy=function(a,b,c,t,d){for(;d--;)a[b+d]=c[t+d];return a}},function(b,c){var a=[new Uint8Array([237,246,253,253,254,254,254,254,254,254,254,254,254,254,250,250,252,254,254]),new Uint8Array([231,243,245,253,254,254,254,254,254,254,254,254,254,254,251,251,254,254,254])],e=[new Uint8Array([162,128,225,146,172,147,214,39,156,128,129,132,75,145, -178,206,239,254,254]),new Uint8Array([164,128,204,170,119,235,140,230,228,128,130,130,74,148,180,203,236,254,254])];b.exports={};b.exports.vp8_mv_update_probs=a;b.exports.vp8_default_mv_context=e},function(b,c,a){var e=a(19).data_64;b.exports={vp8_default_coef_probs:function(a){a.entropy_hdr.coeff_probs.data_64.set(e)}}},function(b,c){var a=new Uint8Array([128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,253,136,254, -255,228,219,128,128,128,128,128,189,129,242,255,227,213,255,219,128,128,128,106,126,227,252,214,209,255,255,128,128,128,1,98,248,255,236,226,255,255,128,128,128,181,133,238,254,221,234,255,154,128,128,128,78,134,202,247,198,180,255,219,128,128,128,1,185,249,255,243,255,128,128,128,128,128,184,150,247,255,236,224,128,128,128,128,128,77,110,216,255,236,230,128,128,128,128,128,1,101,251,255,241,255,128,128,128,128,128,170,139,241,252,236,209,255,255,128,128,128,37,116,196,243,228,255,255,255,128,128, -128,1,204,254,255,245,255,128,128,128,128,128,207,160,250,255,238,128,128,128,128,128,128,102,103,231,255,211,171,128,128,128,128,128,1,152,252,255,240,255,128,128,128,128,128,177,135,243,255,234,225,128,128,128,128,128,80,129,211,255,194,224,128,128,128,128,128,1,1,255,128,128,128,128,128,128,128,128,246,1,255,128,128,128,128,128,128,128,128,255,128,128,128,128,128,128,128,128,128,128,198,35,237,223,193,187,162,160,145,155,62,131,45,198,221,172,176,220,157,252,221,1,68,47,146,208,149,167,221,162, -255,223,128,1,149,241,255,221,224,255,255,128,128,128,184,141,234,253,222,220,255,199,128,128,128,81,99,181,242,176,190,249,202,255,255,128,1,129,232,253,214,197,242,196,255,255,128,99,121,210,250,201,198,255,202,128,128,128,23,91,163,242,170,187,247,210,255,255,128,1,200,246,255,234,255,128,128,128,128,128,109,178,241,255,231,245,255,255,128,128,128,44,130,201,253,205,192,255,255,128,128,128,1,132,239,251,219,209,255,165,128,128,128,94,136,225,251,218,190,255,255,128,128,128,22,100,174,245,186,161, -255,199,128,128,128,1,182,249,255,232,235,128,128,128,128,128,124,143,241,255,227,234,128,128,128,128,128,35,77,181,251,193,211,255,205,128,128,128,1,157,247,255,236,231,255,255,128,128,128,121,141,235,255,225,227,255,255,128,128,128,45,99,188,251,195,217,255,224,128,128,128,1,1,251,255,213,255,128,128,128,128,128,203,1,248,255,255,128,128,128,128,128,128,137,1,177,255,224,255,128,128,128,128,128,253,9,248,251,207,208,255,192,128,128,128,175,13,224,243,193,185,249,198,255,255,128,73,17,171,221,161, -179,236,167,255,234,128,1,95,247,253,212,183,255,255,128,128,128,239,90,244,250,211,209,255,255,128,128,128,155,77,195,248,188,195,255,255,128,128,128,1,24,239,251,218,219,255,205,128,128,128,201,51,219,255,196,186,128,128,128,128,128,69,46,190,239,201,218,255,228,128,128,128,1,191,251,255,255,128,128,128,128,128,128,223,165,249,255,213,255,128,128,128,128,128,141,124,248,255,255,128,128,128,128,128,128,1,16,248,255,255,128,128,128,128,128,128,190,36,230,255,236,255,128,128,128,128,128,149,1,255, -128,128,128,128,128,128,128,128,1,226,255,128,128,128,128,128,128,128,128,247,192,255,128,128,128,128,128,128,128,128,240,128,255,128,128,128,128,128,128,128,128,1,134,252,255,255,128,128,128,128,128,128,213,62,250,255,255,128,128,128,128,128,128,55,93,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,202,24,213,235,186,191,220,160,240,175,255,126,38,182,232,169,184,228,174,255,187, -128,61,46,138,219,151,178,240,170,255,216,128,1,112,230,250,199,191,247,159,255,255,128,166,109,228,252,211,215,255,174,128,128,128,39,77,162,232,172,180,245,178,255,255,128,1,52,220,246,198,199,249,220,255,255,128,124,74,191,243,183,193,250,221,255,255,128,24,71,130,219,154,170,243,182,255,255,128,1,182,225,249,219,240,255,224,128,128,128,149,150,226,252,216,205,255,171,128,128,128,28,108,170,242,183,194,254,223,255,255,128,1,81,230,252,204,203,255,192,128,128,128,123,102,209,247,188,196,255,233, -128,128,128,20,95,153,243,164,173,255,203,128,128,128,1,222,248,255,216,213,128,128,128,128,128,168,175,246,252,235,205,255,255,128,128,128,47,116,215,255,211,212,255,255,128,128,128,1,121,236,253,212,214,255,255,128,128,128,141,84,213,252,201,202,255,219,128,128,128,42,80,160,240,162,185,255,205,128,128,128,1,1,255,128,128,128,128,128,128,128,128,244,1,255,128,128,128,128,128,128,128,128,238,1,255,128,128,128,128,128,128,128,128]);a.data_32=new Uint32Array(a.buffer);a.data_64=new Float64Array(a.buffer); -b.exports=a},function(b,c){var a=new Int32Array([4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157]),e=new Int32Array([4,5,6,7,8,9,10,11,12,13,14, -15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284]),k=Math.min,t=Math.max;b.exports={};b.exports.vp8_dc_quant=function(b,c){b+=c;127b&&(b= -0);b=k(t(b,0),127);return a[b]};b.exports.vp8_dc2quant=function(b,c){b+=c;127b&&(b=0);return a[b]<<1};b.exports.vp8_dc_uv_quant=function(b,c){var d;b+=c;127b&&(b=0);d=a[b];132a&&(a=0);return e[a]};b.exports.vp8_ac2quant=function(a,b){var d;a+=b;127a&&(a=0);d=101581*e[a]>>16;8>d&&(d=8);return d};b.exports.vp8_ac_uv_quant=function(a,b){a+=b;127a&&(a=0);return e[a]}},function(b,c,a){function e(a, -b,c,g,e,q,k){var f=a.frame_strg[0].img.img_data,l=a.frame_strg[0].img.img_data_off,m,n,r,p,v,K,t,u,z,B;m=e.mbmi.ref_frame;var w=b.u,x=b.v,H=b.u_off,J=b.v_off;u=q<<4;z=k<<4;K=a.mb_cols<<4;t=a.mb_rows<<4;r=b.y;p=b.y_off;v=a.ref_frame_offsets[m];n=p+v;var I=e.mbmi.y_mode,E=e.bmi.mvs;v=a.ref_frame_offsets[m];m=a.ref_frame_offsets_[m];for(B=0;16>B;B++)d(r,p,f,l,m,n,b.stride,9!==I?e.mbmi.mv:E[B],a.subpixel_filters,c,g,e,u,z,K,t,B),u+=4,p+=4,n+=4,3===(B&3)&&(u-=16,z+=4,p+=(b.stride<<2)-16,n+=(b.stride<< -2)-16);u=q<<4>>1;z=k<<4>>1;K>>=1;t>>=1;q=4*b.uv_stride-8;for(B=0;4>B;B++)d(w,H,f,l,m,H+v,b.uv_stride,h[B],a.subpixel_filters,c,g,e,u,z,K,t,B+16),d(x,J,f,l,m,J+v,b.uv_stride,h[B],a.subpixel_filters,c,g,e,u,z,K,t,B+20),H+=4,J+=4,u+=4,1===(B&1)&&(u-=8,z+=4,H+=q,J+=q)}function k(a,b,d,c,g){var f,l,m;f=l=m=b.y;var e=b.y_off,n=b.u_off,k=b.v_off,r,p,v=g.mbmi,u=v.y_mode;p=a.ref_frame_offsets[g.mbmi.ref_frame];r=a.ref_frame_offsets_[g.mbmi.ref_frame];var z=b.stride,w=a.subpixel_filters,x=g.bmi.mvs;for(a=0;16> -a;a++)t(f,e,r,e+p,z,9!==u?v.mv:x[a],w,d,c,g,a),e+=4,3===(a&3)&&(e+=(b.stride<<2)-16);b=b.uv_stride;for(a=0;4>a;a++)t(l,n,r,n+p,b,h[a],w,d,c,g,a+16),t(m,k,r,k+p,b,h[a],w,d,c,g,a+20),n+=4,k+=4,1===(a&1)&&(n+=(b<<2)-8,k+=(b<<2)-8)}function t(a,b,d,c,g,h,e,k,p,v,t){v=d;var f;h.as_int?(v=h.x&7,f=h.y&7,c+=(h.y>>3)*g+(h.x>>3),u(a,b,g,d,c,g,4,4,v,f,e),v=a,d=b):d=c;x(a,b,v,d,g,k,p+16*t)}function d(a,b,d,c,h,g,e,k,t,z,w,y,G,A,V,F,ha){G+=k.x>>3;A+=k.y>>3;if(2>G||G+4-1+3>=V||2>A||A+4-1+3>=F){g+=(k.x>>3)+(k.y>> -3)*e;y=c;G-=2;A-=2;var f=9;g=g-2-(e<<1)-G-A*e;A>=F?g+=(F-1)*e:0G?-G:0;9V&&(m=G+9-V);9>3)+(k.y>>3)*e)}k.as_int?(d=k.x&7,c=k.y&7,g+=(k.y>>3)*e+(k.x>>3),u(a,b,e,h,g,e,4,4,d,c,t),k=a,t=b):(g+=(k.y>>3)*e+(k.x>>3),k=h,t=g);x(a,b,k,t,e,z,w+16*ha)}c=a(9);var u=a(22).filter_block2d,z=a(23),w=z.vp8_short_inv_walsh4x4_c, -x=z.vp8_short_idct4x4llm_c;a=a(16);var p=a.memset,v=a.memcpy,h=[new c,new c,new c,new c],g=new c;b.exports={};b.exports.predict_inter_emulated_edge=e;b.exports.predict_inter=k;b.exports.vp8_build_inter_predictors_mb=function(a,b,d,c,r,q,p){var f=(3===a.common.version)+0;if(9!==r.mbmi.y_mode){w(d,c+384,c);g.as_int=r.mbmi.mv.as_int;if(1===r.mbmi.need_mc_border){var l=g.x,m=g.y;g.x=l+1+(l>>31<<1);g.y=m+1+(m>>31<<1);g.x/=2;g.y/=2}else g.x=g.x+1>>1,g.y=g.y+1>>1;f&&(g.as_int&=4294508536);h[0].as_int=h[1].as_int= -h[2].as_int=h[3].as_int=g.as_int}else for(l=r.bmi.mvs,m=0;2>m;++m)for(var n=0;2>n;++n){var v=(m<<3)+(n<<1),t=h[(m<<1)+n],u;u=l[v].x+l[v+1].x+l[v+4].x+l[v+5].x;u=0>u?u-4:u+4;t.x=u/8|0;u=l[v].y+l[v+1].y+l[v+4].y+l[v+5].y;u=0>u?u-4:u+4;t.y=u/8|0;1===f&&(t.as_int&=4294508536)}1===r.mbmi.need_mc_border?e(a,b,d,c,r,q,p):k(a,b,d,c,r)}},function(b,c){function a(a,b,d,c,e,h,g,m,f){var l,n,k=f[0]|0,q=f[1]|0,p=f[2]|0,v=f[3]|0,u=f[4]|0,t=f[5]|0;for(f=0;f>=7,0>n?n=0:255>=7,0>k?k=0:255>= -7,0>w?w=0:255>=7,0>y?y=0:255>=7,0>q?q=0:255>=7,0>p?p=0:255b;b++)g=l[n],f=l[n+4],h=l[n+8],m=l[n+12],c=g+m|0,e=f+h|0,h=f-h|0,g=g-m|0,k[r]=c+e,k[r+4]=h+g,k[r+8]=c-e,k[r+12]=g-h,n++,r++;l=k;r=n=0;l=l.data_32;for(b=0;4>b;b++)c=l[n>>1],h=c>>16,g=c<<16>>16,c=l[n+2>>1],m=c>>16,f=c<<16>>16,c=g+m,e=h+f,h-=f,g-=m,m=c+e,f=h+g,c-=e,e=g-h,t[r>>1]=m+3>>3&65535|f+3>>3<<16,t[r+2>>1]=c+3>>3&65535|e+3>>3<<16,n+=4,r+=4;for(b=0;16>b;b++)a[d+(b<<4)]=k[b]};b.exports.vp8_short_idct4x4llm_c=function(b,d,c,k,t,h,g){var m,f,l,n,r,q,p=0;for(m=0;4>m;m++){l=h[g]; -var v=h[g+4],z=h[g+12];n=h[g+8];f=l+n;l-=n;r=35468*v>>16;q=z+(20091*z>>16);n=r-q;r=v+(20091*v>>16);q=35468*z>>16;r+=q;u[p]=f+r;u[p+12]=f-r;u[p+4]=l+n;u[p+8]=l-n;g++;p++}h=u;g=0;b=b.data_32;for(m=0;4>m;m++)l=h[g],p=h[g+1],n=h[g+2],v=h[g+3],f=l+n,l-=n,r=35468*p>>16,q=v+(20091*v>>16),n=r-q,r=p+(20091*p>>16),q=35468*v>>16,r+=q,q=c[k],v=c[k+1],z=c[k+2],p=c[k+3],q=a(e(q+(f+r+4>>3),0),255),v=a(e(v+(l+n+4>>3),0),255),l=a(e(z+(l-n+4>>3),0),255),f=a(e(p+(f-r+4>>3),0),255),b[d>>2]=q|v<<8|l<<16|f<<24,g+=4,d+= -t,k+=t}},function(b,c,a){function e(a,b,d){u(a,b,d,8)}function e(a,b,d){u(a,b,d,8)}function k(a,b,d,c){var e=b-d|0,f,g,h;for(f=0;f>5;break;case 8:h=h+8>>4;break;case 4:h=h+4>>3}for(g=0;gn;n++)x(a,b,a,b,l,r,q),q+= -16,b+=4,n&1&&(b+=g);for(n=20;24>n;n++)x(c,f,c,f,l,r,q),q+=16,f+=4,n&1&&(f+=g)};b.exports.predict_intra_luma=function(a,b,c,e,l,n){if(4===e.mbmi.y_mode){var f=b,g=n,h;z(a,f,c);for(h=0;16>h;h++){var m=a,p=f+((h&3)<<2);switch(e.bmi.modes[h]){case 0:d(m,p,c,4);break;case 1:u(m,p,c,4);break;case 2:var v=void 0,N=void 0,y=void 0,G=m,A=p,V=c,F=A-V,ha=G.data_32[F>>2]|0,W=ha&255,B=ha>>8&255,M=ha>>16&255,ja=ha>>24&255;G.data_32[A>>2]=G[F-1]+(W<<1)+B+2>>2|W+(B<<1)+M+2>>2<<8|B+(M<<1)+ja+2>>2<<16|M+(ja<<1)+G[F+ -4]+2>>2<<24;for(y=1;4>y;y++)for(v=y*V,N=0;4>N;N++)G[A+v+N]=G[A+N];break;case 3:var H=m,J=p,I=c,E=J-1,ia=H.data_32,S=H[E-I]+2*H[E]+H[E+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;E+=I;S=H[E-I]+2*H[E]+H[E+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;E+=I;S=H[E-I]+2*H[E]+H[E+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;E+=I;S=H[E-I]+2*H[E]+H[E+0]+2>>2;ia[J+I>>2]=S|S<<8|S<<16|S<<24;break;case 4:var sa=void 0,ta=void 0,D=void 0,ga=void 0,ua=void 0,na=m,R=p,O=c,Q=R-O,Hb=na.data_32,C=Hb[Q>>2],Yb=C&255,ea=C>>8&255,ba=C>> -16&255,ca=C>>24&255,C=Hb[(Q>>2)+1],da=C&255,Y=C>>8&255,T=C>>16&255,X=C>>24&255,ua=ea+(ba<<1)+ca+2>>2,ga=ba+(ca<<1)+da+2>>2,D=ca+(da<<1)+na[Q+5]+2>>2;na.data_32[R>>2]=Yb+(ea<<1)+ba+2>>2|ua<<8|ga<<16|D<<24;R+=O;ta=da+2*Y+T+2>>2;na.data_32[R>>2]=ua|ga<<8|D<<16|ta<<24;R+=O;sa=Y+(T<<1)+X+2>>2;na.data_32[R>>2]=ga|D<<8|ta<<16|sa<<24;na.data_32[R+O>>2]=D|ta<<8|sa<<16|T+2*X+X+2>>2<<24;break;case 5:var Ba=void 0,Fa=void 0,Z=void 0,la=void 0,Ca=void 0,Ra=void 0,Ga=void 0,fa=m,ma=p,va=c,Ha=ma-1,Sa=ma-va,Ta=fa.data_32[Sa>> -2],gb=Ta&255,hb=Ta>>8&255,Ib=Ta>>16&255,Jb=fa[Ha],ib=fa[Ha+va],Kb=fa[Ha+2*va],Ga=fa[Ha+0]+2*fa[Sa-1]+gb+2>>2,Ra=fa[Sa-1]+2*gb+hb+2>>2,Ca=gb+2*hb+Ib+2>>2,la=hb+2*Ib+(Ta>>24&255)+2>>2;fa.data_32[ma>>2]=Ga|Ra<<8|Ca<<16|la<<24;ma+=va;Z=ib+2*Jb+fa[Sa-1]+2>>2;fa.data_32[ma>>2]=Z|Ga<<8|Ra<<16|Ca<<24;ma+=va;Fa=Kb+2*ib+Jb+2>>2;fa.data_32[ma>>2]=Fa|Z<<8|Ga<<16|Ra<<24;Ba=fa[Ha+3*va]+2*Kb+ib+2>>2;fa.data_32[ma+va>>2]=Ba|Fa<<8|Z<<16|Ga<<24;break;case 6:var Lb=void 0,Mb=void 0,Nb=void 0,jb=void 0,kb=void 0,lb= -void 0,Ob=void 0,mb=void 0,nb=void 0,ob=void 0,aa=m,oa=p,wa=c,Ia=oa-1,Da=oa-wa,Ua=aa.data_32[Da>>2],Ja=Ua&255,Ka=Ua>>8&255,Va=Ua>>16&255,Pb=aa[Ia+0],ob=aa[Da-1]+Ja+1>>1,nb=Ja+Ka+1>>1,mb=Ka+Va+1>>1,Ob=Va+(Ua>>24&255)+1>>1;aa.data_32[oa>>2]=ob|nb<<8|mb<<16|Ob<<24;oa+=wa;lb=aa[Ia+0]+2*aa[Da-1]+Ja+2>>2;kb=aa[Da-1]+2*Ja+Ka+2>>2;jb=Ja+2*Ka+Va+2>>2;Nb=Ka+2*Va+aa[Da+3]+2>>2;aa.data_32[oa>>2]=lb|kb<<8|jb<<16|Nb<<24;oa+=wa;Mb=aa[Ia+wa]+2*Pb+aa[Da-1]+2>>2;aa.data_32[oa>>2]=Mb|ob<<8|nb<<16|mb<<24;Lb=aa[Ia+2* -wa]+2*aa[Ia+wa]+Pb+2>>2;aa.data_32[oa+wa>>2]=Lb|lb<<8|kb<<16|jb<<24;break;case 7:var Qb=void 0,pb=void 0,qb=void 0,rb=void 0,sb=void 0,tb=void 0,ub=void 0,pa=m,xa=p,Wa=c,Xa=xa-Wa,ka=pa.data_32[Xa>>2],Rb=ka&255,Ya=ka>>8&255,La=ka>>16&255,Za=ka>>24&255,ka=pa.data_32[(Xa>>2)+1],$a=ka&255,Sb=ka>>8&255,Tb=ka>>16&255,ub=Ya+La+1>>1,tb=La+Za+1>>1,sb=pa[Xa+3]+$a+1>>1;pa.data_32[xa>>2]=Rb+Ya+1>>1|ub<<8|tb<<16|sb<<24;xa+=Wa;rb=Ya+2*La+Za+2>>2;qb=La+2*Za+$a+2>>2;pb=Za+2*$a+pa[Xa+5]+2>>2;pa.data_32[xa>>2]=Rb+ -2*Ya+La+2>>2|rb<<8|qb<<16|pb<<24;xa+=Wa;pa.data_32[xa>>2]=ub|tb<<8|sb<<16|$a+2*Sb+Tb+2>>2<<24;Qb=Sb+2*Tb+(ka>>24&255)+2>>2;pa.data_32[xa+Wa>>2]=rb|qb<<8|pb<<16|Qb<<24;break;case 8:var vb=void 0,wb=void 0,xb=void 0,yb=void 0,Ub=void 0,zb=void 0,Ab=void 0,qa=p,ya=c,ab=qa-1,Ma=qa-ya,Bb=m[Ma-1]|0,Cb=m[Ma]|0,Vb=m[Ma+1]|0,Zb=m[Ma+2]|0,Na=m[ab]|0,Oa=m[ab+ya]|0,bb=m[ab+(ya<<1)]|0,Wb=m[ab+3*ya]|0,cb=m.data_32,Ab=Na+Bb+1>>1,zb=Na+2*Bb+Cb+2>>2,Ub=m[Ma-1]+2*Cb+Vb+2>>2;cb[qa>>2]=Ab|zb<<8|Ub<<16|Cb+(Vb<<1)+Zb+ -2>>2<<24;qa+=ya;yb=Oa+Na+1>>1;xb=Oa+2*Na+Bb+2>>2;cb[qa>>2]=yb|xb<<8|Ab<<16|zb<<24;qa+=ya;wb=bb+Oa+1>>1;vb=bb+2*Oa+Na+2>>2;cb[qa>>2]=wb|vb<<8|yb<<16|xb<<24;cb[qa+ya>>2]=Wb+bb+1>>1|Wb+2*bb+Oa+2>>2<<8|wb<<16|vb<<24;break;case 9:var za=void 0,Db=void 0,Eb=void 0,Fb=void 0,Gb=void 0,ra=m,Aa=p,Ea=c,db=Aa-1,Xb=ra[db],eb=ra[db+Ea],Pa=ra[db+2*Ea],Qa=ra[db+3*Ea],Gb=eb+Pa+1>>1,Fb=eb+2*Pa+Qa+2>>2;ra.data_32[Aa>>2]=Xb+eb+1>>1|Xb+2*eb+Pa+2>>2<<8|Gb<<16|Fb<<24;Aa+=Ea;Eb=Pa+Qa+1>>1;Db=Pa+2*Qa+Qa+2>>2;ra.data_32[Aa>> -2]=Gb|Fb<<8|Eb<<16|Db<<24;Aa+=Ea;za=Qa;ra.data_32[Aa>>2]=Eb|Db<<8|za<<16|za<<24;ra.data_32[Aa+Ea>>2]=za|za<<8|za<<16|za<<24;break;default:throw"ERROR :(";}x(m,p,m,p,c,l,g);g+=16;3===(h&3)&&(f+=4*c)}}else{var fb;switch(e.mbmi.y_mode){case 0:d(a,b,c,16);break;case 1:k(a,b,c,16);break;case 2:t(a,b,c,16);break;case 3:u(a,b,c,16)}w(l,n+384,n);for(fb=0;16>fb;fb++)x(a,b,a,b,c,l,n),n+=16,b+=4,3===(fb&3)&&(b+=(c<<2)-16)}}},function(b,c){b.exports={};b.exports.intra_prediction_down_copy=function(a,b,c){b=b+ -16-c;a=a.data_32;var e=a[b>>2];b+=c<<2;a[b>>2]=e;b+=c<<2;a[b>>2]=e;a[b+(c<<2)>>2]=e}},function(b,c,a){function e(a,b,c){c.enabled&&c.update_map&&(1===L(a,c.tree_probs[0])?b.mbmi.segment_id=2+L(a,c.tree_probs[2]):b.mbmi.segment_id=L(a,c.tree_probs[1]))}function k(a,b,c,d){a=a.common.mode_info_stride;var e=b[c];e.init_split_mode();var h=e.bmi.modes;e.mbmi.ref_frame=0;var k=e.mbmi,q=y(d,m,n,0);k.y_mode=q;if(4===e.mbmi.y_mode){k=0;e.mbmi.is_4x4=1;do{var t=x(b,c,k,a),r=w(b,c,k),q=k,t=y(d,g,p[t][r],0); -h[q]=t}while(16>++k)}b=e.mbmi;d=y(d,f,l,0);b.uv_mode=d}function t(a,b){a.xb.mb_to_right_edge&&(a.x=b.mb_to_right_edge);a.yb.mb_to_bottom_edge&&(a.y=b.mb_to_bottom_edge)}function d(a,b,c,d,e,f){b+=a.x>>3;c+=a.y>>3;return 2>b>>1||3>e-(b+d)>>1||2>c>>1||3>f-(c+d)>>1}function u(a,b,c,d){b[a.mbmi.ref_frame]^b[c]&&(d.x*=-1,d.y*=-1)}function z(a,b){var c=0;if(L(a,b[0])){var d;for(d=0;3>d;d++)c+=L(a,b[9+d])<n;n++)1===L(m,v[n])&&(p[n]=m.get_uint(8));a.common.entropy_hdr.coeff_skip_enabled=N(m);a.common.entropy_hdr.coeff_skip_prob=1===a.common.entropy_hdr.coeff_skip_enabled?m.get_uint(8):0;if(!1===a.common.is_keyframe){a.common.entropy_hdr.prob_inter= -m.get_uint(8);a.common.entropy_hdr.prob_last=m.get_uint(8);a.common.entropy_hdr.prob_gf=m.get_uint(8);1===N(m)&&(a.common.entropy_hdr.y_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[2]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[3]=m.get_uint(8));1===N(m)&&(a.common.entropy_hdr.uv_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[2]=m.get_uint(8));n=a.common.entropy_hdr.mv_probs; -for(var r=0;2>r;r++)for(p=0;19>p;p++)if(L(m,G[r][p])){var w=m.get_uint(7);n[r][p]=0M[1]&&(O=M[1],M[1]=M[2],M[2]=O,O=W[1].as_int,W[1].as_int=W[2].as_int,W[2].as_int=O);M[1]>=M[0]&&(W[0].as_int=W[1].as_int);w.mbmi.need_mc_border=0;R=-C.mb_to_left_edge-128>>3;Q=-C.mb_to_top_edge-128>>3;O=J.mb_cols<<4;J=J.mb_rows<<4;if(L(x,U[M[0]][0]))if(L(x,U[M[1]][1]))if(L(x,U[M[2]][2]))if(L(x,U[M[3]][3])){w.mbmi.y_mode=9;B[0].as_int=0;B[1].as_int=0;B[2].as_int=0;B[3].as_int=0;I=W[0];t(I,C);C=w;var ca=x,Ba=0,Y=3,x=16;L(ca,110)&&(Y=2,x=4,L(ca,111)&&(Y=L(ca,150),x=2));var X= -q[Y],Fa=C.bmi.mvs;do{A.as_int=0;V.as_int=0;F.as_int=0;for(var Z,T=0;Ba!==X[T];T++);V.as_int=T&3?C.bmi.mvs[T-1].as_int:9===ba.mbmi.y_mode?ba.bmi.mvs[T+3].as_int:ba.mbmi.mv.as_int;F.as_int=T>>2?C.bmi.mvs[T-4].as_int:9===da.mbmi.y_mode?da.bmi.mvs[T+12].as_int:da.mbmi.mv.as_int;Z=V.as_int;var la=F.as_int;Z=ha[(0===la)<<2|(0===Z)<<1|Z===la];if(L(ca,Z[0]))if(L(ca,Z[1])){if(L(ca,Z[2])){Z=ca;var la=A,Ca=ea.mv_probs;la.y=z(Z,Ca[0]);la.x=z(Z,Ca[1]);A.x+=I.x;A.y+=I.y}}else A.as_int=F.as_int;else A.as_int=V.as_int; -for(;16>T;T++)Ba===X[T]&&(Fa[T].as_int=A.as_int)}while(++BaC;C++)if(B[(C>>1&1)+(C>>2&2)].x+=x[C].x,B[(C>>1&1)+(C>>2&2)].y+=x[C].y,d(x[C],R+4*(C&3),Q+(C&-4),4,O,J)){w.mbmi.need_mc_border=1;break}for(C=0;4>C;C++)if(B[C].x+=4+(B[C].x>>28)|0,B[C].y+=4+(B[C].y>>28)|0,B[C].x>>=2,B[C].y>>=2,d(B[C],R+8*(C&1),Q+(C>>1<<3),16,O,J)){w.mbmi.need_mc_border=1;break}}else I=W[0],t(I,C),C=w.mbmi.mv,ea=ea.mv_probs,C.y=z(x,ea[0]), -C.x=z(x,ea[1]),w.mbmi.mv.x+=I.x,w.mbmi.mv.y+=I.y,w.mbmi.y_mode=8;else w.mbmi.mv.as_int=W[2].as_int,t(w.mbmi.mv,C),w.mbmi.y_mode=6;else w.mbmi.y_mode=5,w.mbmi.mv.as_int=W[1].as_int,t(w.mbmi.mv,C);else w.mbmi.y_mode=7,w.mbmi.mv.as_int=0;d(w.mbmi.mv,R,Q,16,O,J)&&(w.mbmi.need_mc_border=1)}else{J=y(x,P,ea.y_mode_probs,0);if(4===J)for(ba=w.bmi.modes,da=w.bmi.mvs,w=0;16>w;w++)C=y(x,g,K,0),ba[w]=da[w].x=C;R.y_mode=J;R.uv_mode=y(x,f,ea.uv_mode_probs,0);R.mv.x=O[Q].mbmi.mv.y=0;R.ref_frame=0}}!0!==a.common.is_keyframe&& -(H.mb_to_left_edge-=128,H.mb_to_right_edge-=128);r++;n++}}},function(b,c,a){a(9);var e=0,k=1,t=2,d=3,u=4,e=0,k=1,t=2,d=3,u=4;b.exports={};b.exports.left_block_mode=function(a,b,c){if(!(c&3))switch(--b,a[b].mbmi.y_mode){case e:return 0;case k:return 2;case t:return 3;case d:return 1;case u:return a[b].bmi.modes[c+3];default:return 0}return a[b].bmi.modes[c-1]};b.exports.above_block_mode=function(a,b,c,p){if(!(c>>2))switch(b-=p,a[b].mbmi.y_mode){case u:return a[b].bmi.modes[c+12];case e:return 0;case k:return 2; -case t:return 3;case d:return 1;default:return 0}return a[b].bmi.modes[c-4]}},function(b,c){var a=new Uint8Array([112,86,140,37]),e=[[new Uint8Array([231,120,48,89,115,113,120,152,112]),new Uint8Array([152,179,64,126,170,118,46,70,95]),new Uint8Array([175,69,143,80,85,82,72,155,103]),new Uint8Array([56,58,10,171,218,189,17,13,152]),new Uint8Array([144,71,10,38,171,213,144,34,26]),new Uint8Array([114,26,17,163,44,195,21,10,173]),new Uint8Array([121,24,80,195,26,62,44,64,85]),new Uint8Array([170,46, -55,19,136,160,33,206,71]),new Uint8Array([63,20,8,114,114,208,12,9,226]),new Uint8Array([81,40,11,96,182,84,29,16,36])],[new Uint8Array([134,183,89,137,98,101,106,165,148]),new Uint8Array([72,187,100,130,157,111,32,75,80]),new Uint8Array([66,102,167,99,74,62,40,234,128]),new Uint8Array([41,53,9,178,241,141,26,8,107]),new Uint8Array([104,79,12,27,217,255,87,17,7]),new Uint8Array([74,43,26,146,73,166,49,23,157]),new Uint8Array([65,38,105,160,51,52,31,115,128]),new Uint8Array([87,68,71,44,114,51,15, -186,23]),new Uint8Array([47,41,14,110,182,183,21,17,194]),new Uint8Array([66,45,25,102,197,189,23,18,22])],[new Uint8Array([88,88,147,150,42,46,45,196,205]),new Uint8Array([43,97,183,117,85,38,35,179,61]),new Uint8Array([39,53,200,87,26,21,43,232,171]),new Uint8Array([56,34,51,104,114,102,29,93,77]),new Uint8Array([107,54,32,26,51,1,81,43,31]),new Uint8Array([39,28,85,171,58,165,90,98,64]),new Uint8Array([34,22,116,206,23,34,43,166,73]),new Uint8Array([68,25,106,22,64,171,36,225,114]),new Uint8Array([34, -19,21,102,132,188,16,76,124]),new Uint8Array([62,18,78,95,85,57,50,48,51])],[new Uint8Array([193,101,35,159,215,111,89,46,111]),new Uint8Array([60,148,31,172,219,228,21,18,111]),new Uint8Array([112,113,77,85,179,255,38,120,114]),new Uint8Array([40,42,1,196,245,209,10,25,109]),new Uint8Array([100,80,8,43,154,1,51,26,71]),new Uint8Array([88,43,29,140,166,213,37,43,154]),new Uint8Array([61,63,30,155,67,45,68,1,209]),new Uint8Array([142,78,78,16,255,128,34,197,171]),new Uint8Array([41,40,5,102,211,183, -4,1,221]),new Uint8Array([51,50,17,168,209,192,23,25,82])],[new Uint8Array([125,98,42,88,104,85,117,175,82]),new Uint8Array([95,84,53,89,128,100,113,101,45]),new Uint8Array([75,79,123,47,51,128,81,171,1]),new Uint8Array([57,17,5,71,102,57,53,41,49]),new Uint8Array([115,21,2,10,102,255,166,23,6]),new Uint8Array([38,33,13,121,57,73,26,1,85]),new Uint8Array([41,10,67,138,77,110,90,47,114]),new Uint8Array([101,29,16,10,85,128,101,196,26]),new Uint8Array([57,18,10,102,102,213,34,20,43]),new Uint8Array([117, -20,15,36,163,128,68,1,26])],[new Uint8Array([138,31,36,171,27,166,38,44,229]),new Uint8Array([67,87,58,169,82,115,26,59,179]),new Uint8Array([63,59,90,180,59,166,93,73,154]),new Uint8Array([40,40,21,116,143,209,34,39,175]),new Uint8Array([57,46,22,24,128,1,54,17,37]),new Uint8Array([47,15,16,183,34,223,49,45,183]),new Uint8Array([46,17,33,183,6,98,15,32,183]),new Uint8Array([65,32,73,115,28,128,23,128,205]),new Uint8Array([40,3,9,115,51,192,18,6,223]),new Uint8Array([87,37,9,115,59,77,64,21,47])], -[new Uint8Array([104,55,44,218,9,54,53,130,226]),new Uint8Array([64,90,70,205,40,41,23,26,57]),new Uint8Array([54,57,112,184,5,41,38,166,213]),new Uint8Array([30,34,26,133,152,116,10,32,134]),new Uint8Array([75,32,12,51,192,255,160,43,51]),new Uint8Array([39,19,53,221,26,114,32,73,255]),new Uint8Array([31,9,65,234,2,15,1,118,73]),new Uint8Array([88,31,35,67,102,85,55,186,85]),new Uint8Array([56,21,23,111,59,205,45,37,192]),new Uint8Array([55,38,70,124,73,102,1,34,98])],[new Uint8Array([102,61,71, -37,34,53,31,243,192]),new Uint8Array([69,60,71,38,73,119,28,222,37]),new Uint8Array([68,45,128,34,1,47,11,245,171]),new Uint8Array([62,17,19,70,146,85,55,62,70]),new Uint8Array([75,15,9,9,64,255,184,119,16]),new Uint8Array([37,43,37,154,100,163,85,160,1]),new Uint8Array([63,9,92,136,28,64,32,201,85]),new Uint8Array([86,6,28,5,64,255,25,248,1]),new Uint8Array([56,8,17,132,137,255,55,116,128]),new Uint8Array([58,15,20,82,135,57,26,121,40])],[new Uint8Array([164,50,31,137,154,133,25,35,218]),new Uint8Array([51, +this.partition_sz=new Int32Array(8)};b.exports.MODE_INFO=h},function(b,c){var a=function(){this.internalStruct=new Int16Array(2);this.as_int=new Uint32Array(this.internalStruct.buffer)};Object.defineProperty(a.prototype,"x",{get:function(){return this.internalStruct[0]},set:function(a){this.internalStruct[0]=a}});Object.defineProperty(a.prototype,"y",{get:function(){return this.internalStruct[1]},set:function(a){this.internalStruct[1]=a}});b.exports=a},function(b,c){function a(a,b,c,d,u){return b+ +d<=a.w&&c+u<=a.h?(a.d_w=d,a.d_h=u,0===(a.fmt&256)?a.img_data_off+(b*a.bps>>3+c*a.stride[0])|0:(d=a.img_data_off,a.fmt&1024&&(a.planes_off[3]=d+b+c*a.stride[3],d+=a.h*a.stride[3]),a.planes_off[0]=d+b+c*a.stride[0],d+=a.h*a.stride[0],a.fmt&512?(a.planes_off[2]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[2],d+=(a.h>>a.y_chroma_shift)*a.stride[2],a.planes_off[1]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[1]):(a.planes_off[1]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[1], +d+=(a.h>>a.y_chroma_shift)*a.stride[1],a.planes_off[2]=d+(b>>a.x_chroma_shift)+(c>>a.y_chroma_shift)*a.stride[2])),0):-1}Uint8ClampedArray.prototype.data_32=null;Uint8Array.prototype.data_32=null;b.exports={};b.exports.vpx_img_set_rect=a;b.exports.img_alloc_helper=function(b,c,t,d,u,z){var e,h,p,v,g;u||(u=1);u&u-1&&console.warn("Invalid stride align");switch(c){case 2:case 9:case 10:case 11:g=32;break;case 1:case 8:g=24;break;case 3:case 12:case 4:case 13:case 5:case 6:case 7:g=16;break;case 258:case 769:case 260:case 771:g= +12;break;default:g=16}switch(c){case 258:case 769:case 260:case 771:p=1;break;default:p=0}switch(c){case 258:case 769:case 260:case 771:v=1;break;default:v=0}e=(1<>3)|0)+u-1&~(u-1)|0;b.img_data=z;null!==z&&(b.img_data=new Uint8Array(0===(c&256)?e*u:e*h*g>>3),b.img_data.data_32=new Uint32Array(b.img_data.buffer),b.img_data_owner=1);b.fmt=c;b.w=h;b.h=e;b.x_chroma_shift=p;b.y_chroma_shift=v;b.bps=g;b.stride[0]=b.stride[3]=u;b.stride[1]=b.stride[2]= +u>>p;if(0===a(b,0,0,t,d))return b};b.exports.vpx_image_t=function(){this.y_chroma_shift=this.x_chroma_shift=this.d_h=this.d_w=this.h=this.w=this.fmt=0;this.planes_off=new Int32Array(4);this.stride=new Int32Array(4);this.user_priv=this.bps=0;this.img_data=null;this.self_allocd=this.img_data_owner=this.img_data_off=0}},function(b,c,a){function e(a){if(a){if(0===a.ref_cnt)throw"ERROR :(";a.ref_cnt--}}function h(a){a.ref_cnt++;return a}var t=a(12).vp8_decode_frame;b.exports={vp8dx_receive_compressed_data:function(a, +b,c,w){t(c,a);1===a.common.copy_arf?(e(a.ref_frames[3]),a.ref_frames[3]=h(a.ref_frames[1])):2===a.common.copy_arf&&(e(a.ref_frames[3]),a.ref_frames[3]=h(a.ref_frames[2]));1===a.common.copy_gf?(e(a.ref_frames[2]),a.ref_frames[2]=h(a.ref_frames[1])):2===a.common.copy_gf&&(e(a.ref_frames[2]),a.ref_frames[2]=h(a.ref_frames[3]));1===a.common.refresh_gf&&(e(a.ref_frames[2]),a.ref_frames[2]=h(a.ref_frames[0]));1===a.common.refresh_arf&&(e(a.ref_frames[3]),a.ref_frames[3]=h(a.ref_frames[0]));1===a.common.refresh_last&& +(e(a.ref_frames[1]),a.ref_frames[1]=h(a.ref_frames[0]))}}},function(b,c,a){function e(a,b,m){var d,k,g,e=1;1===b.enabled&&(e=ia);for(d=0;d=E.y_mode?(U(y.u,y.u_off,y.v,y.v_off,y.uv_stride,J,N,0),L(y.y,y.y_off,y.stride,J,N,0)):P(l,y,N,0,J,h,q);e++;D.y_off+=16;D.u_off+=8;D.v_off+=8}a.common.level&&k&&(a.common.filter_type?w(a,k-1):x(a,k-1,0,a.mb_cols));c===a.mb_cols&&(n=D.y,e=D.y_off+15*D.stride,n[e]=n[e+1]=n[e+2]=n[e+3]=D.y[D.y_off-1+15*D.stride]);++g===a.token_hdr.partitions&&(g=0)}a.common.level&&(a.common.filter_type? +w(a,k-1):x(a,k-1,0,a.mb_cols))}function t(a,b,m,k,f,d){var g=b-1;if(0===d&&f)for(f=b-k,b=0;b>=2;a=a.data_32;m=m|m<<8|m<<16|m<<24;var f=k>>2;for(k=0;k>2)]=m}function z(a,b,m,k){var f,d=a.decoder;a.partitions=1<>1&7;d.show_frame=l>>4&1;r=(l|a[1]<<8|a[2]<<16)>>5;if(c<=r+(d.is_keyframe?10:3))return-1;d.frame_size_updated=0;if(!0===d.is_keyframe){var q=d.Width,P=d.Height,l=d.vert_scale,K=d.horiz_scale;if(157!==a[3]||1!==a[4]||42!==a[5])return-1;var U=a[7];d.Width=(a[6]|U<<8)&16383;d.horiz_scale=U>>6;d.Height=(a[8]|a[9]<<8)&16383;d.vert_scale=a[9]>>6;if(q!==d.Width||P!==d.Height||l!==d.vert_scale||K!==d.horiz_scale)d.frame_size_updated=1}a.ptr+=M;c-=M;!0===d.is_keyframe&&(a.ptr+=ja,c-=ja,b.mb_cols=d.Width+ +15>>4|0,b.mb_rows=d.Height+15>>4|0);N(f,a,a.ptr,r);d.is_keyframe&&f.get_uint(2);l=b.common;if(!0===l.is_keyframe){for(q=0;19>q;q++)l.entropy_hdr.mv_probs[0][q]=k[0][q];for(q=0;19>q;q++)l.entropy_hdr.mv_probs[1][q]=k[1][q];G(l);m(l)}n.enabled=g(f);if(1===n.enabled){n.update_map=g(f);n.update_data=g(f);if(1===n.update_data){n.abs=g(f);for(l=0;ll;l++)1===g(f)?n.tree_probs[l]=f.get_uint(8): +n.tree_probs[l]=255}else n.update_map=0,n.update_data=0;!0===d.is_keyframe&&(d.filter_type=0,d.level=0,d.sharpness=0,d.delta_enabled=0,d.ref_delta[0]=0,d.ref_delta[1]=0,d.ref_delta[2]=0,d.ref_delta[3]=0,d.mode_delta[0]=0,d.mode_delta[1]=0,d.mode_delta[2]=0,d.mode_delta[3]=0);d.filter_type=g(f);d.level=f.get_uint(6);d.sharpness=f.get_uint(3);d.delta_enabled=g(f);l=d.ref_delta;1===d.delta_enabled&&1===g(f)&&(l[0]=f.maybe_get_int(6),l[1]=f.maybe_get_int(6),l[2]=f.maybe_get_int(6),l[3]=f.maybe_get_int(6), +d.mode_delta[0]=f.maybe_get_int(6),d.mode_delta[1]=f.maybe_get_int(6),d.mode_delta[2]=f.maybe_get_int(6),d.mode_delta[3]=f.maybe_get_int(6));z(b.token_hdr,a,a.ptr+r,c-r);c=d.mbmi_qindex;d.mbmi_qindex=f.get_uint(7);c=(c!==d.mbmi_qindex)+0;c|=d.y1dc_delta_q=f.maybe_get_int(4);c|=d.y2dc_delta_q=f.maybe_get_int(4);c|=d.y2ac_delta_q=f.maybe_get_int(4);c|=d.uvdc_delta_q=f.maybe_get_int(4);c|=d.uvac_delta_q=f.maybe_get_int(4);d.delta_update=c;c=d.is_keyframe;d.refresh_gf=!0===c?1:g(f);d.refresh_arf=!0=== +c?1:g(f);d.copy_gf=!0===c?0:d.refresh_gf?0:f.get_uint(2);d.copy_arf=!0===c?0:d.refresh_arf?0:f.get_uint(2);d.sign_bias[J]=!0===c?0:g(f);d.sign_bias[I]=!0===c?0:g(f);d.refresh_entropy_probs=g(f);d.refresh_last=!0===c?1:g(f);0===d.refresh_entropy_probs&&(W(d.saved_entropy,d.entropy_hdr),b.saved_entropy_valid=1);b.modemv_init();c=b.token_hdr.partitions;if(1===d.frame_size_updated){r=400*b.mb_cols;for(l=0;lk&&(k=0); +b=k;a.common.sharpness&&(b>>=49-a.common.sharpness&&(b=9-a.common.sharpness));1>b&&(b=1);l=15<=k?1:0;40<=k&&l++;20<=k&&!a.common.is_keyframe&&l++;d[0]=k;f[0]=b;m[0]=l}function h(a){return l(n(a,0),255)}function t(a,b,d,k){var m=a[b],l=a[b+d];return f(a[b-2*d]-a[b-d])>k||f(l-m)>k}function d(a,b,d,k,m){var l=a[b-4*d],c=a[b-3*d],n=a[b-2*d],g=a[b-d],r=a[b],e=a[b+d],q=a[b+2*d],h=a[b+3*d];k=2*k+m;var P=a[b-(d<<1)],K=a[b+d];return 2*f(a[b-d]-a[b])+(f(P-K)>>1)<=k|0&&f(l-c)<=m&&f(c- +n)<=m&&f(n-g)<=m&&f(h-q)<=m&&f(q-e)<=m&&f(e-r)<=m}function u(a,b,f,k,m,c,g){var r=g<<3;for(g=0;g>7;p=h(p+A);v=h(v-A);A=18*u+63>>7;y=h(y+A);G=h(G-A);A=9*u+63>>7;L=h(L+A);N=h(N-A);e[q-U]=L;e[q-K]=y;e[q-P]=p;e[q]=v;e[q+P]=G;e[q+K]=N}b+=1}}function z(a,b,f,k,m,l,c){var g=c<<3;for(c=0;c>3;c=a(c+(127>3));e=a(e-L);l||(p=L+1>>1,m=a(m+p),h=a(h-p));b[d-k]=m;b[d-f]=c;b[d]=e;b[d+f]=h}function h(a,b,d,l){var f;for(f=0;16>f;f++)1===t(a,b,d,l)&&e(a,b,d,1),b+=1}function t(a,b,d,l){var f=a[b-(d<<1)],k=a[b+d];return(p(a[b-d]-a[b])<<1)+(p(f- +k)>>1)<=l|0}function d(a,b,d,l){var f;for(f=0;16>f;f++)t(a,b,1,l)&&e(a,b,1,1),b+=d}function u(b,d,f,l,c,r,q){var k=q<<3;for(q=0;q>7;y=a(y+x);u=a(u-x);x=18*F+63>>7;p=a(p+x);A=a(A-x);x=9*F+63>>7;h=a(h+x);t=a(t-x);m[n-3]=h;m[n-2]=p;m[n-1]=y;m[n]=u;m[n+1]=A;m[n+2]=t}d+=f}}function z(a,b,d,l,c){var f=a[b-4*d],m=a[b-3*d],k=a[b-2* +d],g=a[b-d],n=a[b],e=a[b+d],h=a[b+2*d],y=a[b+3*d];return t(a,b,d,2*l+c)&&p(f-m)<=c&&p(m-k)<=c&&p(k-g)<=c&&p(y-h)<=c&&p(h-e)<=c&&p(e-n)<=c}function w(a,b,d,c){var f=a[b],m=a[b+d];return p(a[b-2*d]-a[b-d])>c||p(m-f)>c}function x(a,b,d,c,g,r,q){var f=8*q;for(q=0;qf)return P[U+v[f]]=n,++f,F=1;P[U+v[15]]=n;F=12;return 1}function B(b,d){r+=u(a,p[b].probs[d])<f?(++f,G+=x[f]|0,F=2):F=12,z=1);if(1===z)continue;if(1===h(y[G+2],11))continue;if(1===h(y[G+3],8))continue;if(1===h(y[G+6],6))continue;if(1===h(y[G+8],4))continue;if(1===h(y[G+10],3))continue;r=p[10].min_val;q=p[10].length;do B(10,q),q--;while(0<=q);if(1===E(r))continue}if(3===F&&(r=p[9].min_val,B(9,4),B(9,3),B(9,2),B(9,1),B(9,0),1===E(r)))continue; +if(4===F){if(1===h(y[G+9],5))continue;r=p[8].min_val;B(8,3);B(8,2);B(8,1);B(8,0);if(1===E(r))continue}if(5===F&&(r=p[7].min_val,B(7,2),B(7,1),B(7,0),1===E(r)))continue;if(6===F){if(1===h(y[G+7],7))continue;r=p[6].min_val;B(6,1);B(6,0);if(1===E(r))continue}if(7===F&&(r=p[5].min_val,B(5,0),1===E(r)))continue;if(8===F){if(h(y[G+4],10))continue;if(h(y[G+5],9))continue;if(E(4))continue}if(9!==F||!E(3))if(10!==F||!E(2)){if(11===F){e(1);G=N+11;if(15>f){P[U+v[f]]=n;++f;F=1;continue}P[U+v[15]]=n;F=12}if(12=== +F){K=(K|(1>>0;l=(f!=!m)+0;K=(K|l<<31)>>>0;b[t[g]]=c[d[g]]=l;U+=16;g++;if(gd;d++)e[d]=c[d];c=b.mv_probs; +for(d=0;19>d;d++)a.mv_probs[0][d]=c[0][d];for(d=0;19>d;d++)a.mv_probs[1][d]=c[1][d];c=b.y_mode_probs_32;a.y_mode_probs_32[0]=c[0];c=b.uv_mode_probs;a.uv_mode_probs[0]=c[0];a.uv_mode_probs[1]=c[1];a.uv_mode_probs[2]=c[2];a.prob_inter=b.prob_inter;a.prob_last=b.prob_inter;a.prob_gf=b.prob_inter};b.exports.memset=function(a,b,c,t){for(;t--;)a[b+t]=c};b.exports.memset_32=function(a,b,c,t){b>>=2;a=a.data_32;c=c|c<<8|c<<16|c<<24;var d=t>>2;for(t=0;t>2)]=c};b.exports.memcpy=function(a,b,c, +t,d){for(;d--;)a[b+d]=c[t+d];return a}},function(b,c){var a=[new Uint8Array([237,246,253,253,254,254,254,254,254,254,254,254,254,254,250,250,252,254,254]),new Uint8Array([231,243,245,253,254,254,254,254,254,254,254,254,254,254,251,251,254,254,254])],e=[new Uint8Array([162,128,225,146,172,147,214,39,156,128,129,132,75,145,178,206,239,254,254]),new Uint8Array([164,128,204,170,119,235,140,230,228,128,130,130,74,148,180,203,236,254,254])];b.exports={};b.exports.vp8_mv_update_probs=a;b.exports.vp8_default_mv_context= +e},function(b,c,a){var e=a(19).data_64;b.exports={vp8_default_coef_probs:function(a){a.entropy_hdr.coeff_probs.data_64.set(e)}}},function(b,c){var a=new Uint8Array([128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,253,136,254,255,228,219,128,128,128,128,128,189,129,242,255,227,213,255,219,128,128,128,106,126,227,252,214,209,255,255,128,128,128,1,98,248,255,236,226,255,255,128,128,128,181,133,238,254,221,234,255,154, +128,128,128,78,134,202,247,198,180,255,219,128,128,128,1,185,249,255,243,255,128,128,128,128,128,184,150,247,255,236,224,128,128,128,128,128,77,110,216,255,236,230,128,128,128,128,128,1,101,251,255,241,255,128,128,128,128,128,170,139,241,252,236,209,255,255,128,128,128,37,116,196,243,228,255,255,255,128,128,128,1,204,254,255,245,255,128,128,128,128,128,207,160,250,255,238,128,128,128,128,128,128,102,103,231,255,211,171,128,128,128,128,128,1,152,252,255,240,255,128,128,128,128,128,177,135,243,255, +234,225,128,128,128,128,128,80,129,211,255,194,224,128,128,128,128,128,1,1,255,128,128,128,128,128,128,128,128,246,1,255,128,128,128,128,128,128,128,128,255,128,128,128,128,128,128,128,128,128,128,198,35,237,223,193,187,162,160,145,155,62,131,45,198,221,172,176,220,157,252,221,1,68,47,146,208,149,167,221,162,255,223,128,1,149,241,255,221,224,255,255,128,128,128,184,141,234,253,222,220,255,199,128,128,128,81,99,181,242,176,190,249,202,255,255,128,1,129,232,253,214,197,242,196,255,255,128,99,121,210, +250,201,198,255,202,128,128,128,23,91,163,242,170,187,247,210,255,255,128,1,200,246,255,234,255,128,128,128,128,128,109,178,241,255,231,245,255,255,128,128,128,44,130,201,253,205,192,255,255,128,128,128,1,132,239,251,219,209,255,165,128,128,128,94,136,225,251,218,190,255,255,128,128,128,22,100,174,245,186,161,255,199,128,128,128,1,182,249,255,232,235,128,128,128,128,128,124,143,241,255,227,234,128,128,128,128,128,35,77,181,251,193,211,255,205,128,128,128,1,157,247,255,236,231,255,255,128,128,128, +121,141,235,255,225,227,255,255,128,128,128,45,99,188,251,195,217,255,224,128,128,128,1,1,251,255,213,255,128,128,128,128,128,203,1,248,255,255,128,128,128,128,128,128,137,1,177,255,224,255,128,128,128,128,128,253,9,248,251,207,208,255,192,128,128,128,175,13,224,243,193,185,249,198,255,255,128,73,17,171,221,161,179,236,167,255,234,128,1,95,247,253,212,183,255,255,128,128,128,239,90,244,250,211,209,255,255,128,128,128,155,77,195,248,188,195,255,255,128,128,128,1,24,239,251,218,219,255,205,128,128, +128,201,51,219,255,196,186,128,128,128,128,128,69,46,190,239,201,218,255,228,128,128,128,1,191,251,255,255,128,128,128,128,128,128,223,165,249,255,213,255,128,128,128,128,128,141,124,248,255,255,128,128,128,128,128,128,1,16,248,255,255,128,128,128,128,128,128,190,36,230,255,236,255,128,128,128,128,128,149,1,255,128,128,128,128,128,128,128,128,1,226,255,128,128,128,128,128,128,128,128,247,192,255,128,128,128,128,128,128,128,128,240,128,255,128,128,128,128,128,128,128,128,1,134,252,255,255,128,128, +128,128,128,128,213,62,250,255,255,128,128,128,128,128,128,55,93,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,202,24,213,235,186,191,220,160,240,175,255,126,38,182,232,169,184,228,174,255,187,128,61,46,138,219,151,178,240,170,255,216,128,1,112,230,250,199,191,247,159,255,255,128,166,109,228,252,211,215,255,174,128,128,128,39,77,162,232,172,180,245,178,255,255,128,1,52,220,246, +198,199,249,220,255,255,128,124,74,191,243,183,193,250,221,255,255,128,24,71,130,219,154,170,243,182,255,255,128,1,182,225,249,219,240,255,224,128,128,128,149,150,226,252,216,205,255,171,128,128,128,28,108,170,242,183,194,254,223,255,255,128,1,81,230,252,204,203,255,192,128,128,128,123,102,209,247,188,196,255,233,128,128,128,20,95,153,243,164,173,255,203,128,128,128,1,222,248,255,216,213,128,128,128,128,128,168,175,246,252,235,205,255,255,128,128,128,47,116,215,255,211,212,255,255,128,128,128,1,121, +236,253,212,214,255,255,128,128,128,141,84,213,252,201,202,255,219,128,128,128,42,80,160,240,162,185,255,205,128,128,128,1,1,255,128,128,128,128,128,128,128,128,244,1,255,128,128,128,128,128,128,128,128,238,1,255,128,128,128,128,128,128,128,128]);a.data_32=new Uint32Array(a.buffer);a.data_64=new Float64Array(a.buffer);b.exports=a},function(b,c){var a=new Int32Array([4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41, +42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157]),e=new Int32Array([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92, +94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284]),h=Math.min,t=Math.max;b.exports={};b.exports.vp8_dc_quant=function(b,c){b+=c;127b&&(b=0);b=h(t(b,0),127);return a[b]};b.exports.vp8_dc2quant=function(b,c){b+=c;127b&&(b=0);return a[b]<<1};b.exports.vp8_dc_uv_quant=function(b,c){var d;b+=c;127b&& +(b=0);d=a[b];132a&&(a=0);return e[a]};b.exports.vp8_ac2quant=function(a,b){var d;a+=b;127a&&(a=0);d=101581*e[a]>>16;8>d&&(d=8);return d};b.exports.vp8_ac_uv_quant=function(a,b){a+=b;127a&&(a=0);return e[a]}},function(b,c,a){function e(a,b,c,k,e,q,h){var f=a.frame_strg[0].img.img_data,l=a.frame_strg[0].img.img_data_off,m,n,r,p,v,K,t,u,z,B;m=e.mbmi.ref_frame;var w=b.u,x=b.v,H=b.u_off,J=b.v_off;u=q<<4;z=h<< +4;K=a.mb_cols<<4;t=a.mb_rows<<4;r=b.y;p=b.y_off;v=a.ref_frame_offsets[m];n=p+v;var I=e.mbmi.y_mode,E=e.bmi.mvs;v=a.ref_frame_offsets[m];m=a.ref_frame_offsets_[m];for(B=0;16>B;B++)d(r,p,f,l,m,n,b.stride,9!==I?e.mbmi.mv:E[B],a.subpixel_filters,c,k,e,u,z,K,t,B),u+=4,p+=4,n+=4,3===(B&3)&&(u-=16,z+=4,p+=(b.stride<<2)-16,n+=(b.stride<<2)-16);u=q<<4>>1;z=h<<4>>1;K>>=1;t>>=1;q=4*b.uv_stride-8;for(B=0;4>B;B++)d(w,H,f,l,m,H+v,b.uv_stride,g[B],a.subpixel_filters,c,k,e,u,z,K,t,B+16),d(x,J,f,l,m,J+v,b.uv_stride, +g[B],a.subpixel_filters,c,k,e,u,z,K,t,B+20),H+=4,J+=4,u+=4,1===(B&1)&&(u-=8,z+=4,H+=q,J+=q)}function h(a,b,d,c,k){var f,l,m;f=l=m=b.y;var e=b.y_off,n=b.u_off,h=b.v_off,r,p,v=k.mbmi,u=v.y_mode;p=a.ref_frame_offsets[k.mbmi.ref_frame];r=a.ref_frame_offsets_[k.mbmi.ref_frame];var z=b.stride,w=a.subpixel_filters,x=k.bmi.mvs;for(a=0;16>a;a++)t(f,e,r,e+p,z,9!==u?v.mv:x[a],w,d,c,k,a),e+=4,3===(a&3)&&(e+=(b.stride<<2)-16);b=b.uv_stride;for(a=0;4>a;a++)t(l,n,r,n+p,b,g[a],w,d,c,k,a+16),t(m,h,r,h+p,b,g[a],w, +d,c,k,a+20),n+=4,h+=4,1===(a&1)&&(n+=(b<<2)-8,h+=(b<<2)-8)}function t(a,b,d,c,k,g,e,h,p,v,t){v=d;var f;g.as_int[0]?(v=g.x&7,f=g.y&7,c+=(g.y>>3)*k+(g.x>>3),u(a,b,k,d,c,k,4,4,v,f,e),v=a,d=b):d=c;x(a,b,v,d,k,h,p+16*t)}function d(a,b,d,c,k,g,e,h,t,z,w,y,G,A,V,F,ha){G+=h.x>>3;A+=h.y>>3;if(2>G||G+4-1+3>=V||2>A||A+4-1+3>=F){g+=(h.x>>3)+(h.y>>3)*e;y=c;G-=2;A-=2;var f=9;g=g-2-(e<<1)-G-A*e;A>=F?g+=(F-1)*e:0G?-G:0;9V&&(m=G+9-V);9>3)+(h.y>>3)*e)}h.as_int[0]?(d=h.x&7,c=h.y&7,g+=(h.y>>3)*e+(h.x>>3),u(a,b,e,k,g,e,4,4,d,c,t),h=a,t=b):(g+=(h.y>>3)*e+(h.x>>3),h=k,t=g);x(a,b,h,t,e,z,w+16*ha)}c=a(9);var u=a(22).filter_block2d,z=a(23),w=z.vp8_short_inv_walsh4x4_c,x=z.vp8_short_idct4x4llm_c;a=a(16);var p=a.memset,v=a.memcpy,g=[new c,new c,new c,new c],k=new c;b.exports={};b.exports.predict_inter_emulated_edge=e;b.exports.predict_inter= +h;b.exports.vp8_build_inter_predictors_mb=function(a,b,d,c,r,q,p){var f=(3===a.common.version)+0;if(9!==r.mbmi.y_mode){w(d,c+384,c);k.as_int[0]=r.mbmi.mv.as_int[0];if(1===r.mbmi.need_mc_border){var l=k.x,m=k.y;k.x=l+1+(l>>31<<1);k.y=m+1+(m>>31<<1);k.x/=2;k.y/=2}else k.x=k.x+1>>1,k.y=k.y+1>>1;f&&(k.as_int[0]&=4294508536);g[0].as_int[0]=g[1].as_int[0]=g[2].as_int[0]=g[3].as_int[0]=k.as_int[0]}else for(l=r.bmi.mvs,m=0;2>m;++m)for(var n=0;2>n;++n){var v=(m<<3)+(n<<1),t=g[(m<<1)+n],u;u=l[v].x+l[v+1].x+ +l[v+4].x+l[v+5].x;u=0>u?u-4:u+4;t.x=u/8|0;u=l[v].y+l[v+1].y+l[v+4].y+l[v+5].y;u=0>u?u-4:u+4;t.y=u/8|0;1===f&&(t.as_int[0]&=4294508536)}1===r.mbmi.need_mc_border?e(a,b,d,c,r,q,p):h(a,b,d,c,r)}},function(b,c){function a(a,b,d,c,e,g,k,m,f){var l,h,r=f[0]|0,q=f[1]|0,p=f[2]|0,v=f[3]|0,u=f[4]|0,t=f[5]|0;for(f=0;f>=7,0>h?h=0:255>=7,0>h?h=0:255>=7,0>w?w=0:255>=7,0>y?y=0:255>=7,0>q?q=0:255>=7,0>p?p= +0:255b;b++)k=l[n],f=l[n+4],g=l[n+8],m=l[n+12],c=k+m|0,e=f+g|0,g=f-g|0,k=k-m|0,h[r]=c+e,h[r+ +4]=g+k,h[r+8]=c-e,h[r+12]=k-g,n++,r++;l=h;r=n=0;l=l.data_32;for(b=0;4>b;b++)c=l[n>>1],g=c>>16,k=c<<16>>16,c=l[n+2>>1],m=c>>16,f=c<<16>>16,c=k+m,e=g+f,g-=f,k-=m,m=c+e,f=g+k,c-=e,e=k-g,t[r>>1]=m+3>>3&65535|f+3>>3<<16,t[r+2>>1]=c+3>>3&65535|e+3>>3<<16,n+=4,r+=4;for(b=0;16>b;b++)a[d+(b<<4)]=h[b]};b.exports.vp8_short_idct4x4llm_c=function(b,d,c,h,t,g,k){var m,f,l,n,r,q,p=0;for(m=0;4>m;m++){l=g[k];var v=g[k+4],z=g[k+12];n=g[k+8];f=l+n;l-=n;r=35468*v>>16;q=z+(20091*z>>16);n=r-q;r=v+(20091*v>>16);q=35468* +z>>16;r+=q;u[p]=f+r;u[p+12]=f-r;u[p+4]=l+n;u[p+8]=l-n;k++;p++}g=u;k=0;b=b.data_32;for(m=0;4>m;m++)l=g[k],p=g[k+1],n=g[k+2],v=g[k+3],f=l+n,l-=n,r=35468*p>>16,q=v+(20091*v>>16),n=r-q,r=p+(20091*p>>16),q=35468*v>>16,r+=q,q=c[h],v=c[h+1],z=c[h+2],p=c[h+3],q=a(e(q+(f+r+4>>3),0),255),v=a(e(v+(l+n+4>>3),0),255),l=a(e(z+(l-n+4>>3),0),255),f=a(e(p+(f-r+4>>3),0),255),b[d>>2]=q|v<<8|l<<16|f<<24,k+=4,d+=t,h+=t}},function(b,c,a){function e(a,b,d){u(a,b,d,8)}function e(a,b,d){u(a,b,d,8)}function h(a,b,d,c){var e= +b-d|0,f,g,k;for(f=0;f>5;break;case 8:k=k+8>>4;break;case 4:k=k+4>>3}for(g=0;gn;n++)x(a,b,a,b,l,r,q),q+=16,b+=4,n&1&&(b+=g);for(n=20;24>n;n++)x(c,f,c,f,l,r,q),q+=16,f+=4,n&1&&(f+=g)};b.exports.predict_intra_luma=function(a,b,c,e,l,n){if(4=== +e.mbmi.y_mode){var f=b,g=n,k;z(a,f,c);for(k=0;16>k;k++){var m=a,p=f+((k&3)<<2);switch(e.bmi.modes[k]){case 0:d(m,p,c,4);break;case 1:u(m,p,c,4);break;case 2:var v=void 0,N=void 0,y=void 0,G=m,A=p,V=c,F=A-V,ha=G.data_32[F>>2]|0,W=ha&255,B=ha>>8&255,M=ha>>16&255,ja=ha>>24&255;G.data_32[A>>2]=G[F-1]+(W<<1)+B+2>>2|W+(B<<1)+M+2>>2<<8|B+(M<<1)+ja+2>>2<<16|M+(ja<<1)+G[F+4]+2>>2<<24;for(y=1;4>y;y++)for(v=y*V,N=0;4>N;N++)G[A+v+N]=G[A+N];break;case 3:var H=m,J=p,I=c,E=J-1,ia=H.data_32,S=H[E-I]+2*H[E]+H[E+I]+ +2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;E+=I;S=H[E-I]+2*H[E]+H[E+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;J+=I;E+=I;S=H[E-I]+2*H[E]+H[E+I]+2>>2;ia[J>>2]=S|S<<8|S<<16|S<<24;E+=I;S=H[E-I]+2*H[E]+H[E+0]+2>>2;ia[J+I>>2]=S|S<<8|S<<16|S<<24;break;case 4:var sa=void 0,ta=void 0,D=void 0,ga=void 0,ua=void 0,na=m,R=p,O=c,Q=R-O,Hb=na.data_32,C=Hb[Q>>2],Yb=C&255,ea=C>>8&255,ba=C>>16&255,ca=C>>24&255,C=Hb[(Q>>2)+1],da=C&255,Y=C>>8&255,T=C>>16&255,X=C>>24&255,ua=ea+(ba<<1)+ca+2>>2,ga=ba+(ca<<1)+da+2>>2,D=ca+(da<<1)+ +na[Q+5]+2>>2;na.data_32[R>>2]=Yb+(ea<<1)+ba+2>>2|ua<<8|ga<<16|D<<24;R+=O;ta=da+2*Y+T+2>>2;na.data_32[R>>2]=ua|ga<<8|D<<16|ta<<24;R+=O;sa=Y+(T<<1)+X+2>>2;na.data_32[R>>2]=ga|D<<8|ta<<16|sa<<24;na.data_32[R+O>>2]=D|ta<<8|sa<<16|T+2*X+X+2>>2<<24;break;case 5:var Ba=void 0,Fa=void 0,Z=void 0,la=void 0,Ca=void 0,Ra=void 0,Ga=void 0,fa=m,ma=p,va=c,Ha=ma-1,Sa=ma-va,Ta=fa.data_32[Sa>>2],gb=Ta&255,hb=Ta>>8&255,Ib=Ta>>16&255,Jb=fa[Ha],ib=fa[Ha+va],Kb=fa[Ha+2*va],Ga=fa[Ha+0]+2*fa[Sa-1]+gb+2>>2,Ra=fa[Sa-1]+2* +gb+hb+2>>2,Ca=gb+2*hb+Ib+2>>2,la=hb+2*Ib+(Ta>>24&255)+2>>2;fa.data_32[ma>>2]=Ga|Ra<<8|Ca<<16|la<<24;ma+=va;Z=ib+2*Jb+fa[Sa-1]+2>>2;fa.data_32[ma>>2]=Z|Ga<<8|Ra<<16|Ca<<24;ma+=va;Fa=Kb+2*ib+Jb+2>>2;fa.data_32[ma>>2]=Fa|Z<<8|Ga<<16|Ra<<24;Ba=fa[Ha+3*va]+2*Kb+ib+2>>2;fa.data_32[ma+va>>2]=Ba|Fa<<8|Z<<16|Ga<<24;break;case 6:var Lb=void 0,Mb=void 0,Nb=void 0,jb=void 0,kb=void 0,lb=void 0,Ob=void 0,mb=void 0,nb=void 0,ob=void 0,aa=m,oa=p,wa=c,Ia=oa-1,Da=oa-wa,Ua=aa.data_32[Da>>2],Ja=Ua&255,Ka=Ua>>8&255, +Va=Ua>>16&255,Pb=aa[Ia+0],ob=aa[Da-1]+Ja+1>>1,nb=Ja+Ka+1>>1,mb=Ka+Va+1>>1,Ob=Va+(Ua>>24&255)+1>>1;aa.data_32[oa>>2]=ob|nb<<8|mb<<16|Ob<<24;oa+=wa;lb=aa[Ia+0]+2*aa[Da-1]+Ja+2>>2;kb=aa[Da-1]+2*Ja+Ka+2>>2;jb=Ja+2*Ka+Va+2>>2;Nb=Ka+2*Va+aa[Da+3]+2>>2;aa.data_32[oa>>2]=lb|kb<<8|jb<<16|Nb<<24;oa+=wa;Mb=aa[Ia+wa]+2*Pb+aa[Da-1]+2>>2;aa.data_32[oa>>2]=Mb|ob<<8|nb<<16|mb<<24;Lb=aa[Ia+2*wa]+2*aa[Ia+wa]+Pb+2>>2;aa.data_32[oa+wa>>2]=Lb|lb<<8|kb<<16|jb<<24;break;case 7:var Qb=void 0,pb=void 0,qb=void 0,rb=void 0, +sb=void 0,tb=void 0,ub=void 0,pa=m,xa=p,Wa=c,Xa=xa-Wa,ka=pa.data_32[Xa>>2],Rb=ka&255,Ya=ka>>8&255,La=ka>>16&255,Za=ka>>24&255,ka=pa.data_32[(Xa>>2)+1],$a=ka&255,Sb=ka>>8&255,Tb=ka>>16&255,ub=Ya+La+1>>1,tb=La+Za+1>>1,sb=pa[Xa+3]+$a+1>>1;pa.data_32[xa>>2]=Rb+Ya+1>>1|ub<<8|tb<<16|sb<<24;xa+=Wa;rb=Ya+2*La+Za+2>>2;qb=La+2*Za+$a+2>>2;pb=Za+2*$a+pa[Xa+5]+2>>2;pa.data_32[xa>>2]=Rb+2*Ya+La+2>>2|rb<<8|qb<<16|pb<<24;xa+=Wa;pa.data_32[xa>>2]=ub|tb<<8|sb<<16|$a+2*Sb+Tb+2>>2<<24;Qb=Sb+2*Tb+(ka>>24&255)+2>>2;pa.data_32[xa+ +Wa>>2]=rb|qb<<8|pb<<16|Qb<<24;break;case 8:var vb=void 0,wb=void 0,xb=void 0,yb=void 0,Ub=void 0,zb=void 0,Ab=void 0,qa=p,ya=c,ab=qa-1,Ma=qa-ya,Bb=m[Ma-1]|0,Cb=m[Ma]|0,Vb=m[Ma+1]|0,Zb=m[Ma+2]|0,Na=m[ab]|0,Oa=m[ab+ya]|0,bb=m[ab+(ya<<1)]|0,Wb=m[ab+3*ya]|0,cb=m.data_32,Ab=Na+Bb+1>>1,zb=Na+2*Bb+Cb+2>>2,Ub=m[Ma-1]+2*Cb+Vb+2>>2;cb[qa>>2]=Ab|zb<<8|Ub<<16|Cb+(Vb<<1)+Zb+2>>2<<24;qa+=ya;yb=Oa+Na+1>>1;xb=Oa+2*Na+Bb+2>>2;cb[qa>>2]=yb|xb<<8|Ab<<16|zb<<24;qa+=ya;wb=bb+Oa+1>>1;vb=bb+2*Oa+Na+2>>2;cb[qa>>2]=wb|vb<< +8|yb<<16|xb<<24;cb[qa+ya>>2]=Wb+bb+1>>1|Wb+2*bb+Oa+2>>2<<8|wb<<16|vb<<24;break;case 9:var za=void 0,Db=void 0,Eb=void 0,Fb=void 0,Gb=void 0,ra=m,Aa=p,Ea=c,db=Aa-1,Xb=ra[db],eb=ra[db+Ea],Pa=ra[db+2*Ea],Qa=ra[db+3*Ea],Gb=eb+Pa+1>>1,Fb=eb+2*Pa+Qa+2>>2;ra.data_32[Aa>>2]=Xb+eb+1>>1|Xb+2*eb+Pa+2>>2<<8|Gb<<16|Fb<<24;Aa+=Ea;Eb=Pa+Qa+1>>1;Db=Pa+2*Qa+Qa+2>>2;ra.data_32[Aa>>2]=Gb|Fb<<8|Eb<<16|Db<<24;Aa+=Ea;za=Qa;ra.data_32[Aa>>2]=Eb|Db<<8|za<<16|za<<24;ra.data_32[Aa+Ea>>2]=za|za<<8|za<<16|za<<24;break;default:throw"ERROR :("; +}x(m,p,m,p,c,l,g);g+=16;3===(k&3)&&(f+=4*c)}}else{var fb;switch(e.mbmi.y_mode){case 0:d(a,b,c,16);break;case 1:h(a,b,c,16);break;case 2:t(a,b,c,16);break;case 3:u(a,b,c,16)}w(l,n+384,n);for(fb=0;16>fb;fb++)x(a,b,a,b,c,l,n),n+=16,b+=4,3===(fb&3)&&(b+=(c<<2)-16)}}},function(b,c){b.exports={};b.exports.intra_prediction_down_copy=function(a,b,c){b=b+16-c;a=a.data_32;var e=a[b>>2];b+=c<<2;a[b>>2]=e;b+=c<<2;a[b>>2]=e;a[b+(c<<2)>>2]=e}},function(b,c,a){function e(a,b,c){c.enabled&&c.update_map&&(1===L(a, +c.tree_probs[0])?b.mbmi.segment_id=2+L(a,c.tree_probs[2]):b.mbmi.segment_id=L(a,c.tree_probs[1]))}function h(a,b,c,d){a=a.common.mode_info_stride;var e=b[c];e.init_split_mode();var g=e.bmi.modes;e.mbmi.ref_frame=0;var h=e.mbmi,q=y(d,m,n,0);h.y_mode=q;if(4===e.mbmi.y_mode){h=0;e.mbmi.is_4x4=1;do{var t=x(b,c,h,a),r=w(b,c,h),q=h,t=y(d,k,p[t][r],0);g[q]=t}while(16>++h)}b=e.mbmi;d=y(d,f,l,0);b.uv_mode=d}function t(a,b){a.xb.mb_to_right_edge&&(a.x=b.mb_to_right_edge); +a.yb.mb_to_bottom_edge&&(a.y=b.mb_to_bottom_edge)}function d(a,b,c,d,e,f){b+=a.x>>3;c+=a.y>>3;return 2>b>>1||3>e-(b+d)>>1||2>c>>1||3>f-(c+d)>>1}function u(a,b,c,d){b[a.mbmi.ref_frame]^b[c]&&(d.x*=-1,d.y*=-1)}function z(a,b){var c=0;if(L(a,b[0])){var d;for(d=0;3>d;d++)c+=L(a,b[9+d])<n;n++)1===L(m,v[n])&&(p[n]=m.get_uint(8));a.common.entropy_hdr.coeff_skip_enabled=N(m);a.common.entropy_hdr.coeff_skip_prob=1===a.common.entropy_hdr.coeff_skip_enabled?m.get_uint(8):0;if(!1===a.common.is_keyframe){a.common.entropy_hdr.prob_inter=m.get_uint(8);a.common.entropy_hdr.prob_last=m.get_uint(8);a.common.entropy_hdr.prob_gf=m.get_uint(8);1===N(m)&&(a.common.entropy_hdr.y_mode_probs[0]= +m.get_uint(8),a.common.entropy_hdr.y_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[2]=m.get_uint(8),a.common.entropy_hdr.y_mode_probs[3]=m.get_uint(8));1===N(m)&&(a.common.entropy_hdr.uv_mode_probs[0]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[1]=m.get_uint(8),a.common.entropy_hdr.uv_mode_probs[2]=m.get_uint(8));n=a.common.entropy_hdr.mv_probs;for(var r=0;2>r;r++)for(p=0;19>p;p++)if(L(m,G[r][p])){var w=m.get_uint(7);n[r][p]=0M[1]&&(O=M[1],M[1]=M[2],M[2]=O,O=W[1].as_int[0], +W[1].as_int[0]=W[2].as_int[0],W[2].as_int[0]=O);M[1]>=M[0]&&(W[0].as_int[0]=W[1].as_int[0]);w.mbmi.need_mc_border=0;R=-C.mb_to_left_edge-128>>3;Q=-C.mb_to_top_edge-128>>3;O=J.mb_cols<<4;J=J.mb_rows<<4;if(L(x,U[M[0]][0]))if(L(x,U[M[1]][1]))if(L(x,U[M[2]][2]))if(L(x,U[M[3]][3])){w.mbmi.y_mode=9;B[0].as_int[0]=0;B[1].as_int[0]=0;B[2].as_int[0]=0;B[3].as_int[0]=0;I=W[0];t(I,C);C=w;var ca=x,Ba=0,Y=3,x=16;L(ca,110)&&(Y=2,x=4,L(ca,111)&&(Y=L(ca,150),x=2));var X=q[Y],Fa=C.bmi.mvs;do{A.as_int[0]=0;V.as_int[0]= +0;F.as_int[0]=0;for(var Z,T=0;Ba!==X[T];T++);V.as_int[0]=T&3?C.bmi.mvs[T-1].as_int[0]:9===ba.mbmi.y_mode?ba.bmi.mvs[T+3].as_int[0]:ba.mbmi.mv.as_int[0];F.as_int[0]=T>>2?C.bmi.mvs[T-4].as_int[0]:9===da.mbmi.y_mode?da.bmi.mvs[T+12].as_int[0]:da.mbmi.mv.as_int[0];Z=V.as_int[0];var la=F.as_int[0];Z=ha[(0===la)<<2|(0===Z)<<1|Z===la];if(L(ca,Z[0]))if(L(ca,Z[1])){if(L(ca,Z[2])){Z=ca;var la=A,Ca=ea.mv_probs;la.y=z(Z,Ca[0]);la.x=z(Z,Ca[1]);A.x+=I.x;A.y+=I.y}}else A.as_int[0]=F.as_int[0];else A.as_int[0]=V.as_int[0]; +for(;16>T;T++)Ba===X[T]&&(Fa[T].as_int[0]=A.as_int[0])}while(++BaC;C++)if(B[(C>>1&1)+(C>>2&2)].x+=x[C].x,B[(C>>1&1)+(C>>2&2)].y+=x[C].y,d(x[C],R+4*(C&3),Q+(C&-4),4,O,J)){w.mbmi.need_mc_border=1;break}for(C=0;4>C;C++)if(B[C].x+=4+(B[C].x>>28)|0,B[C].y+=4+(B[C].y>>28)|0,B[C].x>>=2,B[C].y>>=2,d(B[C],R+8*(C&1),Q+(C>>1<<3),16,O,J)){w.mbmi.need_mc_border=1;break}}else I=W[0],t(I,C),C=w.mbmi.mv,ea=ea.mv_probs,C.y= +z(x,ea[0]),C.x=z(x,ea[1]),w.mbmi.mv.x+=I.x,w.mbmi.mv.y+=I.y,w.mbmi.y_mode=8;else w.mbmi.mv.as_int[0]=W[2].as_int[0],t(w.mbmi.mv,C),w.mbmi.y_mode=6;else w.mbmi.y_mode=5,w.mbmi.mv.as_int[0]=W[1].as_int[0],t(w.mbmi.mv,C);else w.mbmi.y_mode=7,w.mbmi.mv.as_int[0]=0;d(w.mbmi.mv,R,Q,16,O,J)&&(w.mbmi.need_mc_border=1)}else{J=y(x,P,ea.y_mode_probs,0);if(4===J)for(ba=w.bmi.modes,da=w.bmi.mvs,w=0;16>w;w++)C=y(x,k,K,0),ba[w]=da[w].x=C;R.y_mode=J;R.uv_mode=y(x,f,ea.uv_mode_probs,0);R.mv.x=O[Q].mbmi.mv.y=0;R.ref_frame= +0}}!0!==a.common.is_keyframe&&(H.mb_to_left_edge-=128,H.mb_to_right_edge-=128);r++;n++}}},function(b,c,a){a(9);var e=0,h=1,t=2,d=3,u=4,e=0,h=1,t=2,d=3,u=4;b.exports={};b.exports.left_block_mode=function(a,b,c){if(!(c&3))switch(--b,a[b].mbmi.y_mode){case e:return 0;case h:return 2;case t:return 3;case d:return 1;case u:return a[b].bmi.modes[c+3];default:return 0}return a[b].bmi.modes[c-1]};b.exports.above_block_mode=function(a,b,c,p){if(!(c>>2))switch(b-=p,a[b].mbmi.y_mode){case u:return a[b].bmi.modes[c+ +12];case e:return 0;case h:return 2;case t:return 3;case d:return 1;default:return 0}return a[b].bmi.modes[c-4]}},function(b,c){var a=new Uint8Array([112,86,140,37]),e=[[new Uint8Array([231,120,48,89,115,113,120,152,112]),new Uint8Array([152,179,64,126,170,118,46,70,95]),new Uint8Array([175,69,143,80,85,82,72,155,103]),new Uint8Array([56,58,10,171,218,189,17,13,152]),new Uint8Array([144,71,10,38,171,213,144,34,26]),new Uint8Array([114,26,17,163,44,195,21,10,173]),new Uint8Array([121,24,80,195,26, +62,44,64,85]),new Uint8Array([170,46,55,19,136,160,33,206,71]),new Uint8Array([63,20,8,114,114,208,12,9,226]),new Uint8Array([81,40,11,96,182,84,29,16,36])],[new Uint8Array([134,183,89,137,98,101,106,165,148]),new Uint8Array([72,187,100,130,157,111,32,75,80]),new Uint8Array([66,102,167,99,74,62,40,234,128]),new Uint8Array([41,53,9,178,241,141,26,8,107]),new Uint8Array([104,79,12,27,217,255,87,17,7]),new Uint8Array([74,43,26,146,73,166,49,23,157]),new Uint8Array([65,38,105,160,51,52,31,115,128]),new Uint8Array([87, +68,71,44,114,51,15,186,23]),new Uint8Array([47,41,14,110,182,183,21,17,194]),new Uint8Array([66,45,25,102,197,189,23,18,22])],[new Uint8Array([88,88,147,150,42,46,45,196,205]),new Uint8Array([43,97,183,117,85,38,35,179,61]),new Uint8Array([39,53,200,87,26,21,43,232,171]),new Uint8Array([56,34,51,104,114,102,29,93,77]),new Uint8Array([107,54,32,26,51,1,81,43,31]),new Uint8Array([39,28,85,171,58,165,90,98,64]),new Uint8Array([34,22,116,206,23,34,43,166,73]),new Uint8Array([68,25,106,22,64,171,36,225, +114]),new Uint8Array([34,19,21,102,132,188,16,76,124]),new Uint8Array([62,18,78,95,85,57,50,48,51])],[new Uint8Array([193,101,35,159,215,111,89,46,111]),new Uint8Array([60,148,31,172,219,228,21,18,111]),new Uint8Array([112,113,77,85,179,255,38,120,114]),new Uint8Array([40,42,1,196,245,209,10,25,109]),new Uint8Array([100,80,8,43,154,1,51,26,71]),new Uint8Array([88,43,29,140,166,213,37,43,154]),new Uint8Array([61,63,30,155,67,45,68,1,209]),new Uint8Array([142,78,78,16,255,128,34,197,171]),new Uint8Array([41, +40,5,102,211,183,4,1,221]),new Uint8Array([51,50,17,168,209,192,23,25,82])],[new Uint8Array([125,98,42,88,104,85,117,175,82]),new Uint8Array([95,84,53,89,128,100,113,101,45]),new Uint8Array([75,79,123,47,51,128,81,171,1]),new Uint8Array([57,17,5,71,102,57,53,41,49]),new Uint8Array([115,21,2,10,102,255,166,23,6]),new Uint8Array([38,33,13,121,57,73,26,1,85]),new Uint8Array([41,10,67,138,77,110,90,47,114]),new Uint8Array([101,29,16,10,85,128,101,196,26]),new Uint8Array([57,18,10,102,102,213,34,20,43]), +new Uint8Array([117,20,15,36,163,128,68,1,26])],[new Uint8Array([138,31,36,171,27,166,38,44,229]),new Uint8Array([67,87,58,169,82,115,26,59,179]),new Uint8Array([63,59,90,180,59,166,93,73,154]),new Uint8Array([40,40,21,116,143,209,34,39,175]),new Uint8Array([57,46,22,24,128,1,54,17,37]),new Uint8Array([47,15,16,183,34,223,49,45,183]),new Uint8Array([46,17,33,183,6,98,15,32,183]),new Uint8Array([65,32,73,115,28,128,23,128,205]),new Uint8Array([40,3,9,115,51,192,18,6,223]),new Uint8Array([87,37,9,115, +59,77,64,21,47])],[new Uint8Array([104,55,44,218,9,54,53,130,226]),new Uint8Array([64,90,70,205,40,41,23,26,57]),new Uint8Array([54,57,112,184,5,41,38,166,213]),new Uint8Array([30,34,26,133,152,116,10,32,134]),new Uint8Array([75,32,12,51,192,255,160,43,51]),new Uint8Array([39,19,53,221,26,114,32,73,255]),new Uint8Array([31,9,65,234,2,15,1,118,73]),new Uint8Array([88,31,35,67,102,85,55,186,85]),new Uint8Array([56,21,23,111,59,205,45,37,192]),new Uint8Array([55,38,70,124,73,102,1,34,98])],[new Uint8Array([102, +61,71,37,34,53,31,243,192]),new Uint8Array([69,60,71,38,73,119,28,222,37]),new Uint8Array([68,45,128,34,1,47,11,245,171]),new Uint8Array([62,17,19,70,146,85,55,62,70]),new Uint8Array([75,15,9,9,64,255,184,119,16]),new Uint8Array([37,43,37,154,100,163,85,160,1]),new Uint8Array([63,9,92,136,28,64,32,201,85]),new Uint8Array([86,6,28,5,64,255,25,248,1]),new Uint8Array([56,8,17,132,137,255,55,116,128]),new Uint8Array([58,15,20,82,135,57,26,121,40])],[new Uint8Array([164,50,31,137,154,133,25,35,218]),new Uint8Array([51, 103,44,131,131,123,31,6,158]),new Uint8Array([86,40,64,135,148,224,45,183,128]),new Uint8Array([22,26,17,131,240,154,14,1,209]),new Uint8Array([83,12,13,54,192,255,68,47,28]),new Uint8Array([45,16,21,91,64,222,7,1,197]),new Uint8Array([56,21,39,155,60,138,23,102,213]),new Uint8Array([85,26,85,85,128,128,32,146,171]),new Uint8Array([18,11,7,63,144,171,4,4,246]),new Uint8Array([35,27,10,146,174,171,12,26,128])],[new Uint8Array([190,80,35,99,180,80,126,54,45]),new Uint8Array([85,126,47,87,176,51,41, 20,32]),new Uint8Array([101,75,128,139,118,146,116,128,85]),new Uint8Array([56,41,15,176,236,85,37,9,62]),new Uint8Array([146,36,19,30,171,255,97,27,20]),new Uint8Array([71,30,17,119,118,255,17,18,138]),new Uint8Array([101,38,60,138,55,70,43,26,142]),new Uint8Array([138,45,61,62,219,1,81,188,64]),new Uint8Array([32,41,20,117,151,142,20,21,163]),new Uint8Array([112,19,12,61,195,128,48,4,24])]];b.exports={};b.exports.vp8_kf_bmode_prob=e;b.exports.vp8_ymode_prob=a},function(b,c){var a=new Uint8Array([255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,176,246,255,255,255,255,255,255,255,255,255,223,241,252,255,255,255,255,255,255,255,255,249,253,253,255,255,255,255,255,255,255,255,255,244,252,255,255,255,255,255,255,255,255,234,254,254,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,255,255,255,246,254,255,255,255,255,255,255,255,255,239,253,254,255,255,255,255,255,255,255,255,254,255,254,255,255,255, @@ -121,8 +121,8 @@ case t:return 3;case d:return 1;default:return 0}return a[b].bmi.modes[c-4]}},fu 255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,248,255,255,255,255,255,255,255,255,255,255,250,254,252,254,255,255,255,255,255,255,255,248,254,249,253,255,255,255,255,255,255,255,255,253,253,255,255,255,255,255,255,255,255,246,253,253,255,255,255,255,255,255,255,255,252,254,251,254,254,255,255,255,255,255,255,255,254,252,255,255,255,255,255,255,255,255,248,254,253,255,255,255,255,255,255,255,255,253,255,254, 254,255,255,255,255,255,255,255,255,251,254,255,255,255,255,255,255,255,255,245,251,254,255,255,255,255,255,255,255,255,253,253,254,255,255,255,255,255,255,255,255,255,251,253,255,255,255,255,255,255,255,255,252,253,254,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,252,255,255,255,255,255,255,255,255,255,249,255,254,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,253,255,255,255,255,255,255,255,255,250,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);b.exports=a},function(b,c){var a=new Int32Array([-0,2,-1,4,-2,6,8,12,-3,10,-5,-6,-4,14,-7,16,-8,-9]),e=new Int32Array([-4,2,4,6,-0,-1,-2,-3]),k=new Int32Array([-0,2,4,6,-1,-2,-3,-4]),t=new Int32Array([-0,2,-1,4,-2,-3]),d=new Int32Array([-7,2,-5,4,-6,6,-8,-9]),u=new Int32Array([-10,2,-11,4,-12,-13]),z=new Int32Array([2, -8,4,6,-0,-1,-2,-3,10,12,-4,-5,-6,-7]),w=new Int32Array([-3,2,-2,4,-0,-1]),x=[new Int32Array([0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1]),new Int32Array([0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1]),new Int32Array([0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3]),new Int32Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])],p=[new Int32Array([147,136,18]),new Int32Array([106,145,1]),new Int32Array([179,121,1]),new Int32Array([223,1,34]),new Int32Array([208,1,1])],v=new Uint8Array([110,111,150]),h=new Uint8Array([112,86,140,37]),g=new Uint32Array(h.buffer), -m=new Uint8Array([162,101,204]),f=new Uint8Array([142,114,183]),l=new Uint8Array([145,156,163,128]),n=new Uint8Array([120,90,79,133,87,85,80,111,151]);b.exports={};b.exports.vp8_bmode_tree=a;b.exports.vp8_kf_ymode_tree=e;b.exports.vp8_uv_mode_tree=t;b.exports.vp8_kf_uv_mode_prob=f;b.exports.vp8_kf_ymode_prob=l;b.exports.vp8_uv_mode_prob=m;b.exports.vp8_bmode_prob=n;b.exports.vp8_ymode_prob=h;b.exports.vp8_ymode_tree=k;b.exports.vp8_mbsplit_probs=v;b.exports.vp8_mv_ref_tree=d;b.exports.vp8_sub_mv_ref_tree= -u;b.exports.vp8_small_mvtree=z;b.exports.vp8_mbsplit_tree=w;b.exports.vp8_mbsplits=x;b.exports.vp8_sub_mv_ref_prob2=p;b.exports.vp8_init_mbmode_probs=function(a){a.entropy_hdr.y_mode_probs_32[0]=g[0];a.entropy_hdr.uv_mode_probs[0]=m[0];a.entropy_hdr.uv_mode_probs[1]=m[1];a.entropy_hdr.uv_mode_probs[2]=m[2]}},function(b,c){var a=[new Uint8Array([7,1,1,143]),new Uint8Array([14,18,14,107]),new Uint8Array([135,64,57,68]),new Uint8Array([60,56,128,65]),new Uint8Array([159,134,128,34]),new Uint8Array([234, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);b.exports=a},function(b,c){var a=new Int32Array([-0,2,-1,4,-2,6,8,12,-3,10,-5,-6,-4,14,-7,16,-8,-9]),e=new Int32Array([-4,2,4,6,-0,-1,-2,-3]),h=new Int32Array([-0,2,4,6,-1,-2,-3,-4]),t=new Int32Array([-0,2,-1,4,-2,-3]),d=new Int32Array([-7,2,-5,4,-6,6,-8,-9]),u=new Int32Array([-10,2,-11,4,-12,-13]),z=new Int32Array([2, +8,4,6,-0,-1,-2,-3,10,12,-4,-5,-6,-7]),w=new Int32Array([-3,2,-2,4,-0,-1]),x=[new Int32Array([0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1]),new Int32Array([0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1]),new Int32Array([0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3]),new Int32Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])],p=[new Int32Array([147,136,18]),new Int32Array([106,145,1]),new Int32Array([179,121,1]),new Int32Array([223,1,34]),new Int32Array([208,1,1])],v=new Uint8Array([110,111,150]),g=new Uint8Array([112,86,140,37]),k=new Uint32Array(g.buffer), +m=new Uint8Array([162,101,204]),f=new Uint8Array([142,114,183]),l=new Uint8Array([145,156,163,128]),n=new Uint8Array([120,90,79,133,87,85,80,111,151]);b.exports={};b.exports.vp8_bmode_tree=a;b.exports.vp8_kf_ymode_tree=e;b.exports.vp8_uv_mode_tree=t;b.exports.vp8_kf_uv_mode_prob=f;b.exports.vp8_kf_ymode_prob=l;b.exports.vp8_uv_mode_prob=m;b.exports.vp8_bmode_prob=n;b.exports.vp8_ymode_prob=g;b.exports.vp8_ymode_tree=h;b.exports.vp8_mbsplit_probs=v;b.exports.vp8_mv_ref_tree=d;b.exports.vp8_sub_mv_ref_tree= +u;b.exports.vp8_small_mvtree=z;b.exports.vp8_mbsplit_tree=w;b.exports.vp8_mbsplits=x;b.exports.vp8_sub_mv_ref_prob2=p;b.exports.vp8_init_mbmode_probs=function(a){a.entropy_hdr.y_mode_probs_32[0]=k[0];a.entropy_hdr.uv_mode_probs[0]=m[0];a.entropy_hdr.uv_mode_probs[1]=m[1];a.entropy_hdr.uv_mode_probs[2]=m[2]}},function(b,c){var a=[new Uint8Array([7,1,1,143]),new Uint8Array([14,18,14,107]),new Uint8Array([135,64,57,68]),new Uint8Array([60,56,128,65]),new Uint8Array([159,134,128,34]),new Uint8Array([234, 188,128,28])];b.exports=a},function(b,c,a){var e=a(7).vpx_read;b.exports=function(a,b,c,u){for(var d=0;0<(d=b[d+e(a,c[u+(d>>1)])]););return-d|0}},function(b,c){b.exports={};b.exports.vpx_codec_ctx_t=function(){this.name;this.iface;this.err;this.err_detail;this.config={vpx_codec_dec_cfg:null};this.priv}}]); diff --git a/vp8/common/filter.js b/vp8/common/filter.js index 48a4871..b152a0f 100644 --- a/vp8/common/filter.js +++ b/vp8/common/filter.js @@ -350,7 +350,7 @@ function filter_block(return_off, //reference_off += ((mv_.y >> 3) * stride) + (mv_.x >> 3); - if (mv_.as_int) + if (mv_.as_int[0]) { filter_block2d(output, output_off, stride, reference, reference_off, stride, 4, 4, mv_.x & 7, mv_.y & 7, filters); diff --git a/vp8/common/mv.js b/vp8/common/mv.js index d33b0ba..82779f5 100644 --- a/vp8/common/mv.js +++ b/vp8/common/mv.js @@ -4,7 +4,7 @@ class MotionVector { constructor() { this.internalStruct = new Int16Array(2); - this.internalStruct32 = new Uint32Array(this.internalStruct.buffer); + this.as_int = new Uint32Array(this.internalStruct.buffer); } } @@ -27,13 +27,4 @@ Object.defineProperty(MotionVector.prototype, 'y', { } }); -Object.defineProperty(MotionVector.prototype, 'as_int', { - get: function () { - return this.internalStruct32[0]; - }, - set: function (as_int) { - this.internalStruct32[0] = as_int; - } -}); - module.exports = MotionVector; \ No newline at end of file diff --git a/vp8/common/reconinter.js b/vp8/common/reconinter.js index c70eb87..d4428dc 100644 --- a/vp8/common/reconinter.js +++ b/vp8/common/reconinter.js @@ -177,7 +177,7 @@ function build_4x4uvmvs(mbi, full_pixel) { chroma_mv_cache.y = (temp / 8) | 0; if (full_pixel === 1) { - chroma_mv_cache.as_int &= 0xFFF8FFF8; + chroma_mv_cache.as_int[0] &= 0xFFF8FFF8; } @@ -316,7 +316,7 @@ function recon_1_block(output, output_off, reference, reference_off, stride, mv, var predict_off = reference_off; var mx = 0, my = 0; - if (mv.as_int) { + if (mv.as_int[0]) { mx = mv.x & 7; my = mv.y & 7; @@ -371,7 +371,7 @@ function recon_1_edge_block(output, output_off, - if (mv_.as_int) { + if (mv_.as_int[0]) { mx = mv_.x & 7; my = mv_.y & 7; @@ -408,7 +408,7 @@ function vp8_build_inter16x16_predictors_mb(mbi, full_pixel) { var mbmi_cache = mbi.mbmi; - uvmv.as_int = mbmi_cache.mv.as_int; + uvmv.as_int[0] = mbmi_cache.mv.as_int[0]; if (mbi.mbmi.need_mc_border === 1) { var x = uvmv.x; @@ -424,13 +424,13 @@ function vp8_build_inter16x16_predictors_mb(mbi, full_pixel) { } if (full_pixel) { - uvmv.as_int &= 0xFFF8FFF8; + uvmv.as_int[0] &= 0xFFF8FFF8; } - chroma_mv[0].as_int = - chroma_mv[1].as_int = - chroma_mv[2].as_int = - chroma_mv[3].as_int = uvmv.as_int; + chroma_mv[0].as_int[0] = + chroma_mv[1].as_int[0] = + chroma_mv[2].as_int[0] = + chroma_mv[3].as_int[0] = uvmv.as_int[0]; } diff --git a/vp8/common/vp8_loopfilter.js b/vp8/common/vp8_loopfilter.js index 85f96ea..781c050 100644 --- a/vp8/common/vp8_loopfilter.js +++ b/vp8/common/vp8_loopfilter.js @@ -57,9 +57,9 @@ function vp8_loop_filter_row_simple(ctx, row) { for (col = 0; col < ctx.mb_cols; col++) { - /* TODO: only need to recalculate every MB if segmentation is - * enabled. - */ + // TODO: only need to recalculate every MB if segmentation is + // enabled. + calculate_filter_parameters(ctx, mbi[mbi_off], edge_limit, interior_limit, hev_threshold); @@ -80,11 +80,11 @@ function vp8_loop_filter_row_simple(ctx, row) { { //vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c vp8_loop_filter_bvs_c(y, y_off, stride, b_limit); - /* - filter_v_edge_simple(y, y_off + 4, stride, b_limit); - filter_v_edge_simple(y, y_off + 8, stride, b_limit); - filter_v_edge_simple(y, y_off + 12, stride, b_limit); - */ + + //filter_v_edge_simple(y, y_off + 4, stride, b_limit); + //filter_v_edge_simple(y, y_off + 8, stride, b_limit); + //filter_v_edge_simple(y, y_off + 12, stride, b_limit); + } if (row > 0) @@ -133,9 +133,9 @@ function vp8_loop_filter_row_normal(ctx, row, start_col, num_cols) { { //var edge_limit = [0], interior_limit = [0], hev_threshold = [0]; var edge_limit = edge_limit_cache, interior_limit = interior_limit_cache, hev_threshold = hev_threshold_cache; - /* TODO: only need to recalculate every MB if segmentation is - * enabled. - */ + // TODO: only need to recalculate every MB if segmentation is + // enabled. + calculate_filter_parameters(ctx, mbi[mbi_off], edge_limit, interior_limit, hev_threshold); edge_limit = edge_limit[0], interior_limit = interior_limit[0], hev_threshold = hev_threshold[0]; @@ -196,6 +196,7 @@ function vp8_loop_filter_row_normal(ctx, row, start_col, num_cols) { v_off += 8; mbi_off++; } + } function calculate_filter_parameters(ctx, diff --git a/vp8/decoder/decodemv.js b/vp8/decoder/decodemv.js index a87641c..8fd32ff 100644 --- a/vp8/decoder/decodemv.js +++ b/vp8/decoder/decodemv.js @@ -224,9 +224,9 @@ function decode_split_mv(mi, left_mb, above_mb, hdr, best_mv, bool) { do { - blockmv.as_int = 0; - left_mv.as_int = 0; - above_mv.as_int = 0; + blockmv.as_int[0] = 0; + left_mv.as_int[0] = 0; + above_mv.as_int[0] = 0; var subblock_mode;//='prediction_mode' @@ -239,49 +239,49 @@ function decode_split_mv(mi, left_mb, above_mb, hdr, best_mv, bool) { /* Decode the next MV */ if (!(k & 3)) { if (left_mb.mbmi.y_mode === SPLITMV){ - left_mv.as_int = left_mb.bmi.mvs[k + 3].as_int; + left_mv.as_int[0] = left_mb.bmi.mvs[k + 3].as_int[0]; }else{ - left_mv.as_int = left_mb.mbmi.mv.as_int; + left_mv.as_int[0] = left_mb.mbmi.mv.as_int[0]; } } else { - left_mv.as_int = mi.bmi.mvs[k - 1].as_int; + left_mv.as_int[0] = mi.bmi.mvs[k - 1].as_int[0]; } if (!(k >> 2)) { if (above_mb.mbmi.y_mode === SPLITMV) { - above_mv.as_int = above_mb.bmi.mvs[k + 12].as_int; + above_mv.as_int[0] = above_mb.bmi.mvs[k + 12].as_int[0]; } else { - above_mv.as_int = above_mb.mbmi.mv.as_int; + above_mv.as_int[0] = above_mb.mbmi.mv.as_int[0]; } } else { - above_mv.as_int = mi.bmi.mvs[k - 4].as_int; + above_mv.as_int[0] = mi.bmi.mvs[k - 4].as_int[0]; } - prob = get_sub_mv_ref_prob(left_mv.as_int, above_mv.as_int); + prob = get_sub_mv_ref_prob(left_mv.as_int[0], above_mv.as_int[0]); if (vpx_read(bool, prob[0])) { if (vpx_read(bool, prob[1])) { - //blockmv.as_int = 0; + //blockmv.as_int[0] = 0; if (vpx_read(bool, prob[2])) { read_mv(bool, blockmv, hdr.mv_probs); blockmv.x = (blockmv.x + best_mv.x); blockmv.y = (blockmv.y + best_mv.y); } } else { - blockmv.as_int = above_mv.as_int; + blockmv.as_int[0] = above_mv.as_int[0]; } } else { - blockmv.as_int = left_mv.as_int; + blockmv.as_int[0] = left_mv.as_int[0]; } var fill_count = mbsplit_fill_count[s]; /* Fill the MV's for this partition */ for (; k < 16; k++) if (j === partition[k]) { - mvs[k].as_int = blockmv.as_int; + mvs[k].as_int[0] = blockmv.as_int[0]; } @@ -427,7 +427,7 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { var cntx_off = 0; /* Zero accumulators */ - nmv[0].as_int = nmv[1].as_int = nmv[2].as_int = 0; + nmv[0].as_int[0] = nmv[1].as_int[0] = nmv[2].as_int[0] = 0; cnt[0] = cnt[1] = cnt[2] = cnt[3] = 0; @@ -435,8 +435,8 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { var aboveleft_ = mi[aboveleft_off]; /* Process above */ if (above.mbmi.ref_frame !== INTRA_FRAME) { - if (above.mbmi.mv.as_int) { - nmv[++mv_off].as_int = above.mbmi.mv.as_int; + if (above.mbmi.mv.as_int[0]) { + nmv[++mv_off].as_int[0] = above.mbmi.mv.as_int[0]; mv_bias(above, sign_bias, this_.mbmi.ref_frame, nmv[mv_off]); ++cntx_off; @@ -446,14 +446,14 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { /* Process left */ if (left_.mbmi.ref_frame !== INTRA_FRAME) { - if (left_.mbmi.mv.as_int) { + if (left_.mbmi.mv.as_int[0]) { var this_mv = this_mv_tmp; - this_mv.as_int = left_.mbmi.mv.as_int; + this_mv.as_int[0] = left_.mbmi.mv.as_int[0]; mv_bias(left_, sign_bias, this_.mbmi.ref_frame, this_mv); - if (this_mv.as_int !== nmv[mv_off].as_int) { - nmv[++mv_off].as_int = this_mv.as_int; + if (this_mv.as_int[0] !== nmv[mv_off].as_int[0]) { + nmv[++mv_off].as_int[0] = this_mv.as_int[0]; ++cntx_off; } cntx[cntx_off] += 2; @@ -464,15 +464,15 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { /* Process above left */ if (aboveleft_.mbmi.ref_frame !== INTRA_FRAME) { - if (aboveleft_.mbmi.mv.as_int) { + if (aboveleft_.mbmi.mv.as_int[0]) { var this_mv = this_mv_tmp; - this_mv.as_int = aboveleft_.mbmi.mv.as_int; + this_mv.as_int[0] = aboveleft_.mbmi.mv.as_int[0]; mv_bias(aboveleft_, sign_bias, this_.mbmi.ref_frame, this_mv); - if (this_mv.as_int !== nmv[mv_off].as_int) { - nmv[(++mv_off)].as_int = this_mv.as_int; + if (this_mv.as_int[0] !== nmv[mv_off].as_int[0]) { + nmv[(++mv_off)].as_int[0] = this_mv.as_int[0]; ++cntx_off; } @@ -484,7 +484,7 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { /* If we have three distinct MV's ... */ if (cnt[CNT_SPLITMV]) { /* See if above-left MV can be merged with NEAREST */ - if (nmv[mv_off].as_int === near_mvs[CNT_NEAREST].as_int)//.raw + if (nmv[mv_off].as_int[0] === near_mvs[CNT_NEAREST].as_int[0])//.raw cnt[CNT_NEAREST] += 1; } @@ -498,9 +498,9 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { tmp = cnt[CNT_NEAREST]; cnt[CNT_NEAREST] = cnt[CNT_NEAR]; cnt[CNT_NEAR] = tmp; - tmp = near_mvs[CNT_NEAREST].as_int; - near_mvs[CNT_NEAREST].as_int = near_mvs[CNT_NEAR].as_int; - near_mvs[CNT_NEAR].as_int = tmp; + tmp = near_mvs[CNT_NEAREST].as_int[0]; + near_mvs[CNT_NEAREST].as_int[0] = near_mvs[CNT_NEAR].as_int[0]; + near_mvs[CNT_NEAR].as_int[0] = tmp; } var near_index; @@ -508,7 +508,7 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { * storage shares the same address as near_mvs[CNT_ZEROZERO]. */ if (cnt[CNT_NEAREST] >= cnt[CNT_BEST]) { - near_mvs[CNT_BEST].as_int = near_mvs[CNT_NEAREST].as_int; + near_mvs[CNT_BEST].as_int[0] = near_mvs[CNT_NEAREST].as_int[0]; //near_mvs[CNT_BEST].y = near_mvs[CNT_NEAREST].y; } @@ -536,10 +536,10 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { //Reset, dont redeclare - chroma_mv[0].as_int = 0; - chroma_mv[1].as_int = 0; - chroma_mv[2].as_int = 0; - chroma_mv[3].as_int = 0; + chroma_mv[0].as_int[0] = 0; + chroma_mv[1].as_int[0] = 0; + chroma_mv[2].as_int[0] = 0; + chroma_mv[3].as_int[0] = 0; //clamped_best_mv = clamp_mv(near_mvs[BEST], bounds); @@ -549,7 +549,7 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { decode_split_mv(this_, left_, above, hdr, clamped_best_mv, bool);//&clamped_best_mv - this_.mbmi.mv.as_int = this_.bmi.mvs[15].as_int; + this_.mbmi.mv.as_int[0] = this_.bmi.mvs[15].as_int[0]; var this_mvs = this_.bmi.mvs; for (b = 0; b < 16; b++) { @@ -595,20 +595,20 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { } } else { //nearmv - this_.mbmi.mv.as_int = near_mvs[NEAR].as_int; + this_.mbmi.mv.as_int[0] = near_mvs[NEAR].as_int[0]; vp8_clamp_mv2(this_.mbmi.mv, bounds); this_.mbmi.y_mode = NEARMV; } } else { this_.mbmi.y_mode = NEARESTMV; - this_.mbmi.mv.as_int = near_mvs[NEAREST].as_int; + this_.mbmi.mv.as_int[0] = near_mvs[NEAREST].as_int[0]; vp8_clamp_mv2(this_.mbmi.mv, bounds); } } else { this_.mbmi.y_mode = ZEROMV; - this_.mbmi.mv.as_int = 0; + this_.mbmi.mv.as_int[0] = 0; }