diff --git a/builds/jsvpx.js b/builds/jsvpx.js index d55f4b6..be91116 100644 --- a/builds/jsvpx.js +++ b/builds/jsvpx.js @@ -1,126 +1,128 @@ (function(a){function e(b){if(c[b])return c[b].exports;var f=c[b]={exports:{},id:b,loaded:!1};a[b].call(f.exports,f,f.exports,e);f.loaded=!0;return f.exports}var c={};e.m=a;e.c=c;e.p="";return e(0)})([function(a,e,c){a.exports=c(1)},function(a,e,c){var b=c(2),f=c(33).vpx_codec_ctx_t;e=function(){this.iface=b.ifaces[0].iface;this.decoder=new f;b.vpx_codec_dec_init(this.decoder,this.iface,null,null)};e.prototype.decode=function(f){f=new Uint8Array(f);b.vpx_codec_decode(this.decoder,f,f.length,void 0, void 0);if(f=b.vpx_codec_get_frame(this.decoder,null))return f};window&&(window.JsVpx=e);a.exports=e},function(a,e,c){function b(f,b,d,c,a){f.iface=b;f.name=b.name;f.priv=null;f.init_flags=c;f.config.dec=d;f.iface.init(f,null)}e=[{name:"jsvp8",iface:c(3)}];a.exports={ifaces:e,vpx_codec_dec_init:function(f,c,d,a){return b(f,c,d,a,4)},vpx_codec_dec_init_ver:b,vpx_codec_peek_stream_info:function(){},vpx_codec_get_stream_info:function(){},vpx_codec_decode:function(f,b,d,c,a){f.iface.dec.decode(f.priv, -b,d,c,a)},vpx_codec_get_frame:function(f,b){return f.iface.dec.get_frame(f,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,c){var b=c(4),f=c(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,c,a,e,t){d.temp_pbi||(e=new b,d.temp_pbi=e);f(d.temp_pbi,a,c,t);return 0},get_frame:function(d,b){return d.priv.temp_pbi.common.show_frame?d.priv.temp_pbi.ref_frames[0].img:null}},init:function(d,b){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,c){var b=c(5),f=c(6).BOOL_DECODER;e=c(8);var t=e.MACROBLOCKD,d=e.FRAGMENT_DATA,x=e.MODE_INFO,u=c(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])]},r=function(){this.bool=new f;this.left_token_entropy_ctx=new Int32Array(9);this.coeffs=0};c=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 b;this.boolDecoder=new f;this.segment_hdr=new t(this);this.token_hdr=new d(this);this.tokens=Array(8);for(var c=0;8>c;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;lc;c++)this.tokens[c]=new t;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,k;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 l=d*f;this.mb_info_storage=Array(l);for(k=0;k>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, -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])]];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, -255,255,255,250,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,186,251,250,255,255,255,255,255,255,255,255,234,251,244,254,255,255,255,255,255,255,255,251,251,243,253,254,255,254,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,236,253,254,255,255,255,255,255,255,255,255,251,253,253,254,254,255,255,255,255,255,255,255,254, -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=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}}]); +(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,r,t,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:t=1;break;default:t=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*r*h>>3),b.img_data.data_32=new Uint32Array(b.img_data.buffer),b.img_data_owner=1);b.fmt=a;b.w=r;b.h=f;b.x_chroma_shift=t;b.y_chroma_shift=w;b.bps=h;b.stride[0]=b.stride[3]=x;b.stride[1]=b.stride[2]= +x>>t;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 r=c(12).vp8_decode_frame;a.exports={vp8dx_receive_compressed_data:function(d, +c,a,e){r(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,c,d){var l,k,a,f=1;1===c.enabled&&(f=ia);for(l=0;l=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);h++;C.y_off+=16;C.u_off+=8;C.v_off+=8}b.common.level&&g&&(b.common.filter_type?v(b,g-1):y(b,g-1,0,b.mb_cols));m===b.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]);++a===b.token_hdr.partitions&&(a=0)}b.common.level&&(b.common.filter_type? +v(b,g-1):y(b,g-1,0,b.mb_cols))}function r(b,l,c,d,g,k){var a=l-1;if(0===k&&g)for(g=l-d,l=0;l>=2;b=b.data_32;d=d|d<<8|d<<16|d<<24;var c=g>>2;for(g=0;g>2)]=d}function u(b,l,d,g){var c,k=b.decoder;b.partitions=1<>1&7;a.show_frame=n>>4&1;q=(n|c[1]<<8|c[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!==c[3]||1!==c[4]||42!==c[5])return-1;var U=c[7];a.Width=(c[6]|U<<8)&16383;a.horiz_scale=U>>6;a.Height=(c[8]|c[9]<<8)&16383;a.vert_scale=c[9]>>6;if(e!==a.Width||P!==a.Height||n!==a.vert_scale||K!==a.horiz_scale)a.frame_size_updated=1}c.ptr+=M;p-=M;!0===a.is_keyframe&&(c.ptr+=ja,p-=ja,d.mb_cols=a.Width+ +15>>4|0,d.mb_rows=a.Height+15>>4|0);N(g,c,c.ptr,q);a.is_keyframe&&g.get_uint(2);n=d.common;if(!0===n.is_keyframe){for(e=0;19>e;e++)n.entropy_hdr.mv_probs[0][e]=k[0][e];for(e=0;19>e;e++)n.entropy_hdr.mv_probs[1][e]=k[1][e];F(n);l(n)}m.enabled=h(g);if(1===m.enabled){m.update_map=h(g);m.update_data=h(g);if(1===m.update_data){m.abs=h(g);for(n=0;nn;n++)1===h(g)?m.tree_probs[n]=g.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=h(g);a.level=g.get_uint(6);a.sharpness=g.get_uint(3);a.delta_enabled=h(g);n=a.ref_delta;1===a.delta_enabled&&1===h(g)&&(n[0]=g.maybe_get_int(6),n[1]=g.maybe_get_int(6),n[2]=g.maybe_get_int(6),n[3]=g.maybe_get_int(6), +a.mode_delta[0]=g.maybe_get_int(6),a.mode_delta[1]=g.maybe_get_int(6),a.mode_delta[2]=g.maybe_get_int(6),a.mode_delta[3]=g.maybe_get_int(6));u(d.token_hdr,c,c.ptr+q,p-q);p=a.mbmi_qindex;a.mbmi_qindex=g.get_uint(7);p=(p!==a.mbmi_qindex)+0;p|=a.y1dc_delta_q=g.maybe_get_int(4);p|=a.y2dc_delta_q=g.maybe_get_int(4);p|=a.y2ac_delta_q=g.maybe_get_int(4);p|=a.uvdc_delta_q=g.maybe_get_int(4);p|=a.uvac_delta_q=g.maybe_get_int(4);a.delta_update=p;p=a.is_keyframe;a.refresh_gf=!0===p?1:h(g);a.refresh_arf=!0=== +p?1:h(g);a.copy_gf=!0===p?0:a.refresh_gf?0:g.get_uint(2);a.copy_arf=!0===p?0:a.refresh_arf?0:g.get_uint(2);a.sign_bias[J]=!0===p?0:h(g);a.sign_bias[I]=!0===p?0:h(g);a.refresh_entropy_probs=h(g);a.refresh_last=!0===p?1:h(g);0===a.refresh_entropy_probs&&(X(a.saved_entropy,a.entropy_hdr),d.saved_entropy_valid=1);d.modemv_init();p=d.token_hdr.partitions;if(1===a.frame_size_updated){q=400*d.mb_cols;for(n=0;nl&&(l=0); +b=l;a.common.sharpness&&(b>>=49-a.common.sharpness&&(b=9-a.common.sharpness));1>b&&(b=1);k=15<=l?1:0;40<=l&&k++;20<=l&&!a.common.is_keyframe&&k++;d[0]=l;g[0]=b;c[0]=k}function f(a){return q(m(a,0),255)}function r(a,b,d,l){var c=a[b],k=a[b+d];return g(a[b-2*d]-a[b-d])>l||g(k-c)>l}function d(a,b,d,l,c){var k=a[b-4*d],n=a[b-3*d],p=a[b-2*d],m=a[b-d],f=a[b],h=a[b+d],q=a[b+2*d],e=a[b+3*d];l=2*l+c;var P=a[b-(d<<1)],K=a[b+d];return 2*g(a[b-d]-a[b])+(g(P-K)>>1)<=l|0&&g(k-n)<=c&&g(n- +p)<=c&&g(p-m)<=c&&g(e-q)<=c&&g(q-h)<=c&&g(h-f)<=c}function x(a,b,g,l,c,k,n){var p=n<<3;for(n=0;n>7;t=f(t+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]=t;h[e]=F;h[e+P]=N;h[e+K]=w}b+=1}}function u(a,b,g,l,c,k,n){var p=n<<3;for(n=0;n>3;n=c(n+(127>3));k=c(k-t);f||(q=t+1>>1,l=c(l+q),e=c(e-q));a[b-g]=l;a[b-d]=n;a[b]=k;a[b+d]=e}function f(a,d,g,c){var l;for(l=0;16>l;l++)1===r(a,d,g,c)&&b(a,d,g,1),d+=1}function r(a,b,d,c){var g=a[b-(d<<1)],l=a[b+d];return(t(a[b-d]-a[b])<<1)+(t(g- +l)>>1)<=c|0}function d(a,d,g,c){var l;for(l=0;16>l;l++)r(a,d,1,c)&&b(a,d,1,1),d+=g}function x(a,d,g,f,m,p,n){var l=n<<3;for(n=0;n>7;r=c(r+V);x=c(x-V);V=18*E+63>>7;t=c(t+V);G=c(G-V);V=9*E+63>>7;q=c(q+V);y=c(y-V);k[e-3]=q;k[e-2]=t;k[e-1]=r;k[e]=x;k[e+1]=G;k[e+2]=y}d+=g}}function u(a,b,d,c,f){var g=a[b-4*d],l=a[b-3*d],k=a[b-2* +d],e=a[b-d],h=a[b],m=a[b+d],q=a[b+2*d],w=a[b+3*d];return r(a,b,d,2*c+f)&&t(g-l)<=f&&t(l-k)<=f&&t(k-e)<=f&&t(w-q)<=f&&t(q-m)<=f&&t(m-h)<=f}function v(a,b,d,c){var g=a[b],l=a[b+d];return t(a[b-2*d]-a[b-d])>c||t(l-g)>c}function y(a,d,c,f,e,h,n){var g=8*n;for(n=0;ng)return P[U+w[g]]=m,++g,E=1;P[U+w[15]]=m;E=12;return 1}function z(b,d){p+=x(a,t[b].probs[d])<g?(++g,F+=y[g]|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=t[10].min_val;n=t[10].length;do z(10,n),n--;while(0<=n);if(1===D(p))continue}if(3===E&&(p=t[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=t[8].min_val;z(8,3);z(8,2);z(8,1);z(8,0);if(1===D(p))continue}if(5===E&&(p=t[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=t[6].min_val;z(6,1);z(6,0);if(1===D(p))continue}if(7===E&&(p=t[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>g){P[U+w[g]]=m;++g;E=1;continue}P[U+w[15]]=m;E=12}if(12=== +E){K=(K|(1>>0;q=(g!=!l)+0;K=(K|q<<31)>>>0;c[r[h]]=e[d[h]]=q;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};a.exports.memset=function(a,b,e,r){for(;r--;)a[b+r]=e};a.exports.memset_32=function(a,b,e,r){b>>=2;a=a.data_32;e=e|e<<8|e<<16|e<<24;var d=r>>2;for(r=0;r>2)]=e};a.exports.memcpy=function(a,b,e, +r,d){for(;d--;)a[b+d]=e[r+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,r=Math.max;a.exports={};a.exports.vp8_dc_quant=function(a,b){a+=b;127a&&(a=0);a=f(r(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,k){var g=a.frame_strg[0].img.img_data,l=a.frame_strg[0].img.img_data_off,m,p,q,t,w,r,K,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=k<< +4;r=a.mb_cols<<4;K=a.mb_rows<<4;q=b.y;t=b.y_off;w=a.ref_frame_offsets[m];p=t+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,t,g,l,m,p,b.stride,9!==I?f.mbmi.mv:D[z],a.subpixel_filters,c,e,f,u,x,r,K,z),u+=4,t+=4,p+=4,3===(z&3)&&(u-=16,x+=4,t+=(b.stride<<2)-16,p+=(b.stride<<2)-16);u=n<<4>>1;x=k<<4>>1;r>>=1;K>>=1;n=4*b.uv_stride-8;for(z=0;4>z;z++)d(v,H,g,l,m,H+w,b.uv_stride,h[z],a.subpixel_filters,c,e,f,u,x,r,K,z+16),d(y,J,g,l,m,J+w,b.uv_stride, +h[z],a.subpixel_filters,c,e,f,u,x,r,K,z+20),H+=4,J+=4,u+=4,1===(z&1)&&(u-=8,x+=4,H+=n,J+=n)}function f(a,b,d,c,e){var g,l,f;g=l=f=b.y;var k=b.y_off,m=b.u_off,p=b.v_off,q,t,w=e.mbmi,u=w.y_mode;t=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++)r(g,k,q,k+t,x,9!==u?w.mv:y[a],v,d,c,e,a),k+=4,3===(a&3)&&(k+=(b.stride<<2)-16);b=b.uv_stride;for(a=0;4>a;a++)r(l,m,q,m+t,b,h[a],v,d,c,e,a+16),r(f,p,q,p+t,b,h[a],v, +d,c,e,a+20),m+=4,p+=4,1===(a&1)&&(m+=(b<<2)-8,p+=(b<<2)-8)}function r(a,b,d,c,e,h,f,k,t,w,r){w=d;var g;h.as_int[0]?(w=h.as_row_col[0]&7,g=h.as_row_col[1]&7,c+=(h.as_row_col[1]>>3)*e+(h.as_row_col[0]>>3),x(a,b,e,d,c,e,4,4,w,g,f),w=a,d=b):d=c;y(a,b,w,d,e,k,t+16*r)}function d(a,b,d,c,e,h,f,k,r,u,v,A,F,G,W,E,V){F+=k.as_row_col[0]>>3;G+=k.as_row_col[1]>>3;if(2>F||F+4-1+3>=W||2>G||G+4-1+3>=E){h+=(k.as_row_col[0]>>3)+(k.as_row_col[1]>>3)*f;A=c;F-=2;G-=2;var g=9;h=h-2-(f<<1)-F-G*f;G>=E?h+=(E-1)*f:0F?-F:0;9W&&(n=F+9-W);9>3)+(k.as_row_col[1]>>3)*f)}k.as_int[0]?(d=k.as_row_col[0]&7,c=k.as_row_col[1]&7,h+=(k.as_row_col[1]>>3)*f+(k.as_row_col[0]>>3),x(a,b,f,e,h,f,4,4,d,c,r),k=a,r=b):(h+=(k.as_row_col[1]>>3)*f+(k.as_row_col[0]>>3),k=e,r=h);y(a,b,k,r,f,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 t=c.memset,w=c.memcpy,h=[e.create(),e.create(),e.create(),e.create()],k=e.create();a.exports={};a.exports.predict_inter_emulated_edge=b;a.exports.predict_inter=f;a.exports.vp8_build_inter_predictors_mb=function(a,d,c,e,p,n,t){var g=(3===a.common.version)+0;if(9!==p.mbmi.y_mode){v(c,e+384,e);k.as_int[0]=p.mbmi.mv.as_int[0];if(1===p.mbmi.need_mc_border){var l=k.as_row_col[0],m=k.as_row_col[1];k.as_row_col[0]=l+1+(l>>31<<1);k.as_row_col[1]= +m+1+(m>>31<<1);k.as_row_col[0]/=2;k.as_row_col[1]/=2}else k.as_row_col[0]=k.as_row_col[0]+1>>1,k.as_row_col[1]=k.as_row_col[1]+1>>1;g&&(k.as_int[0]&=4294508536);h[0].as_int[0]=h[1].as_int[0]=h[2].as_int[0]=h[3].as_int[0]=k.as_int[0]}else for(l=p.bmi.mvs,m=0;2>m;++m)for(var q=0;2>q;++q){var w=(m<<3)+(q<<1),r=h[(m<<1)+q],u;u=l[w].as_row_col[0]+l[w+1].as_row_col[0]+l[w+4].as_row_col[0]+l[w+5].as_row_col[0];u=0>u?u-4:u+4;r.as_row_col[0]=u/8|0;u=l[w].as_row_col[1]+l[w+1].as_row_col[1]+l[w+4].as_row_col[1]+ +l[w+5].as_row_col[1];u=0>u?u-4:u+4;r.as_row_col[1]=u/8|0;1===g&&(r.as_int[0]&=4294508536)}1===p.mbmi.need_mc_border?b(a,d,c,e,p,n,t):f(a,d,c,e,p)}},function(a,e){function c(a,b,d,c,e,h,f,l,g){var k,m,p=g[0]|0,n=g[1]|0,t=g[2]|0,r=g[3]|0,w=g[4]|0,u=g[5]|0;for(g=0;g>=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>t?t=0:255b;b++)k=q[m],g=q[m+4],h=q[m+8],l=q[m+12],c=k+l|0,e=g+h|0,h=g-h|0,k=k-l|0,f[p]=c+e,f[p+4]=h+k,f[p+8]=c-e,f[p+12]=k-h,m++,p++;q=f;p=m= +0;q=q.data_32;for(b=0;4>b;b++)c=q[m>>1],h=c>>16,k=c<<16>>16,c=q[m+2>>1],l=c>>16,g=c<<16>>16,c=k+l,e=h+g,h-=g,k-=l,l=c+e,g=h+k,c-=e,e=k-h,r[p>>1]=l+3>>3&65535|g+3>>3<<16,r[p+2>>1]=c+3>>3&65535|e+3>>3<<16,m+=4,p+=4;for(b=0;16>b;b++)a[d+(b<<4)]=f[b]};a.exports.vp8_short_idct4x4llm_c=function(a,d,e,f,r,h,k){var l,g,q,m,p,n,t=0;for(l=0;4>l;l++){q=h[k];var u=h[k+4],w=h[k+12];m=h[k+8];g=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[t]=g+p;x[t+12]=g-p;x[t+4]=q+m;x[t+ +8]=q-m;k++;t++}h=x;k=0;a=a.data_32;for(l=0;4>l;l++)q=h[k],t=h[k+1],m=h[k+2],u=h[k+3],g=q+m,q-=m,p=35468*t>>16,n=u+(20091*u>>16),m=p-n,p=t+(20091*t>>16),n=35468*u>>16,p+=n,n=e[f],u=e[f+1],w=e[f+2],t=e[f+3],n=c(b(n+(g+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),g=c(b(t+(g-p+4>>3),0),255),a[d>>2]=n|u<<8|q<<16|g<<24,k+=4,d+=r,f+=r}},function(a,e,c){function b(a,b,d){x(a,b,d,8)}function b(a,b,d){x(a,b,d,8)}function f(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;gm;m++)y(a,c,a,c,q,p,n),n+=16,c+=4,m&1&&(c+=h);for(m=20;24>m;m++)y(e,g,e,g,q,p,n),n+=16,g+=4,m&1&&(g+=h)};a.exports.predict_intra_luma=function(a,b,c,e,q,m){if(4===e.mbmi.y_mode){var g=b,h=m,l;u(a,g, +c);for(l=0;16>l;l++){var k=a,t=g+((l&3)<<2);switch(e.bmi.modes[l]){case 0:d(k,t,c,4);break;case 1:x(k,t,c,4);break;case 2:var w=void 0,N=void 0,A=void 0,F=k,G=t,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=t,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=t,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=t,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=t,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=t,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=t,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=t,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, +t,k,t,c,q,h);h+=16;3===(l&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:r(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 h=e.mbmi,n=A(d,l,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),r=v(b,c,h),n=h,p=A(d,k,t[p][r],0);f[n]=p}while(16>++h)}b=e.mbmi;d=A(d,g,q,0);b.uv_mode=d}function r(a,b){a.as_row_col[0]b.mb_to_right_edge&& +(a.as_row_col[0]=b.mb_to_right_edge);a.as_row_col[1]b.mb_to_bottom_edge&&(a.as_row_col[1]=b.mb_to_bottom_edge)}function d(a,b,c,d,e,f){b+=a.as_row_col[0]>>3;c+=a.as_row_col[1]>>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.as_row_col[0]*=-1,d.as_row_col[1]*=-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 t=0;2>t;t++)for(q=0;19>q;q++)if(L(m,F[t][q])){var v=m.get_uint(7);p[t][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];r(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.as_row_col[1]=u(aa,Ca[0]);la.as_row_col[0]=u(aa,Ca[1]);G.as_row_col[0]+=I.as_row_col[0];G.as_row_col[1]+=I.as_row_col[1]}}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)].as_row_col[0]+=y[B].as_row_col[0], +z[(B>>1&1)+(B>>2&2)].as_row_col[1]+=y[B].as_row_col[1],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].as_row_col[0]+=4+(z[B].as_row_col[0]>>28)|0,z[B].as_row_col[1]+=4+(z[B].as_row_col[1]>>28)|0,z[B].as_row_col[0]>>=2,z[B].as_row_col[1]>>=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],r(I,B),B=v.mbmi.mv,fa=fa.mv_probs,B.as_row_col[1]=u(y,fa[0]),B.as_row_col[0]=u(y,fa[1]),v.mbmi.mv.as_row_col[0]+=I.as_row_col[0],v.mbmi.mv.as_row_col[1]+= +I.as_row_col[1],v.mbmi.y_mode=8;else v.mbmi.mv.as_int[0]=X[2].as_int[0],r(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],r(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,k,K,0),ca[v]=ea[v].as_row_col[0]=B;R.y_mode=J;R.uv_mode=A(y,g,fa.uv_mode_probs,0);R.mv.as_row_col[0]=O[Q].mbmi.mv.as_row_col[1]=0;R.ref_frame= +0}}!0!==a.common.is_keyframe&&(H.mb_to_left_edge-=128,H.mb_to_right_edge-=128);t++;p++}}},function(a,e,c){c(9);var b=0,f=1,r=2,d=3,x=4,b=0,f=1,r=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 r: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,t){if(!(e>>2))switch(c-=t,a[c].mbmi.y_mode){case x:return a[c].bmi.modes[e+ +12];case b:return 0;case f:return 2;case r: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,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])]];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,255,255,255,250,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,186,251,250,255,255,255,255,255,255,255,255,234,251,244,254,255,255,255,255,255,255,255,251,251,243,253,254,255,254,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,236,253,254,255,255,255,255,255,255,255,255,251,253,253,254,254,255,255,255,255,255,255,255,254,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=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]),r=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])],t=[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]),k=new Uint32Array(h.buffer), +l=new Uint8Array([162,101,204]),g=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=r;a.exports.vp8_kf_uv_mode_prob=g;a.exports.vp8_kf_ymode_prob=q;a.exports.vp8_uv_mode_prob=l;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=t;a.exports.vp8_init_mbmode_probs=function(a){a.entropy_hdr.y_mode_probs_32[0]=k[0];a.entropy_hdr.uv_mode_probs[0]=l[0];a.entropy_hdr.uv_mode_probs[1]=l[1];a.entropy_hdr.uv_mode_probs[2]=l[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 73762f6..679a9cc 100644 --- a/builds/ogv-decoder-video-vp8.js +++ b/builds/ogv-decoder-video-vp8.js @@ -1,128 +1,130 @@ -(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,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,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, -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,255,255,255,250,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,186,251,250,255,255,255,255,255,255,255,255,234,251,244,254,255,255,255,255,255,255,255,251,251,243,253,254,255,254,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,236,253,254,255,255,255,255,255,255,255,255,251,253,253,254,254,255,255,255,255,255,255,255,254,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]);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}}]); +(function(a){function d(h){if(c[h])return c[h].exports;var e=c[h]={exports:{},id:h,loaded:!1};a[h].call(e.exports,e,e.exports,d);e.loaded=!0;return e.exports}var c={};d.m=a;d.c=c;d.p="";return d(0)})([function(a,d,c){a.exports=c(1)},function(a,d,c){var h=c(2),e=c(33).vpx_codec_ctx_t,q;q="undefined"===typeof performance||"undefined"===typeof performance.now?Date.now:performance.now.bind(performance);d=function(b){this.cpuTime=0;this.loadedMetadata=!0;this.frameBuffer=null;this.videoFormat=b.videoFormat|| +null;this.iface=h.ifaces[0].iface;this.decoder=new e;h.vpx_codec_dec_init(this.decoder,this.iface,null,null)};d.prototype.init=function(b){console.warn("STARTING CODEC JSVPX");b()};d.prototype.processHeader=function(b,e){this.loadedMetadata=!0;e(0)};d.prototype.processFrame=function(b,e){var c=q(),a=new Uint8Array(b);h.vpx_codec_decode(this.decoder,a,a.length,void 0,void 0);if(a=h.vpx_codec_get_frame(this.decoder,null)){var d=a.planes_off,u=a.img_data,w=this.videoFormat;this.frameBuffer={format:{width:a.d_w+ +2,height:a.d_h,chromaWidth:a.d_w>>1,chromaHeight:a.d_h>>1,cropLeft:w.cropLeft,cropTop:w.cropTop,cropWidth:w.cropWidth,cropHeight:w.cropHeight,displayWidth:w.displayWidth,displayHeight:w.displayHeight},y:{bytes:u.subarray(d[0],d[1]),stride:a.stride[0]},u:{bytes:u.subarray(d[1],d[2]),stride:a.stride[1]},v:{bytes:u.subarray(d[2]),stride:a.stride[2]}}}c=q()-c;this.cpuTime+=c;e(1)};d.prototype.close=function(){};"undefined"!==typeof window?window.OGVDecoderVideoVP8=d:"undefined"!==typeof self&&(self.OGVDecoderVideoVP8= +d);a.exports=d},function(a,d,c){function h(e,h,b,a,c){e.iface=h;e.name=h.name;e.priv=null;e.init_flags=a;e.config.dec=b;e.iface.init(e,null)}d=[{name:"jsvp8",iface:c(3)}];a.exports={ifaces:d,vpx_codec_dec_init:function(e,a,b,c){return h(e,a,b,c,4)},vpx_codec_dec_init_ver:h,vpx_codec_peek_stream_info:function(){},vpx_codec_get_stream_info:function(){},vpx_codec_decode:function(e,h,b,a,c){e.iface.dec.decode(e.priv,h,b,a,c)},vpx_codec_get_frame:function(e,h){return e.iface.dec.get_frame(e,h)},vpx_codec_put_frame_cb_fn_t:function(){}, +vpx_codec_register_put_frame_cb:function(){},vpx_codec_register_put_slice_cb:function(){}}},function(a,d,c){var h=c(4),e=c(11).vp8dx_receive_compressed_data,q=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(b,a,c,d,q){b.temp_pbi||(d=new h,b.temp_pbi=d);e(b.temp_pbi,c,a,q);return 0},get_frame:function(b,h){return b.priv.temp_pbi.common.show_frame?b.priv.temp_pbi.ref_frames[0].img:null}},init:function(b,h){if(!b.priv){var e=new q;b.priv=e;b.priv.init_flags=b.init_flags;b.priv.decrypt_cb=null;b.priv.decrypt_state=null;b.config.dec&&(e.cfg=b.config.dec,b.config.dec=e.cfg)}}}},function(a,d,c){var h=c(5),e=c(6).BOOL_DECODER;d=c(8);var q=d.MACROBLOCKD,b=d.FRAGMENT_DATA,u=d.MODE_INFO,x=c(10).vpx_image_t; +Uint8Array.prototype.ptr=0;var v=function(){this.img=new x;this.ref_cnt=0},y=function(){this.quant_idx=0;this.factor=[new Int16Array([0,0]),new Int16Array([0,0]),new Int16Array([0,0])]},r=function(){this.bool=new e;this.left_token_entropy_ctx=new Int32Array(9);this.coeffs=0};c=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 h;this.boolDecoder=new e;this.segment_hdr=new q(this);this.token_hdr=new b(this);this.tokens=Array(8);for(var a=0;8>a;a++)this.tokens[a]=new r;this.frame_strg=[{img:new x,ref_cnt:0},{img:new x,ref_cnt:0},{img:new x,ref_cnt:0},{img:new x,ref_cnt:0}];this.ref_frames=Array(4);for(a=0;4>a;a++)this.ref_frames[a]=new v;this.dequant_factors=Array(4);for(a=0;4>a;a++)this.dequant_factors[a]=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 b,e,g;b=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=b*e;this.mb_info_storage=Array(m);for(g=0;g>8),c=b<<8,e;a.value>=c?(e=1,a.range-=b,a.value-=c):(e=0,a.range=b);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 e}function h(a){return c(a,128)}a.exports={};a.exports.vpx_read_bit=h;a.exports.vpx_read=c; +a.exports.vpx_read_literal=function(a,c){var b=0,e;for(e=c-1;0<=e;e--)b|=h(a)<>3+d*a.stride[0])|0:(b=a.img_data_off,a.fmt&1024&&(a.planes_off[3]=b+c+d*a.stride[3],b+= +a.h*a.stride[3]),a.planes_off[0]=b+c+d*a.stride[0],b+=a.h*a.stride[0],a.fmt&512?(a.planes_off[2]=b+(c>>a.x_chroma_shift)+(d>>a.y_chroma_shift)*a.stride[2],b+=(a.h>>a.y_chroma_shift)*a.stride[2],a.planes_off[1]=b+(c>>a.x_chroma_shift)+(d>>a.y_chroma_shift)*a.stride[1]):(a.planes_off[1]=b+(c>>a.x_chroma_shift)+(d>>a.y_chroma_shift)*a.stride[1],b+=(a.h>>a.y_chroma_shift)*a.stride[1],a.planes_off[2]=b+(c>>a.x_chroma_shift)+(d>>a.y_chroma_shift)*a.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(a,e,d,b,u,x){var h,q,r,w,l;u||(u=1);u&u-1&&console.warn("Invalid stride align");switch(e){case 2:case 9:case 10:case 11:l=32;break;case 1:case 8:l=24;break;case 3:case 12:case 4:case 13:case 5:case 6:case 7:l=16;break;case 258:case 769:case 260:case 771:l=12;break;default:l=16}switch(e){case 258:case 769:case 260:case 771:r=1;break;default:r=0}switch(e){case 258:case 769:case 260:case 771:w= +1;break;default:w=0}h=(1<>3)|0)+u-1&~(u-1)|0;a.img_data=x;null!==x&&(a.img_data=new Uint8Array(0===(e&256)?h*u:h*q*l>>3),a.img_data.data_32=new Uint32Array(a.img_data.buffer),a.img_data_owner=1);a.fmt=e;a.w=q;a.h=h;a.x_chroma_shift=r;a.y_chroma_shift=w;a.bps=l;a.stride[0]=a.stride[3]=u;a.stride[1]=a.stride[2]=u>>r;if(0===c(a,0,0,d,b))return a};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,d,c){function h(a){if(a){if(0===a.ref_cnt)throw"ERROR :(";a.ref_cnt--}}function e(a){a.ref_cnt++;return a}var q=c(12).vp8_decode_frame;a.exports={vp8dx_receive_compressed_data:function(a,c,d,v){q(d,a);1===a.common.copy_arf?(h(a.ref_frames[3]),a.ref_frames[3]=e(a.ref_frames[1])):2===a.common.copy_arf&&(h(a.ref_frames[3]), +a.ref_frames[3]=e(a.ref_frames[2]));1===a.common.copy_gf?(h(a.ref_frames[2]),a.ref_frames[2]=e(a.ref_frames[1])):2===a.common.copy_gf&&(h(a.ref_frames[2]),a.ref_frames[2]=e(a.ref_frames[3]));1===a.common.refresh_gf&&(h(a.ref_frames[2]),a.ref_frames[2]=e(a.ref_frames[0]));1===a.common.refresh_arf&&(h(a.ref_frames[3]),a.ref_frames[3]=e(a.ref_frames[0]));1===a.common.refresh_last&&(h(a.ref_frames[1]),a.ref_frames[1]=e(a.ref_frames[0]))}}},function(a,d,c){function h(a,m,c){var g,b,e,l=1;1===m.enabled&& +(l=ia);for(g=0;g=D.y_mode?(U(z.u,z.u_off,z.v,z.v_off,z.uv_stride,J,N,0),L(z.y,z.y_off,z.stride,J,N,0)):P(k,z,N,0,J,h,t);p++;C.y_off+=16;C.u_off+=8;C.v_off+=8}a.common.level&&f&&(a.common.filter_type?v(a,f-1):y(a,f-1,0,a.mb_cols));n===a.mb_cols&&(l=C.y,p=C.y_off+15*C.stride,l[p]=l[p+1]=l[p+2]=l[p+3]=C.y[C.y_off-1+15*C.stride]);++e===a.token_hdr.partitions&&(e=0)}a.common.level&&(a.common.filter_type?v(a,f-1):y(a,f-1,0,a.mb_cols))}function q(a,m,f,c,g,b){var e=m-1;if(0===b&&g)for(g=m-c,m=0;m>=2;a=a.data_32;f=f|f<<8|f<<16|f<<24;var g=c>>2;for(c=0;c>2)]=f}function x(a,m,f,c){var g,b=a.decoder;a.partitions=1<>1&7;b.show_frame=k>>4&1;d=(k|a[1]<<8|a[2]<<16)>>5;if(n<=d+(b.is_keyframe? +10:3))return-1;b.frame_size_updated=0;if(!0===b.is_keyframe){var t=b.Width,P=b.Height,k=b.vert_scale,K=b.horiz_scale;if(157!==a[3]||1!==a[4]||42!==a[5])return-1;var U=a[7];b.Width=(a[6]|U<<8)&16383;b.horiz_scale=U>>6;b.Height=(a[8]|a[9]<<8)&16383;b.vert_scale=a[9]>>6;if(t!==b.Width||P!==b.Height||k!==b.vert_scale||K!==b.horiz_scale)b.frame_size_updated=1}a.ptr+=M;n-=M;!0===b.is_keyframe&&(a.ptr+=ja,n-=ja,f.mb_cols=b.Width+15>>4|0,f.mb_rows=b.Height+15>>4|0);N(c,a,a.ptr,d);b.is_keyframe&&c.get_uint(2); +k=f.common;if(!0===k.is_keyframe){for(t=0;19>t;t++)k.entropy_hdr.mv_probs[0][t]=g[0][t];for(t=0;19>t;t++)k.entropy_hdr.mv_probs[1][t]=g[1][t];G(k);m(k)}p.enabled=l(c);if(1===p.enabled){p.update_map=l(c);p.update_data=l(c);if(1===p.update_data){p.abs=l(c);for(k=0;kk;k++)1===l(c)?p.tree_probs[k]=c.get_uint(8):p.tree_probs[k]=255}else p.update_map=0,p.update_data=0;!0===b.is_keyframe&& +(b.filter_type=0,b.level=0,b.sharpness=0,b.delta_enabled=0,b.ref_delta[0]=0,b.ref_delta[1]=0,b.ref_delta[2]=0,b.ref_delta[3]=0,b.mode_delta[0]=0,b.mode_delta[1]=0,b.mode_delta[2]=0,b.mode_delta[3]=0);b.filter_type=l(c);b.level=c.get_uint(6);b.sharpness=c.get_uint(3);b.delta_enabled=l(c);k=b.ref_delta;1===b.delta_enabled&&1===l(c)&&(k[0]=c.maybe_get_int(6),k[1]=c.maybe_get_int(6),k[2]=c.maybe_get_int(6),k[3]=c.maybe_get_int(6),b.mode_delta[0]=c.maybe_get_int(6),b.mode_delta[1]=c.maybe_get_int(6),b.mode_delta[2]= +c.maybe_get_int(6),b.mode_delta[3]=c.maybe_get_int(6));x(f.token_hdr,a,a.ptr+d,n-d);n=b.mbmi_qindex;b.mbmi_qindex=c.get_uint(7);n=(n!==b.mbmi_qindex)+0;n|=b.y1dc_delta_q=c.maybe_get_int(4);n|=b.y2dc_delta_q=c.maybe_get_int(4);n|=b.y2ac_delta_q=c.maybe_get_int(4);n|=b.uvdc_delta_q=c.maybe_get_int(4);n|=b.uvac_delta_q=c.maybe_get_int(4);b.delta_update=n;n=b.is_keyframe;b.refresh_gf=!0===n?1:l(c);b.refresh_arf=!0===n?1:l(c);b.copy_gf=!0===n?0:b.refresh_gf?0:c.get_uint(2);b.copy_arf=!0===n?0:b.refresh_arf? +0:c.get_uint(2);b.sign_bias[J]=!0===n?0:l(c);b.sign_bias[I]=!0===n?0:l(c);b.refresh_entropy_probs=l(c);b.refresh_last=!0===n?1:l(c);0===b.refresh_entropy_probs&&(X(b.saved_entropy,b.entropy_hdr),f.saved_entropy_valid=1);f.modemv_init();n=f.token_hdr.partitions;if(1===b.frame_size_updated){d=400*f.mb_cols;for(k=0;kg&&(g=0);f=g;a.common.sharpness&&(f>>=49-a.common.sharpness&&(f= +9-a.common.sharpness));1>f&&(f=1);k=15<=g?1:0;40<=g&&k++;20<=g&&!a.common.is_keyframe&&k++;b[0]=g;c[0]=f;m[0]=k}function e(a){return k(p(a,0),255)}function q(a,b,c,m){var g=a[b],k=a[b+c];return f(a[b-2*c]-a[b-c])>m||f(k-g)>m}function b(a,b,c,m,g){var k=a[b-4*c],n=a[b-3*c],e=a[b-2*c],p=a[b-c],l=a[b],d=a[b+c],t=a[b+2*c],h=a[b+3*c];m=2*m+g;var P=a[b-(c<<1)],K=a[b+c];return 2*f(a[b-c]-a[b])+(f(P-K)>>1)<=m|0&&f(k-n)<=g&&f(n-e)<=g&&f(e-p)<=g&&f(h-t)<=g&&f(t-d)<=g&&f(d-l)<=g}function u(a,f,c,g,m,n,l){var d= +l<<3;for(l=0;l>7;r=e(r+E);w=e(w-E);E=18*u+63>>7;z=e(z+E);G=e(G-E);E=9*u+63>>7;L=e(L+E);N=e(N-E);t[h-U]=L;t[h-K]=z;t[h-P]=r;t[h]=w;t[h+P]=G;t[h+K]=N}f+=1}}function x(a,f,c,g,m,k,n){var e=n<<3;for(n=0;n>3;e=c(e+(127>3));d=c(d-q);k||(r=q+1>>1,m=c(m+r),h=c(h-r));a[b-g]=m;a[b-f]=e;a[b]=d;a[b+f]=h}function e(a,b,f,c){var g;for(g=0;16>g;g++)1===q(a,b,f,c)&&h(a,b,f,1),b+=1}function q(a,b,f,c){var g=a[b-(f<<1)],m=a[b+f];return(r(a[b-f]-a[b])<<1)+(r(g-m)>>1)<=c|0}function b(a,b,f,c){var g;for(g=0;16>g;g++)q(a,b,1,c)&&h(a,b,1,1),b+=f}function u(a,b,f,k, +e,n,d){var g=d<<3;for(d=0;d>7;q=c(q+V);u=c(u-V);V=18*F+63>>7;r=c(r+V);E=c(E-V);V=9*F+63>>7;t=c(t+V);y=c(y-V);m[p-3]=t;m[p-2]=r;m[p-1]=q;m[p]=u;m[p+1]=E;m[p+2]=y}b+=f}}function x(a,b,f,c,e){var m=a[b-4*f],g=a[b-3*f],k=a[b-2*f],d=a[b-f],p=a[b],l=a[b+f],h=a[b+2*f],w=a[b+3*f];return q(a,b,f,2*c+e)&&r(m-g)<=e&&r(g-k)<=e&&r(k-d)<= +e&&r(w-h)<=e&&r(h-l)<=e&&r(l-p)<=e}function v(a,b,f,c){var g=a[b],m=a[b+f];return r(a[b-2*f]-a[b-f])>c||r(m-g)>c}function y(a,b,f,c,e,n,d){var g=8*d;for(d=0;df)return P[U+w[f]]=p,++f,F=1;P[U+w[15]]=p;F=12;return 1}function A(b,c){n+=u(a,r[b].probs[c])<f?(++f,G+=y[f]|0,F=2):F=12,x=1);if(1===x)continue;if(1===e(z[G+2],11))continue;if(1===e(z[G+3],8))continue;if(1===e(z[G+6],6))continue;if(1===e(z[G+8],4))continue;if(1===e(z[G+10],3))continue;n=r[10].min_val;t=r[10].length;do A(10,t),t--;while(0<=t);if(1===D(n))continue}if(3===F&&(n=r[9].min_val,A(9,4),A(9,3),A(9,2),A(9,1),A(9,0),1===D(n)))continue;if(4===F){if(1===e(z[G+9],5))continue;n=r[8].min_val;A(8,3);A(8,2);A(8,1);A(8,0);if(1===D(n))continue}if(5=== +F&&(n=r[7].min_val,A(7,2),A(7,1),A(7,0),1===D(n)))continue;if(6===F){if(1===e(z[G+7],7))continue;n=r[6].min_val;A(6,1);A(6,0);if(1===D(n))continue}if(7===F&&(n=r[5].min_val,A(5,0),1===D(n)))continue;if(8===F){if(e(z[G+4],10))continue;if(e(z[G+5],9))continue;if(D(4))continue}if(9!==F||!D(3))if(10!==F||!D(2)){if(11===F){h(1);G=N+11;if(15>f){P[U+w[f]]=p;++f;F=1;continue}P[U+w[15]]=p;F=12}if(12===F){K=(K|(1>>0;k=(f!=!m)+0;K=(K|k<<31)>>>0;c[q[l]]=d[b[l]]=k;U+=16;l++;if(lb;b++)h[b]=c[b];c=d.mv_probs;for(b=0;19>b;b++)a.mv_probs[0][b]=c[0][b];for(b=0;19>b;b++)a.mv_probs[1][b]=c[1][b];c=d.y_mode_probs_32;a.y_mode_probs_32[0]= +c[0];c=d.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=d.prob_inter;a.prob_last=d.prob_inter;a.prob_gf=d.prob_inter};a.exports.memset=function(a,d,e,q){for(;q--;)a[d+q]=e};a.exports.memset_32=function(a,d,e,q){d>>=2;a=a.data_32;e=e|e<<8|e<<16|e<<24;var b=q>>2;for(q=0;q>2)]=e};a.exports.memcpy=function(a,d,e,q,b){for(;b--;)a[d+b]=e[q+b];return a}},function(a,d){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])],h=[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=h},function(a,d,c){var h=c(19).data_64;a.exports={vp8_default_coef_probs:function(a){a.entropy_hdr.coeff_probs.data_64.set(h)}}}, +function(a,d){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,d){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]),h=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]),e=Math.min,q=Math.max;a.exports={};a.exports.vp8_dc_quant=function(a,d){a+=d;127a&&(a=0);a=e(q(a,0),127);return c[a]};a.exports.vp8_dc2quant=function(a,d){a+=d;127a&&(a=0);return c[a]<<1};a.exports.vp8_dc_uv_quant=function(a,d){var b;a+=d;127a&&(a=0);b=c[a];132a&&(a=0);return h[a]};a.exports.vp8_ac2quant= +function(a,c){var b;a+=c;127a&&(a=0);b=101581*h[a]>>16;8>b&&(b=8);return b};a.exports.vp8_ac_uv_quant=function(a,c){a+=c;127a&&(a=0);return h[a]}},function(a,d,c){function h(a,c,d,e,g,t,h){var f=a.frame_strg[0].img.img_data,m=a.frame_strg[0].img.img_data_off,k,n,p,r,q,w,K,u,x,A;k=g.mbmi.ref_frame;var v=c.u,y=c.v,H=c.u_off,J=c.v_off;u=t<<4;x=h<<4;w=a.mb_cols<<4;K=a.mb_rows<<4;p=c.y;r=c.y_off;q=a.ref_frame_offsets[k];n=r+q;var I=g.mbmi.y_mode,D=g.bmi.mvs;q=a.ref_frame_offsets[k]; +k=a.ref_frame_offsets_[k];for(A=0;16>A;A++)b(p,r,f,m,k,n,c.stride,9!==I?g.mbmi.mv:D[A],a.subpixel_filters,d,e,g,u,x,w,K,A),u+=4,r+=4,n+=4,3===(A&3)&&(u-=16,x+=4,r+=(c.stride<<2)-16,n+=(c.stride<<2)-16);u=t<<4>>1;x=h<<4>>1;w>>=1;K>>=1;t=4*c.uv_stride-8;for(A=0;4>A;A++)b(v,H,f,m,k,H+q,c.uv_stride,l[A],a.subpixel_filters,d,e,g,u,x,w,K,A+16),b(y,J,f,m,k,J+q,c.uv_stride,l[A],a.subpixel_filters,d,e,g,u,x,w,K,A+20),H+=4,J+=4,u+=4,1===(A&1)&&(u-=8,x+=4,H+=t,J+=t)}function e(a,b,c,d,g){var f,e,k;f=e=k=b.y; +var m=b.y_off,n=b.u_off,p=b.v_off,h,r,w=g.mbmi,u=w.y_mode;r=a.ref_frame_offsets[g.mbmi.ref_frame];h=a.ref_frame_offsets_[g.mbmi.ref_frame];var x=b.stride,v=a.subpixel_filters,y=g.bmi.mvs;for(a=0;16>a;a++)q(f,m,h,m+r,x,9!==u?w.mv:y[a],v,c,d,g,a),m+=4,3===(a&3)&&(m+=(b.stride<<2)-16);b=b.uv_stride;for(a=0;4>a;a++)q(e,n,h,n+r,b,l[a],v,c,d,g,a+16),q(k,p,h,p+r,b,l[a],v,c,d,g,a+20),n+=4,p+=4,1===(a&1)&&(n+=(b<<2)-8,p+=(b<<2)-8)}function q(a,b,c,d,g,e,l,h,r,q,w){q=c;var f;e.as_int[0]?(q=e.as_row_col[0]& +7,f=e.as_row_col[1]&7,d+=(e.as_row_col[1]>>3)*g+(e.as_row_col[0]>>3),u(a,b,g,c,d,g,4,4,q,f,l),q=a,c=b):c=d;y(a,b,q,c,g,h,r+16*w)}function b(a,b,c,d,g,e,l,h,q,x,v,z,G,E,W,F,V){G+=h.as_row_col[0]>>3;E+=h.as_row_col[1]>>3;if(2>G||G+4-1+3>=W||2>E||E+4-1+3>=F){e+=(h.as_row_col[0]>>3)+(h.as_row_col[1]>>3)*l;z=d;G-=2;E-=2;var f=9;e=e-2-(l<<1)-G-E*l;E>=F?e+=(F-1)*l:0G?-G:0;9W&&(m=G+9-W);9>3)+(h.as_row_col[1]>>3)*l)}h.as_int[0]?(c=h.as_row_col[0]&7,d=h.as_row_col[1]&7,e+=(h.as_row_col[1]>>3)*l+(h.as_row_col[0]>>3),u(a,b,l,g,e,l,4,4,c,d,q),h=a,q=b):(e+=(h.as_row_col[1]>>3)*l+(h.as_row_col[0]>>3),h=g,q=e);y(a,b,h,q,l,x,v+16*V)}d=c(9);var u=c(22).filter_block2d,x=c(23),v=x.vp8_short_inv_walsh4x4_c,y=x.vp8_short_idct4x4llm_c;c=c(16);var r=c.memset,w=c.memcpy,l=[d.create(),d.create(),d.create(),d.create()], +g=d.create();a.exports={};a.exports.predict_inter_emulated_edge=h;a.exports.predict_inter=e;a.exports.vp8_build_inter_predictors_mb=function(a,b,c,d,n,r,q){var f=(3===a.common.version)+0;if(9!==n.mbmi.y_mode){v(c,d+384,d);g.as_int[0]=n.mbmi.mv.as_int[0];if(1===n.mbmi.need_mc_border){var k=g.as_row_col[0],m=g.as_row_col[1];g.as_row_col[0]=k+1+(k>>31<<1);g.as_row_col[1]=m+1+(m>>31<<1);g.as_row_col[0]/=2;g.as_row_col[1]/=2}else g.as_row_col[0]=g.as_row_col[0]+1>>1,g.as_row_col[1]=g.as_row_col[1]+1>> +1;f&&(g.as_int[0]&=4294508536);l[0].as_int[0]=l[1].as_int[0]=l[2].as_int[0]=l[3].as_int[0]=g.as_int[0]}else for(k=n.bmi.mvs,m=0;2>m;++m)for(var p=0;2>p;++p){var t=(m<<3)+(p<<1),w=l[(m<<1)+p],u;u=k[t].as_row_col[0]+k[t+1].as_row_col[0]+k[t+4].as_row_col[0]+k[t+5].as_row_col[0];u=0>u?u-4:u+4;w.as_row_col[0]=u/8|0;u=k[t].as_row_col[1]+k[t+1].as_row_col[1]+k[t+4].as_row_col[1]+k[t+5].as_row_col[1];u=0>u?u-4:u+4;w.as_row_col[1]=u/8|0;1===f&&(w.as_int[0]&=4294508536)}1===n.mbmi.need_mc_border?h(a,b,c,d, +n,r,q):e(a,b,c,d,n)}},function(a,d){function c(a,b,c,d,e,l,g,m,f){var k,h,n=f[0]|0,t=f[1]|0,r=f[2]|0,q=f[3]|0,w=f[4]|0,u=f[5]|0;for(f=0;f>=7,0>h?h=0:255>=7,0>h?h=0:255>=7,0>v?v=0:255>=7,0>z?z=0:255>=7,0>t?t=0:255>=7,0>r?r=0:255b;b++)g=k[p],f=k[p+4],l=k[p+8],m=k[p+12],d=g+m|0,h=f+l|0,l=f-l|0,g=g-m|0,e[n]=d+h,e[n+4]=l+g,e[n+8]=d-h,e[n+12]=g-l,p++,n++;k=e;n=p=0;k=k.data_32;for(b=0;4>b;b++)d=k[p>>1],l=d>>16,g=d<<16>>16,d=k[p+2>>1],m=d>>16,f=d<<16>>16,d=g+m,h=l+f,l-=f,g-=m,m=d+h, +f=l+g,d-=h,h=g-l,q[n>>1]=m+3>>3&65535|f+3>>3<<16,q[n+2>>1]=d+3>>3&65535|h+3>>3<<16,p+=4,n+=4;for(b=0;16>b;b++)a[c+(b<<4)]=e[b]};a.exports.vp8_short_idct4x4llm_c=function(a,b,d,e,q,l,g){var m,f,k,p,n,t,r=0;for(m=0;4>m;m++){k=l[g];var x=l[g+4],w=l[g+12];p=l[g+8];f=k+p;k-=p;n=35468*x>>16;t=w+(20091*w>>16);p=n-t;n=x+(20091*x>>16);t=35468*w>>16;n+=t;u[r]=f+n;u[r+12]=f-n;u[r+4]=k+p;u[r+8]=k-p;g++;r++}l=u;g=0;a=a.data_32;for(m=0;4>m;m++)k=l[g],r=l[g+1],p=l[g+2],x=l[g+3],f=k+p,k-=p,n=35468*r>>16,t=x+(20091* +x>>16),p=n-t,n=r+(20091*r>>16),t=35468*x>>16,n+=t,t=d[e],x=d[e+1],w=d[e+2],r=d[e+3],t=c(h(t+(f+n+4>>3),0),255),x=c(h(x+(k+p+4>>3),0),255),k=c(h(w+(k-p+4>>3),0),255),f=c(h(r+(f-n+4>>3),0),255),a[b>>2]=t|x<<8|k<<16|f<<24,g+=4,b+=q,e+=q}},function(a,d,c){function h(a,b,c){u(a,b,c,8)}function h(a,b,c){u(a,b,c,8)}function e(a,b,c,d){var f=b-c|0,e,g,h;for(e=0;e>5;break;case 8:h=h+8>>4;break;case 4:h=h+4>>3}for(g=0;gp;p++)y(a,c,a,c,k,n,t),t+=16,c+=4,p&1&&(c+=g);for(p=20;24>p;p++)y(d,f,d,f,k,n,t),t+=16,f+=4,p&1&&(f+=g)};a.exports.predict_intra_luma=function(a,c,d,f,h,p){if(4===f.mbmi.y_mode){var g=c,k=p,l;x(a,g,d);for(l=0;16>l;l++){var m=a,r=g+((l&3)<<2);switch(f.bmi.modes[l]){case 0:b(m,r,d,4);break;case 1:u(m,r,d,4); +break;case 2:var w=void 0,N=void 0,z=void 0,G=m,E=r,W=d,F=E-W,V=G.data_32[F>>2]|0,X=V&255,A=V>>8&255,M=V>>16&255,ja=V>>24&255;G.data_32[E>>2]=G[F-1]+(X<<1)+A+2>>2|X+(A<<1)+M+2>>2<<8|A+(M<<1)+ja+2>>2<<16|M+(ja<<1)+G[F+4]+2>>2<<24;for(z=1;4>z;z++)for(w=z*W,N=0;4>N;N++)G[E+w+N]=G[E+N];break;case 3:var H=m,J=r,I=d,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=m,R=r,O=d,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=m,ma=r,va=d,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=m,oa=r,wa=d,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=m,xa=r,Wa=d,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=d,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=r,Ea=d,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(m,r,m,r,d,h,k);k+=16;3===(l&3)&&(g+=4*d)}}else{var fb;switch(f.mbmi.y_mode){case 0:b(a,c,d,16);break;case 1:e(a, +c,d,16);break;case 2:q(a,c,d,16);break;case 3:u(a,c,d,16)}v(h,p+384,p);for(fb=0;16>fb;fb++)y(a,c,a,c,d,h,p),p+=16,c+=4,3===(fb&3)&&(c+=(d<<2)-16)}}},function(a,d){a.exports={};a.exports.intra_prediction_down_copy=function(a,d,e){d=d+16-e;a=a.data_32;var c=a[d>>2];d+=e<<2;a[d>>2]=c;d+=e<<2;a[d>>2]=c;a[d+(e<<2)>>2]=c}},function(a,d,c){function h(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 e(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 l=e.mbmi,n=z(d,m,p,0);l.y_mode=n;if(4===e.mbmi.y_mode){l=0;e.mbmi.is_4x4=1;do{var q=y(b,c,l,a),t=v(b,c,l),n=l,q=z(d,g,r[q][t],0);h[n]=q}while(16>++l)}b=e.mbmi;d=z(d,f,k,0);b.uv_mode=d}function q(a,b){a.as_row_col[0]b.mb_to_right_edge&&(a.as_row_col[0]=b.mb_to_right_edge);a.as_row_col[1]b.mb_to_bottom_edge&&(a.as_row_col[1]=b.mb_to_bottom_edge)}function b(a,b,c,d,e,f){b+=a.as_row_col[0]>>3;c+=a.as_row_col[1]>>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.as_row_col[0]*=-1,d.as_row_col[1]*=-1)}function x(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,w[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 v=m.get_uint(7);n[r][p]=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;A[0].as_int[0]=0;A[1].as_int[0]=0;A[2].as_int[0]=0;A[3].as_int[0]=0;I=X[0];q(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=t[Z],Fa=B.bmi.mvs;do{E.as_int[0]=0;W.as_int[0]=0;F.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];F.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=F.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=E,Ca=fa.mv_probs; +la.as_row_col[1]=x(aa,Ca[0]);la.as_row_col[0]=x(aa,Ca[1]);E.as_row_col[0]+=I.as_row_col[0];E.as_row_col[1]+=I.as_row_col[1]}}else E.as_int[0]=F.as_int[0];else E.as_int[0]=W.as_int[0];for(;16>T;T++)Ba===Y[T]&&(Fa[T].as_int[0]=E.as_int[0])}while(++BaB;B++)if(A[(B>>1&1)+(B>>2&2)].as_row_col[0]+=y[B].as_row_col[0],A[(B>>1&1)+(B>>2&2)].as_row_col[1]+=y[B].as_row_col[1],b(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(A[B].as_row_col[0]+=4+(A[B].as_row_col[0]>>28)|0,A[B].as_row_col[1]+=4+(A[B].as_row_col[1]>>28)|0,A[B].as_row_col[0]>>=2,A[B].as_row_col[1]>>=2,b(A[B],R+8*(B&1),Q+(B>>1<<3),16,O,J)){v.mbmi.need_mc_border=1;break}}else I=X[0],q(I,B),B=v.mbmi.mv,fa=fa.mv_probs,B.as_row_col[1]=x(y,fa[0]),B.as_row_col[0]=x(y,fa[1]),v.mbmi.mv.as_row_col[0]+=I.as_row_col[0],v.mbmi.mv.as_row_col[1]+=I.as_row_col[1],v.mbmi.y_mode=8;else v.mbmi.mv.as_int[0]=X[2].as_int[0],q(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],q(v.mbmi.mv,B);else v.mbmi.y_mode=7,v.mbmi.mv.as_int[0]=0;b(v.mbmi.mv,R,Q,16,O,J)&&(v.mbmi.need_mc_border=1)}else{J=z(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=z(y,g,K,0),ca[v]=ea[v].as_row_col[0]=B;R.y_mode=J;R.uv_mode=z(y,f,fa.uv_mode_probs,0);R.mv.as_row_col[0]=O[Q].mbmi.mv.as_row_col[1]=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(a, +d,c){c(9);var h=0,e=1,q=2,b=3,u=4,h=0,e=1,q=2,b=3,u=4;a.exports={};a.exports.left_block_mode=function(a,c,d){if(!(d&3))switch(--c,a[c].mbmi.y_mode){case h:return 0;case e:return 2;case q:return 3;case b:return 1;case u:return a[c].bmi.modes[d+3];default:return 0}return a[c].bmi.modes[d-1]};a.exports.above_block_mode=function(a,c,d,r){if(!(d>>2))switch(c-=r,a[c].mbmi.y_mode){case u:return a[c].bmi.modes[d+12];case h:return 0;case e:return 2;case q:return 3;case b:return 1;default:return 0}return a[c].bmi.modes[d- +4]}},function(a,d){var c=new Uint8Array([112,86,140,37]),h=[[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])]];a.exports={};a.exports.vp8_kf_bmode_prob=h;a.exports.vp8_ymode_prob=c},function(a,d){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,255,255,255,250,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,186,251,250,255,255,255,255,255,255,255,255,234,251,244,254,255,255,255,255,255,255,255,251,251,243,253,254,255,254,255,255,255,255,255,253,254,255,255,255,255,255,255,255,255,236,253,254,255,255,255,255,255,255,255,255,251,253,253,254,254,255,255,255,255,255,255,255,254,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=c},function(a,d){var c=new Int32Array([-0,2,-1,4,-2,6,8,12,-3,10,-5,-6,-4,14,-7,16,-8,-9]),h=new Int32Array([-4,2,4,6,-0,-1,-2,-3]),e=new Int32Array([-0,2,4,6,-1,-2,-3,-4]),q=new Int32Array([-0,2,-1,4,-2,-3]),b=new Int32Array([-7,2,-5,4,-6,6,-8,-9]),u=new Int32Array([-10,2,-11,4,-12,-13]),x=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]),l=new Uint8Array([112,86,140,37]),g=new Uint32Array(l.buffer),m=new Uint8Array([162,101,204]),f=new Uint8Array([142, +114,183]),k=new Uint8Array([145,156,163,128]),p=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=h;a.exports.vp8_uv_mode_tree=q;a.exports.vp8_kf_uv_mode_prob=f;a.exports.vp8_kf_ymode_prob=k;a.exports.vp8_uv_mode_prob=m;a.exports.vp8_bmode_prob=p;a.exports.vp8_ymode_prob=l;a.exports.vp8_ymode_tree=e;a.exports.vp8_mbsplit_probs=w;a.exports.vp8_mv_ref_tree=b;a.exports.vp8_sub_mv_ref_tree=u;a.exports.vp8_small_mvtree=x;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]=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(a,d){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,d,c){var h=c(7).vpx_read; +a.exports=function(a,c,b,d){for(var e=0;0<(e=c[e+h(a,b[d+(e>>1)])]););return-e|0}},function(a,d){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/vp8/common/blockd.js b/vp8/common/blockd.js index 77f01f4..5975050 100644 --- a/vp8/common/blockd.js +++ b/vp8/common/blockd.js @@ -49,7 +49,7 @@ class MODE_INFO { uv_mode: 0, ref_frame: 0, is_4x4: 0, - mv: new MotionVector(), + mv: MotionVector.create(), partitioning: 0, mb_skip_coeff: 0, need_mc_border: 0, @@ -59,26 +59,14 @@ class MODE_INFO { this.bmi = null; - /* - var mvs = new Array(16); - var i = 16; - while (i--) - mvs[i] = new MotionVector(); - - //Only needed for spit mode, maybe can skip initialization unless splitt mode is on - this.bmi = - { - mvs: mvs, - modes: new Uint8Array(16)//16,'todo:enum prediction_mode') - }; - */ + } init_split_mode() { var mvs = new Array(16); var i = 16; while (i--) - mvs[i] = new MotionVector(); + mvs[i] = MotionVector.create(); //Only needed for spit mode, maybe can skip initialization unless splitt mode is on this.bmi = diff --git a/vp8/common/findnearmv.js b/vp8/common/findnearmv.js index 4e11b90..89a9e8e 100644 --- a/vp8/common/findnearmv.js +++ b/vp8/common/findnearmv.js @@ -23,8 +23,8 @@ var B_HE_PRED = 3; /* horizontal prediction */ function mv_bias(mb, sign_bias, ref_frame, mv) { if (sign_bias[mb.mbmi.ref_frame] ^ sign_bias[ref_frame]) { - mv.x *= -1; - mv.y *= -1; + mv.as_row_col[0] *= -1; + mv.as_row_col[1] *= -1; } } diff --git a/vp8/common/mv.js b/vp8/common/mv.js index 82779f5..1f6ec0c 100644 --- a/vp8/common/mv.js +++ b/vp8/common/mv.js @@ -3,28 +3,18 @@ class MotionVector { constructor() { - this.internalStruct = new Int16Array(2); - this.as_int = new Uint32Array(this.internalStruct.buffer); - - } -} - -Object.defineProperty(MotionVector.prototype, 'x', { - get: function () { - return this.internalStruct[0]; - }, - set: function (x) { - this.internalStruct[0] = x; + this.as_row_col = new Int16Array(2); + this.as_int = new Uint32Array(this.as_row_col.buffer); } -}); - -Object.defineProperty(MotionVector.prototype, 'y', { - get: function () { - return this.internalStruct[1]; - }, - set: function (y) { - this.internalStruct[1] = y; + + static create(){ + var as_row_col = new Int16Array(2); + var as_int = new Uint32Array(as_row_col.buffer); + return { + 'as_row_col' : as_row_col, + 'as_int' : as_int + }; } -}); +} module.exports = MotionVector; \ No newline at end of file diff --git a/vp8/common/reconinter.js b/vp8/common/reconinter.js index d4428dc..936c4a0 100644 --- a/vp8/common/reconinter.js +++ b/vp8/common/reconinter.js @@ -20,10 +20,10 @@ var memcpy = c_utils.memcpy; //Keep from having to redeclare this var chroma_mv = [ - new MotionVector(), - new MotionVector(), - new MotionVector(), - new MotionVector() + MotionVector.create(), + MotionVector.create(), + MotionVector.create(), + MotionVector.create() ]; @@ -152,29 +152,29 @@ function build_4x4uvmvs(mbi, full_pixel) { - temp = mvs[b].x + - mvs[b + 1].x + - mvs[b + 4].x + - mvs[b + 5].x; + temp = mvs[b].as_row_col[0] + + mvs[b + 1].as_row_col[0] + + mvs[b + 4].as_row_col[0] + + mvs[b + 5].as_row_col[0]; if (temp < 0) temp -= 4; else temp += 4; - chroma_mv_cache.x = (temp / 8 ) | 0; + chroma_mv_cache.as_row_col[0] = (temp / 8 ) | 0; - temp = mvs[b].y + - mvs[b + 1].y + - mvs[b + 4].y + - mvs[b + 5].y; + temp = mvs[b].as_row_col[1] + + mvs[b + 1].as_row_col[1] + + mvs[b + 4].as_row_col[1] + + mvs[b + 5].as_row_col[1]; if (temp < 0) temp -= 4; else temp += 4; - chroma_mv_cache.y = (temp / 8) | 0; + chroma_mv_cache.as_row_col[1] = (temp / 8) | 0; if (full_pixel === 1) { chroma_mv_cache.as_int[0] &= 0xFFF8FFF8; @@ -240,7 +240,7 @@ function build_mc_border(dst, dst_off, src, src_off, stride, x, y, b_w, b_h, w, } while (--b_h); } -var uvmv = new MotionVector(); +var uvmv = MotionVector.create(); function predict_inter(ctx, img, coeffs, coeffs_off, mbi) { var y, u , v; @@ -318,10 +318,10 @@ function recon_1_block(output, output_off, reference, reference_off, stride, mv, if (mv.as_int[0]) { - mx = mv.x & 7; - my = mv.y & 7; + mx = mv.as_row_col[0] & 7; + my = mv.as_row_col[1] & 7; - reference_off += ((mv.y >> 3) * stride) + (mv.x >> 3); + reference_off += ((mv.as_row_col[1] >> 3) * stride) + (mv.as_row_col[0] >> 3); @@ -351,20 +351,20 @@ function recon_1_edge_block(output, output_off, var b_h = 4; var mx = 0, my = 0; - x += mv_.x >> 3; - y += mv_.y >> 3; + x += mv_.as_row_col[0] >> 3; + y += mv_.as_row_col[1] >> 3; if (x < 2 || x + b_w - 1 + 3 >= w || y < 2 || y + b_h - 1 + 3 >= h) { - reference_off += (mv_.x >> 3) + (mv_.y >> 3) * stride; + reference_off += (mv_.as_row_col[0] >> 3) + (mv_.as_row_col[1] >> 3) * stride; build_mc_border(emul_block, emul_block_off, reference, reference_off - 2 - (stride << 1), stride, x - 2, y - 2, b_w + 5, b_h + 5, w, h); reference = emul_block; reference_off = emul_block_off + (stride << 1) + 2; - reference_off -= (mv_.x >> 3) + (mv_.y >> 3) * stride; + reference_off -= (mv_.as_row_col[0] >> 3) + (mv_.as_row_col[1] >> 3) * stride; } @@ -373,11 +373,11 @@ function recon_1_edge_block(output, output_off, if (mv_.as_int[0]) { - mx = mv_.x & 7; - my = mv_.y & 7; + mx = mv_.as_row_col[0] & 7; + my = mv_.as_row_col[1] & 7; - reference_off += ((mv_.y >> 3) * stride) + (mv_.x >> 3); + reference_off += ((mv_.as_row_col[1] >> 3) * stride) + (mv_.as_row_col[0] >> 3); @@ -389,7 +389,7 @@ function recon_1_edge_block(output, output_off, predict_off = output_off; } else { - reference_off += ((mv_.y >> 3) * stride) + (mv_.x >> 3); + reference_off += ((mv_.as_row_col[1] >> 3) * stride) + (mv_.as_row_col[0] >> 3); predict = reference; predict_off = reference_off; @@ -411,16 +411,16 @@ function vp8_build_inter16x16_predictors_mb(mbi, full_pixel) { uvmv.as_int[0] = mbmi_cache.mv.as_int[0]; if (mbi.mbmi.need_mc_border === 1) { - var x = uvmv.x; - var y = uvmv.y; - uvmv.x = (x + 1 + ((x >> 31) << 1)); - uvmv.y = (y + 1 + ((y >> 31) << 1)); - uvmv.x /= 2; - uvmv.y /= 2; + var x = uvmv.as_row_col[0]; + var y = uvmv.as_row_col[1] ; + uvmv.as_row_col[0] = (x + 1 + ((x >> 31) << 1)); + uvmv.as_row_col[1] = (y + 1 + ((y >> 31) << 1)); + uvmv.as_row_col[0] /= 2; + uvmv.as_row_col[1] /= 2; } else { - uvmv.x = (uvmv.x + 1) >> 1; - uvmv.y = (uvmv.y + 1) >> 1; + uvmv.as_row_col[0] = (uvmv.as_row_col[0] + 1) >> 1; + uvmv.as_row_col[1] = (uvmv.as_row_col[1] + 1) >> 1; } if (full_pixel) { diff --git a/vp8/decoder/decodeframe.js b/vp8/decoder/decodeframe.js index c5c922e..c025c28 100644 --- a/vp8/decoder/decodeframe.js +++ b/vp8/decoder/decodeframe.js @@ -79,7 +79,6 @@ var PLANE_PACKED = VPX_PLANE_PACKED; var PLANE_Y = VPX_PLANE_Y; var PLANE_U = VPX_PLANE_U; var PLANE_V = VPX_PLANE_V; -var PLANE_ALPHA = VPX_PLANE_ALPHA; var CURRENT_FRAME = 0; var LAST_FRAME = 1; diff --git a/vp8/decoder/decodemv.js b/vp8/decoder/decodemv.js index 8fd32ff..1e8d49e 100644 --- a/vp8/decoder/decodemv.js +++ b/vp8/decoder/decodemv.js @@ -166,38 +166,38 @@ function read_kf_modes(pbi, mi, this_off, bool) { } -var clamped_best_mv_1 = new MotionVector(); +var clamped_best_mv_1 = MotionVector.create(); var LEFT_TOP_MARGIN = (16 << 3); var RIGHT_BOTTOM_MARGIN = (16 << 3); function vp8_clamp_mv2(mv, bounds) { - if (mv.x < (bounds.mb_to_left_edge)) { - mv.x = bounds.mb_to_left_edge ; - } else if (mv.x > bounds.mb_to_right_edge) { - mv.x = bounds.mb_to_right_edge; + if (mv.as_row_col[0] < (bounds.mb_to_left_edge)) { + mv.as_row_col[0] = bounds.mb_to_left_edge ; + } else if (mv.as_row_col[0] > bounds.mb_to_right_edge) { + mv.as_row_col[0] = bounds.mb_to_right_edge; } - if (mv.y < (bounds.mb_to_top_edge )) { - mv.y = bounds.mb_to_top_edge; + if (mv.as_row_col[1] < (bounds.mb_to_top_edge )) { + mv.as_row_col[1] = bounds.mb_to_top_edge; } - else if (mv.y > bounds.mb_to_bottom_edge) { - mv.y = bounds.mb_to_bottom_edge ; + else if (mv.as_row_col[1] > bounds.mb_to_bottom_edge) { + mv.as_row_col[1] = bounds.mb_to_bottom_edge ; } } -//var mv_clamp_mv = new MotionVector(); +//var mv_clamp_mv = MotionVector.create(); function read_mv(bool, mv, mvc) { - mv.y = read_mv_component(bool, mvc[0]); - mv.x = read_mv_component(bool, mvc[1]); + mv.as_row_col[1] = read_mv_component(bool, mvc[0]); + mv.as_row_col[0] = read_mv_component(bool, mvc[1]); } -var blockmv = new MotionVector(); -var left_mv = new MotionVector(); -var above_mv = new MotionVector(); +var blockmv = MotionVector.create(); +var left_mv = MotionVector.create(); +var above_mv = MotionVector.create(); function decode_split_mv(mi, left_mb, above_mb, hdr, best_mv, bool) { var partition = 0; @@ -267,8 +267,8 @@ function decode_split_mv(mi, left_mb, above_mb, hdr, best_mv, bool) { //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); + blockmv.as_row_col[0] = (blockmv.as_row_col[0] + best_mv.as_row_col[0]); + blockmv.as_row_col[1] = (blockmv.as_row_col[1] + best_mv.as_row_col[1] ); } } else { blockmv.as_int[0] = above_mv.as_int[0]; @@ -319,8 +319,8 @@ function need_mc_border(mv, l, t, b_w, w, h) { var r = 0; // Get distance to edge for top-left pixel - l += (mv.x >> 3); - t += (mv.y >> 3); + l += (mv.as_row_col[0] >> 3); + t += (mv.as_row_col[1] >> 3); // Get distance to edge for bottom-right pixel r = w - (l + b_w); @@ -332,8 +332,8 @@ function need_mc_border(mv, l, t, b_w, w, h) { function mv_bias(mb, sign_bias, ref_frame, mv) { if (sign_bias[mb.mbmi.ref_frame] ^ sign_bias[ref_frame]) { - mv.x *= -1; - mv.y *= -1; + mv.as_row_col[0] *= -1; + mv.as_row_col[1] *= -1; } } @@ -366,23 +366,23 @@ function read_mv_component(bool, mvc) { //Do not need to redeclare these var near_mvs = [ - new MotionVector(), - new MotionVector(), - new MotionVector(), - new MotionVector() + MotionVector.create(), + MotionVector.create(), + MotionVector.create(), + MotionVector.create() ]; -var near_mvs_best = new MotionVector(); +var near_mvs_best = MotionVector.create(); var chroma_mv = [ - new MotionVector(), - new MotionVector(), - new MotionVector(), - new MotionVector() + MotionVector.create(), + MotionVector.create(), + MotionVector.create(), + MotionVector.create() ]; var cnt = new Int32Array(4); -var this_mv_tmp = new MotionVector(); +var this_mv_tmp = MotionVector.create(); function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { var mbmi = mi[this_off].mbmi; @@ -509,7 +509,7 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { */ if (cnt[CNT_NEAREST] >= cnt[CNT_BEST]) { near_mvs[CNT_BEST].as_int[0] = near_mvs[CNT_NEAREST].as_int[0]; - //near_mvs[CNT_BEST].y = near_mvs[CNT_NEAREST].y; + //near_mvs[CNT_BEST].as_row_col[1] = near_mvs[CNT_NEAREST].y; } @@ -554,10 +554,10 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { var this_mvs = this_.bmi.mvs; for (b = 0; b < 16; b++) { - chroma_mv[(b >> 1 & 1) + (b >> 2 & 2)].x += - this_mvs[b].x; - chroma_mv[(b >> 1 & 1) + (b >> 2 & 2)].y += - this_mvs[b].y; + chroma_mv[(b >> 1 & 1) + (b >> 2 & 2)].as_row_col[0] += + this_mvs[b].as_row_col[0]; + chroma_mv[(b >> 1 & 1) + (b >> 2 & 2)].as_row_col[1] += + this_mvs[b].as_row_col[1] ; if (need_mc_border(this_mvs[b], x + (b & 3) * 4, y + (b & ~3), 4, w, h)) @@ -568,10 +568,10 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { } for (b = 0; b < 4; b++) { - chroma_mv[b].x += 4 + (chroma_mv[b].x >> 28) | 0;///* + 8 * (chroma_mv[b].x >> 31)*/; - chroma_mv[b].y += 4 + (chroma_mv[b].y >> 28) | 0; - chroma_mv[b].x = (chroma_mv[b].x >> 2); - chroma_mv[b].y = (chroma_mv[b].y >> 2); + chroma_mv[b].as_row_col[0] += 4 + (chroma_mv[b].as_row_col[0] >> 28) | 0;///* + 8 * (chroma_mv[b].as_row_col[0] >> 31)*/; + chroma_mv[b].as_row_col[1] += 4 + (chroma_mv[b].as_row_col[1] >> 28) | 0; + chroma_mv[b].as_row_col[0] = (chroma_mv[b].as_row_col[0] >> 2); + chroma_mv[b].as_row_col[1] = (chroma_mv[b].as_row_col[1] >> 2); //note we're passing in non-subsampled coordinates if (need_mc_border(chroma_mv[b], @@ -589,8 +589,8 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { vp8_clamp_mv2(clamped_best_mv, bounds); read_mv(bool, this_.mbmi.mv, hdr.mv_probs); - this_.mbmi.mv.x += clamped_best_mv.x; - this_.mbmi.mv.y += clamped_best_mv.y; + this_.mbmi.mv.as_row_col[0] += clamped_best_mv.as_row_col[0]; + this_.mbmi.mv.as_row_col[1] += clamped_best_mv.as_row_col[1] ; this_.mbmi.y_mode = NEWMV; } } else { @@ -633,15 +633,15 @@ function read_mb_modes_mv(pbi, mi, this_off, bool, bounds) { var b; b = vp8_treed_read(bool, vp8_bmode_tree, vp8_bmode_prob , 0); - modes[i] = mvs[i].x = b; - //mvs[i].y = 0; + modes[i] = mvs[i].as_row_col[0] = b; + //mvs[i].as_row_col[1] = 0; } } mbmi.y_mode = y_mode; mbmi.uv_mode = vp8_treed_read(bool, vp8_uv_mode_tree, hdr.uv_mode_probs , 0); - mbmi.mv.x = mi[this_off].mbmi.mv.y = 0; + mbmi.mv.as_row_col[0] = mi[this_off].mbmi.mv.as_row_col[1] = 0; mbmi.ref_frame = CURRENT_FRAME; }