diff --git a/crates/ec-av1/examples/decode_probe.rs b/crates/ec-av1/examples/decode_probe.rs index ab64eea2..bec376fd 100644 --- a/crates/ec-av1/examples/decode_probe.rs +++ b/crates/ec-av1/examples/decode_probe.rs @@ -36,6 +36,20 @@ fn main() { } let (sc, dp) = ec_av1::decode::reelc_chroma_counters(); println!("reelc_chroma: skip_cfl={sc} dir_1to4_pairs={dp}"); + println!( + "chroma422_square: {}", + ec_av1::decode::chroma422_square_hits() + ); + println!("chroma422_rect: {}", ec_av1::decode::chroma422_rect_hits()); + println!("chroma422_sub8: {}", ec_av1::decode::chroma422_sub8_hits()); + println!( + "chroma422_chunk: {}", + ec_av1::decode::chroma422_chunk_hits() + ); + println!( + "chroma422_pair_wide: {}", + ec_av1::decode::chroma422_pair_wide_hits() + ); let (h, v, c) = ec_av1::stream::rect4_32_counters(); println!("rect4_32: horz={h} vert={v} coded={c}"); println!( @@ -105,6 +119,14 @@ fn main() { ); let (h84, h48) = ec_av1::decode::sub8_inter_rect_hits(); println!("sub8_inter_rect: horz8x4={h84} vert4x8={h48}"); + println!( + "llintra8_chroma_walk: {}", + ec_av1::decode::llintra8_chroma_walk_hits() + ); + println!( + "sub8rect444_chroma_walk: {}", + ec_av1::decode::llsub8rect444_chroma_walk_hits() + ); let si = ec_av1::stream::sub8_intra_rect_hits(); println!( "sub8_intra_rect: horz8x4={} vert4x8={} chroma_ref={} mixed={} split4x4={}", @@ -216,6 +238,10 @@ fn main() { ec_av1::decode::chroma_edge_tu_clip_hits(), ec_av1::decode::skip_lossless_band_reset_hits(), ); + println!( + "llband: rect_split_lossless_chroma444={}", + ec_av1::decode::rect_split_lossless_chroma444_hits() + ); // lane-t900 r12: chroma edge-filter neighbour answered from the mi-granular // uv_mode grid instead of the coarse one-slot-per-column map. println!( diff --git a/crates/ec-av1/fixtures/422_allskip_2f.obu b/crates/ec-av1/fixtures/422_allskip_2f.obu new file mode 100644 index 0000000000000000000000000000000000000000..d6f493d80d3d2c40b8c970b21b73815baff4137f GIT binary patch literal 62 zcmWe);No&%U|=@?|4#S-hY_y;Ln{LV69WUoGMSnMLJUUy2FwQ<7#JK&85md?7_KM? Hp{NG{e4z~a literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/422_sb128_3f.obu b/crates/ec-av1/fixtures/422_sb128_3f.obu new file mode 100644 index 0000000000000000000000000000000000000000..86b8f18931706043a83d8b202d2743355e2d41c7 GIT binary patch literal 12543 zcmV;20EB=50)PxyX`r~s5&#McKmY&(H~;Pvzz8yr zPZR(oU;qH1@XHUmM(FTr3OV_6$-Vf-7EYqHG9QLdt1+UE6Rpq#c|Y5E-o%dz$+Qy7 zM!KinBt2e^z6}$(EPrJYbCuai6Y(K5+W0G61^>Wp59rJR%K~(IP z48>#6Qk3K$)P9|A!U5j;gWD>3)b*8&XKnILd64X8^uyRAVk~cw=5w|-(+73zf#q+e zCi8PSbvQhL3&k{ddgrz^49p8>U``tu#e0}nqMB9EfWCI=xQ*Vd=G61N6qBW1&*IR?TLX11-YjBapiV){OZBqpiXusu5JJ9NG z;I)U@3bgQ9l@;U8Erd-dT_75-F8D-FaE-mNXjTbkPG6$H@u_V8HiMivUR#!9Bb!P? z7a`cvMB*g^ld7L}RdnJZ3Ou z`fsqfO7DbD0(sL!=)6-Ro#=rTBYn0Z?lWbUtw=P3iHre)cE>mV=H3o-*;~De-JH;M zGWU*LU#zapQoe$h>}4&$=8h#Jor9|4W=cKW1zP*S(#j*RJ;BpdbWXB|*p>Kw+(q4? zQzCnu_X0B*?ShHr#LB{>gtcR#*E*e>i22EM?jEV`;{M%2~QdRRs^O;H1ijRqNM{kcoQ5hwA~U*M>1e^+GZAA#QV9Z)`P%*+s-n> z)s0o7Eestu@IggF$U7Hdd<|cGOkYny)PXn?Vele^7DijI!ycE%ivv~>!aA$f7{&cM zj$K+f*xU5hD_c*X5Ij~{7!6D6INyMLA})51*{OS0m=!jsVpaIHp7C_-aWs;>-R9&E zO7QJ={aLT_*cBOHBvO{`p8PW(r z2@7rN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OsC>d(z1P~BoE6y?|x*@ V_UKfvl7;3rNh(7BDyLwdn-0q-VYvVR literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/444_leaf8_oob.obu b/crates/ec-av1/fixtures/444_leaf8_oob.obu new file mode 100644 index 0000000000000000000000000000000000000000..03357d6e94dc4ac55d75f97468d601aea90d57d0 GIT binary patch literal 3577 zcmVWO0165q000C$|NQ^?f-;a26ab{~G}|Q^;Z&t;E4(80@sT*{6I8P|q!yir z?>hw<@F9MJEi=yDReW2RD2jZZh_%AYA*_^GdBIILyz@rGe|Gv!LGv`s-Ctn~+)9>R zY-KwFUR?uN9A)_tXN;CL_E54qAm{=ek^>z3Q_gZb0MHSQOzQH;JdM~(;*v*IB=suk z2l@RICX@jtUj;QbFpx?@wGd+;k09Brq6cXqX5$DO;wgN~igq^h#hPTZS-?0r!BbFu z=NJnvB8QEqS`Q0Mdh;|oorI%+@IvNBaXy0YVohx`i_N2_w#{%PbJJ_n+us@C%cbm; zZi-RUYENd&FhbLq2|ah0YNyjsDXVpIkBvL16Gp*@hZgF_bjUQIhXx==i7*?Ahhb>9dj|Ea?Yl z$#@V3Ao`9>-J^imWKsS@vi^R=O9B5g`xJu<5k$Z)hJ$QNW8RH`A~VO9yVsbGj%K?12AjCm0sd? zfdWta7{noBi}tPw=|sQO2T+(XqC}o8t0S_$#_5Pu#%_H~0hSoRXNS#Z>MZWSN z0SY=ix6&EiRC~iy8cO_hAtCdk(HXuQntcSx#A!I4>Rn2r#wU$l@yX1%7auRS_F%!-*O~K;?!NyHmz}t zEl$(GH$^&BX-^#E#8^-TOZHn)5SocD%yE_19bc8(jlE3G!!8H8m~9g;MVDZDy|U88 zAG0iz!{4BZzDj8o8s1QK)AV}*b$`(@hjYEkKdQS}J|S@rDqyBrFCK34k5Fj>duJWq zSze&-7KkL+k^Kcmw>$xsXPwnm_-^M88J|EeN z32^(=HTSdv%75<~9$CcL@s21LRG%=#8d2i1ZN2S&4&+7fh70~`U(Si}$Hp18@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IbGf ztlCmad-oyWeF8^p+K+P~LTVg&@y=+(5u`>Sk{wSHU0W_aK>m(DHlOXdd#!fDpRFSv zz)_||u0zP(I1YKKCG0w#zGxwh58V4uRVNALf``j)#A3V=8R=vF-)13!&GmBMX3(zp zBHs9Vf)uRa00R-$ra<6Lk6^tEnMPOuPi#{`$Rqaf7y`MHT_ZtTE%i>g=*#yb%w5fq zeL^1qDfFPA&&`%V&A-7Ph&6vtaBS|sH-FPEs7hxP0S&qm05Ze`G6LX&0012=01OAt z6fPjPfB==NR>GNK;1M2yN7efEH)LP1fdbEpq69VPMnC*H{CqM<)~{2QHN3-uadd9s zF8R@#!%far(dD%_KO+L|pE@;fLy{XfU(5mF0?UBTy@4FJQuhoG(X*8yl(3bs$_hMj z5VysJUC}V=yLICL@*NW%OX%LtR0E*%!>`6-Z+!gZ(@|g3USh&lLBXp4`3yiW+d9|e zft$(OLPXL1sYvZ>!Eo^KLyaaiYD6};fNxugQr)^cnqZdB`P^z(@V&zHY>34-eOz@y2?mP6Qar1BQyK-oTu;FO4#;%;UnmYN0wajX ziJe*}rm;U{ckwr_xPWo}m%zhblvh4eVM}e-k0E*sZj%>sXJ0DtC2Xr>LH9B3LNDh> z)3|>YYD95hQeK&YG??~Ft0;?v-e|X^6&Y*@#6C;uJlX~H22|`q5c%c(zLu>Szyk@CCjOX+eoO;c$CQp<;5s zU2I>We0x@E)L4Jk9LOvZbb-6$wjoIaDcDJv0WbIy5xw>T=tbu8pg7 zQoVU~r}waE1GDQPqCI*Zw6`it0e;4n^TxOjPr)d~&lg*uKV-rOyixi_Uw2x7U9ir? literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu b/crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu new file mode 100644 index 0000000000000000000000000000000000000000..daaf7c390403b24a0f429616cd75f8cf2a5ddd26 GIT binary patch literal 794 zcmV+#1Lgb@0165q000BM{QLj&1TxbD5CDV#004vlz%$H>DK2Qo4+3BhKlfi^z}gF% z!}VW`2(ut$4!j4(oUD4z+wEe1MM>bxirx&8ARl_a9?PoA9HC<($6=pf>qPcKim}aBrT0$RIat1VieS@8AitwU7fZ| zt)X*(Q3JX|6yQvTBNC1Bb8&0R#0~F**l!9U$I>d_WkIV~&`=Kbj98Z5bZv%>r}YYW zaEmt+JLMw$UzvV3BV;L^b##ER3Fd#1wQms5|Mei)sWvAGUMgFv8jN+fOd*rEvAO^yi@F@l5Ux0m4q2 zgK=8G;(d-}=8q!qiMMb-R%zyT+76Hs05XmNFav;q002gcAOHZAF~bx60H++~MC9g1 ztinHYq@S^hSNf$0M?=U38loD|oH7&vacaROMxoI451S!i*Xc4SF$4;hA)MVIx4f02 z*}2#G6p=A`2~9dRA@|>oFM8L+x9s3gaM{a`rjMFP2Kr_(=E01|hcEx3cHihd~0QJSvM& zzM@kQN|UV}OXojZdBN(6u9zTFct4&CVO<`zH9t4=*qtFW@@6qzl;qmGS~*4U-Oo$! z9Qh9Q(mk3?fdx_vH`L$nL}Z>9lB^U@mHk!We>}tqQMXT<&TuZGSz-5Pl(g2+r8bWH YHr5r-6x3L($&{_ki@hu^WUx5$XEuj_{r~^~ literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/ll444_defaultp_inter_strip.obu b/crates/ec-av1/fixtures/ll444_defaultp_inter_strip.obu new file mode 100644 index 0000000000000000000000000000000000000000..6aae3f74b50cb7bb0cb113a9de7ae1b0f27ebb8b GIT binary patch literal 32487 zcmV(hK={8B0165q0009w`|tnE5HgxQ6aXLq0QtGyPu!6u{lzixoI28h>c&p9o#pz5 zTF`E~bE!&nB&YBbSuaSRQsBRhn)9@{)Sh)uPN)c5x+y`sgM_;aOMwq^=++F$3!A!j zq2TEv4B*jK8I@w)yGzOu(yrq;cOFOIq~UpV=FWGQ`E=*@C4^jJkKtfy+Nc?~2r>E> za7s8;uBS=l5gKX@#}+JLPYQZCG+1Kl^=2_$)t0{~&M0IdNdFIV%Q^iDtKI72t}7ik zgE>Bq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J3RR7BY})!G0%O9c2^bzm`2EzxlP_u4;(k z1&j)Par@~?z0dwouW$ zliwhhb>?7?PN}z!j_wG*Jw=PILdA2#UCw}df0i~jTe86qj|xu%oK(c1kvQ$eD~o~~ zwU;;A1%eo@GU3B|GLTOAsw_mM5jTYju?kDFv3cW~>~iT_HLj1N57#S}w_6Q}W*}Py2Ec*OcG#evIujEFf zJNb&8Z)iUeHY6OR2#Y2sWJL}9y9@z>(LavNRhdj{J^{5@zmTti)2@<^sngUIC~|k- z?#nk1R%5IQxAl_BMR=2o4ZAd08`6G?#DVFcj+aO(ax80n3fMf#Dm#$61Y;Uxkg$%)L0pB(5*y$(IbM~*#Rt0+!l8y7P<{UL5KIV5sqwh1 zfrJpkz_6=kdtpDz%liE?d?RHy1Jp#t!Wp3sG*$@XrplG#I_(~He~|{^xXrb*$KeOv zu%jEVC^Wo{20A^=Z4^{5MXt2)Io)TWlLmy0F zEKc$;)85=$pg)QckH$}OvwaX7Sm4#wG!7`uN{n~~DBjn{Sd6Q@EOQ?2VlU$ofC$mE z9GC-YY%vOxwOpx7O~H4Mm5QyNhveWMf=+nRF4S;KBTg2%rfGmf)BEToJs@*!BTnng z#yx;hA$7X64J@(6xkNR)YUV^}DF$1X`Oo4@A9C26Ic=6Z)vk<}EhH%<-J=)RdZOtVyU6@jTvkoCO2XmXhmOGIXiNhK#wS~z0pGT7b3(>sFu|g+2mimDxH?@Yr+U_C*ST}9roOh~v!0fwc zUvWLfB$kiUUD`8&5u>#?G}^(@GJYUuVL#};6r%#kHr(Cu@m0dC(|ysEV*s!*WaHVk z4utHePD#X%S}E;%9tif6)MlYrd?kcxaj#(?gC*#-Boa0|8_8~Ww!$Tsk$rss;2w%Ru~chG7T~X01FUcqd)+F0L9=n C+xrjz literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/ll444_ibc_rect.obu b/crates/ec-av1/fixtures/ll444_ibc_rect.obu new file mode 100644 index 0000000000000000000000000000000000000000..345e7c758624c0812f563977ce8f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NCKNlZnEc$dx7SRqk8~e0{hOuQ5^>|?yMiPLSFOnWsVjd(PxM#i(`s#M6EG>B zC!iD_wH%X_!g6iH6R}<5%z21)^osS+9nEADJl<)l5_ezDh8B=@^p;WvI$`h&qF?(7 zJFo0icdqWq$V7<`4*en#twj}iu@9O9OT+OiA>3fJU2?dLV7!&xnkNNfk?lO<}`fU+EC7URa;~5XkH$9gf`X(>yRImx9xb5g1 z?~_;27r_8k-djtIZ|~ExY}?f@1ywZ=T`qikS_8nlbA*6m(=$B4R}>JvXO%y<4R4*{ zOl@g?qsD)SLXlY?)j?^Vq_bzE$3Dnt@#ljLW8>uj?K&$>vHW7X_Ez^>LQ1{_0j{)D z?!fOd!F$NB@94C+Hh#@o>6fJMKlq_z(c%;t^z~XR_1lX2QoF7 zE-x49ymelOJw`cCFCu(Px~9I;Jg-x;-vVr?HhcqNp0o`IiIimKA3S2{I4_bsno1;!?_yDUUn;CRetC$mIy zc$Fc|tcMJhJZ+|MROisNR718`Fz^cBSj{d3A^vuox&KqF{~5g4me z@GA9gL43Fmpi+D^hny<%``Z!7!7^vs)}5tO?dEK8OYLpJ>)oddC@vFSGm!|1GaTw}Kxh+!uF!4_WX4 zV5PoH1r^!deJ#gP@uu4Z3@{QGu3^ WuwqjaW(gJ)A&=N-o!%Pdd)_P_r?%Jt literal 0 HcmV?d00001 diff --git a/crates/ec-av1/fixtures/ll444_minp64_inter.obu b/crates/ec-av1/fixtures/ll444_minp64_inter.obu new file mode 100644 index 0000000000000000000000000000000000000000..c27b15130ee7ed3ad656d8d46f1a8b143bcf5786 GIT binary patch literal 37658 zcmV(+K;6F*0165q0009w`{a|r5Hj;c6aXLq0FwVxv-%dt30H;(UG!X|Q`OyojFr>^ z$B<|c$c>iaVfOH$hD}`Dyf1Y$%Zj+uPc+Mp->>l%uSKL-qTCVLfKbr{ZZShc{*VJs zKB4bFfw*0II8-1-evmmHlj4q*dO+lB>y1v7I4CaQh8MHn9!;%!|f)#eNELS#&GS~Z=F+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u b/crates/ec-av1/fixtures/ll444_minp8_inter.obu new file mode 100644 index 0000000000000000000000000000000000000000..ee63334825cb75cd3cca80b775b9494c6cb52dc0 GIT binary patch literal 34037 zcmV(lK=i*70165q0009w`|tnE5Hg=Z6aXLq0Qtv~ogL^tek9%H+W&~VS=t`UKRp+@ zGFAdU{2|!26 zWPj&vfKj5EZrsj|>KfgofREHAJDT8y88PnVj{SOyf@i+QUu6V=? z3uOZbAFG7^oxm>ff(r=>E^`QPmRLr~zw3MWIHYDB=x3c(u)Se|S)$?Z&t}`7WRjos zXqKywD1;?04noGu>igW$RS;}81L$0n?RLueHkW`JZo)FF{Tz`7b|2E(9rFYW(Z25? z=re2^lvLe6g!Xi&$R=SkFnT4q*10pFr+^twB;_4!yrW6Hr5JhXp13)WqIfeu|52+) z7UX5B0>CW?RoyH4zoLUT|A7Vsif^k27u9-f@g*oWoOz?4m6Hg};l{BXNj zb-GP0+BDE7kqmt_YMl$Tn~#H+7*n27tctmMVi^%!25kdV<`2(Q)D!y43`ZicDjvX!G zyVuRQ^cRhdbXL#P=1^de?^>ZJfN{o&IRh%;MN%kG0vE0 zmwGWV-bi@NaLe1DDqvXRIuMt3*`>e=<8OVbEw7ER&e&HxJRiM@@-YGp=8A$avnd3a zs4SHI=?W^`6#SFdCkX3U@+$fUV9LemH5#nXH^vF^-4zCoT~dyM=;ab9tkwReo6 z_@DrAKX_nAvexIa>R+jF3x_SAY@zOaL5SIKEM}Ot?-WUqmqpJUEhxNWG2Cf+?=&&C7 z6gx$uiEU53)PK*p2crXXJUFVz^!>J&rIO3(HO3Ze6|;rP`{+d}Y$URY^6W8Ys zJ8=jYy4eU%mfxS#uZv`u;Xa@;)U{G)Holcf^uChw=okd?pmJH2X3E1Y#G~`51uWHa z^4fe8UT-&`Sw$exSvi@Tz^AWZN;-{jb8h?Qa_DD?g&Vv!`(B<|wou6*5 zrkKl-8$v2FUAoMkw*`74^JW6dP?75wcos8?+>=BTU#7+%PRef$@+6Peu^P!Yy?q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qP_E8Tan%!=*+>u$!Xg6GC`&H>5|FkhC5?e zD1gTmwr_Jn#$+(TqOk}6zni!^T_>k{)}>pUFgT96iY2ep+@9YG zshk%EhWTA<8Cp#RhYY(_IVrvkfg$*}$_D-8+zds-s*zYXZQ`7Fs(QfeyJufhi-kKWx)kndJT z19r*6Y(b(zYp{B5Htk3t6jbrB%a1Ypk#b6Vb&-7HBwd(1g{xSL_&pOZD5`@09C{_O zJH&w)^!0mdIz4y}s96xNCW+E)mjUGp6rur}4*KM-^M5>(vI~w+*H4(=h>8H*xwDx= zrIC^7mZ>&~uQUpa_Y&|ik3Mn`sjfQwT|SUuwYByUqTyBlKr(7Bk~2T&#i0XMq}6<) zIEmUu@}-$A);O(-7GRAE)5R1rZN9HWRgHUe+1q5k@uF1D-cYWzghZwW_o+KjQZvdK z4d{P*=Nz67u%H8)tRH?#@$mZCWh-`x-nyFJZu>?bQ9_C&=4#6 literal 0 HcmV?d00001 diff --git a/crates/ec-av1/src/cdf.rs b/crates/ec-av1/src/cdf.rs index 2949967d..cf782582 100644 --- a/crates/ec-av1/src/cdf.rs +++ b/crates/ec-av1/src/cdf.rs @@ -290,21 +290,16 @@ pub const EOB_PT_512_LUMA_Q3: [u16; 11] = [ /// coded positions -- what a true 16x8/8x16 rectangular transform has /// (`txsize_log2_minus4` = 3), distinct from [`EOB_PT_256_CHROMA`]'s /// 256-position group a *square* 16x16 reads. -pub const EOB_PT_128_CHROMA: [u16; 9] = [ - 13627, 16246, 20173, 24429, 27948, 30415, 31863, 32768, 0, -]; +pub const EOB_PT_128_CHROMA: [u16; 9] = [13627, 16246, 20173, 24429, 27948, 30415, 31863, 32768, 0]; /// [`EOB_PT_128_CHROMA`], q-context 0. -pub const EOB_PT_128_CHROMA_Q0: [u16; 9] = [ - 5245, 7456, 12880, 15852, 20033, 23932, 27608, 32768, 0, -]; +pub const EOB_PT_128_CHROMA_Q0: [u16; 9] = + [5245, 7456, 12880, 15852, 20033, 23932, 27608, 32768, 0]; /// [`EOB_PT_128_CHROMA`], q-context 1. -pub const EOB_PT_128_CHROMA_Q1: [u16; 9] = [ - 8045, 11200, 15497, 19595, 23948, 27408, 30938, 32768, 0, -]; +pub const EOB_PT_128_CHROMA_Q1: [u16; 9] = + [8045, 11200, 15497, 19595, 23948, 27408, 30938, 32768, 0]; /// [`EOB_PT_128_CHROMA`], q-context 3. -pub const EOB_PT_128_CHROMA_Q3: [u16; 9] = [ - 24313, 26062, 28385, 30107, 31217, 31898, 32345, 32768, 0, -]; +pub const EOB_PT_128_CHROMA_Q3: [u16; 9] = + [24313, 26062, 28385, 30107, 31217, 31898, 32345, 32768, 0]; /// `av1_default_eob_multi128_cdfs[2][0][0]` (`token_cdfs.h:830-849`, /// lane-rectx): the end-of-block group of a LUMA transform with 128 coded @@ -313,21 +308,13 @@ pub const EOB_PT_128_CHROMA_Q3: [u16; 9] = [ /// 32x16/16x32), distinct from [`EOB_PT_256_LUMA`]'s 256-position group a /// *square* 16x16 reads. Read straight from the plane-0 half of the same /// `token_cdfs.h` table [`EOB_PT_128_CHROMA`] reads its plane-1 half from. -pub const EOB_PT_128_LUMA: [u16; 9] = [ - 1366, 1738, 2527, 5016, 9355, 15797, 24643, 32768, 0, -]; +pub const EOB_PT_128_LUMA: [u16; 9] = [1366, 1738, 2527, 5016, 9355, 15797, 24643, 32768, 0]; /// [`EOB_PT_128_LUMA`], q-context 0. -pub const EOB_PT_128_LUMA_Q0: [u16; 9] = [ - 219, 482, 1140, 2091, 3680, 6028, 12586, 32768, 0, -]; +pub const EOB_PT_128_LUMA_Q0: [u16; 9] = [219, 482, 1140, 2091, 3680, 6028, 12586, 32768, 0]; /// [`EOB_PT_128_LUMA`], q-context 1. -pub const EOB_PT_128_LUMA_Q1: [u16; 9] = [ - 685, 933, 1488, 2714, 4766, 8562, 19254, 32768, 0, -]; +pub const EOB_PT_128_LUMA_Q1: [u16; 9] = [685, 933, 1488, 2714, 4766, 8562, 19254, 32768, 0]; /// [`EOB_PT_128_LUMA`], q-context 3. -pub const EOB_PT_128_LUMA_Q3: [u16; 9] = [ - 3472, 4885, 7489, 12481, 18517, 24536, 29635, 32768, 0, -]; +pub const EOB_PT_128_LUMA_Q3: [u16; 9] = [3472, 4885, 7489, 12481, 18517, 24536, 29635, 32768, 0]; /// `av1_default_eob_multi32_cdfs[2][1][0]` (`token_cdfs.h:792-808`, /// lane-rectx): the end-of-block group of a CHROMA transform with 32 coded @@ -1824,20 +1811,20 @@ pub const WEDGE_IDX: [[u16; 17]; 22] = [ 29629, 32768, 0, ], [ - 2779, 3738, 4683, 7213, 7775, 8017, 8655, 14357, 17939, 21332, 24520, 27470, 29456, - 30529, 31656, 32768, 0, + 2779, 3738, 4683, 7213, 7775, 8017, 8655, 14357, 17939, 21332, 24520, 27470, 29456, 30529, + 31656, 32768, 0, ], [ 1684, 3625, 5675, 7108, 9302, 11274, 14429, 17144, 19163, 20961, 22884, 24471, 26719, 28714, 30877, 32768, 0, ], [ - 1142, 3491, 6277, 7314, 8089, 8355, 9023, 13624, 15369, 16730, 18114, 19313, 22521, - 26012, 29550, 32768, 0, + 1142, 3491, 6277, 7314, 8089, 8355, 9023, 13624, 15369, 16730, 18114, 19313, 22521, 26012, + 29550, 32768, 0, ], [ - 2742, 4195, 5727, 8035, 8980, 9336, 10146, 14124, 17270, 20533, 23434, 25972, 27944, - 29570, 31416, 32768, 0, + 2742, 4195, 5727, 8035, 8980, 9336, 10146, 14124, 17270, 20533, 23434, 25972, 27944, 29570, + 31416, 32768, 0, ], [ 1727, 3948, 6101, 7796, 9841, 12344, 15766, 18944, 20638, 22038, 23963, 25311, 26988, @@ -1880,8 +1867,8 @@ pub const WEDGE_IDX: [[u16; 17]; 22] = [ 30911, 32768, 0, ], [ - 1135, 1322, 1493, 2635, 2696, 2737, 2770, 21016, 22935, 25057, 27251, 29173, 30089, - 30960, 31933, 32768, 0, + 1135, 1322, 1493, 2635, 2696, 2737, 2770, 21016, 22935, 25057, 27251, 29173, 30089, 30960, + 31933, 32768, 0, ], [ 2048, 4096, 6144, 8192, 10240, 12288, 14336, 16384, 18432, 20480, 22528, 24576, 26624, @@ -3179,6 +3166,19 @@ pub const TXB_SKIP_CHROMA_8_Q3: [[u16; 3]; 3] = /// TXB_SKIP_CHROMA_16, q-context 3: the same table as [`TXB_SKIP_CHROMA_16`], for `base_q_idx` 121..=255. pub const TXB_SKIP_CHROMA_16_Q3: [[u16; 3]; 3] = [[3440, 32768, 0], [13117, 32768, 0], [22702, 32768, 0]]; + +/// `av1_default_txb_skip_cdfs[q][TX_8X8][10..13]` (token_cdfs.h): the chroma +/// `+10` rows of an 8x8 transform. libaom leaves every q-context at the +/// neutral 16384 -- its own encoder never codes an 8x8 chroma transform under +/// a larger plane block (4:2:0/4:4:4 always match plane to transform at this +/// size) -- but `get_txb_ctx`'s `+10` arm reaches them the moment a 4:2:2 +/// frame's 16x16 luma block reads its plane's 8x16 half as two TX_8X8 units +/// (lane-av1-422b; aomdec seeds and adapts the same neutral rows). +pub const TXB_SKIP_CHROMA_8_BIG: [[u16; 3]; 3] = [[16384, 32768, 0]; 3]; +/// `av1_default_txb_skip_cdfs[q][TX_16X16][10..13]` (token_cdfs.h): the same +/// neutral `+10` rows at 16x16 (libaom encoder-unreachable, 4:2:2-reachable +/// through a 32x32 luma block's 16x32 plane -- lane-av1-422b). +pub const TXB_SKIP_CHROMA_16_BIG: [[u16; 3]; 3] = [[16384, 32768, 0]; 3]; /// TXB_SKIP_CHROMA_32, q-context 3: the same table as [`TXB_SKIP_CHROMA_32`], for `base_q_idx` 121..=255. pub const TXB_SKIP_CHROMA_32_Q3: [[u16; 3]; 3] = [[4656, 32768, 0], [16074, 32768, 0], [24704, 32768, 0]]; @@ -3188,13 +3188,17 @@ pub const TXB_SKIP_CHROMA_32_Q3: [[u16; 3]; 3] = /// LARGER than the transform (`get_txb_ctx`), which in AV1 happens only for a /// 128x128 block's four TX_32X32 chroma units -- the offset-7 rows above are /// every other case (lane-sb128b r3). -pub const TXB_SKIP_CHROMA_32_BIG_Q0: [[u16; 3]; 3] = [[146, 32768, 0], [5132, 32768, 0], [31657, 32768, 0]]; +pub const TXB_SKIP_CHROMA_32_BIG_Q0: [[u16; 3]; 3] = + [[146, 32768, 0], [5132, 32768, 0], [31657, 32768, 0]]; /// Default CDF table `TXB_SKIP_CHROMA_32_BIG_Q1` (AV1 spec 9.4 initial probabilities). -pub const TXB_SKIP_CHROMA_32_BIG_Q1: [[u16; 3]; 3] = [[641, 32768, 0], [22265, 32768, 0], [31452, 32768, 0]]; +pub const TXB_SKIP_CHROMA_32_BIG_Q1: [[u16; 3]; 3] = + [[641, 32768, 0], [22265, 32768, 0], [31452, 32768, 0]]; /// Default CDF table `TXB_SKIP_CHROMA_32_BIG` (AV1 spec 9.4 initial probabilities). -pub const TXB_SKIP_CHROMA_32_BIG: [[u16; 3]; 3] = [[3082, 32768, 0], [20982, 32768, 0], [29443, 32768, 0]]; +pub const TXB_SKIP_CHROMA_32_BIG: [[u16; 3]; 3] = + [[3082, 32768, 0], [20982, 32768, 0], [29443, 32768, 0]]; /// Default CDF table `TXB_SKIP_CHROMA_32_BIG_Q3` (AV1 spec 9.4 initial probabilities). -pub const TXB_SKIP_CHROMA_32_BIG_Q3: [[u16; 3]; 3] = [[1806, 32768, 0], [14645, 32768, 0], [25336, 32768, 0]]; +pub const TXB_SKIP_CHROMA_32_BIG_Q3: [[u16; 3]; 3] = + [[1806, 32768, 0], [14645, 32768, 0], [25336, 32768, 0]]; /// EOB_EXTRA_LUMA_16, q-context 3: the same table as [`EOB_EXTRA_LUMA_16`], for `base_q_idx` 121..=255. pub const EOB_EXTRA_LUMA_16_Q3: [[u16; 3]; 9] = [ [19941, 32768, 0], @@ -5374,27 +5378,28 @@ pub const EOB_PT_256_LUMA_CLASS1_Q3: [u16; 10] = [2453, 4474, 6307, 8777, 16474, 22975, 29000, 31547, 32768, 0]; /// Default CDF table `EOB_PT_256_CHROMA_CLASS1_Q0` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_256_CHROMA_CLASS1_Q0: [u16; 10] = - [2203, 4130, 7435, 10739, 20652, 23681, 25609, 27261, 32768, 0]; +pub const EOB_PT_256_CHROMA_CLASS1_Q0: [u16; 10] = [ + 2203, 4130, 7435, 10739, 20652, 23681, 25609, 27261, 32768, 0, +]; /// Default CDF table `EOB_PT_256_CHROMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_256_CHROMA_CLASS1_Q1: [u16; 10] = - [1674, 3252, 5734, 10159, 22397, 23802, 24821, 30940, 32768, 0]; +pub const EOB_PT_256_CHROMA_CLASS1_Q1: [u16; 10] = [ + 1674, 3252, 5734, 10159, 22397, 23802, 24821, 30940, 32768, 0, +]; /// Default CDF table `EOB_PT_256_CHROMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_256_CHROMA_CLASS1: [u16; 10] = - [6571, 9610, 15516, 21826, 29092, 30829, 31842, 32708, 32768, 0]; +pub const EOB_PT_256_CHROMA_CLASS1: [u16; 10] = [ + 6571, 9610, 15516, 21826, 29092, 30829, 31842, 32708, 32768, 0, +]; /// Default CDF table `EOB_PT_256_CHROMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_256_CHROMA_CLASS1_Q3: [u16; 10] = - [9998, 17661, 25178, 28097, 31308, 32038, 32403, 32695, 32768, 0]; +pub const EOB_PT_256_CHROMA_CLASS1_Q3: [u16; 10] = [ + 9998, 17661, 25178, 28097, 31308, 32038, 32403, 32695, 32768, 0, +]; /// Default CDF table `EOB_PT_64_CHROMA_CLASS1_Q0` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_64_CHROMA_CLASS1_Q0: [u16; 8] = - [1563, 2700, 4876, 10911, 14706, 22480, 32768, 0]; +pub const EOB_PT_64_CHROMA_CLASS1_Q0: [u16; 8] = [1563, 2700, 4876, 10911, 14706, 22480, 32768, 0]; /// Default CDF table `EOB_PT_64_CHROMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_64_CHROMA_CLASS1_Q1: [u16; 8] = - [1923, 3127, 5867, 9703, 14277, 27100, 32768, 0]; +pub const EOB_PT_64_CHROMA_CLASS1_Q1: [u16; 8] = [1923, 3127, 5867, 9703, 14277, 27100, 32768, 0]; /// Default CDF table `EOB_PT_64_CHROMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_64_CHROMA_CLASS1: [u16; 8] = - [4034, 6290, 10235, 14982, 21214, 28491, 32768, 0]; +pub const EOB_PT_64_CHROMA_CLASS1: [u16; 8] = [4034, 6290, 10235, 14982, 21214, 28491, 32768, 0]; /// Default CDF table `EOB_PT_64_CHROMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). pub const EOB_PT_64_CHROMA_CLASS1_Q3: [u16; 8] = [8726, 12378, 19409, 26450, 30038, 32462, 32768, 0]; @@ -5411,13 +5416,15 @@ pub const EOB_PT_16_CHROMA_CLASS1_Q3: [u16; 6] = [7297, 10767, 19273, 28194, 327 /// `EOB_PT_128_LUMA`'s class-1 sibling (`av1_default_eob_multi128_cdfs[q][0][1]`), /// read by a 16x8/8x16 luma transform whose inherited `tx_type` is 1D /// (`TxbSet::LumaRect16x8`) -- machine-extracted, scripts/extract-eob-class1.py. -pub const EOB_PT_128_LUMA_CLASS1_Q0: [u16; 9] = [371, 699, 1254, 4830, 9479, 12562, 17497, 32768, 0]; +pub const EOB_PT_128_LUMA_CLASS1_Q0: [u16; 9] = + [371, 699, 1254, 4830, 9479, 12562, 17497, 32768, 0]; /// Default CDF table `EOB_PT_128_LUMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). pub const EOB_PT_128_LUMA_CLASS1_Q1: [u16; 9] = [217, 352, 618, 2303, 5261, 9969, 17472, 32768, 0]; /// Default CDF table `EOB_PT_128_LUMA_CLASS1` (AV1 spec 9.4 initial probabilities). pub const EOB_PT_128_LUMA_CLASS1: [u16; 9] = [354, 558, 944, 2760, 7287, 14037, 21779, 32768, 0]; /// Default CDF table `EOB_PT_128_LUMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_128_LUMA_CLASS1_Q3: [u16; 9] = [886, 1731, 3271, 8469, 15569, 22126, 28383, 32768, 0]; +pub const EOB_PT_128_LUMA_CLASS1_Q3: [u16; 9] = + [886, 1731, 3271, 8469, 15569, 22126, 28383, 32768, 0]; /// `EOB_PT_32_CHROMA`'s class-1 sibling (`av1_default_eob_multi32_cdfs[q][1][1]`), /// read by an 8x4/4x8 chroma transform under a 1D luma `tx_type` @@ -5431,47 +5438,82 @@ pub const EOB_PT_32_CHROMA_CLASS1: [u16; 7] = [3542, 5502, 10415, 16760, 25644, pub const EOB_PT_32_CHROMA_CLASS1_Q3: [u16; 7] = [7699, 10897, 20891, 26926, 31628, 32768, 0]; /// `EOB_PT_128_CHROMA`'s class-1 sibling (`av1_default_eob_multi128_cdfs[q][1][1]`). -pub const EOB_PT_128_CHROMA_CLASS1_Q0: [u16; 9] = [2054, 3472, 5869, 14232, 18242, 20590, 26752, 32768, 0]; +pub const EOB_PT_128_CHROMA_CLASS1_Q0: [u16; 9] = + [2054, 3472, 5869, 14232, 18242, 20590, 26752, 32768, 0]; /// Default CDF table `EOB_PT_128_CHROMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_128_CHROMA_CLASS1_Q1: [u16; 9] = [2310, 4160, 7471, 14997, 17931, 20768, 30240, 32768, 0]; +pub const EOB_PT_128_CHROMA_CLASS1_Q1: [u16; 9] = + [2310, 4160, 7471, 14997, 17931, 20768, 30240, 32768, 0]; /// Default CDF table `EOB_PT_128_CHROMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_128_CHROMA_CLASS1: [u16; 9] = [6275, 9889, 14769, 23164, 27988, 30493, 32272, 32768, 0]; +pub const EOB_PT_128_CHROMA_CLASS1: [u16; 9] = + [6275, 9889, 14769, 23164, 27988, 30493, 32272, 32768, 0]; /// Default CDF table `EOB_PT_128_CHROMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_128_CHROMA_CLASS1_Q3: [u16; 9] = [9165, 13282, 21150, 30286, 31894, 32571, 32712, 32768, 0]; +pub const EOB_PT_128_CHROMA_CLASS1_Q3: [u16; 9] = + [9165, 13282, 21150, 30286, 31894, 32571, 32712, 32768, 0]; /// `EOB_PT_512_LUMA`'s class-1 sibling (`av1_default_eob_multi512_cdfs[q][0][1]`). -pub const EOB_PT_512_LUMA_CLASS1_Q0: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_LUMA_CLASS1_Q0: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_LUMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_LUMA_CLASS1_Q1: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_LUMA_CLASS1_Q1: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_LUMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_LUMA_CLASS1: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_LUMA_CLASS1: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_LUMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_LUMA_CLASS1_Q3: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_LUMA_CLASS1_Q3: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// `EOB_PT_512_CHROMA`'s class-1 sibling (`av1_default_eob_multi512_cdfs[q][1][1]`). -pub const EOB_PT_512_CHROMA_CLASS1_Q0: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_CHROMA_CLASS1_Q0: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_CHROMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_CHROMA_CLASS1_Q1: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_CHROMA_CLASS1_Q1: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_CHROMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_CHROMA_CLASS1: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_CHROMA_CLASS1: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// Default CDF table `EOB_PT_512_CHROMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_512_CHROMA_CLASS1_Q3: [u16; 11] = [3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0]; +pub const EOB_PT_512_CHROMA_CLASS1_Q3: [u16; 11] = [ + 3277, 6554, 9830, 13107, 16384, 19661, 22938, 26214, 29491, 32768, 0, +]; /// `EOB_PT_1024_LUMA`'s class-1 sibling (`av1_default_eob_multi1024_cdfs[q][0][1]`). -pub const EOB_PT_1024_LUMA_CLASS1_Q0: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_LUMA_CLASS1_Q0: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_LUMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_LUMA_CLASS1_Q1: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_LUMA_CLASS1_Q1: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_LUMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_LUMA_CLASS1: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_LUMA_CLASS1: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_LUMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_LUMA_CLASS1_Q3: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_LUMA_CLASS1_Q3: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// `EOB_PT_1024_CHROMA`'s class-1 sibling (`av1_default_eob_multi1024_cdfs[q][1][1]`). -pub const EOB_PT_1024_CHROMA_CLASS1_Q0: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_CHROMA_CLASS1_Q0: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_CHROMA_CLASS1_Q1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_CHROMA_CLASS1_Q1: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_CHROMA_CLASS1_Q1: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_CHROMA_CLASS1` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_CHROMA_CLASS1: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; +pub const EOB_PT_1024_CHROMA_CLASS1: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; /// Default CDF table `EOB_PT_1024_CHROMA_CLASS1_Q3` (AV1 spec 9.4 initial probabilities). -pub const EOB_PT_1024_CHROMA_CLASS1_Q3: [u16; 12] = [2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0]; - +pub const EOB_PT_1024_CHROMA_CLASS1_Q3: [u16; 12] = [ + 2979, 5958, 8937, 11916, 14895, 17873, 20852, 23831, 26810, 29789, 32768, 0, +]; diff --git a/crates/ec-av1/src/cdf_state.rs b/crates/ec-av1/src/cdf_state.rs index 27c3e006..d43d1588 100644 --- a/crates/ec-av1/src/cdf_state.rs +++ b/crates/ec-av1/src/cdf_state.rs @@ -400,7 +400,7 @@ pub(crate) struct Cdfs { /// The same, for a 4x4 luma transform (lane-av1tx4). pub txb_skip_luma_4: [[u16; 3]; 7], /// The all-zero flag of an 8x8 chroma transform. - pub txb_skip_chroma_8: [[u16; 3]; 3], + pub txb_skip_chroma_8: [[u16; 3]; 6], /// The all-zero flag of a 4x4 chroma transform. /// lane-lossless: SIX rows, like [`Self::txb_skip_chroma_32`] -- the last /// three are `get_txb_ctx`'s `+10` rows (chroma plane block bigger than @@ -500,7 +500,7 @@ pub(crate) struct Cdfs { /// The same, for a 64x64 luma transform. pub txb_skip_luma_64: [[u16; 3]; 7], /// The all-zero flag of a 16x16 chroma transform. - pub txb_skip_chroma_16: [[u16; 3]; 3], + pub txb_skip_chroma_16: [[u16; 3]; 6], /// The all-zero flag of a 32x32 chroma transform. /// SIX contexts, not three: rows 0..3 are libaom's `txb_skip_ctx` 7..9 /// (chroma transform == its plane block) and rows 3..6 its 10..12 (plane @@ -828,9 +828,7 @@ fn reset3(a: &mut [[[u16; N]; M] /// [`reset3`] for a table whose ALPHABET grows with its first index: the /// palette colour-index CDFs are `[u16; 9]` rows read as `[..=n]` with /// `n = idx + 2`, so their symbol counter sits at index `n`, not `N - 1`. -fn reset_var_alphabet( - a: &mut [[[u16; N]; M]; K], -) { +fn reset_var_alphabet(a: &mut [[[u16; N]; M]; K]) { for (idx, rows) in a.iter_mut().enumerate() { for row in rows.iter_mut() { row[idx + 2] = 0; @@ -1067,13 +1065,27 @@ impl Cdfs { cdf::TXB_SKIP_LUMA_4_CTX, cdf::TXB_SKIP_LUMA_4_Q3_CTX, ), - txb_skip_chroma_8: pick( - q_ctx, - cdf::TXB_SKIP_CHROMA_8_Q0, - cdf::TXB_SKIP_CHROMA_8_Q1, - cdf::TXB_SKIP_CHROMA_8, - cdf::TXB_SKIP_CHROMA_8_Q3, - ), + txb_skip_chroma_8: { + // lane-av1-422b: rows 3..6 are the `+10` chroma rows + // (`TXB_SKIP_CHROMA_8_BIG`) -- neutral in libaom's defaults, + // reached only when the plane block is larger than an 8x8 + // transform, i.e. only at 4:2:2 today. + let small = pick( + q_ctx, + cdf::TXB_SKIP_CHROMA_8_Q0, + cdf::TXB_SKIP_CHROMA_8_Q1, + cdf::TXB_SKIP_CHROMA_8, + cdf::TXB_SKIP_CHROMA_8_Q3, + ); + [ + small[0], + small[1], + small[2], + cdf::TXB_SKIP_CHROMA_8_BIG[0], + cdf::TXB_SKIP_CHROMA_8_BIG[1], + cdf::TXB_SKIP_CHROMA_8_BIG[2], + ] + }, txb_skip_chroma_4: { let small = pick( q_ctx, @@ -1387,13 +1399,27 @@ impl Cdfs { cdf::TXB_SKIP_LUMA_64_CTX, cdf::TXB_SKIP_LUMA_64_Q3_CTX, ), - txb_skip_chroma_16: pick( - q_ctx, - cdf::TXB_SKIP_CHROMA_16_Q0, - cdf::TXB_SKIP_CHROMA_16_Q1, - cdf::TXB_SKIP_CHROMA_16, - cdf::TXB_SKIP_CHROMA_16_Q3, - ), + txb_skip_chroma_16: { + // lane-av1-422b: rows 3..6 are the `+10` chroma rows + // (`TXB_SKIP_CHROMA_16_BIG`) -- neutral in libaom's defaults, + // reached only when the plane block is larger than a 16x16 + // transform, i.e. only at 4:2:2 today. + let small = pick( + q_ctx, + cdf::TXB_SKIP_CHROMA_16_Q0, + cdf::TXB_SKIP_CHROMA_16_Q1, + cdf::TXB_SKIP_CHROMA_16, + cdf::TXB_SKIP_CHROMA_16_Q3, + ); + [ + small[0], + small[1], + small[2], + cdf::TXB_SKIP_CHROMA_16_BIG[0], + cdf::TXB_SKIP_CHROMA_16_BIG[1], + cdf::TXB_SKIP_CHROMA_16_BIG[2], + ] + }, txb_skip_chroma_32: { let small = pick( q_ctx, diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index cf2f181e..af9b70ae 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -486,7 +486,15 @@ pub(crate) fn lossless_tx(px: usize, fctx: &crate::decode::FrameCtx) -> usize { /// picks the 13-symbol one (class `wrong-alphabet-same-value`). pub(crate) fn cfl_allowed_px(bw: usize, bh: usize, fctx: &crate::decode::FrameCtx) -> bool { if lossless(fctx) { - bw <= 8 && bh <= 8 + // `is_cfl_allowed`: at lossless CfL is available only when the + // partition size equals the transform size -- the CHROMA plane block + // must be a single TX_4X4. True for an 8x8 partition at 4:2:0 (its + // plane block is 4x4) and for 4x4 partitions; FALSE for an 8x8 + // partition at 4:4:4, whose plane block is 8x8 -- that partition + // reads the 13-symbol uv_mode CDF, and reading the CFL alphabet + // there desynced the tile from the leaf's own uv_mode symbol (class + // `wrong-alphabet-same-value`). + (bw >> ss_x(fctx)).max(4) == 4 && (bh >> ss_y(fctx)).max(4) == 4 } else { bw <= 32 && bh <= 32 } @@ -1509,6 +1517,36 @@ fn tu_reach( fixed } +/// [`tu_reach`] for a unit whose LUMA footprint is a `tx_w` x `tx_h` rect +/// (lane-av1-422b: a 4:2:2 chroma unit is square in chroma pixels, but its +/// luma anchor is `(chroma_tx << ss_x, chroma_tx << ss_y)` -- at ss (1,0) +/// twice as wide as it is tall). Same predicate as [`tu_reach`]; the +/// square mismatch counter only means anything when the footprint actually +/// is square. +#[allow(clippy::too_many_arguments)] +fn tu_reach_rect( + bw: usize, + bh: usize, + col_off: usize, + row_off: usize, + tx_w: usize, + tx_h: usize, + block: Reach, + px: usize, + py: usize, + width: usize, + height: usize, fctx: &crate::decode::FrameCtx, +) -> Reach { + let fixed = Reach::of_tu(bw, bh, col_off, row_off, tx_w, tx_h, block); + if tx_w == tx_h { + let standalone = Reach::of(tx_w, px + col_off, py + row_off, width, height, fctx); + if fixed != standalone { + hit!(SPLIT_TU_REACH_FIX_HITS); + } + } + fixed +} + // How many `uv_mode` reads resolved to `SMOOTH_PRED..=PAETH_PRED` (9..=12), // across every call on the current thread -- lane-chroma r3's own before/after // counter, proving a stream actually exercised chroma's smooth/paeth @@ -1990,6 +2028,100 @@ pub(crate) fn rect_split_chroma_shape_hits() -> [usize; 4] { RECT_SPLIT_CHROMA_SHAPE_HITS.with(|c| c.get()) } +// lane-av1-422: how many SQUARE chroma coefficient units the strip path read +// on a 4:2:2 frame (ss 1,0) -- the half-width, unhalved-height shape whose +// tables only exist because of the square rows in the chroma_tiled arm. A +// 4:2:0 or 4:4:4 frame can never increment it (their rect strips' chroma is +// itself rect), and a restored `/2 chroma height` diverts 4:2:2 squares onto +// the rect rows, so the witness gate reads 0 there and fails. +thread_local! { + static CHROMA422_SQUARE_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_SQUARE_HITS`]. +// lane-av1-422b: `pub` so `examples/decode_probe.rs` can census it the way +// it does every other capability counter. +pub fn chroma422_square_hits() -> usize { + CHROMA422_SQUARE_HITS.with(|c| c.get()) +} + +// lane-av1-422f: how many RECT chroma coefficient units the square-block +// path read on a 4:2:2 frame (ss 1,0) -- TX_4X8 / TX_8X16 / TX_16X32, the +// plane block's own half-width, unhalved-height shape. A 4:2:0 or 4:4:4 +// frame never takes the rect branch (their units are square +// `chroma_tx == chroma_tx_h`), so a witness gate reading 0 here proves the +// model reverted to squares. +thread_local! { + static CHROMA422_RECT_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_RECT_HITS`]. +pub fn chroma422_rect_hits() -> usize { + CHROMA422_RECT_HITS.with(|c| c.get()) +} + +// lane-av1-422g: how many PER-LEAF TX_4X4 chroma coefficient units the +// sub-8x8 split4 path read on a 4:2:2 frame (ss 1,0) -- one per even-column +// leaf per plane (`is_chroma_reference`'s `!(mi_col & ss_x)`). A 4:2:0 frame +// codes no sub-8 chroma at all and 4:4:4 goes through `sub8_leaf_chroma444`, +// so a witness gate reading 0 here proves the per-leaf 4:2:2 arm never ran. +thread_local! { + static CHROMA422_SUB8_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_SUB8_HITS`]. +pub fn chroma422_sub8_hits() -> usize { + CHROMA422_SUB8_HITS.with(|c| c.get()) +} + +// lane-av1-422sub8rect: how many PER-PIECE TX_4X4 chroma coefficient units +// the INTER sub-8x8 split4 path read on a 4:2:2 frame (ss 1,0) -- one per +// non-skipped odd-column piece per plane (`is_chroma_reference`'s +// `mi_col & 0x01` at ss_x 1). 4:2:0 goes through the shared group unit and +// 4:4:4 through [`sub8_leaf_chroma444`]'s own per-piece twin, so a witness +// gate reading 0 here proves the inter 4:2:2 per-piece arm never ran. +thread_local! { + static CHROMA422_INTER_SUB8_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_INTER_SUB8_HITS`]. +pub fn chroma422_inter_sub8_hits() -> usize { + CHROMA422_INTER_SUB8_HITS.with(|c| c.get()) +} + +// lane-av1-422m: how many TX_4X4 chunk units the invalid-ss-size chroma arm +// read (the 8x32 luma block whose 4:2:2 plane has no `ss_size_lookup` block). +// A 4:2:0 or 4:4:4 frame cannot increment it, so a non-zero read proves the +// chunked 4:2:2 chroma really decoded. +thread_local! { + static CHROMA422_CHUNK_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_CHUNK_HITS`]. +pub fn chroma422_chunk_hits() -> usize { + CHROMA422_CHUNK_HITS.with(|c| c.get()) +} + +// lane-av1-422stripanchor: how many 4-wide-strip PAIR chroma units +// ([`decode_rect_split`]'s ported floored-pair anchor) decoded. A 4:2:0 or +// 4:4:4 frame cannot increment it (the arm is keyed to a 2-px-wide chroma +// block, which only a 1-mi-wide strip at ss (1, 0) produces), so a non-zero +// read proves a stream routed a 4-wide strip through the split path. +thread_local! { + static CHROMA422_PAIR_WIDE_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA422_PAIR_WIDE_HITS`]. +pub fn chroma422_pair_wide_hits() -> usize { + CHROMA422_PAIR_WIDE_HITS.with(|c| c.get()) +} + // How many HORZ/VERT intra strips actually predicted with filter intra // (lane-rectsplit r1) -- the case `decode_block_rect` refused by name // ("this decoder predicts square-only") until `predict_filter_intra` took @@ -2575,7 +2707,10 @@ impl TxParams { if self.stride == 0 { return residual; } - let mut strided = vec![0i32; self.stride * self.stride]; + // lane-av1-422sub8rect: `h` rows of `stride` -- a rect unit whose + // height exceeds its (narrow) prediction stride needs the full + // stride * h; every square caller has h == stride and is unchanged. + let mut strided = vec![0i32; self.stride * self.h]; for row in 0..self.h { strided[row * self.stride..][..self.w] .copy_from_slice(&residual[row * self.w..][..self.w]); @@ -2983,10 +3118,18 @@ pub(crate) struct WaveState { q: std::sync::Mutex, cv: std::sync::Condvar, planes: ReconPlanes, - /// The two [`FrameCtx`] fields reconstruction reads (`sample_max` is + /// The [`FrameCtx`] fields reconstruction reads (`sample_max` is /// `bit_depth`'s; everything else a `reconstruct*` needs is in the op). bit_depth: u8, enable_edge_filter: bool, + /// lane-av1wavefront: the sequence's chroma subsampling. The replay-side + /// readers -- the deferred chroma builds' `mv_to_q4(.., ss_x(fctx))` + /// positions and `exec_intra`'s CfL AC signal -- must see the FRAME's + /// pair, not [`FrameCtx::new`]'s 4:2:0 default: on a 4:4:4 stream the + /// default halved every worker's chroma reference position and lost the + /// chroma planes (the 444_sb128rect witness, U 17504 / V 3 at PREFILT on + /// frame 1) while every 4:2:0 gate stream stayed accidentally exact. + subsampling: (u8, u8), last_col: usize, } @@ -3139,6 +3282,9 @@ fn wave_worker(st: &WaveState, idx: usize) { let fctx = FrameCtx::new(); fctx.bit_depth.set(st.bit_depth); fctx.enable_edge_filter.set(st.enable_edge_filter); + let (sx, sy) = st.subsampling; + fctx.subsampling_x.set(sx); + fctx.subsampling_y.set(sy); let stats = wave_stats(); let slot = idx.min(WS_SLOTS - 1); loop { @@ -3235,6 +3381,10 @@ impl<'a> WaveGuard<'a> { ), bit_depth: fctx.bit_depth.with(std::cell::Cell::get), enable_edge_filter: fctx.enable_edge_filter.with(std::cell::Cell::get), + subsampling: ( + fctx.subsampling_x.with(std::cell::Cell::get), + fctx.subsampling_y.with(std::cell::Cell::get), + ), last_col: cols - 1, }); let batch = crate::par::Batch::new("ec-av1-recon"); @@ -3918,6 +4068,30 @@ pub(crate) fn reset_skipped_intrabc_chroma_arm_hits() { SKIPPED_INTRABC_CHROMA_ARM_HITS.with(|c| c.set(0)); } +thread_local! { + /// lane-av1-ibcskip2: a sub-8x8 4:4:4 leaf that is BOTH intrabc AND + /// `skip` -- the arm whose chroma is the bare frame copy at the DV + /// (libaom `av1_build_inter_predictors_sb` runs regardless of `skip`). + /// Before the fix this route predicted intra-DC and every one of this + /// fixture's 150 such cells differed from the oracle on both chroma + /// planes. + static SKIPPED_INTRABC_DV_COPY_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`SKIPPED_INTRABC_DV_COPY_HITS`]. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn skipped_intrabc_dv_copy_hits() -> usize { + SKIPPED_INTRABC_DV_COPY_HITS.with(|c| c.get()) +} + +/// Zeroes [`SKIPPED_INTRABC_DV_COPY_HITS`] (gate tests call this before a +/// decode). +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn reset_skipped_intrabc_dv_copy_hits() { + SKIPPED_INTRABC_DV_COPY_HITS.with(|c| c.set(0)); +} + /// Zeroes [`INTRABC_HITS`] (gate tests call this before a decode). #[allow(dead_code)] // read only from the `#[cfg(test)]` gates pub(crate) fn reset_intrabc_hits() { @@ -4356,6 +4530,23 @@ pub(crate) fn affine_gm_hits() -> usize { AFFINE_GM_HITS.with(|c| c.get()) } +// lane-av1gwarp12: how many 16x16+ blocks built their SINGLE-reference +// prediction through `crate::warp::global_warp_params` with a FOUR-parameter +// (`ROTZOOM`) model. Vanilla aomenc pins its global-motion search to ROTZOOM +// (`global_motion_facade.c:24`), so this is the only >TRANSLATION single-ref +// global-warp arm a real aomenc stream can reach (AFFINE needs the widened +// side build and its own counter, [`AFFINE_GM_HITS`]). +thread_local! { + static ROTZOOM_GM_WARP_HITS: std::cell::Cell = + const { std::cell::Cell::new(0) }; +} + +/// Current value of [`ROTZOOM_GM_WARP_HITS`]. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn rotzoom_gm_warp_hits() -> usize { + ROTZOOM_GM_WARP_HITS.with(|c| c.get()) +} + // lane-t900 r9: rect blocks whose warp-sample top-right probe answers // differently at the block's WIDTH than at libaom's // `AOMMAX(xd->width, xd->height)` -- each one is a `num_proj_ref` that could @@ -5313,6 +5504,17 @@ thread_local! { /// entropy bands were zeroed per unit (libaom `av1_reset_entropy_context`, /// decodeframe.c:1262) instead of leaking the previous occupant's. static SKIP_LOSSLESS_BAND_RESET_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// lane-av1-llband: 4x4 chroma transform units a lossless HORZ/VERT strip + /// walked at subsampling 0/0 (one unit per mi cell -- the geometry the + /// hardcoded 4:2:0 span mis-stepped). + static RECT_SPLIT_LOSSLESS_CHROMA444_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// lane-av1-ibc444rect: unskipped intrabc 8x4/4x8 leaves whose luma + /// coefficients a lossless frame walked as per-4x4 inter units (the walk + /// that replaced the single rect unit). + static INTRABC_RECT8_LOSSLESS_LUMA_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// lane-av1-ibc444rect: unskipped intrabc 8x4/4x8 leaves whose chroma a + /// lossless 4:4:4 frame walked as per-4x4 [`TxbSet::Chroma4`] units. + static INTRABC_RECT8_LOSSLESS_CHROMA_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } /// How many skipped sub-8x8 chroma blocks carried a CfL alpha (the shape @@ -5335,6 +5537,32 @@ pub fn skip_lossless_band_reset_hits() -> usize { SKIP_LOSSLESS_BAND_RESET_HITS.with(|c| c.get()) } +/// How many 4x4 chroma transform units a lossless HORZ/VERT strip walked at +/// subsampling 0/0 (lane-av1-llband). Zero means a stream never decoded the +/// 4:4:4 lossless unit walk this counter proves -- a gate asserting the fix +/// must see this nonzero. +pub fn rect_split_lossless_chroma444_hits() -> usize { + RECT_SPLIT_LOSSLESS_CHROMA444_HITS.with(|c| c.get()) +} + +/// How many unskipped intrabc 8x4/4x8 leaves a lossless frame walked luma as +/// per-4x4 inter units (lane-av1-ibc444rect). +pub fn intrabc_rect8_lossless_luma_hits() -> usize { + INTRABC_RECT8_LOSSLESS_LUMA_HITS.with(|c| c.get()) +} + +/// How many unskipped intrabc 8x4/4x8 leaves a lossless 4:4:4 frame walked +/// chroma as per-4x4 [`TxbSet::Chroma4`] units (lane-av1-ibc444rect). +pub fn intrabc_rect8_lossless_chroma_hits() -> usize { + INTRABC_RECT8_LOSSLESS_CHROMA_HITS.with(|c| c.get()) +} + +/// Gate-side reset for the two lane-av1-ibc444rect counters above. +pub fn reset_ibc444rect_hits() { + INTRABC_RECT8_LOSSLESS_LUMA_HITS.with(|c| c.set(0)); + INTRABC_RECT8_LOSSLESS_CHROMA_HITS.with(|c| c.set(0)); +} + /// Gate-side reset for the two lane-av1-loss64 counters above. pub fn reset_loss64_hits() { CHROMA_EDGE_TU_CLIP_HITS.with(|c| c.set(0)); @@ -8433,6 +8661,62 @@ impl Neighbours { o.1 |= left[plane].level != 0; o.2 += dc_vote(left[plane].dc); } + } + out + } + + /// [`Self::around_mi_rect`] for the CHROMA planes of a 4:2:2 frame + /// (lane-av1-422f): libaom `get_txb_ctx_general` reads its above votes + /// over `txb_w_unit` CHROMA 4-px cells, and at ss_x 1 one chroma cell + /// spans TWO luma mi columns. Both cells of a column carry the covering + /// unit's whole-unit dc sign (the same value libaom stores), so the + /// per-luma-mi sum counts each chroma column twice -- and + /// `dc_sign_ctx`'s signum flips whenever the above and left votes have + /// opposite signs with equal magnitude (measured at mi(4,4) plane 1 of + /// the t422 fixture: ours read `dc_sign_cdf[1]`, the oracle row 0). + /// Sampling every second above cell counts each chroma column once, + /// which IS libaom's sum. The left extent is unsubsquared at ss_y 0, so + /// its per-mi cells already line up one-to-one. The level booleans are + /// ORs over duplicated cells, so the sampling cannot change them. + fn around_mi_422_chroma( + &self, + (mi_r, mi_c): (usize, usize), + w: usize, + h: usize, + ) -> [(bool, bool, i32); 3] { + let (w_mi, h_mi) = (w / MI, h / MI); + let above_mi = w_mi.min(self.mi_cols.saturating_sub(mi_c)); + let left_mi = h_mi.min(self.mi_rows.saturating_sub(mi_r)); + let mut out = [(false, false, 0i32); 3]; + for cell in (0..above_mi).step_by(2) { + let above = &self.above[mi_c + cell]; + for (plane, o) in out.iter_mut().enumerate() { + o.0 |= above[plane].level != 0; + o.2 += dc_vote(above[plane].dc); + } + } + for cell in 0..left_mi { + let left = &self.left[mi_r + cell]; + for (plane, o) in out.iter_mut().enumerate() { + o.1 |= left[plane].level != 0; + o.2 += dc_vote(left[plane].dc); + } + } + if crate::envflags::env_flag!("EC_DCDUMP") { + // lane-av1422mi24: same dump [`Self::around_mi_rect`] prints, so + // a rerouted 4:2:2 chroma gather stays visible under EC_DCDUMP=1. + // The above rows are the SAMPLED (every-second) cells. + for (plane, o) in out.iter().enumerate() { + let vote = o.2; + let ab: Vec = (0..above_mi) + .step_by(2) + .map(|k| format!("{:?}/{}", self.above[mi_c + k][plane].dc, self.above[mi_c + k][plane].level)) + .collect(); + let lf: Vec = (0..left_mi) + .map(|k| format!("{:?}/{}", self.left[mi_r + k][plane].dc, self.left[mi_r + k][plane].level)) + .collect(); + eprintln!("EC_DCDUMP422 mi=({mi_r},{mi_c}) plane={plane} wh=({w},{h}) vote={vote} above=[{}] left=[{}]", ab.join(","), lf.join(",")); + } } out } @@ -8960,6 +9244,13 @@ impl Neighbours { let round_up_even = |n: usize| n.div_ceil(2) * 2; let (bound_h, bound_w) = (round_up_even(self.mi_rows), round_up_even(self.mi_cols)); let state = neighbour_state(grid); + if crate::envflags::env_flag!("EC_CHROMA_PUB") { + eprintln!( + "EC_CHROMA_PUB plane={plane} mi=({mi_r},{mi_c}) wh=({w_px},{h_px}) lvl={} dc={}", + state.level, + state.dc.map_or(-1, |s| i32::from(s)) + ); + } for cell in 0..(h_px / MI).min(bound_h.saturating_sub(mi_r)) { self.left[mi_r + cell][plane] = state; } @@ -10016,6 +10307,35 @@ fn depth_to_tx_wh( (w, h) } +/// lane-av1-422stripanchor: [`decode_rect_split`]'s 4-wide-strip port of the +/// split4 floored-pair anchor ([`sub8_leaf_chroma422`]'s rule). A 1-mi-wide +/// strip (luma `(4, 16)` / `(4, 8)`) has NO chroma plane block of its own at +/// ss (1, 0) -- `av1_ss_size_lookup[BLOCK_4X16][1][0]` and +/// `[BLOCK_4X8][1][0]` are both BLOCK_INVALID (`common_data.c`), and a +/// 2-px-wide area is not a transform shape. The strip pairs with its +/// even-column sibling (`is_chroma_reference`'s `mi_col & 1` column clause, +/// the rule [`decode_rect4_16_strip`] implements one partition level up), and +/// the ODD-column strip codes the PAIR's `(4, bh)` plane anchored at +/// `av1_setup_dst_planes`' mi-exact floor `(mi_col & !1) * MI >> ss_x`, with +/// the entropy context on the floored cell. Returns +/// `(pair block width, pair block height, write anchor x, entropy mi column)` +/// for that pair, or `None` when the strip keeps its own plane block at its +/// own origin -- which is every 4:2:0 and 4:4:4 cell (their chroma is never +/// 2 px wide) and every 4:2:2 strip of 8 px or more. +fn chroma422_pair_plane( + ss_x: bool, + ss_y: bool, + mi_col: usize, + bw: usize, + bh: usize, +) -> Option<(usize, usize, usize, usize)> { + if ss_x && !ss_y && (bw >> 1) == 2 { + Some((4, bh, ((mi_col & !1) * MI) >> 1, mi_col & !1)) + } else { + None + } +} + /// Decodes the planes of one `bw`x`bh` HORZ/VERT intra strip whose luma /// transform is SPLIT (`tx_depth != 0`) -- lane-rectsplit r1, the case every /// rect path here refused by name until now ("per-unit rect prediction is not @@ -10061,6 +10381,36 @@ fn decode_rect_split( let (px, py) = (mi_c * MI, mi_r * MI); let (cpx, cpy) = (px >> ss_x(fctx), py >> ss_y(fctx)); let (chroma_w, chroma_h) = (bw >> ss_x(fctx), bh >> ss_y(fctx)); + // lane-av1-422blockhalf: at ss (1,0) the tall/wide 1:2 and 1:4 strips' + // chroma plane block is BLOCK_INVALID (`av1_ss_size_lookup[...][1][0]`, + // blockd.h -- the 4:2:2 column maps BLOCK_8X16/16X32/32X64/64X128 and + // BLOCK_8X32/16X64, plus 4-wide BLOCK_4X16, to BLOCK_INVALID), so + // `av1_get_max_uv_txsize` indexes `max_txsize_rect_lookup` OUT OF BOUNDS + // and the pinned Release oracle byte there is TX_4X8 (the lane-av1-422m + // measurement). The plane is still coded -- `decode_token_recon_block` + // steps it in that (4, 8) unit shape -- so the strip's chroma tiles into + // 4x8 rect units, plane-major. + let chroma_422_oob = ss_x(fctx) == 1 + && ss_y(fctx) == 0 + && matches!( + (bw, bh), + (8, 16) | (16, 32) | (32, 64) | (64, 128) | (8, 32) | (16, 64) + ); + // lane-av1-422stripanchor: the 4-wide strips' PAIR chroma -- the ported + // floored-pair anchor. `chroma422_pair_plane` is `Some` exactly when this + // strip's own chroma block would be 2 px wide at ss (1, 0); the pair's + // plane is then `(4, chroma_h)` written at the FLOORED cell + // (`chroma_x`), and the skip/tiled chroma arms below tile it in (4, 8) + // units (the OOB `max_txsize_rect_lookup[BLOCK_INVALID]` byte, TX_4X8 -- + // the same walk the (8, 32) class takes). The lossless raster arm keeps + // the strip's own geometry: no caller of this function can present a + // 4-wide strip yet (the enumeration test pins the five callers at + // `8 <= min`), and the skip/tiled arms are the routes a future caller + // needs. + let chroma422_pair = chroma422_pair_plane(ss_x(fctx) == 1, ss_y(fctx) == 0, mi_c, bw, bh); + let chroma_422_pair_wide = chroma422_pair.is_some(); + let (chroma_block_w, chroma_block_h, chroma_x) = chroma422_pair + .map_or((chroma_w, chroma_h, cpx), |(w, h, x, _)| (w, h, x)); // The chroma transform is picked before any symbol is read, so an // unsupported chroma shape refuses before this strip desyncs the tile. let chroma: Option<(TxbSet, &[u16])> = match (chroma_w, chroma_h) { @@ -10083,6 +10433,25 @@ fn decode_rect_split( (4, 8) => Some((TxbSet::ChromaRect8x4, &SCAN_4X8[..])), _ => None, }; + // A 4:4:4 64-axis strip's chroma plane block is larger than one adjusted + // UV transform (TX_64X32 adjusts to TX_32X32). Those sizes are tiled + // below; everything else still needs a single-unit table. + // lane-av1-422: a 4:2:2 strip's chroma plane keeps the strip's HEIGHT and + // halves only the width, so a rect luma strip codes a SQUARE chroma block + // (16x8 luma -> 8x8 chroma) -- the square rows below. At 4:2:0 and 4:4:4 a + // rect strip's chroma is itself rect, so the square rows are unreachable + // there and cannot change their results. + // lane-av1-422blockhalf: the tiled arms below handle every shape this + // strip can carry (including the 4:2:2 BLOCK_INVALID planes), so the + // diagnostic names only the shapes that would actually refuse -- it used + // to fire for every tiled square too (the parent lane's `chroma=8x8` + // rows) and sent the next lane chasing handled shapes. + let chroma_tiled = chroma_422_pair_wide + || chroma_422_oob + || matches!( + (chroma_w, chroma_h), + (64, 32) | (32, 64) | (64, 16) | (16, 64) | (32, 32) | (16, 16) | (8, 8) + ); if !m.skip { if let Some(i) = match (chroma_w, chroma_h) { (32, 8) => Some(0), @@ -10099,11 +10468,14 @@ fn decode_rect_split( }); } } - if chroma.is_none() { + if !m.skip && chroma.is_none() && !chroma_tiled { // Diagnostic for the next caller that lands here (class // refusal-names-a-correlate: the message names the tool, not the // shape); the refusal below keeps its inventory-pinned wording. - eprintln!("EC_RECTCHROMA_GAP luma={bw}x{bh} tx={tx_w}x{tx_h} chroma={chroma_w}x{chroma_h}"); + eprintln!( + "EC_RECTCHROMA_GAP luma={bw}x{bh} tx={tx_w}x{tx_h} \ + chroma={chroma_w}x{chroma_h}" + ); } } // lane-rectsplit r2 (verifier finding): with both callers wired @@ -10113,10 +10485,6 @@ fn decode_rect_split( // caller -- a new strip size would otherwise hit the `expect` below and // panic instead of refusing by name -- and so stays in // `refusal_inventory::REFUSALS`. - // A 4:4:4 64-axis strip's chroma plane block is larger than one adjusted - // UV transform (TX_64X32 adjusts to TX_32X32). Those sizes are tiled - // below; everything else still needs a single-unit table. - let chroma_tiled = matches!((chroma_w, chroma_h), (64, 32) | (32, 64) | (64, 16) | (16, 64)); if !m.skip && chroma.is_none() && !chroma_tiled { return Err(unsupported( "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here", @@ -10395,7 +10763,7 @@ fn decode_rect_split( // them with the LAST unit's state (class `override-slot-on-one-arm`: the // next block then read `dc_sign_ctx` 1 where libaom reads 0). They are // collected here and replayed after that record. - let mut ll_chroma_units: Vec<((usize, usize), usize, Grid)> = Vec::new(); + let mut ll_chroma_units: Vec<((usize, usize), usize, Grid, usize, usize)> = Vec::new(); // The chroma_tiled arm below stamps each unit's coefficient context // immediately (so the NEXT unit reads it), then the whole-strip // `record_split_luma_rect_mi` rewrites every chroma cell with ONE @@ -10405,8 +10773,25 @@ fn decode_rect_split( // `ll_chroma_units` and `decode_inter_block`'s `mu_chroma_units` tail // already do. let mut tiled_chroma_units: Vec<((usize, usize), usize, Grid, usize, usize)> = Vec::new(); - let ac = m.alpha.map(|_| cfl_src_rect(px, py, bw, bh)); - let reach = block_reach; + let ac = m.alpha.map(|_| { + // lane-av1-422stripanchor: the pair unit's CfL source is the PAIR's + // luma -- the 8-px-wide region the floored 4-px chroma block covers + // (`av1_setup_dst_planes`' floor), never the odd strip's own 4 px. + if chroma_422_pair_wide { + cfl_src_rect((mi_c & !1) * MI, py, 8, bh) + } else { + cfl_src_rect(px, py, bw, bh) + } + }); + let reach = if chroma_422_pair_wide { + // The chroma units predict off the PAIR block's edges: an odd-column + // strip's pair starts 4 luma px to the strip's left, so the strip's + // own answer names the wrong above/right samples (the pair16 arm's + // `pair_reach`, one partition level up). + Reach::of_rect(8, bh, (mi_c & !1) * MI, py, y.width, y.height, fctx) + } else { + block_reach + }; let (u_grid, v_grid) = if mono(fctx) { // lane-av1mono: a monochrome frame codes no chroma coefficients on // any block (`plane < av1_num_planes == 1`), so the whole chroma @@ -10415,21 +10800,63 @@ fn decode_rect_split( let zero = Grid::Zero(chroma_w * chroma_h); (zero.clone(), zero) } else if m.skip { - let zero = Grid::Zero(chroma_w * chroma_h); - if let Some((ub, _)) = &m.palette_uv { - set_palette_pred(ub.clone(), fctx); - } - push_intra_rect(1, - cpx, cpy, chroma_w, chroma_h, m.uv_predict_mode, m.angle_delta_uv, reach, &zero, - m.alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, m.smooth_neighbor_uv, fctx, - ); - if let Some((_, vb)) = &m.palette_uv { - set_palette_pred(vb.clone(), fctx); + let zero = Grid::Zero(chroma_block_w * chroma_block_h); + if chroma_422_pair_wide || chroma_422_oob { + // lane-av1-422blockhalf: libaom predicts an INTRA strip's chroma + // per transform unit even when the strip is skipped + // (`decode_token_recon_block`'s per-TU plane walk runs before the + // skip guard), so the BLOCK_INVALID plane predicts as (4, 8) + // units -- one whole-plane push here would ask the intra + // predictor for a 1:8 rect it never needs. + // lane-av1-422stripanchor: the 4-wide strip's PAIR plane does the + // same, over the pair's own `(chroma_block_w, chroma_block_h)` + // grid at the floored anchor `chroma_x`. + let (uw, uh) = (4usize, 8usize); + for plane_idx in 1..=2 { + if let Some((ub, vb)) = &m.palette_uv { + let buf = if plane_idx == 1 { ub } else { vb }; + set_palette_pred(buf.clone(), fctx); + } + for cu_row in 0..chroma_block_h / uh { + for cu_col in 0..chroma_block_w / uw { + push_intra_rect( + plane_idx, + chroma_x + cu_col * uw, + cpy + cu_row * uh, + uw, + uh, + m.uv_predict_mode, + m.angle_delta_uv, + reach, + &ZERO_RESIDUAL[..uw * uh], + m.alpha.zip(ac.clone()).map(|((au, av), ac)| { + ( + if plane_idx == 1 { au } else { av }, + ac, + ) + }), + None, + m.smooth_neighbor_uv, fctx, + ); + } + } + } + } else { + if let Some((ub, _)) = &m.palette_uv { + set_palette_pred(ub.clone(), fctx); + } + push_intra_rect(1, + cpx, cpy, chroma_w, chroma_h, m.uv_predict_mode, m.angle_delta_uv, reach, &zero, + m.alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, m.smooth_neighbor_uv, fctx, + ); + if let Some((_, vb)) = &m.palette_uv { + set_palette_pred(vb.clone(), fctx); + } + push_intra_rect(2, + cpx, cpy, chroma_w, chroma_h, m.uv_predict_mode, m.angle_delta_uv, reach, &zero, + m.alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, m.smooth_neighbor_uv, fctx, + ); } - push_intra_rect(2, - cpx, cpy, chroma_w, chroma_h, m.uv_predict_mode, m.angle_delta_uv, reach, &zero, - m.alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, m.smooth_neighbor_uv, fctx, - ); (zero.clone(), zero) } else if lossless(fctx) { // lane-lossless: the strip's chroma plane block is coded as 4x4 @@ -10443,19 +10870,29 @@ fn decode_rect_split( let scan4 = default_scan(4); let offset = (chroma_w > 4 || chroma_h > 4).then_some(3); let (cw_n, ch_n) = (chroma_w / 4, chroma_h / 4); + // lane-av1-llband: one 4x4 chroma unit's extent in LUMA pixels -- 4 + // chroma px scaled by the plane's own subsampling. The hardcoded 8 + // was the 4:2:0 unit's span; at 4:4:4 a unit is 4x4 LUMA px (one mi + // cell), and the 8-px step made every unit past the first column/row + // read its `txb_skip` context at the WRONG mi (two cells over) and + // stamp a 2-cell span with one unit's state -- the polluted above-band + // cell behind a 16x8 leaf's U bc=2 unit of the 444 lossless key frame + // (measured: oracle `EC_DBGCTX` reads 1-cell spans at 1-mi steps; + // ours read `above[28..29]` where the oracle read `above[26]`). + let span_x = 4 << ss_x(fctx); + let span_y = 4 << ss_y(fctx); let mut last = [Grid::Zero(16), Grid::Zero(16)]; for plane_idx in 1..=2 { for cu_row in 0..ch_n { for cu_col in 0..cw_n { - let luma_span = 8; let cu_mi = ( - mi_r + cu_row * (luma_span / MI), - mi_c + cu_col * (luma_span / MI), + mi_r + cu_row * (span_y / MI), + mi_c + cu_col * (span_x / MI), ); - let cu_around = neighbours.around_mi(cu_mi, luma_span); + let cu_around = neighbours.around_mi_rect(cu_mi, span_x, span_y); let cu_reach = tu_reach( bw, bh, - cu_col * luma_span, cu_row * luma_span, luma_span, + cu_col * span_x, cu_row * span_y, span_x, block_reach, px, py, y.width, y.height, fctx, ); let (cu_x, cu_y) = (cpx + cu_col * 4, cpy + cu_row * 4); @@ -10477,8 +10914,11 @@ fn decode_rect_split( }), None, offset, m.smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, luma_span, luma_span, plane_idx, &grid); - ll_chroma_units.push((cu_mi, plane_idx, grid.clone())); + if span_x == 4 && span_y == 4 { + hit!(RECT_SPLIT_LOSSLESS_CHROMA444_HITS); + } + neighbours.record_mi_chroma(cu_mi, span_x, span_y, plane_idx, &grid); + ll_chroma_units.push((cu_mi, plane_idx, grid.clone(), span_x, span_y)); last[plane_idx - 1] = grid; } } @@ -10486,15 +10926,49 @@ fn decode_rect_split( let [ug, vg] = last; (ug, vg) } else if chroma_tiled { - let (uw, uh, set, scan): (usize, usize, TxbSet, &[u16]) = match (chroma_w, chroma_h) { - (64, 32) | (32, 64) => (32, 32, TxbSet::Chroma32, default_scan(32)), - (64, 16) => (32, 16, TxbSet::ChromaRect32x16, &SCAN_32X16), - (16, 64) => (16, 32, TxbSet::ChromaRect32x16, &SCAN_16X32), - _ => unreachable!("chroma_tiled"), + let (uw, uh, set, scan): (usize, usize, TxbSet, &[u16]) = + if chroma_422_pair_wide || chroma_422_oob { + // lane-av1-422blockhalf / lane-av1-422stripanchor: the + // BLOCK_INVALID-plane chroma's (4, 8) units -- the Release + // oracle's out-of-bounds `max_txsize_rect_lookup` byte (TX_4X8, + // see above). For the 4-wide strip the units tile the PAIR's + // plane, stepping from the floored anchor. + (4, 8, TxbSet::ChromaRect8x4, &SCAN_4X8) + } else { + match (chroma_w, chroma_h) { + (64, 32) | (32, 64) | (32, 32) => (32, 32, TxbSet::Chroma32, default_scan(32)), + (64, 16) => (32, 16, TxbSet::ChromaRect32x16, &SCAN_32X16), + (16, 64) => (16, 32, TxbSet::ChromaRect32x16, &SCAN_16X32), + // lane-av1-422: the 4:2:2 square chroma planes (height unhalved), + // through the square reader like every other square chroma unit. + (16, 16) => (16, 16, TxbSet::Chroma16, default_scan(16)), + (8, 8) => (8, 8, TxbSet::Chroma8, default_scan(8)), + _ => unreachable!("chroma_tiled"), + } + }; + // lane-av1-422: the witness counter, keyed to ss (1,0) so only a 4:2:2 + // frame's square chroma units count it. + if uw == uh && ss_x(fctx) == 1 && ss_y(fctx) == 0 { + hit!(CHROMA422_SQUARE_HITS); + } + if chroma_422_pair_wide { + hit!(CHROMA422_PAIR_WIDE_HITS); + } + let (nw, nh) = (chroma_block_w / uw, chroma_block_h / uh); + // lane-av1-422stripanchor: the pair's plane block is BLOCK_INVALID + // whatever the pair size (`num_pels_log2_lookup[255]` reads 0xff in + // the pinned Release oracle), so its txb_skip rows always carry the + // bigger-plane +3 (the av1422q rule the pair16 arm measures). + let bigger = chroma_422_pair_wide || chroma_w * chroma_h > uw * uh; + // `av1_get_ext_tx_set_type`: a chroma transform whose square-up size + // is TX_32X32 or bigger resolves to `EXT_TX_SET_DCTONLY` for intra; + // smaller rect units (the 4:2:2 BLOCK_INVALID-plane (4, 8)s) take the + // mode-indexed default, the same rule the unsplit arm below applies. + let default_tx = if uw.max(uh) >= 32 { + TxType::DctDct + } else { + default_intra_tx_type(m.uv_predict_mode as u8) }; - let (nw, nh) = (chroma_w / uw, chroma_h / uh); - let bigger = chroma_w * chroma_h > uw * uh; - let default_tx = TxType::DctDct; let mut last = [Grid::Zero(uw * uh), Grid::Zero(uw * uh)]; for plane_idx in 1..=2 { for cu_row in 0..nh { @@ -10503,22 +10977,74 @@ fn decode_rect_split( let luma_span_y = uh << ss_y(fctx); let cu_mi = ( mi_r + cu_row * (luma_span_y / MI), - mi_c + cu_col * (luma_span_x / MI), + if chroma_422_pair_wide { mi_c & !1 } else { mi_c } + + cu_col * (luma_span_x / MI), ); - let cu_around = neighbours.around_mi_rect(cu_mi, luma_span_x, luma_span_y); - let (cu_x, cu_y) = (cpx + cu_col * uw, cpy + cu_row * uh); + // lane-av1-422blockhalf: the 4:2:2 (4, 8) units read their + // chroma context per chroma cell + // ([`Neighbours::around_mi_422_chroma`], the block-8 + // rule) -- the plain rect walk samples one chroma cell + // twice at ss_x 1. Every pre-existing shape keeps its own + // walk. + // lane-av1422mi24: the plain rect walk's double-count + // hits EVERY unit shape at ss (1,0), not just the (4, 8) + // one -- the (8, 8) unit of a 16x8 intra-in-inter strip + // read its above dc votes twice and its U dc_sign one + // ctx row high (t422 frame 1). Route every ss (1,0) + // unit through the every-second-above-cell sampling; + // 4:2:0/4:4:4 keep the plain walk verbatim. + let cu_around = if chroma_422_oob + || (ss_x(fctx) == 1 && ss_y(fctx) == 0) + { + neighbours.around_mi_422_chroma(cu_mi, luma_span_x, luma_span_y) + } else { + neighbours.around_mi_rect(cu_mi, luma_span_x, luma_span_y) + }; + let (cu_x, cu_y) = (chroma_x + cu_col * uw, cpy + cu_row * uh); let cfl = m.alpha.map(|(au, av)| { let alpha = if plane_idx == 1 { au } else { av }; ( alpha, - cfl_src_rect( - px + cu_col * luma_span_x, - py + cu_row * luma_span_y, - luma_span_x, - luma_span_y, - ), + if chroma_422_pair_wide { + // The unit's co-located luma is the PAIR's + // 8-px-wide band at the floored mi column. + cfl_src_rect( + (mi_c & !1) * MI + cu_col * luma_span_x, + py + cu_row * luma_span_y, + luma_span_x, + luma_span_y, + ) + } else { + cfl_src_rect( + px + cu_col * luma_span_x, + py + cu_row * luma_span_y, + luma_span_x, + luma_span_y, + ) + }, ) }); + // lane-av1-422kf: the palette colour map is consumed per + // unit here like every other chroma arm (`av1_visit_palette` + // feeds the whole plane block; window it to this unit). + // Without this the square chroma rows decoded a uv-palette + // strip's chroma as plain DC (class same-symbols-silent- + // prediction: the rng stayed in sync, only the prediction + // was dropped). + if let Some((ub, vb)) = &m.palette_uv { + let buf = if plane_idx == 1 { ub } else { vb }; + set_palette_pred( + palette_window( + buf, + chroma_block_w, + cu_col * uw, + cu_row * uh, + uw, + uh, + ), + fctx, + ); + } // 32x32 does not fit read_coeffs_rect's scratch (768). The // square reader is the path every other 32x32 chroma unit uses. let levels = if uw == uh { @@ -10576,7 +11102,19 @@ fn decode_rect_split( } else { default_intra_tx_type(m.uv_predict_mode as u8) }; - let around = neighbours.around_mi_rect(at_mi, bw, bh); + // lane-av1422mi24: at ss (1,0) the chroma above span is `bw >> 1` + // chroma cells spread over `bw` luma mi columns -- the per-mi gather + // counts every chroma column's whole-unit dc sign twice (the t422 + // frame-1 mi(26,60) intra-in-inter strip's U dc_sign read one ctx + // row high). Luma keeps the per-mi gather; the two chroma planes + // take [`Neighbours::around_mi_422_chroma`]'s every-second + // above-cell sampling, like every other 4:2:2 chroma gather. + let mut around = neighbours.around_mi_rect(at_mi, bw, bh); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + let c = neighbours.around_mi_422_chroma(at_mi, bw, bh); + around[1] = c[1]; + around[2] = c[2]; + } let mut grids: Vec = Vec::with_capacity(2); for plane_idx in 1..=2 { let skip_ctx = @@ -10650,8 +11188,8 @@ fn decode_rect_split( m.uv_predict_mode, [&u_grid, &v_grid], ); - for (cu_mi, plane, unit) in &ll_chroma_units { - neighbours.record_mi_chroma(*cu_mi, 8, 8, *plane, unit); + for (cu_mi, plane, unit, span_w, span_h) in &ll_chroma_units { + neighbours.record_mi_chroma(*cu_mi, *span_w, *span_h, *plane, unit); } for (cu_mi, plane, unit, span_w, span_h) in &tiled_chroma_units { neighbours.record_mi_chroma(*cu_mi, *span_w, *span_h, *plane, unit); @@ -10848,6 +11386,87 @@ fn every_shape_that_allows_motion_variation_has_a_motion_mode_cdf_row() { ); } +/// lane-av1-422stripanchor, format-cell census for the 4-wide-strip pair port +/// ([`chroma422_pair_plane`], [`decode_rect_split`]'s chroma routing): over +/// every `BLOCK_SIZES_ALL` footprint at every subsampling cell, the pair arm +/// fires exactly when libaom's own `av1_ss_size_lookup[..][1][0]` column +/// (`common_data.c`) marks the plane block BLOCK_INVALID AND the plane would +/// be 2 px wide -- the 4-wide footprints. The tall/wide BLOCK_INVALID shapes +/// stay on the pre-existing `chroma_422_oob` (4, 8) tiling, and 4:2:0 / +/// 4:4:4 never enter either arm (the byte-identical claim, checked per cell). +#[test] +fn chroma422_pair_plane_matches_the_ss_size_lookup_cells() { + // The `av1_ss_size_lookup[..][1][0]` column verbatim (pinned oracle, + // `common_data.c`), keyed by footprint: `true` = BLOCK_INVALID. + let ss10_invalid: &[(&str, bool)] = &[ + ("4x4", false), + ("4x8", true), + ("8x4", false), + ("8x8", false), + ("8x16", true), + ("16x8", false), + ("16x16", false), + ("16x32", true), + ("32x16", false), + ("32x32", false), + ("32x64", true), + ("64x32", false), + ("64x64", false), + ("64x128", true), + ("128x64", false), + ("128x128", false), + ("4x16", true), + ("16x4", false), + ("8x32", true), + ("32x8", false), + ("16x64", true), + ("64x16", false), + ]; + for (footprint, invalid10) in ss10_invalid { + let (w, h) = footprint.split_once('x').unwrap(); + let (bw, bh) = (w.parse::().unwrap(), h.parse::().unwrap()); + // BLOCK_4X4 is the SQUARE path's leaf, never a strip: its ss cell is + // valid because a (2, 4) plane area rounds UP to the 4x4 read + // (`sub8_leaf_chroma422`'s own rule), and it never reaches + // [`decode_rect_split`] at all. + if (bw, bh) == (4, 4) { + continue; + } + // 4:2:0 and 4:4:4: the port never fires, whatever the footprint. + for (ss_x, ss_y) in [(false, false), (true, true)] { + assert!( + chroma422_pair_plane(ss_x, ss_y, 7, bw, bh).is_none(), + "{bw}x{bh} at ss ({ss_x}, {ss_y}) must keep its own plane block" + ); + } + // 4:2:2: the pair arm is exactly the 2-px-wide (4-wide) slice of the + // BLOCK_INVALID column, anchored at the floored mi column. + let pair = chroma422_pair_plane(true, false, 7, bw, bh); + assert_eq!( + pair.is_some(), + *invalid10 && bw == 4, + "{bw}x{bh} at ss (1, 0): pair routing disagrees with ss_size_lookup" + ); + if let Some((block_w, block_h, x, ctx_col)) = pair { + assert_eq!((block_w, block_h), (4, bh), "{bw}x{bh} pair plane shape"); + assert_eq!(x, ((7 & !1) * MI) >> 1, "{bw}x{bh} floored write anchor"); + assert_eq!(ctx_col, 6, "{bw}x{bh} entropy cell is the floored column"); + // An even-column strip anchors at its own cell. + let (x_even, col_even) = match chroma422_pair_plane(true, false, 6, bw, bh) { + Some((_, _, x, c)) => (x, c), + None => panic!("{bw}x{bh} lost its pair arm at an even mi_col"), + }; + assert_eq!((x_even, col_even), (12, 6), "even column keeps its own cell"); + } + } + // The tall/wide BLOCK_INVALID shapes (8 px wide or more) are the + // `chroma_422_oob` tiling's residents, not the pair arm's: both are + // 4:2:2-only, so the two arms partition the BLOCK_INVALID column. + for (bw, bh) in [(8usize, 16), (16, 32), (32, 64), (64, 128), (8, 32), (16, 64)] { + assert!(chroma422_pair_plane(true, false, 7, bw, bh).is_none()); + } +} + fn decode_intra_rect_in_inter( dec: &mut SymbolDecoder, cdfs: &mut Cdfs, @@ -11580,7 +12199,21 @@ fn decode_intrabc_rect( match leaves.as_ref() { None => { // One whole-block rectangular transform unit. - let around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); + // lane-av1422mi24: at ss (1,0) the chroma above span is + // `bw >> 1` chroma cells spread over `bw` luma mi columns -- + // the per-mi gather counts every chroma column's whole-unit + // dc sign twice (t422 frame 1, the mi(26,60) intra-in-inter + // strip's U dc_sign read ctx 1 where the oracle's cell sum + // is 0 -> ctx 0). Luma keeps the per-mi gather; the two + // chroma planes take + // [`Neighbours::around_mi_422_chroma`]'s every-second + // above-cell sampling, like every other 4:2:2 chroma gather. + let mut around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + let c = neighbours.around_mi_422_chroma((mi_r, mi_c), bw, bh); + around[1] = c[1]; + around[2] = c[2]; + } let (grid, tx_type) = read_inter_plane_rect( dec, cdfs, @@ -11705,7 +12338,15 @@ fn decode_intrabc_rect( // `av1_get_tx_type`'s chroma lookup lands on the colocated // LUMA unit, which for a split block is the top-left one. luma_tx_type = first_tx_type; - let around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); + // lane-av1422mi24: same 4:2:2 chroma gather rule as the + // `None` arm above -- the per-mi rect gather double-counts + // each chroma column's whole-unit dc sign at ss (1,0). + let mut around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + let c = neighbours.around_mi_422_chroma((mi_r, mi_c), bw, bh); + around[1] = c[1]; + around[2] = c[2]; + } let (ug, _) = read_inter_plane_rect( dec, cdfs, @@ -12518,6 +13159,16 @@ fn decode_block_rect( (16, 32) => (TxbSet::ChromaRect32x16, &SCAN_16X32), (16, 8) => (TxbSet::ChromaRect16x8, &SCAN_16X8), (8, 16) => (TxbSet::ChromaRect16x8, &SCAN_8X16), + // lane-av1-422: a 4:2:2 strip halves only the width. A 32x16 + // luma strip's chroma is a 16x16 SQUARE (`TxbSet::Chroma16`, the + // set any 16x16 chroma plane reads); a 16x32 strip's chroma is + // 8x32, whose entropy set is the 16x16 one and whose DCT-only + // default follows the >=32 rule below -- the same pairing the + // (8,32) row of [`decode_rect_split`]'s chroma table proves. At + // 4:2:0 and 4:4:4 a strip's chroma is itself rect, so neither row + // is reachable there. + (16, 16) => (TxbSet::Chroma16, default_scan(16)), + (8, 32) => (TxbSet::Chroma16, &SCAN_8X32), _ => { return Err(unsupported( "a rectangular chroma transform whose size has no coefficient table", @@ -12729,7 +13380,9 @@ fn decode_block_rect( /// caller uses once, after both strips, exactly like the `VERT_B` arm next /// to it). The non-skip case (lane-rectx) reads real `TX_16X8`/`TX_8X16` /// luma coefficients (`TxbSet::LumaRect16x8`) and their `TX_8X4`/`TX_4X8` -/// chroma half (`TxbSet::ChromaRect8x4`), the two size classes one level +/// chroma half (`TxbSet::ChromaRect8x4`) at 4:2:0 -- an 8x8 *square* chroma +/// plane (`TxbSet::Chroma8` + the default scan) at 4:2:2 (lane-av1-422e: +/// half-width, unhalved height), the two size classes one level /// under [`decode_block_rect`]'s own 32x16/16x32 strip. #[allow(clippy::too_many_arguments)] fn decode_leaf_rect( @@ -12985,14 +13638,28 @@ fn decode_leaf_rect( // `use_reduced_set` branch returns `EXT_TX_SET_DTT4_IDTX` at // `tx_size_sqr_up == TX_16X16` regardless of the true, non-square // `tx_size`) and its chroma half (8x4/4x8, `TxbSet::ChromaRect8x4`). + // lane-av1-422e: a 4:2:2 strip halves only the width, so the chroma + // half of a 16x8/8x16 luma leaf is an 8x8 SQUARE (`TxbSet::Chroma8` + + // the default scan -- the pairing any 8x8 chroma plane reads). 4:2:0 + // halves both axes (8x4/4x8 rect, `TxbSet::ChromaRect8x4`); 4:4:4 + // leaves the full 16x8/8x16 rect (`TxbSet::ChromaRect16x8`). + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; let (luma_scan, chroma_scan): (&[u16], &[u16]) = if ss_x(fctx) == 0 { if bw == 16 { (&SCAN_16X8, &SCAN_16X8) } else { (&SCAN_8X16, &SCAN_8X16) } + } else if chroma_422 { + if bw == 16 { (&SCAN_16X8, default_scan(8)) } else { (&SCAN_8X16, default_scan(8)) } } else if bw == 16 { (&SCAN_16X8, &SCAN_8X4) } else { (&SCAN_8X16, &SCAN_4X8) }; - let chroma_rect_set = if ss_x(fctx) == 0 { TxbSet::ChromaRect16x8 } else { TxbSet::ChromaRect8x4 }; + let chroma_rect_set = if ss_x(fctx) == 0 { + TxbSet::ChromaRect16x8 + } else if chroma_422 { + TxbSet::Chroma8 + } else { + TxbSet::ChromaRect8x4 + }; let around = neighbours.around_mi_rect(leaf_mi, bw, bh); let luma_set = if reduced_tx_set { TxbSet::LumaRect16x8 @@ -13361,12 +14028,43 @@ fn decode_block_rect4( // `TxbSet::Chroma16`). The caller set is closed -- this reader only // ever sees 32x8 / 8x32 luma and the sequence header admits ss 0/0 // and 1/1 only -- so the table is exhaustive. + let chroma422_rect32 = + (chroma_w, chroma_h) == (4, 32) && ss_x(fctx) == 1 && ss_y(fctx) == 0; let (chroma_set, chroma_scan): (TxbSet, &[u16]) = match (chroma_w, chroma_h) { (16, 4) => (TxbSet::Chroma8, &SCAN_16X4[..]), (4, 16) => (TxbSet::Chroma8, &SCAN_4X16[..]), (32, 8) => (TxbSet::Chroma16, &SCAN_32X8[..]), (8, 32) => (TxbSet::Chroma16, &SCAN_8X32[..]), - _ => unreachable!("decode_block_rect4 chroma shape set is closed"), + // lane-av1-422: a 4:2:2 1:4 strip halves only the width, so the + // landscape leaves (32x8, 16x4 luma) code their chroma as the RECT + // (16,8)/(8,4) -- the same TxbSet/scan pair the (16,8)/(8,4) rows of + // [`decode_rect_split`]'s chroma table use. + // lane-av1-422p: the PORTRAIT leaf occurs too -- the pinned + // fixture's frame 2 carries an 8x32 strip at ss(1,0), whose (4, 32) + // chroma block `ss_size_lookup[BLOCK_8X32][1][0]` marks + // BLOCK_INVALID (255, enums.h). BLOCK_INVALID does not mean + // "uncodable": `av1_get_tx_size` reads `max_txsize_rect_lookup[255]` + // OUT OF BOUNDS there, the byte at +255 in the pinned Release oracle + // is 0x05 = TX_4X8 (the `decode_token_recon_block` copy at + // 0xc0d030, objdump-measured), and `av1_get_adjusted_tx_size` has no + // TX_4X8 case. libaom HAS the transform, so the shape CHUNKS (the + // `chroma422_rect32` arm below) into FOUR stacked TX_4X8 units per + // plane (`tx_size_high_unit[TX_4X8] = 2`: blk_row 0, 2, 4, 6) + // instead of refusing; no coefficient-table row is added, because + // BLOCK_4X32 is not a table libaom has. 4:2:0 and 4:4:4 never land + // here (their 8x32 strips read (4, 16) and (8, 32)), so the row is + // 4:2:2-only. + (16, 8) => (TxbSet::ChromaRect16x8, &SCAN_16X8[..]), + (8, 4) => (TxbSet::ChromaRect8x4, &SCAN_8X4[..]), + // lane-av1-422p: the units' own set/scan -- the whole-rect read + // below never sees this row, the `chroma422_rect32` arm chunks + // first. Anything else is still a named-lane gap. + (4, 32) if ss_x(fctx) == 1 && ss_y(fctx) == 0 => { + (TxbSet::ChromaRect8x4, &SCAN_4X8[..]) + } + _ => unreachable!( + "decode_block_rect4 chroma shape set is closed: {chroma_w}x{chroma_h}" + ), }; let luma_scan: &[u16] = if bw > bh { &SCAN_32X8 } else { &SCAN_8X32 }; let (luma_levels, u_levels, v_levels) = if skip { @@ -13375,6 +14073,146 @@ fn decode_block_rect4( vec![0i32; chroma_w * chroma_h], vec![0i32; chroma_w * chroma_h], ) + } else if chroma422_rect32 { + // lane-av1-422p: the (4, 32) plane as FOUR TX_4X8 units per plane, + // plane-major (every U unit, then every V) -- the walk the pinned + // oracle's `decode_token_recon_block` makes for the BLOCK_INVALID + // plane block: TX_4X8, so stepr = `tx_size_high_unit[TX_4X8]` = 2 + // 4-px rows and stepc = 1, unit rows at chroma y 0, 8, 16, 24. + // Luma is the same single TX_8X32 rect the general arm reads. + let around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); + let mut luma_coding = cdfs.txb(TxbSet::LumaRect32x8, mode); + let (luma_levels, luma_tx_type) = read_coeffs_rect( + dec, + &mut luma_coding, + luma_scan, + bw, + bh, + 0, + dc_sign_ctx(around[0].2), + TxType::DctDct, + )?; + hit!(RECT4_COEFF_HITS); + let luma_residual = dequant_and_inverse_typed_wh( + &luma_levels, + bw, + bh, + crate::decode::bit_depth(fctx), + block_q_idx(fctx), + plane_q_delta(0, fctx).0, + plane_q_delta(0, fctx).1, + luma_tx_type, + block_iqmatrix(fctx, 0, bw, bh, luma_tx_type), + ); + if let Some(b) = &palette_y_buf { + set_palette_pred(b.clone(), fctx); + } + push_intra_rect(0, + px, + py, + bw, + bh, + mode, + angle_delta_y, + reach, + &luma_residual, + None, + filter_intra, + smooth_neighbor, fctx, + ); + // CfL parameters are computed ONCE per block over the strip's luma + // (`are_parameters_computed`) and shared by all four units, as in + // every other chunk arm. + let ac = alpha.map(|_| cfl_src_rect(px, py, bw, bh)); + let mut unit_grids: Vec<((usize, usize), usize, Grid)> = Vec::new(); + for (plane, buf) in [(1usize, &mut *u), (2usize, &mut *v)] { + for unit_row in 0..4usize { + let unit_mi = (mi_r + unit_row * 2, mi_c); + let unit_reach = tu_reach_rect( + bw, bh, 0, unit_row * 8, 8, 8, reach, + px, py, y.width, y.height, fctx, + ); + if let Some((ub, vb)) = &palette_uv_bufs { + let pbuf = if plane == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, chroma_w, 0, unit_row * 8, 4, 8), + fctx, + ); + } + // Each unit is read and recorded IMMEDIATELY: unit row 0's + // `txb_skip_ctx` still sees the real above/left neighbour + // states, a lower unit sees this block's own upper unit's + // (libaom's per-unit `set_entropy_context`), and the lower + // unit predicts off the upper one's reconstructed samples. + let chroma_around = neighbours.around_mi_422_chroma(unit_mi, 8, 8); + let unit_grid = read_rect_chroma_unit( + dec, + cdfs, + TxbSet::ChromaRect8x4, + &SCAN_4X8, + 4, + 8, + plane, + chroma_around[plane], + uv_predict_mode, + angle_delta_uv, + unit_reach, + buf, + cpx, + cpy + unit_row * 8, + base_q_idx, + // `get_txb_ctx_general`'s chroma branch + // (txb_common.h): plane_bsize is BLOCK_INVALID (255) + // here, `num_pels_log2_lookup[255]` = 255 (the +255 + // byte of the decodetxb copy at 0xc0de70, + // objdump-measured) exceeds `BLOCK_4X8`'s 5, so the + // ctx_offset is 10 -- the port's offset-7-first + // `txb_skip_chroma_8` stores the offset-10 rows at + // rows 3..6, hence +3. + Some(3), + alpha + .zip(ac) + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), + smooth_neighbor_uv, fctx, + )?; + neighbours.record_mi_chroma(unit_mi, 8, 8, plane, &unit_grid); + unit_grids.push((unit_mi, plane, unit_grid)); + } + } + // The whole-block stamp rewrites the chroma cells ONE state wide, + // which would erase the unit boundary the next block reads (class + // `override-slot-on-one-arm`), so it carries zero chroma grids and + // the per-unit writes replay after it. Its luma cells and side + // spans are this arm's own bookkeeping. + let zero_chroma = vec![0i32; chroma_w * chroma_h]; + neighbours.record_mi_rect( + (mi_r, mi_c), + bw, + bh, + &[&luma_levels[..], &zero_chroma[..], &zero_chroma[..]], + ); + for (unit_mi, plane, grid) in &unit_grids { + neighbours.record_mi_chroma(*unit_mi, 8, 8, *plane, grid); + } + neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip); + neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx); + record_strip_palette( + neighbours, pal_at, bw, bh, pal_y_size, pal_y_colors, pal_uv_size, + pal_uv_colors, + ); + if bw > bh { + hit!(RECT4_32_HORZ_HITS); + } else { + hit!(RECT4_32_VERT_HITS); + } + // lane-frame36 r2 (same shape as `decode_block_rect64`'s split arm, + // swept this round): `set_txfm_ctxs` runs for EVERY block of an inter + // frame, so this 1:4 strip -- which is also the INTER frame's reader + // for 32x8/8x32 ([`decode_intra_rect4_in_inter`]) -- publishes its + // transform size in both TXFM_CONTEXT bands. Without it the next block + // reads the row's stale value. + txfm_partition_update_rect(neighbours, (mi_r, mi_c), (bw, bh), (bw, bh)); + return Ok((mode, uv_predict_mode)); } else { let around = neighbours.around_mi_rect((mi_r, mi_c), bw, bh); let mut luma_coding = cdfs.txb(TxbSet::LumaRect32x8, mode); @@ -13523,38 +14361,77 @@ fn decode_block_rect4( smooth_neighbor, fctx, ); let ac = alpha.map(|_| cfl_src_rect(px, py, bw, bh)); - if let Some((ub, _)) = &palette_uv_bufs { - set_palette_pred(ub.clone(), fctx); - } - push_intra_rect(1, - cpx, - cpy, - chroma_w, - chroma_h, - uv_predict_mode, - angle_delta_uv, - reach, - &u_levels, - alpha.zip(ac).map(|((au, _), ac)| (au, ac)), - None, - smooth_neighbor_uv, fctx, - ); - if let Some((_, vb)) = &palette_uv_bufs { - set_palette_pred(vb.clone(), fctx); + if chroma422_rect32 { + // lane-av1-422p: `predict_and_reconstruct_intra_block` (decodeframe.c + // ~1000) predicts EVERY unit regardless of `skip_txfm`, so the skip + // arm walks the same four TX_4X8 units per plane -- the lower unit + // predicts off the upper one's predicted samples. No coefficients + // are coded; the tail's whole-block zero stamp below is the state + // libaom's `set_entropy_context` leaves. + for (plane, _buf) in [(1usize, &mut *u), (2usize, &mut *v)] { + for unit_row in 0..4usize { + let unit_reach = tu_reach_rect( + bw, bh, 0, unit_row * 8, 8, 8, reach, + px, py, y.width, y.height, fctx, + ); + if let Some((ub, vb)) = &palette_uv_bufs { + let pbuf = if plane == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, chroma_w, 0, unit_row * 8, 4, 8), + fctx, + ); + } + push_intra_rect(plane, + cpx, + cpy + unit_row * 8, + 4, + 8, + uv_predict_mode, + angle_delta_uv, + unit_reach, + &ZERO_RESIDUAL[..4 * 8], + alpha + .zip(ac) + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), + None, + smooth_neighbor_uv, fctx, + ); + } + } + } else { + if let Some((ub, _)) = &palette_uv_bufs { + set_palette_pred(ub.clone(), fctx); + } + push_intra_rect(1, + cpx, + cpy, + chroma_w, + chroma_h, + uv_predict_mode, + angle_delta_uv, + reach, + &u_levels, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + None, + smooth_neighbor_uv, fctx, + ); + if let Some((_, vb)) = &palette_uv_bufs { + set_palette_pred(vb.clone(), fctx); + } + push_intra_rect(2, + cpx, + cpy, + chroma_w, + chroma_h, + uv_predict_mode, + angle_delta_uv, + reach, + &v_levels, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + None, + smooth_neighbor_uv, fctx, + ); } - push_intra_rect(2, - cpx, - cpy, - chroma_w, - chroma_h, - uv_predict_mode, - angle_delta_uv, - reach, - &v_levels, - alpha.zip(ac).map(|((_, av), ac)| (av, ac)), - None, - smooth_neighbor_uv, fctx, - ); neighbours.record_mi_rect((mi_r, mi_c), bw, bh, &[&luma_levels[..], &u_levels[..], &v_levels[..]]); neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip); neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx); @@ -13635,7 +14512,17 @@ fn decode_rect4_16( // lane-av1-444: at 4:4:4 every strip is its own chroma reference // (no mi-parity test at ss 0/0, and the strip's own chroma block is // already >= 4x4) -- there is no 4:2:0 pair to close. - let has_chroma = i % 2 == 1 || (ss_x(fctx) == 0 && ss_y(fctx) == 0); + // lane-av1-422o: the parity rule is per axis, straight out of + // `is_chroma_reference`: a HORZ 16x4 strip (1 mi tall) keeps the + // `ss_y == 0 -> every strip a reference` row rule, but a VERT 4x16 + // strip (1 mi wide) keeps the COLUMN clause `(mi_col & 1) || !(bw & + // 1) || !ss_x`, which with bw == 1 mi reduces to `mi_col odd` for + // every ss_x == 1 format -- the ODD strip closes the pair and reads + // the chroma, exactly like 4:2:0. (VERT_4 partitions start on an + // even mi_col, so `i % 2 == 1` is that clause.) + let has_chroma = i % 2 == 1 + || (horz && ss_y(fctx) == 0) + || (!horz && ss_x(fctx) == 0); let (mode, uv, _tx) = decode_rect4_16_strip( dec, cdfs, @@ -14537,6 +15424,19 @@ fn decode_rect4_16_strip( // ss 0/0, so the neighbour reads below anchor at the strip.) let (pair_mi, pw, ph) = if ss_x(fctx) == 0 && ss_y(fctx) == 0 { (lmi, bw, bh) + } else if ss_y(fctx) == 0 && horz { + // lane-av1-422: chroma height is NOT subsampled, so a HORZ + // 16x4 strip is its own chroma reference (`is_chroma_reference` + // at ss(1,0): bh == 1 mi, so the row clause reduces to + // `!ss_y`) and codes its own `ss_size_lookup[BLOCK_16X4][1][0]` + // = BLOCK_8X4 chroma block -- a valid transform, no pair. + // (lane-av1-422o: a VERTICAL 4x16 strip now falls through to + // the pair merge below -- its own chroma block + // `ss_size_lookup[BLOCK_4X16][1][0]` is BLOCK_INVALID, the + // walk proved such leaves exist, and libaom codes the pair's + // chroma from the closing strip; the chunk lives in the + // `chroma422_pair16` arm below.) + (lmi, bw, bh) } else if horz { ((lmi.0 - 1, lmi.1), 16, 8) } else { @@ -14545,6 +15445,19 @@ fn decode_rect4_16_strip( let (ppx, ppy) = (pair_mi.1 * MI, pair_mi.0 * MI); let (cpx, cpy) = (ppx >> ss_x(fctx), ppy >> ss_y(fctx)); let (cw, ch) = (pw >> ss_x(fctx), ph >> ss_y(fctx)); + // lane-av1-422o: the 4:2:2 pair's chroma of a VERT 4x16 strip + // pair: (4, 16) at ss(1,0). The bsize is still BLOCK_4X16, whose + // `ss_size_lookup[..][1][0]` is BLOCK_INVALID, so libaom's + // `av1_get_tx_size` reads `max_txsize_rect_lookup[255]` -- the + // out-of-bounds byte is TX_4X8 in the pinned Release oracle, and + // `av1_get_adjusted_tx_size` has no TX_4X8 case to adjust it. + // `decode_token_recon_block` walks unit_width = + // ROUND_POWER_OF_TWO(1, 1) = 1, unit_height = 4, with stepr = + // tx_size_high_unit[TX_4X8] = 2: TWO TX_4X8 units per plane + // (chroma rows 0..8 and 8..16), plane-major. Even the skip arm + // walks per unit: `predict_and_reconstruct_intra_block` predicts + // every unit regardless of `skip_txfm`. + let chroma422_pair16 = (cw, ch) == (4, 16) && ss_x(fctx) == 1; let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; if (V_PRED..=D67_PRED).contains(&uv_predict_mode) { hit!(RECT4_16_CHROMA_DIR_HITS); @@ -14595,9 +15508,16 @@ fn decode_rect4_16_strip( angle_delta_uv, cu_reach, &ZERO_RESIDUAL[..16], None, None, smooth_neighbor_uv, fctx, ); - let cu_mi = (pair_mi.0 + oy / 2, pair_mi.1 + ox / 2); + let cu_mi = ( + pair_mi.0 + (oy << ss_y(fctx)) / MI, + pair_mi.1 + (ox << ss_x(fctx)) / MI, + ); neighbours.record_mi_chroma( - cu_mi, 8, 8, plane, &ZERO_RESIDUAL[..16], + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane, + &ZERO_RESIDUAL[..16], ); } } @@ -14617,7 +15537,25 @@ fn decode_rect4_16_strip( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - let cu_mi = (pair_mi.0 + oy / 2, pair_mi.1 + ox / 2); + // The unit's stamp is its own span: aom + // `av1_set_entropy_contexts` (blockd.c:29) + // memsets exactly `tx_size_wide_unit` x + // `tx_size_high_unit` cells at the unit's own + // `(aoff, loff)` -- for TX_4X4 ONE above cell + // and ONE left cell. `(oy / 2, ox / 2)` + + // `(8, 8)` is the 4:2:0 subsampled form (one + // chroma cell = 8 luma px = 2 mi cells); at + // 4:4:4 a unit is ONE mi cell, and the 2x2 + // smear let a 4-wide strip's later units + // overwrite the NEXT COLUMN's above cell with + // their own state -- a column aom never sees + // this block write -- so the following block's + // `all_zero` read the wrong `txb_skip` row + // (frame-0 read #452, the llkf named gap). + let cu_mi = ( + pair_mi.0 + (oy << ss_y(fctx)) / MI, + pair_mi.1 + (ox << ss_x(fctx)) / MI, + ); // One luma-mi cell: the chroma entropy arrays // are subsampled, and our bands replicate that // one entry over the unit's two cells @@ -14639,7 +15577,13 @@ fn decode_rect4_16_strip( cu_reach, buf, cpx + ox, cpy + oy, 4, 4, base_q_idx, None, None, offset, smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, 8, 8, plane, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane, + &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = if plane == 1 { &mut uo } else { &mut vo }; for row in 0..4 { @@ -14664,6 +15608,41 @@ fn decode_rect4_16_strip( hit!(CHROMA_SKIP_CFL_HITS); } for (_buf, plane) in [(&mut *u, 1usize), (&mut *v, 2)] { + if chroma422_pair16 { + // lane-av1-422o: two TX_4X8 units, each predicted on + // its own edges (the lower one off the upper one's + // samples); no coefficients are coded, and libaom's + // `set_entropy_context` zeroed the block's own cells, + // so the pair-wide zero stamp below stays correct. + for unit_row in 0..2usize { + let unit_reach = tu_reach_rect( + pw, ph, 0, unit_row * 8, 8, 8, pair_reach, + ppx, ppy, y.width, y.height, fctx, + ); + if let Some((ub, vb)) = &palette_uv_bufs { + let pbuf = if plane == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, cw, 0, unit_row * 8, 4, 8), + fctx, + ); + } + push_intra_rect(plane, + cpx, + cpy + unit_row * 8, + 4, + 8, + uv_predict_mode, + angle_delta_uv, + unit_reach, + &ZERO_RESIDUAL[..4 * 8], + alpha + .zip(ac) + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), + None, + smooth_neighbor_uv, fctx, + ); + } + } else { if let Some((ub, vb)) = &palette_uv_bufs { set_palette_pred(if plane == 1 { ub.clone() } else { vb.clone() }, fctx); } @@ -14682,10 +15661,89 @@ fn decode_rect4_16_strip( None, smooth_neighbor_uv, fctx, ); + } } (zeros.clone(), zeros) + } else if chroma422_pair16 { + // lane-av1-422o: the pair's 4x16 chroma as TWO TX_4X8 units + // per plane, plane-major (every U unit, then every V). Each + // unit: the `ChromaRect8x4` tables (`get_txsize_entropy_ctx` + // squares TX_4X8 up to the 8x8 class), `SCAN_4X8`, and a + // `txb_skip_ctx` of above+left in the OFFSET-10 rows -- the + // offset comes from `num_pels_log2_lookup[plane_bsize] > + // num_pels_log2_lookup[BLOCK_4X8]` with plane_bsize = + // BLOCK_INVALID (255), and the byte at that table's +255 in + // the pinned Release oracle is 255 (`cmpb` against the + // `0xc0db70` copy decodetxb.c links), i.e. the bigger-plane + // arm: +3 on the offset-7-first chroma tables. No tx_type + // symbol (only y plane's is transmitted); the unit's type is + // `intra_mode_to_tx_type(UV mode)` kept by the all-16 ext-tx + // set -- [`read_rect_chroma_unit`]'s own default. CfL params + // are computed ONCE per block (`are_parameters_computed`) + // over the pair's luma, shared by both units. Each unit is + // predicted and recorded immediately, so the lower unit + // reads the upper one's coefficient context. + let ac = alpha.map(|_| cfl_src_rect(ppx, ppy, pw, ph)); + for (plane, buf) in [(1usize, &mut *u), (2usize, &mut *v)] { + for unit_row in 0..2usize { + let unit_mi = (pair_mi.0 + unit_row * 2, pair_mi.1); + let unit_reach = tu_reach_rect( + pw, ph, 0, unit_row * 8, 8, 8, pair_reach, + ppx, ppy, y.width, y.height, fctx, + ); + if let Some((ub, vb)) = &palette_uv_bufs { + let pbuf = if plane == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, cw, 0, unit_row * 8, 4, 8), + fctx, + ); + } + let chroma_around = neighbours.around_mi_422_chroma(unit_mi, 8, 8); + let unit_grid = read_rect_chroma_unit( + dec, + cdfs, + TxbSet::ChromaRect8x4, + &SCAN_4X8, + 4, + 8, + plane, + chroma_around[plane], + uv_predict_mode, + angle_delta_uv, + unit_reach, + buf, + cpx, + cpy + unit_row * 8, + base_q_idx, + // lane-av1-422q: the offset-10 rows -- the same + // measured rule as the 4x32 arm (plane_bsize + // BLOCK_INVALID for the pair's BLOCK_4X16 too; + // num_pels_log2_lookup[255] = 0xff at the + // 0xc0de70 copy -> +3 on the offset-7-first + // chroma tables; see lanes/av1422q.report.md). + Some(3), + alpha + .zip(ac) + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), + smooth_neighbor_uv, fctx, + )?; + neighbours.record_mi_chroma(unit_mi, 8, 8, plane, &unit_grid); + } + } + (Grid::Zero(cw * ch), Grid::Zero(cw * ch)) } else { - let around = neighbours.around_mi_rect(pair_mi, pw, ph); + // lane-av1422ctxgather: 4:2:2's chroma above votes sample + // every second luma-mi cell + // ([`Neighbours::around_mi_422_chroma`]: at ss_x 1 one + // chroma 4-px column spans two luma mi columns, and the + // plain per-mi gather counts each column's whole-unit dc + // sign twice). The left extent is unsubsampled at ss_y 0, + // so its per-mi cells already line up one-to-one. + let around = if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + neighbours.around_mi_422_chroma(pair_mi, pw, ph) + } else { + neighbours.around_mi_rect(pair_mi, pw, ph) + }; // lane-av1-444: the strip's own 16x4 / 4x16 chroma at ss 0/0 // (`TxbSet::Chroma8`, `get_txsize_entropy_ctx(TX_16X4)` = // the 8x8 set); 4:2:0 keeps the pair's 8x4 / 4x8. @@ -14693,7 +15751,25 @@ fn decode_rect4_16_strip( (8, 4) => (TxbSet::ChromaRect8x4, &SCAN_8X4[..]), (4, 8) => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), (16, 4) => (TxbSet::Chroma8, &SCAN_16X4[..]), + // lane-av1-444: 4:4:4's own-strip vert chroma is (4,16) + // -- one TX_4X16. (lane-av1-422o: the 4:2:2 pair's + // (4,16) never reaches this row; `chroma422_pair16` + // intercepts it above and chunks it into TX_4X8 units.) (4, 16) => (TxbSet::Chroma8, &SCAN_4X16[..]), + // lane-av1-422: a 4:2:2 HORZ pair (16x8 luma) keeps the + // pair's height: an 8x8 SQUARE chroma block, the same + // `TxbSet::Chroma8` set any 8x8 chroma plane reads. The + // 4:2:0 pair's chroma is 8x4 and 4:4:4's is 16x4, so this + // row is unreachable there. It is also the witness arm: + // a restored `/2 chroma height` lands on (8,4) and the + // counter reads 0. + (8, 8) => { + hit!(CHROMA422_SQUARE_HITS); + (TxbSet::Chroma8, default_scan(8)) + } + // lane-av1-422o: with the `chroma422_pair16` arm above, + // the (2,16) own-strip shape and the 4:4:4 shapes are the + // only residents; anything else is a named-lane gap. _ => unreachable!("decode_rect4_16_strip chroma shape set is closed"), }; let mut planes = Vec::with_capacity(2); @@ -14758,7 +15834,11 @@ fn decode_rect4_16_strip( neighbours.record_uv_mode_mi(pair_mi.0, pair_mi.1, pw / MI, ph / MI, uv_predict_mode); // A lossless pair already stamped each TX_4X4 (`record_mi_chroma`). // The single-state rewrite below is the non-lossless TX_8X4/TX_4X8. - if !lossless_pair { + // lane-av1-422o: the chunked pair's cells are stamped PER UNIT in + // the arm above (libaom's coefficient contexts are per + // 4x4-cell); a pair-wide state would erase the unit boundary the + // next block reads. + if !lossless_pair && !chroma422_pair16 { // The chroma planes' coefficient context, over the PAIR's mi span // (`decode_leaf_rect8`'s own rule: a subsampled plane's bound is // the luma one rounded up to its 4x4 unit). @@ -15701,7 +16781,13 @@ fn read_intra_mode( (side >> ss_x(fctx), side >> ss_y(fctx)), (ss_x(fctx), ss_y(fctx)), ); - let map = decode_color_index_map(dec, cdfs, n, side >> ss_x(fctx), on, true); + // lane-av1-422d: the chroma map's extent is the PLANE BLOCK + // `(side >> ss_x) x (side >> ss_y)` -- 4x8 at ss (1,0), not the + // square call's `(side >> ss_x)`-squared (4x4), which left a + // 16-entry map for a 32-sample unit and panicked the reconstruct. + let map = decode_color_index_map_wh( + dec, cdfs, n, side >> ss_x(fctx), side >> ss_y(fctx), on, true, + ); hit!(PALETTE_UV_HITS); if trace { eprintln!( @@ -15797,6 +16883,29 @@ fn cfl_ac_ss( let avg = (sum + num_pel / 2) >> num_pel.trailing_zeros(); ac.iter_mut().for_each(|v| *v -= avg); ac + } else if ss_x == 1 && ss_y == 0 { + // lane-av1-422: `cfl_luma_subsampling_422_lbd_c` -- each chroma sample + // averages the HORIZONTAL luma pair above it, at full chroma height + // (`(a + b) >> 1` in Q3 is `(a + b) << 2`). A rect luma strip's chroma + // is square here, and the 4:2:0 rect/square helpers below would halve + // the height it must keep. + let (cw, ch) = (bw >> 1, bh); + let mut ac = vec![0i32; cw * ch]; + let mut sum = 0i32; + for row in 0..ch { + for col in 0..cw { + let (lx, ly) = (px + col * 2, py + row); + let q3 = (i32::from(y.data[ly * y.width + lx]) + + i32::from(y.data[ly * y.width + lx + 1])) + << 2; + ac[row * cw + col] = q3; + sum += q3; + } + } + let num_pel = (cw * ch) as i32; + let avg = (sum + num_pel / 2) >> num_pel.trailing_zeros(); + ac.iter_mut().for_each(|v| *v -= avg); + ac } else if bw == bh { cfl_ac_q3(y, px, py, bw) } else { @@ -16471,6 +17580,110 @@ fn read_plane( Ok(levels) } +/// [`push_intra`] when the unit is square, [`push_intra_rect`] when it is a +/// rect (lane-av1-422f): a 4:2:2 square-block chroma unit is the plane +/// block's own rect shape, and the `rect` flag selects +/// [`PlaneBuf::reconstruct_rect`]'s two-dimensional loop. +#[allow(clippy::too_many_arguments)] +fn push_intra_unit( + plane: usize, + x: usize, + y: usize, + w: usize, + h: usize, + mode: usize, + angle_delta: i32, + reach: Reach, + residual: &[i32], + cfl: Option<(i32, CflSrc)>, + filter_intra: Option, + smooth_neighbor: bool, fctx: &crate::decode::FrameCtx, +) { + if w == h { + push_intra(plane, x, y, w, mode, angle_delta, reach, residual, cfl, + filter_intra, smooth_neighbor, fctx); + } else { + push_intra_rect(plane, x, y, w, h, mode, angle_delta, reach, residual, cfl, + filter_intra, smooth_neighbor, fctx); + } +} + +/// ONE RECT chroma transform unit of a square block's uv plane +/// (lane-av1-422f) -- a 4:2:2 frame's plane block is `(side/2, side)` and +/// `av1_get_max_uv_txsize` fills it with a single rect unit below side 64 +/// (TX_4X8 / TX_8X16 / TX_16X32), which the square-shaped [`read_plane`] +/// cannot express. Same shape as [`leaf8_chroma422_unit`]'s proven read: the +/// [`TxbSet`] whose entropy class the unit squares up to, the unit-shaped +/// scan, `txb_skip_ctx` = above + left in the offset-7 rows (the unit covers +/// the plane block exactly, so no `+3` bigger-plane term -- that one lives in +/// the square multi-unit walks' `chroma_ctx_offset`), and the plane's +/// predicted mode supplies the mode-derived default `tx_type` unless an armed +/// [`INTRABC_CHROMA_TX`] slot carries the intrabc luma's own -- except at an +/// entropy class of 32x32 and up, where the spec forces `DCT_DCT` +/// ([`read_plane`]'s `side >= 32` clamp). +#[allow(clippy::too_many_arguments)] +fn read_rect_chroma_unit( + dec: &mut SymbolDecoder, + cdfs: &mut Cdfs, + set: TxbSet, + scan: &[u16], + w: usize, + h: usize, + plane_idx: usize, + around: (bool, bool, i32), + uv_predict_mode: usize, + angle_delta_uv: i32, + reach: Reach, + // Unread, like [`read_plane`]'s own: the borrow proves the caller holds + // the plane exclusively while the unit's coefficients are parsed. + _plane: &mut PlaneBuf<'static>, + x: usize, + y: usize, + // Signature parity with [`read_plane`]; the dequant reads its q index + // off `block_q_idx(fctx)` like every other reader here. + _base_q_idx: u8, + // lane-av1-422p: `get_txb_ctx_general`'s chroma branch + // (txb_common.h) reads `txb_skip_ctx = above + left + ctx_offset`, + // where `ctx_offset` is 10 when the plane block is bigger than the + // transform and 7 otherwise. The port stores the offset-7 rows at + // `txb_skip_chroma_8` rows 0..3 and the offset-10 rows at rows 3..6 + // (lane-av1-422b), so a unit SMALLER than its plane block passes + // `Some(3)` to reach the offset-10 rows. Every unit that IS the whole + // plane block stays `None` -- 4:2:2 plane blocks never shrink to a + // rect unit except in the chunk arms. + chroma_skip_offset: Option, + cfl: Option<(i32, CflSrc)>, + smooth_neighbor_uv: bool, fctx: &crate::decode::FrameCtx, +) -> Result { + if ss_x(fctx) == 1 && ss_y(fctx) == 0 && w != h { + hit!(CHROMA422_RECT_HITS); + } + let default_tx = if w.max(h) >= 32 { + TxType::DctDct + } else { + fctx + .intrabc_chroma_tx + .with(std::cell::Cell::get) + .unwrap_or_else(|| default_intra_tx_type(uv_predict_mode as u8)) + }; + let mut coding = cdfs.txb(set, uv_predict_mode); + let (levels, tx_type) = read_coeffs_rect( + dec, &mut coding, scan, w, h, + usize::from(around.0) + usize::from(around.1) + chroma_skip_offset.unwrap_or(0), + dc_sign_ctx(around.2), default_tx, + )?; + let residual = dequant_and_inverse_typed_wh( + &levels, w, h, crate::decode::bit_depth(fctx), block_q_idx(fctx), + plane_q_delta(plane_idx, fctx).0, plane_q_delta(plane_idx, fctx).1, + tx_type, block_iqmatrix(fctx, plane_idx, w, h, tx_type), + ); + push_intra_rect( + plane_idx, x, y, w, h, uv_predict_mode, angle_delta_uv, reach, + &residual, cfl, None, smooth_neighbor_uv, fctx, + ); + Ok(levels) +} + /// Decodes one whole-block coded superblock/quadrant/leaf: its mode, then its /// three planes, reconstructing them into `y`/`u`/`v` and updating /// `neighbours`. @@ -16541,8 +17754,8 @@ fn decode_block( // rewrite (which sat above `read_intra_mode`) rides along here -- same // per-frame `ss_x`/`ss_y` condition, now resolved against the block's own // segment like the lossless arm above it. - let (luma_set, chroma_set, luma_tx, chroma_tx, scans) = if lossless(fctx) { - (TxbSet::Luma4, TxbSet::Chroma4, 4, 4, (scan4, scan4)) + let (luma_set, chroma_set, luma_tx, chroma_tx, chroma_tx_h, scans) = if lossless(fctx) { + (TxbSet::Luma4, TxbSet::Chroma4, 4, 4, 4, (scan4, scan4)) } else if ss_x(fctx) == 0 && ss_y(fctx) == 0 { let tx = if side >= 64 { 32 } else { side }; let (set, scan): (TxbSet, &[u16]) = match tx { @@ -16551,9 +17764,39 @@ fn decode_block( 8 => (TxbSet::Chroma8, scan8), _ => (TxbSet::Chroma4, scan4), }; - (luma_set, set, luma_tx, tx, (scans.0, scan)) + (luma_set, set, luma_tx, tx, tx, (scans.0, scan)) + } else if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + // lane-av1-422f: the uv plane block is the (side/2, side) rect + // (`ss_size_lookup[..][1][0]`), and `av1_get_max_uv_txsize` is + // `av1_get_adjusted_tx_size(max_txsize_rect_lookup[plane_bsize])` -- + // the RECT that fills the plane block, NOT the square transform of + // the smaller side (the oracle reads ONE TX_8X16 for a 16x16 block's + // 8x16 plane where the old model read two 8x8 units): 4 -> TX_4X4 + // (the 2x4 plane rounds up to BLOCK_4X4), 8 -> TX_4X8, 16 -> + // TX_8X16, 32 -> TX_16X32 (one unit per plane, the whole plane + // block), 64 -> TX_32X64 adjusts to TX_32X32 and 128 -> TX_64X64 + // adjusts to TX_32X32 (square units, a 1x2 / 2x4 grid). + // `chroma_tx` is the unit WIDTH, `chroma_tx_h` its HEIGHT; the + // chroma walks below read one (chroma_tx, chroma_tx_h) unit per grid + // cell and key their rect reads on `chroma_tx != chroma_tx_h`. + let (tx_w, tx_h) = match side { + 4 => (4, 4), + 8 => (4, 8), + 16 => (8, 16), + 32 => (16, 32), + // 64 and 128: TX_32X64 / TX_64X64 adjust down to TX_32X32. + _ => (32, 32), + }; + let (set, scan): (TxbSet, &[u16]) = match side { + 4 => (TxbSet::Chroma4, scan4), + 8 => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), + 16 => (TxbSet::ChromaRect16x8, &SCAN_8X16[..]), + 32 => (TxbSet::ChromaRect32x16, &SCAN_16X32[..]), + _ => (TxbSet::Chroma32, scan32), + }; + (luma_set, set, luma_tx, tx_w, tx_h, (scans.0, scan)) } else { - (luma_set, chroma_set, luma_tx, chroma_tx, scans) + (luma_set, chroma_set, luma_tx, chroma_tx, chroma_tx, scans) }; let intrabc_dv = fctx.intrabc_dv.with(|c| c.take()); // `predict` panics outside `DC_PRED..=PAETH_PRED` (0..=12); `UV_CFL_PRED` @@ -16677,6 +17920,9 @@ fn decode_block( let reach = Reach::of(side, px, py, y.width, y.height, fctx); let (cpx, cpy) = (px >> ss_x(fctx), py >> ss_y(fctx)); let chroma_side = side >> ss_x(fctx); + // lane-av1-422b: chroma extent per axis, `side` at ss_y 0 (4:2:2/4:4:4), + // `side / 2` at 4:2:0. + let chroma_height = side >> ss_y(fctx); // spec 7.11.3.4 with `use_intrabc`: the reference is the *current* // frame's own pre-loop-filter reconstruction (all loop filters are off // whenever `allow_intrabc`, frame.rs:194/210/252/272) at the full-pel @@ -16691,17 +17937,17 @@ fn decode_block( mv_to_q4(px, dv_col, 0), mv_to_q4(py, dv_row, 0), side, side, mc::InterpFilterKind::Bilinear, &mut yb, fctx, ); - let mut ub = vec![0u16; chroma_side * chroma_side]; + let mut ub = vec![0u16; chroma_side * chroma_height]; mc::predict_with_filter( &u.data, u.width, u.true_width, u.true_height, - mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_x(fctx)), - chroma_side, chroma_side, mc::InterpFilterKind::Bilinear, &mut ub, fctx, + mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_y(fctx)), + chroma_side, chroma_height, mc::InterpFilterKind::Bilinear, &mut ub, fctx, ); - let mut vb = vec![0u16; chroma_side * chroma_side]; + let mut vb = vec![0u16; chroma_side * chroma_height]; mc::predict_with_filter( &v.data, v.width, v.true_width, v.true_height, - mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_x(fctx)), - chroma_side, chroma_side, mc::InterpFilterKind::Bilinear, &mut vb, fctx, + mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_y(fctx)), + chroma_side, chroma_height, mc::InterpFilterKind::Bilinear, &mut vb, fctx, ); (yb, ub, vb) }); @@ -16846,31 +18092,41 @@ fn decode_block( ); } let ac = alpha.map(|_| cfl_src(px, py, side)); - let cn = (chroma_side / chroma_tx).max(1); - for cu_row in 0..cn { - for cu_col in 0..cn { - let luma_span = chroma_tx << ss_x(fctx); - let cu_r = if cn == 1 { + // lane-av1-422b: the chroma unit grid is `cn_cols` x `cn_rows` -- + // square at 4:2:0/4:4:4, at 4:2:2 `(side/2)/tx` units wide by + // `side/tx` tall (the plane block is (side/2, side)). A unit's LUMA + // anchor follows the per-axis shifts: `chroma_tx << ss_x` wide, + // `chroma_tx_h << ss_y` tall (lane-av1-422f: the unit itself is the + // (chroma_tx, chroma_tx_h) rect, so a 4:2:2 frame below side 64 + // reads ONE unit per plane, the whole plane block). + let cn_cols = (chroma_side / chroma_tx).max(1); + let cn_rows = (chroma_height / chroma_tx_h).max(1); + let luma_span_x = chroma_tx << ss_x(fctx); + let luma_span_y = chroma_tx_h << ss_y(fctx); + for cu_row in 0..cn_rows { + for cu_col in 0..cn_cols { + let cu_r = if cn_rows == 1 && cn_cols == 1 { reach } else { - tu_reach( + tu_reach_rect( side, side, - cu_col * luma_span, cu_row * luma_span, luma_span, + cu_col * luma_span_x, cu_row * luma_span_y, luma_span_x, luma_span_y, reach, px, py, y.width, y.height, fctx, ) }; - let (cu_x, cu_y) = (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx); + let (cu_x, cu_y) = (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx_h); if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - push_intra(1, + push_intra_unit(1, cu_x, cu_y, chroma_tx, + chroma_tx_h, uv_predict_mode, angle_delta_uv, cu_r, - &ZERO_RESIDUAL[..chroma_tx * chroma_tx], + &ZERO_RESIDUAL[..chroma_tx * chroma_tx_h], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx, @@ -16878,14 +18134,15 @@ fn decode_block( if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - push_intra(2, + push_intra_unit(2, cu_x, cu_y, chroma_tx, + chroma_tx_h, uv_predict_mode, angle_delta_uv, cu_r, - &ZERO_RESIDUAL[..chroma_tx * chroma_tx], + &ZERO_RESIDUAL[..chroma_tx * chroma_tx_h], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx, @@ -16941,8 +18198,17 @@ fn decode_block( // TX_32X32, so a 64x64 block codes four chroma units, plane-major // (every U, then every V) — the same loop the multi-TU arm runs. // At 4:2:0 `chroma_side == chroma_tx`, so it stays one read. - let cn = (chroma_side / chroma_tx).max(1); - let (u_grid, v_grid, chroma_units) = if cn == 1 { + // lane-av1-422b: 4:2:2 never collapses to one read above a 4x4 luma + // block -- the unit grid is `(side/2)/tx` wide by `side/tx` tall. + // lane-av1-422f: `chroma_tx` is the unit WIDTH and `chroma_tx_h` its + // HEIGHT, so below side 64 a 4:2:2 frame's grid is 1x1 and the one + // unit is the plane block's own rect. + let cn_cols = (chroma_side / chroma_tx).max(1); + let cn_rows = (chroma_height / chroma_tx_h).max(1); + let luma_span_x = chroma_tx << ss_x(fctx); + let luma_span_y = chroma_tx_h << ss_y(fctx); + let (u_grid, v_grid, chroma_units) = if cn_rows == 1 && cn_cols == 1 { + if chroma_tx == chroma_tx_h { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } @@ -17000,40 +18266,78 @@ fn decode_block( smooth_neighbor_uv, fctx, )?; (u_grid, v_grid, Vec::new()) + } else { + // lane-av1-422f: the one unit is a RECT filling the plane + // block -- the square-shaped [`read_plane`] cannot express + // it, so both planes go through [`read_rect_chroma_unit`] + // (U, then V, the same order the square arm reads). The + // chroma context reads per chroma 4-px cell (see + // [`Neighbours::around_mi_422_chroma`]). + let chroma_around = + neighbours.around_mi_422_chroma((mi_r, mi_c), side, side); + if let Some((ub, _)) = &palette_uv_bufs { + set_palette_pred(ub.clone(), fctx); + } + let u_grid = read_rect_chroma_unit( + dec, cdfs, chroma_set, scans.1, chroma_tx, chroma_tx_h, 1, + chroma_around[1], uv_predict_mode, angle_delta_uv, reach, u, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + smooth_neighbor_uv, fctx, + )?; + if let Some((_, vb)) = &palette_uv_bufs { + set_palette_pred(vb.clone(), fctx); + } + let v_grid = read_rect_chroma_unit( + dec, cdfs, chroma_set, scans.1, chroma_tx, chroma_tx_h, 2, + chroma_around[2], uv_predict_mode, angle_delta_uv, reach, v, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + smooth_neighbor_uv, fctx, + )?; + (u_grid, v_grid, Vec::new()) + } } else { let chroma_ctx_offset = Some(3); let mut u_pass: Vec = Vec::new(); - let mut units: Vec<((usize, usize), usize, Grid, Grid)> = Vec::new(); + let mut units: Vec<((usize, usize), usize, usize, Grid, Grid)> = Vec::new(); let mut last_grids = [Grid::Zero(0), Grid::Zero(0)]; for plane_pass in 1..=2usize { let mut pass_idx = 0usize; - for cu_row in 0..cn { - for cu_col in 0..cn { - let luma_span = chroma_tx << ss_x(fctx); + for cu_row in 0..cn_rows { + for cu_col in 0..cn_cols { let cu_mi = ( - mi_r + cu_row * (luma_span / MI), - mi_c + cu_col * (luma_span / MI), + mi_r + cu_row * (luma_span_y / MI), + mi_c + cu_col * (luma_span_x / MI), ); - let cu_around = neighbours.around_mi(cu_mi, luma_span); - let cu_reach = tu_reach( + let cu_around = if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + // lane-av1-422f: chroma-only loop; per-chroma-cell + // above votes (see [`Neighbours::around_mi_422_chroma`]). + neighbours.around_mi_422_chroma(cu_mi, luma_span_x, luma_span_y) + } else { + neighbours.around_mi_rect(cu_mi, luma_span_x, luma_span_y) + }; + let cu_reach = tu_reach_rect( side, side, - cu_col * luma_span, - cu_row * luma_span, - luma_span, + cu_col * luma_span_x, + cu_row * luma_span_y, + luma_span_x, + luma_span_y, reach, px, py, y.width, y.height, fctx, ); - let (cu_x, cu_y) = (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx); + let (cu_x, cu_y) = + (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx_h); if let Some((ub, vb)) = &palette_uv_bufs { let pbuf = if plane_pass == 1 { ub } else { vb }; set_palette_pred( palette_window( - pbuf, chroma_side, cu_col * chroma_tx, cu_row * chroma_tx, - chroma_tx, chroma_tx, + pbuf, chroma_side, cu_col * chroma_tx, + cu_row * chroma_tx_h, chroma_tx, chroma_tx_h, ), fctx, ); @@ -17050,16 +18354,21 @@ fn decode_block( None, chroma_ctx_offset, smooth_neighbor_uv, fctx, )?; hit!(CHROMA_SPLIT_TX_HITS); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + hit!(CHROMA422_SQUARE_HITS); + } // Immediately, so the next unit of this block reads this // one's coefficient context. `record` below stamps one // chroma state across the whole block; the replay after // it puts the per-unit state back. - neighbours.record_mi_chroma(cu_mi, luma_span, luma_span, plane_pass, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, luma_span_x, luma_span_y, plane_pass, &cu_grid, + ); if plane_pass == 1 { u_pass.push(cu_grid); } else { let u_grid = std::mem::replace(&mut u_pass[pass_idx], Grid::Zero(0)); - units.push((cu_mi, luma_span, u_grid.clone(), cu_grid.clone())); + units.push((cu_mi, luma_span_x, luma_span_y, u_grid.clone(), cu_grid.clone())); last_grids = [u_grid, cu_grid]; } pass_idx += 1; @@ -17070,9 +18379,9 @@ fn decode_block( }; fctx.intrabc_chroma_tx.with(|c| c.set(None)); neighbours.record(at, side, mode, uv_predict_mode, &[&luma_grid[..], &u_grid[..], &v_grid[..]]); - for (cu_mi, luma_span, u_unit, v_unit) in &chroma_units { - neighbours.record_mi_chroma(*cu_mi, *luma_span, *luma_span, 1, u_unit); - neighbours.record_mi_chroma(*cu_mi, *luma_span, *luma_span, 2, v_unit); + for (cu_mi, sw, sh, u_unit, v_unit) in &chroma_units { + neighbours.record_mi_chroma(*cu_mi, *sw, *sh, 1, u_unit); + neighbours.record_mi_chroma(*cu_mi, *sw, *sh, 2, v_unit); } } else { // Several luma transform units, raster order (spec @@ -17082,7 +18391,13 @@ fn decode_block( // the earlier tiles in this same block already wrote -- the same // per-TU pattern [`decode_leaf8`] already runs for an 8x8 leaf. let n_axis = side / logical_tx; - let cn = (chroma_side / chroma_tx).max(1); + // lane-av1-422f: unit width/height per axis, like walk 2 above -- + // a 4:2:2 frame below side 64 reads ONE rect unit per plane per + // chunk, the whole plane block. + let cn_cols = (chroma_side / chroma_tx).max(1); + let cn_rows = (chroma_height / chroma_tx_h).max(1); + let luma_span_x = chroma_tx << ss_x(fctx); + let luma_span_y = chroma_tx_h << ss_y(fctx); // libaom's transform-block loop is over 64x64 luma "mu" chunks // (`decode_token_recon_block`: `mu_blocks_wide/high` = // `mi_size_wide[BLOCK_64X64]`), and it codes EVERY PLANE of a chunk @@ -17094,9 +18409,10 @@ fn decode_block( let nchunk = (side / 64).max(1); // `cn > 1` means the uv plane block is larger than the uv transform, // which moves libaom's chroma `txb_skip_ctx` offset from 7 to 10. - let chroma_ctx_offset = if cn > 1 { Some(3) } else { None }; + let chroma_ctx_offset = if cn_rows * cn_cols > 1 { Some(3) } else { None }; let tpc = (n_axis / nchunk).max(1); - let cpc = (cn / nchunk).max(1); + let cpc_rows = (cn_rows / nchunk).max(1); + let cpc_cols = (cn_cols / nchunk).max(1); // The block's luma transform units, raster order inside each mu // chunk. lane-av1-ibcvtx: an intrabc block's units are the var-tx // tree's own leaf list -- mixed sizes included, exactly what libaom's @@ -17122,7 +18438,7 @@ fn decode_block( } } let mut last_grids = [Grid::Zero(0), Grid::Zero(0)]; - let mut units: Vec<((usize, usize), usize, Grid, Grid)> = Vec::new(); + let mut units: Vec<((usize, usize), usize, usize, Grid, Grid)> = Vec::new(); for ch_row in 0..nchunk { for ch_col in 0..nchunk { // lane-av1-ibcvtx: the chunk's chroma units inherit the CHROMA tx @@ -17256,8 +18572,8 @@ fn decode_block( let mut u_pass: Vec = Vec::new(); for plane_pass in 1..=2usize { let mut pass_idx = 0usize; - for cu_row in ch_row * cpc..(ch_row + 1) * cpc { - for cu_col in ch_col * cpc..(ch_col + 1) * cpc { + for cu_row in ch_row * cpc_rows..(ch_row + 1) * cpc_rows { + for cu_col in ch_col * cpc_cols..(ch_col + 1) * cpc_cols { // libaom `decode_reconstruct_tx`'s frame-edge clip // (decodeframe.c:299, `blk_row >= max_blocks_high || blk_col // >= max_blocks_wide` returns before ANY symbol is read): a @@ -17279,70 +18595,118 @@ fn decode_block( (2 * y.true_width.div_ceil(8)) as i32 - mi_c as i32 - span_mi as i32; let over_h_mi = (2 * y.true_height.div_ceil(8)) as i32 - mi_r as i32 - span_mi as i32; - let plane_px = ((span_mi * 2).max(4)) as i32; - let max_units_w = ((plane_px + 2 * over_w_mi.min(0)) >> 2).max(0) as usize; - let max_units_h = ((plane_px + 2 * over_h_mi.min(0)) >> 2).max(0) as usize; - let unit = chroma_tx / 4; // TU side in 4x4 chroma units - if cu_col * unit >= max_units_w || cu_row * unit >= max_units_h { + // `max_block_wide/high` in chroma pixels: the plane block's + // own span (`side` at 4:4:4, `side / 2` at 4:2:0 -- the old + // hardcoded `span_mi * 2` clipped three quarters of a 4:4:4 + // block's coded units and desynced the tile) plus the + // negative overhang (`mb_to_*_edge >> (3 + ss)`), whose + // chroma-px scale is `MI >> ss` per mi. + let plane_px = (((span_mi * MI) >> ss_x(fctx)).max(4)) as i32; + let over_w_px = over_w_mi.min(0) * (MI >> ss_x(fctx)) as i32; + let over_h_px = over_h_mi.min(0) * (MI >> ss_y(fctx)) as i32; + let max_units_w = ((plane_px + over_w_px) >> 2).max(0) as usize; + // lane-av1-422f: the shared halved formula in the `else` counts + // the plane span in 4-px units through the 2-px-per-mi + // subsampled height, which a 4:2:2 plane does not have (ss_y + // 0) -- its span is the full luma mi count, so a keyed + // formula clips the same units libaom's `max_block_high` + // does. 4:2:0 and 4:4:4 keep the proven shared rows (at 4:2:0 + // `MI >> ss_y` is 2, the same `2 * over_h_mi.min(0)` the + // pre-ss form spelled). + let max_units_h = if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + (span_mi as i32 + over_h_mi.min(0)).max(0) as usize + } else { + ((plane_px + over_h_px) >> 2).max(0) as usize + }; + let (unit_w, unit_h) = (chroma_tx / 4, chroma_tx_h / 4); + if cu_col * unit_w >= max_units_w || cu_row * unit_h >= max_units_h { hit!(CHROMA_EDGE_TU_CLIP_HITS); continue; } // The chroma context arrays are indexed in LUMA mi, so this - // unit's anchor is its own luma quadrant: `chroma_tx` chroma - // pixels span `2 * chroma_tx` luma ones. - let luma_span = chroma_tx << ss_x(fctx); + // unit's anchor is its own luma quadrant (lane-av1-422b: the + // quadrant spans `chroma_tx << ss_x` luma px wide by + // `chroma_tx_h << ss_y` tall -- at 4:2:2 below side 64 the + // one unit's quadrant is the whole block). let cu_mi = ( - mi_r + cu_row * (luma_span / MI), - mi_c + cu_col * (luma_span / MI), + mi_r + cu_row * (luma_span_y / MI), + mi_c + cu_col * (luma_span_x / MI), ); - let cu_around = neighbours.around_mi(cu_mi, luma_span); - let cu_reach = if cn == 1 { + let cu_around = if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + // lane-av1-422f: chroma-only loop; per-chroma-cell above + // votes (see [`Neighbours::around_mi_422_chroma`]). + neighbours.around_mi_422_chroma(cu_mi, luma_span_x, luma_span_y) + } else { + neighbours.around_mi_rect(cu_mi, luma_span_x, luma_span_y) + }; + let cu_reach = if cn_rows == 1 && cn_cols == 1 { reach } else { - tu_reach( + tu_reach_rect( side, side, - cu_col * luma_span, cu_row * luma_span, luma_span, + cu_col * luma_span_x, cu_row * luma_span_y, luma_span_x, luma_span_y, reach, px, py, y.width, y.height, fctx, ) }; - let (cu_x, cu_y) = (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx); + let (cu_x, cu_y) = + (cpx + cu_col * chroma_tx, cpy + cu_row * chroma_tx_h); if let Some((ub, vb)) = &palette_uv_bufs { let pbuf = if plane_pass == 1 { ub } else { vb }; set_palette_pred( palette_window( - pbuf, chroma_side, cu_col * chroma_tx, cu_row * chroma_tx, - chroma_tx, chroma_tx, + pbuf, chroma_side, cu_col * chroma_tx, + cu_row * chroma_tx_h, chroma_tx, chroma_tx_h, ), fctx, ); } let buf: &mut PlaneBuf<'static> = if plane_pass == 1 { &mut *u } else { &mut *v }; - let cu_grid = read_plane( - dec, cdfs, chroma_set, scans.1, plane_pass, cu_around[plane_pass], mode, - uv_predict_mode, angle_delta_uv, cu_reach, buf, cu_x, cu_y, - chroma_tx, chroma_tx, base_q_idx, - alpha.zip(ac).map(|((au, av), ac)| { - (if plane_pass == 1 { au } else { av }, ac) - }), - None, chroma_ctx_offset, smooth_neighbor_uv, fctx, - )?; - if cn > 1 { + let cu_grid = if chroma_tx == chroma_tx_h { + read_plane( + dec, cdfs, chroma_set, scans.1, plane_pass, cu_around[plane_pass], mode, + uv_predict_mode, angle_delta_uv, cu_reach, buf, cu_x, cu_y, + chroma_tx, chroma_tx, base_q_idx, + alpha.zip(ac).map(|((au, av), ac)| { + (if plane_pass == 1 { au } else { av }, ac) + }), + None, chroma_ctx_offset, smooth_neighbor_uv, fctx, + )? + } else { + // lane-av1-422f: the whole plane block as one rect unit; + // `chroma_ctx_offset` is `None` there (the unit covers + // the plane block, so the offset-7 skip rows are right). + read_rect_chroma_unit( + dec, cdfs, chroma_set, scans.1, chroma_tx, chroma_tx_h, plane_pass, + cu_around[plane_pass], uv_predict_mode, angle_delta_uv, cu_reach, buf, + cu_x, cu_y, base_q_idx, None, + alpha.zip(ac).map(|((au, av), ac)| { + (if plane_pass == 1 { au } else { av }, ac) + }), + smooth_neighbor_uv, fctx, + )? + }; + if cn_rows * cn_cols > 1 { hit!(CHROMA_SPLIT_TX_HITS); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + hit!(CHROMA422_SQUARE_HITS); + } // Immediately, so the NEXT unit of this same block reads // this one's coefficient context (libaom's chroma // `txb_skip_ctx` for the second quadrant is 11, i.e. base // 1 from this left neighbour -- measured against aomdec). // The same writes are replayed after `record_split_luma` // below, which would otherwise clobber them whole-block. - neighbours.record_mi_chroma(cu_mi, luma_span, luma_span, plane_pass, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, luma_span_x, luma_span_y, plane_pass, &cu_grid, + ); } if plane_pass == 1 { u_pass.push(cu_grid); } else { let u_grid = std::mem::replace(&mut u_pass[pass_idx], Grid::Zero(0)); - if cn > 1 { - units.push((cu_mi, luma_span, u_grid.clone(), cu_grid.clone())); + if cn_rows * cn_cols > 1 { + units.push((cu_mi, luma_span_x, luma_span_y, u_grid.clone(), cu_grid.clone())); } last_grids = [u_grid, cu_grid]; } @@ -17359,9 +18723,9 @@ fn decode_block( // context write; at `cn > 1` the per-unit writes above are what the // next block reads, so they run after this (last writer wins). neighbours.record_split_luma(at, side, mode, uv_predict_mode, [&last_grids[0], &last_grids[1]]); - for (cu_mi, luma_span, u_grid, v_grid) in &units { - neighbours.record_mi_chroma(*cu_mi, *luma_span, *luma_span, 1, u_grid); - neighbours.record_mi_chroma(*cu_mi, *luma_span, *luma_span, 2, v_grid); + for (cu_mi, sw, sh, u_grid, v_grid) in &units { + neighbours.record_mi_chroma(*cu_mi, *sw, *sh, 1, u_grid); + neighbours.record_mi_chroma(*cu_mi, *sw, *sh, 2, v_grid); } } // Unconditional, `size == 0` for a non-palette block: clears any stale @@ -17627,8 +18991,18 @@ fn decode_block_128rect( let mi_rows = 2 * y.true_height.div_ceil(8); let max_w_mi = (bw / MI).min(mi_cols.saturating_sub(mi_c)); let max_h_mi = (bh / MI).min(mi_rows.saturating_sub(mi_r)); - // Non-lossless: one 32x32 chroma unit per mu chunk, per plane. - debug_assert!(lossless_frame || (chroma_w / chroma_tx, chroma_h / chroma_tx) == (nch_x, nch_y)); + // Non-lossless: per mu chunk, `(64 >> ss) / chroma_tx` chroma units per + // axis -- one 32x32 at 4:2:0, two stacked on the tall axis at 4:2:2 + // (lane-av1-422bigblock: the chunk's chroma plane block is 32x64 there), + // four at 4:4:4 (lane-av1-444sb's own finding on this same walk). + debug_assert!( + lossless_frame + || (chroma_w / chroma_tx, chroma_h / chroma_tx) + == ( + nch_x * ((64 >> ss_x(fctx)) / chroma_tx), + nch_y * ((64 >> ss_y(fctx)) / chroma_tx) + ) + ); let tpc = 64 / logical_tx; let zero_tu = vec![0i32; logical_tx * logical_tx]; let zero_cu = vec![0i32; chroma_tx * chroma_tx]; @@ -17637,6 +19011,7 @@ fn decode_block_128rect( // The chroma context arrays are indexed in LUMA mi; every chroma unit of // every chunk shares this luma span (2 chroma pixels per luma unit). let luma_span = chroma_tx << ss_x(fctx); + let luma_span_h = chroma_tx << ss_y(fctx); for ch_row in 0..nch_y { for ch_col in 0..nch_x { for tu_row in ch_row * tpc..(ch_row + 1) * tpc { @@ -17706,9 +19081,15 @@ fn decode_block_128rect( neighbours.record_mi_luma(tu_mi, logical_tx, &tu_grid); } } - // Transform units per axis inside this mu chunk's 32x32 chroma - // span: one 32x32 unit normally, 8x8 TX_4X4 units when lossless. - let cn = (32 / chroma_tx).max(1); + // Transform units per axis inside this mu chunk's chroma span: + // a 64x64 luma chunk covers `64 >> ss` chroma pixels per axis, + // so it holds `(64 >> ss) / chroma_tx` units -- one 32x32 at + // 4:2:0, four at 4:4:4 (lane-av1-444sb), TWO STACKED TX_32X32 on + // the tall axis at 4:2:2 (lane-av1-422bigblock: the chunk's + // chroma plane block is 32x64 there, so the two axes' counts + // part ways -- 1 x 2); 8x8 TX_4X4 units when lossless. + let cn = ((64 >> ss_x(fctx)) / chroma_tx).max(1); + let cn_h = ((64 >> ss_y(fctx)) / chroma_tx).max(1); // libaom's per-chunk `unit_width/height` (plane-mi units of the // luma mi grid): `min(mu_blocks + col, max_blocks) >> ss`. let unit_w = ((ch_col + 1) * 16).min(max_w_mi) >> ss_x(fctx); @@ -17720,25 +19101,28 @@ fn decode_block_128rect( // symbol order the interleaved pair used to read; a lossless // frame's 4x4 chroma units are where it becomes observable. for plane_pass in 1..=2usize { - for ci_row in 0..cn { + for ci_row in 0..cn_h { for ci_col in 0..cn { - if ch_col * 8 + ci_col * stepc >= unit_w - || ch_row * 8 + ci_row * stepc >= unit_h + // The clamp strides are the CHUNK's chroma mi extent + // per axis: 16 luma mi >> the axis's own ss. + if ch_col * (16 >> ss_x(fctx)) + ci_col * stepc >= unit_w + || ch_row * (16 >> ss_y(fctx)) + ci_row * stepc >= unit_h { continue; } - let cu_x = cpx + ch_col * 32 + ci_col * chroma_tx; - let cu_y = cpy + ch_row * 32 + ci_row * chroma_tx; + let cu_x = cpx + ch_col * (64 >> ss_x(fctx)) + ci_col * chroma_tx; + let cu_y = cpy + ch_row * (64 >> ss_y(fctx)) + ci_row * chroma_tx; let cu_mi = ( mi_r + ch_row * 16 + ci_row * ((chroma_tx << ss_y(fctx)) / 4), mi_c + ch_col * 16 + ci_col * ((chroma_tx << ss_x(fctx)) / 4), ); - let cu_r = tu_reach( + let cu_r = tu_reach_rect( bw, bh, ch_col * 64 + ci_col * luma_span, - ch_row * 64 + ci_row * luma_span, + ch_row * 64 + ci_row * luma_span_h, luma_span, + luma_span_h, reach, px, py, @@ -17752,7 +19136,8 @@ fn decode_block_128rect( ); continue; } - let cu_around = neighbours.around_mi(cu_mi, luma_span); + let cu_around = + neighbours.around_mi_rect(cu_mi, luma_span, luma_span_h); let buf: &mut PlaneBuf<'static> = if plane_pass == 1 { &mut *u } else { &mut *v }; let grid = read_plane( @@ -17766,7 +19151,13 @@ fn decode_block_128rect( // reads this one's coefficient context; replayed after // `record_split_luma_rect` below, which would otherwise // clobber them whole-block. - neighbours.record_mi_chroma(cu_mi, luma_span, luma_span, plane_pass, &grid); + neighbours.record_mi_chroma( + cu_mi, + luma_span, + luma_span_h, + plane_pass, + &grid, + ); units.push((plane_pass, cu_mi, grid)); } } @@ -18053,7 +19444,16 @@ fn decode_leaf8( let (cpx, cpy) = (px >> ss_x(fctx), py >> ss_y(fctx)); // 4:4:4: this 8x8 block's chroma plane block is 8x8 (same scan as luma, // `scans.0`). 4:2:0 stays the 4x4 unit this leaf was written for. + // lane-av1-422d: 4:2:2 (ss 1/0) halves only the width, so the plane block + // is 4x8 -- ONE rect transform unit per plane (`av1_get_max_uv_txsize( + // BLOCK_8X8)` at ss (1,0) is `max_txsize_rect_lookup[BLOCK_4X8]` == + // TX_4X8): one txb_skip + one scan per plane in the + // [`TxbSet::ChromaRect8x4`] class [`decode_rect_split`] proves for the + // shape, read through [`leaf8_chroma422_unit`] in each arm below. The + // `(csz, cset, cscan)` selection keeps serving the square arms (444's + // 8x8, 420's 4x4); the rect arms branch on [`chroma_422`] instead. let chroma_444 = ss_x(fctx) == 0 && ss_y(fctx) == 0; + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; let (csz, cset, cscan) = if chroma_444 { (8usize, TxbSet::Chroma8, scans.0) } else { @@ -18071,17 +19471,30 @@ fn decode_leaf8( mv_to_q4(px, dv_col, 0), mv_to_q4(py, dv_row, 0), 8, 8, mc::InterpFilterKind::Bilinear, &mut yb, fctx, ); - let mut ub = vec![0u16; 4 * 4]; + // The chroma extent is THIS frame's subsampled size of the 8x8 luma + // leaf (`get_plane_block_size`): 4x4 at 4:2:0, 4x8 at 4:2:2, 8x8 at + // 4:4:4. The literal 4x4 this replaces hardcoded the 4:2:0 halving -- + // at 4:4:4 the 16-sample override fed this leaf's own 8x8 chroma + // reconstruct, which indexed `prediction[16]` of a 16-sample buffer + // (len 16, index 16 at `PlaneBuf::reconstruct`), and at 4:2:2 it + // covered half the leaf's 4x8 chroma plane block (lane-av1-422d's + // `if chroma_422 { (4, 8) }` arm, which the ss-derived form subsumes: + // `8 >> ss_x` is 4 and `8 >> ss_y` is 8 there). The same buffers + // are windowed at stride 8 by `read_intra_chroma_lossless` (the TX4 + // 4:4:4-lossless arm) and consumed whole by the TX8 and skip arms, + // so all three heal with this one sizing. + let (cw, ch) = (8 >> ss_x(fctx), 8 >> ss_y(fctx)); + let mut ub = vec![0u16; cw * ch]; mc::predict_with_filter( &u.data, u.width, u.true_width, u.true_height, - mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_x(fctx)), - 4, 4, mc::InterpFilterKind::Bilinear, &mut ub, fctx, + mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_y(fctx)), + cw, ch, mc::InterpFilterKind::Bilinear, &mut ub, fctx, ); - let mut vb = vec![0u16; 4 * 4]; + let mut vb = vec![0u16; cw * ch]; mc::predict_with_filter( &v.data, v.width, v.true_width, v.true_height, - mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_x(fctx)), - 4, 4, mc::InterpFilterKind::Bilinear, &mut vb, fctx, + mv_to_q4(cpx, dv_col, ss_x(fctx)), mv_to_q4(cpy, dv_row, ss_y(fctx)), + cw, ch, mc::InterpFilterKind::Bilinear, &mut vb, fctx, ); (yb, ub, vb) }); @@ -18169,12 +19582,68 @@ fn decode_leaf8( ); } let ac = alpha.map(|_| cfl_src(px, py, 8)); + // Three skip-arm shapes, dispatched on THIS frame's subsampling. + // lane-av1-422d: at 4:2:2 a skipped leaf still predicts its 4x8 rect + // unit per plane (CfL keeps its contribution, [`decode_block`]'s own + // skip-arm rule); no coefficient symbol exists, so the entropy + // context never enters the rect read. + if chroma_422 { + u_grid = leaf8_chroma422_unit( + dec, cdfs, (false, false, 0), uv_predict_mode, angle_delta_uv, reach, + 1, alpha.zip(ac).map(|((au, _), ac)| (au, ac)), true, + intrabc_bufs.as_ref().map(|(_, ub, _)| ub.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(ub, _)| ub.clone())), + u, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + v_grid = leaf8_chroma422_unit( + dec, cdfs, (false, false, 0), uv_predict_mode, angle_delta_uv, reach, + 2, alpha.zip(ac).map(|((_, av), ac)| (av, ac)), true, + intrabc_bufs.as_ref().map(|(_, _, vb)| vb.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(_, vb)| vb.clone())), + v, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + luma_grid = Grid::Zero(64); + } else { + // 4:4:4 lossless: the leaf's chroma plane block is a 2x2 raster of + // TX_4X4 units (`av1_get_tx_size`: lossless forces TX_4X4 on EVERY + // plane), so a skipped leaf predicts per unit -- each from its own + // edges -- like the luma `SKIP_SPLIT_TX` loop above. CfL never fires + // here (`is_cfl_allowed` at lossless needs plane_bsize == 4x4; this + // chroma plane block is 8x8), and intrabc/palette keep the + // whole-plane-block prediction they already run. The guard also + // requires `chroma_444`, so it can never reach the 4:2:2 arm above. + let chroma_units_444 = chroma_444 + && lossless(fctx) + && intrabc_bufs.is_none() + && palette_uv_bufs.is_none(); if let Some((_, ub, _)) = &intrabc_bufs { set_palette_pred(ub.clone(), fctx); } else if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - push_intra(1, + if chroma_units_444 { + for cu_row in 0..2 { + for cu_col in 0..2 { + let cu_reach = tu_reach( + 8, 8, cu_col * 4, cu_row * 4, 4, + reach, px, py, y.width, y.height, fctx, + ); + push_intra(1, + cpx + cu_col * 4, + cpy + cu_row * 4, + 4, + uv_predict_mode, + angle_delta_uv, + cu_reach, + &ZERO_RESIDUAL[..16], + None, + None, + smooth_neighbor_uv, fctx, + ); + } + } + } else { + push_intra(1, cpx, cpy, csz, @@ -18186,12 +19655,35 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, ); + } if let Some((_, _, vb)) = &intrabc_bufs { set_palette_pred(vb.clone(), fctx); } else if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - push_intra(2, + if chroma_units_444 { + for cu_row in 0..2 { + for cu_col in 0..2 { + let cu_reach = tu_reach( + 8, 8, cu_col * 4, cu_row * 4, 4, + reach, px, py, y.width, y.height, fctx, + ); + push_intra(2, + cpx + cu_col * 4, + cpy + cu_row * 4, + 4, + uv_predict_mode, + angle_delta_uv, + cu_reach, + &ZERO_RESIDUAL[..16], + None, + None, + smooth_neighbor_uv, fctx, + ); + } + } + } else { + push_intra(2, cpx, cpy, csz, @@ -18203,11 +19695,26 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, ); + } luma_grid = Grid::Zero(64); u_grid = Grid::Zero(csz * csz); v_grid = Grid::Zero(csz * csz); + } } else if resolved != 4 { let around = neighbours.around_mi(leaf_mi, 8); + // lane-av1-422h: the 4:2:2 chroma rect unit's `get_txb_ctx_general` + // reads its above votes over CHROMA 4-px cells -- at ss_x 1 one chroma + // cell spans TWO luma mi columns, so the per-luma-mi sum counts each + // above chroma column twice and `dc_sign_ctx`'s signum flips whenever + // the doubled sum crosses zero (the same class + // [`Neighbours::around_mi_422_chroma`] fixes for the rect readers; + // measured at mi(2,24) plane 2: ours dc_sign row 0, oracle row 2). + // The left extent is unsubsquared at ss_y 0 and stays one-to-one. + let chroma_around = if chroma_422 { + neighbours.around_mi_422_chroma(leaf_mi, 8, 8) + } else { + around + }; if let Some(buf) = &palette_y_buf { set_palette_pred(buf.clone(), fctx); } @@ -18246,6 +19753,25 @@ fn decode_leaf8( fctx.intrabc_chroma_tx.with(|c| c.set(Some(fctx.luma_tx_type.with(std::cell::Cell::get)))); } let ac = alpha.map(|_| cfl_src(px, py, 8)); + if chroma_422 { + // lane-av1-422d: ONE 4x8 rect unit per plane (`av1_get_max_uv_txsize` + // at ss (1,0) == TX_4X8), covering the plane block exactly, off the + // leaf's own 8x8-span entropy context (`chroma_tiled`'s convention). + u_grid = leaf8_chroma422_unit( + dec, cdfs, chroma_around[1], uv_predict_mode, angle_delta_uv, reach, + 1, alpha.zip(ac).map(|((au, _), ac)| (au, ac)), false, + intrabc_bufs.as_ref().map(|(_, ub, _)| ub.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(ub, _)| ub.clone())), + u, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + v_grid = leaf8_chroma422_unit( + dec, cdfs, chroma_around[2], uv_predict_mode, angle_delta_uv, reach, + 2, alpha.zip(ac).map(|((_, av), ac)| (av, ac)), false, + intrabc_bufs.as_ref().map(|(_, _, vb)| vb.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(_, vb)| vb.clone())), + v, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + } else { if let Some((_, ub, _)) = &intrabc_bufs { set_palette_pred(ub.clone(), fctx); } else if let Some((ub, _)) = &palette_uv_bufs { @@ -18300,6 +19826,7 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, )?; + } // Disarm: `INTRABC_CHROMA_TX` is `Some` across exactly this block's // two chroma reads (`decode_block`'s own tail does the same) -- left // set, every later chroma block would inherit this luma tx_type, @@ -18409,13 +19936,59 @@ fn decode_leaf8( } } let ac = alpha.map(|_| cfl_src(px, py, 8)); - let chroma_around = neighbours.around_mi(leaf_mi, 8); + // lane-av1-422h: same ss_x-1 dc-vote sampling as the whole-leaf arm + // above -- the doubled above sum crosses zero at mi(2,24) plane 2. + let chroma_around = if chroma_422 { + neighbours.around_mi_422_chroma(leaf_mi, 8, 8) + } else { + neighbours.around_mi(leaf_mi, 8) + }; // lane-av1intrapred: the non-vacuity counter -- armed slot consulted // by this arm's chroma reads means the frame-copy + inherited-type // route ran; zero at gate time means the fixture stopped reaching it. if fctx.intrabc_chroma_tx.with(std::cell::Cell::get).is_some() { hit!(INTRABC_TX4_CHROMA_COPY_HITS); } + if chroma_422 { + // lane-av1-422d: the chroma unit does NOT follow the luma var-tx + // split -- `uv_txsize` is `av1_get_max_uv_txsize` of the block, + // still the one 4x8 rect unit per plane at ss (1,0). + u_grid = leaf8_chroma422_unit( + dec, cdfs, chroma_around[1], uv_predict_mode, angle_delta_uv, reach, + 1, alpha.zip(ac).map(|((au, _), ac)| (au, ac)), false, + intrabc_bufs.as_ref().map(|(_, ub, _)| ub.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(ub, _)| ub.clone())), + u, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + v_grid = leaf8_chroma422_unit( + dec, cdfs, chroma_around[2], uv_predict_mode, angle_delta_uv, reach, + 2, alpha.zip(ac).map(|((_, av), ac)| (av, ac)), false, + intrabc_bufs.as_ref().map(|(_, _, vb)| vb.clone()) + .or_else(|| palette_uv_bufs.as_ref().map(|(_, vb)| vb.clone())), + v, cpx, cpy, smooth_neighbor_uv, fctx, + )?; + } else if chroma_444 && lossless(fctx) { + // 4:4:4 lossless: the leaf's chroma plane block is a 2x2 raster + // of TX_4X4 units per plane, PLANE-MAJOR (`av1_get_tx_size`: + // lossless forces TX_4X4 on EVERY plane) -- the same walk + // `read_intra_chroma_lossless` runs for whole blocks. Reading one + // TX_8X8 unit here panicked before: the lossless inverse is the + // 4x4-only WHT (`TxParams::run`'s own `(w, h) == (4, 4)` + // invariant), and the unit count desyncs the tile either way. + // Per-unit `record_mi_chroma` calls stamp the neighbour bands + // inside, which is why the tail's whole-leaf chroma stamp below + // is skipped for this shape. + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_intra_chroma_lossless( + dec, cdfs, neighbours, u, v, leaf_mi, (px, py), (cpx, cpy), + 8, (8, 8), (0, 0), (8, 8), 8, reach, (y.width, y.height), mode, + uv_predict_mode, angle_delta_uv, + palette_uv_bufs.as_ref().map(|(a, b)| (&a[..], &b[..])), + smooth_neighbor_uv, base_q_idx, &mut uo, &mut vo, fctx, + )?; + u_grid = if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }; + v_grid = if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }; + } else { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } @@ -18466,6 +20039,7 @@ fn decode_leaf8( None, smooth_neighbor_uv, fctx, )?; + } // The two chroma reads above are the only consulters of this leaf's // armed [`INTRABC_CHROMA_TX`]; leaving it set would make the NEXT // leaf's chroma inherit this leaf's luma type instead of its own @@ -18493,14 +20067,21 @@ fn decode_leaf8( let bound_w = round_up_even(neighbours.mi_cols); let u_state = neighbour_state(&u_grid); let v_state = neighbour_state(&v_grid); - for cell in 0..side_mi { - if cell < side_mi.min(bound_h.saturating_sub(leaf_mi.0)) { - neighbours.left[leaf_mi.0 + cell][1] = u_state; - neighbours.left[leaf_mi.0 + cell][2] = v_state; - } - if cell < side_mi.min(bound_w.saturating_sub(leaf_mi.1)) { - neighbours.above[leaf_mi.1 + cell][1] = u_state; - neighbours.above[leaf_mi.1 + cell][2] = v_state; + // The 4:4:4 lossless walk above already stamped these bands PER UNIT + // (its raster-order last writer per cell is exactly libaom's + // per-entry last update); this whole-leaf aggregate would clobber + // four distinct unit states with one, so it runs only for the shapes + // whose chroma really is one unit. + if !(chroma_444 && lossless(fctx)) { + for cell in 0..side_mi { + if cell < side_mi.min(bound_h.saturating_sub(leaf_mi.0)) { + neighbours.left[leaf_mi.0 + cell][1] = u_state; + neighbours.left[leaf_mi.0 + cell][2] = v_state; + } + if cell < side_mi.min(bound_w.saturating_sub(leaf_mi.1)) { + neighbours.above[leaf_mi.1 + cell][1] = u_state; + neighbours.above[leaf_mi.1 + cell][2] = v_state; + } } } // This leaf's own palette state into the mi-granular above/left bands @@ -18558,6 +20139,77 @@ fn decode_leaf8( Ok(mode) } +/// lane-av1-422d: ONE 4:2:2 chroma transform unit of an 8x8 leaf +/// ([`decode_leaf8`]). At ss (1,0) the plane block is 4x8 and +/// `av1_get_max_uv_txsize(BLOCK_8X8)` resolves to +/// `max_txsize_rect_lookup[BLOCK_4X8]` == TX_4X8, so the WHOLE plane block is +/// a single rect unit -- one txb_skip + one scan per plane in the +/// [`TxbSet::ChromaRect8x4`] class [`decode_rect_split`] proves for the +/// shape. Mirrors [`sub8_leaf_chroma444`]'s rect arm at the leaf's halved +/// position: the entropy context is the leaf's own 8x8 luma-span +/// above/left state (the `chroma_tiled` arm's convention; no `+3` +/// plane-block-bigger term -- the unit covers the plane block exactly), the +/// CFL source is the leaf's whole 8x8 luma block, and the plane's predicted +/// mode supplies the mode-derived default `tx_type` unless an armed +/// [`INTRABC_CHROMA_TX`] slot carries the intrabc luma's own (the caller +/// arms and disarms it, exactly as it does around its square reads). +#[allow(clippy::too_many_arguments)] +fn leaf8_chroma422_unit( + dec: &mut SymbolDecoder, + cdfs: &mut Cdfs, + around: (bool, bool, i32), + uv_predict_mode: usize, + angle_delta_uv: i32, + reach: Reach, + plane_idx: usize, + cfl: Option<(i32, CflSrc)>, + skip: bool, + // The prediction override the square arms feed through + // `set_palette_pred`: an intrabc leaf's frame copy at the DV takes + // priority over a palette block's colour-index map. + pred_override: Option>, + // Unread, like [`read_plane`]'s own: the borrow proves the caller holds + // the plane exclusively while the unit's coefficients are parsed. + _plane: &mut PlaneBuf<'static>, + cpx: usize, + cpy: usize, + smooth_neighbor_uv: bool, fctx: &crate::decode::FrameCtx, +) -> Result { + // The unit's prediction runs whether or not a residual follows it -- a + // skipped leaf still predicts (the CfL contribution survives a skip), + // and a skipped intrabc leaf still copies the frame at its DV. + if let Some(buf) = pred_override { + set_palette_pred(buf, fctx); + } + if skip { + push_intra_rect( + plane_idx, cpx, cpy, 4, 8, uv_predict_mode, angle_delta_uv, reach, + &ZERO_RESIDUAL[..4 * 8], cfl, None, smooth_neighbor_uv, fctx, + ); + return Ok(Grid::Zero(4 * 8)); + } + let default_tx = fctx + .intrabc_chroma_tx + .with(std::cell::Cell::get) + .unwrap_or_else(|| default_intra_tx_type(uv_predict_mode as u8)); + let mut coding = cdfs.txb(TxbSet::ChromaRect8x4, uv_predict_mode); + let (levels, tx_type) = read_coeffs_rect( + dec, &mut coding, &SCAN_4X8, 4, 8, + usize::from(around.0) + usize::from(around.1), + dc_sign_ctx(around.2), default_tx, + )?; + let residual = dequant_and_inverse_typed_wh( + &levels, 4, 8, crate::decode::bit_depth(fctx), block_q_idx(fctx), + plane_q_delta(plane_idx, fctx).0, plane_q_delta(plane_idx, fctx).1, + tx_type, block_iqmatrix(fctx, plane_idx, 4, 8, tx_type), + ); + push_intra_rect( + plane_idx, cpx, cpy, 4, 8, uv_predict_mode, angle_delta_uv, reach, + &residual, cfl, None, smooth_neighbor_uv, fctx, + ); + Ok(levels) +} + /// `read_intra_frame_mode_info`'s mode-info read for one `BLOCK_4X4` leaf /// below an 8x8 partition (spec `decode_partition`'s `bSize < BLOCK_8X8` /// bottom, where no partition symbol is read at all -- `decode_block` runs @@ -18668,7 +20320,21 @@ fn read_intra_mode_sub8( // desynced the tile at the very next element. let angle_delta_y = 0; let chroma = if has_chroma { - let uv_mode = dec.symbol(&mut cdfs.uv_mode_cfl[mode]); + // `is_cfl_allowed` (blockd.h): at lossless CfL needs the CHROMA plane + // block to be a single TX_4X4 (`cfl_allowed_px`). True for this leaf + // at 4:2:0 (the group's plane block is 4x4) and for a 4:4:4 + // `BLOCK_4X4` split leaf, but FALSE for a 4:4:4 `BLOCK_8X4`/`BLOCK_4X8` + // rect leaf, whose plane block is the rect itself -- that shape reads + // the 13-symbol `uv_mode_no_cfl` CDF, and reading the CFL alphabet + // there desynced the tile at the rect leaf's own uv_mode symbol (measured: + // ours consumed the 14-symbol interval where the oracle read 13, first + // divergence at the rect leaf mi (8,16) of `ll444.obu`; class + // `wrong-alphabet-same-value`, lane-av1-llsub8). + let uv_mode = if cfl_allowed_px(seg_w_mi * MI, seg_h_mi * MI, fctx) { + dec.symbol(&mut cdfs.uv_mode_cfl[mode]) + } else { + dec.symbol(&mut cdfs.uv_mode_no_cfl[mode]) + }; if trace { eprintln!("TRACE sub8 uv_mode value={uv_mode} rng={}", dec.debug_state().0); } @@ -18712,7 +20378,10 @@ fn read_intra_mode_sub8( /// arm for arm at leaf scale: a skipped leaf keeps its CfL contribution, an /// intrabc leaf predicts a frame copy at its DV with the luma `tx_type` /// inherited through [`INTRABC_CHROMA_TX`] (the caller arms it right after -/// the luma read). The chroma position, reach and entropy-context span are +/// the luma read) -- and a SKIPPED intrabc leaf is still the DV copy, never +/// an intra prediction (lane-av1-ibcskip2: libaom's +/// `av1_build_inter_predictors_sb` runs for an intrabc block regardless of +/// `skip`). The chroma position, reach and entropy-context span are /// the leaf's own (ss 0/0); the 4x8/8x4 unit reads the same /// `ChromaRect8x4` tables [`decode_rect_split`] proves for that shape. /// Records the leaf's own `uv_mode` map entry and chroma above/left state, @@ -18736,7 +20405,7 @@ fn sub8_leaf_chroma444( base_q_idx: u8, smooth_neighbor_uv: bool, fctx: &crate::decode::FrameCtx, -) -> Result<(Grid, Grid)> { +) -> Result<(Grid, Grid, usize, usize)> { let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; let (w_mi, h_mi) = (bw / MI, bh / MI); neighbours.record_uv_mode_mi(lmi.0, lmi.1, w_mi, h_mi, uv_predict_mode); @@ -18749,7 +20418,50 @@ fn sub8_leaf_chroma444( } else { Reach::of_rect(bw, bh, px, py, y.width, y.height, fctx) }; - let grids = if skip { + let grids = if let Some(dv) = intrabc_dv.filter(|_| skip) { + // lane-av1-ibcskip2: a SKIPPED intrabc leaf still predicts the frame + // copy at its DV -- libaom's `av1_build_inter_predictors_sb` runs for + // an intrabc block regardless of `skip` (only the residual read is + // dropped), so the reconstruction is the bare DV copy. The intra push + // in the next arm is the NON-intrabc route; predicting DC there + // decoded flat cells where this fixture's oracle copies frame bytes + // (class skipped-intrabc-predicts-intra, + // lanes/av1ibcskip2.report.md). Same armed-palette-slot route the + // leaf's own luma skip arm uses (`decode_leaf_split4` / + // `decode_leaf_rect8`); the caller already flushed the recon queue + // before its luma DV copy, so the source samples are current. + let mut ub = vec![0u16; bw * bh]; + mc::predict_with_filter( + &u.data, u.width, u.true_width, u.true_height, + mv_to_q4(px, dv.1, 0), mv_to_q4(py, dv.0, 0), + bw, bh, mc::InterpFilterKind::Bilinear, &mut ub, fctx, + ); + let mut vb = vec![0u16; bw * bh]; + mc::predict_with_filter( + &v.data, v.width, v.true_width, v.true_height, + mv_to_q4(px, dv.1, 0), mv_to_q4(py, dv.0, 0), + bw, bh, mc::InterpFilterKind::Bilinear, &mut vb, fctx, + ); + hit!(SKIPPED_INTRABC_DV_COPY_HITS); + let zeros = &ZERO_RESIDUAL[..bw * bh]; + if square { + set_palette_pred(ub, fctx); + push_intra(1, px, py, 4, DC_PRED, 0, reach, zeros, None, None, smooth_neighbor_uv, fctx); + set_palette_pred(vb, fctx); + push_intra(2, px, py, 4, DC_PRED, 0, reach, zeros, None, None, smooth_neighbor_uv, fctx); + } else { + set_palette_pred(ub, fctx); + push_intra_rect(1, px, py, bw, bh, DC_PRED, 0, reach, zeros, None, None, smooth_neighbor_uv, fctx); + set_palette_pred(vb, fctx); + push_intra_rect(2, px, py, bw, bh, DC_PRED, 0, reach, zeros, None, None, smooth_neighbor_uv, fctx); + } + // The same arm-without-clear route the 4:2:0 tails count: a skipped + // leaf reads no coefficient, so the inherited chroma `tx_type` is + // dropped unconsumed. + hit!(SKIPPED_INTRABC_CHROMA_ARM_HITS); + fctx.intrabc_chroma_tx.with(|c| c.set(None)); + (Grid::Zero(bw * bh), Grid::Zero(bw * bh), 4, 4) + } else if skip { let ac = alpha.map(|_| cfl_src_rect(px, py, bw, bh)); if square { push_intra(1, px, py, 4, uv_predict_mode, 0, reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx); @@ -18764,7 +20476,7 @@ fn sub8_leaf_chroma444( hit!(SKIPPED_INTRABC_CHROMA_ARM_HITS); fctx.intrabc_chroma_tx.with(|c| c.set(None)); } - (Grid::Zero(bw * bh), Grid::Zero(bw * bh)) + (Grid::Zero(bw * bh), Grid::Zero(bw * bh), 4, 4) } else if let Some(dv) = intrabc_dv { // Frame copy at the DV; the residual still reads the ordinary chroma // tables with the inherited luma `tx_type` (see the 4:2:0 tails). @@ -18794,12 +20506,69 @@ fn sub8_leaf_chroma444( 0, reach, v, px, py, 4, TX4, base_q_idx, None, None, None, smooth_neighbor_uv, fctx, )?; - (ug, vg) + (ug, vg, 4, 4) } else { + // lane-av1-ibc444rect: the unskipped lossless chroma walk this + // lane fixes (one rect unit -> per-4x4 Chroma4 units). + if lossless(fctx) { + hit!(INTRABC_RECT8_LOSSLESS_CHROMA_HITS); + } + if lossless(fctx) { + // lane-av1-ibc444rect: at lossless `read_tx_size` forces + // TX_4X4 on EVERY plane (`av1_get_tx_size`'s lossless + // first line), so this rect leaf's chroma is (bw/4)*(bh/4) + // TX_4X4 units at their own 4x4 origins -- not the single + // `ChromaRect8x4` rect unit the non-lossless arm below reads + // (`av1_get_max_uv_txsize(BLOCK_8X4)`'s rect, unreachable at + // lossless). Same walk the leaf's own non-intrabc lossless + // arm runs (lane-av1-llsub8's fix), plane-major per libaom + // `decode_token_recon_block`, with the intra predictor + // swapped for the CURRENT frame at the DV; CFL is never + // allowed at lossless and no alpha rides an intrabc leaf. + let mut out_u = Grid::Own(vec![0i32; bw * bh]); + let mut out_v = Grid::Own(vec![0i32; bw * bh]); + for (plane_idx, buf) in [(1usize, u), (2usize, v)] { + for ur in 0..bh / 4usize { + for uc in 0..bw / 4usize { + let (umi_r, umi_c) = (lmi.0 + ur, lmi.1 + uc); + let (upx, upy) = (px + uc * 4, py + ur * 4); + let mut pb = vec![0u16; 16]; + mc::predict_with_filter( + &buf.data, buf.width, buf.true_width, buf.true_height, + mv_to_q4(upx, dv.1, 0), mv_to_q4(upy, dv.0, 0), + 4, 4, mc::InterpFilterKind::Bilinear, &mut pb, fctx, + ); + set_palette_pred(pb, fctx); + let unit_around = neighbours.around_mi_rect((umi_r, umi_c), 4, 4); + let unit_reach = Reach::of(4, upx, upy, y.width, y.height, fctx); + let grid = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, plane_idx, unit_around[plane_idx], + DC_PRED, DC_PRED, 0, unit_reach, buf, upx, upy, 4, + TX4, base_q_idx, None, None, Some(3), smooth_neighbor_uv, fctx, + )?; + let cell = grid_unit_state(&grid, 4, 0, 0, 4, 4); + if umi_r < neighbours.mi_rows { + neighbours.left[umi_r][plane_idx] = cell; + } + if umi_c < neighbours.mi_cols { + neighbours.above[umi_c][plane_idx] = cell; + } + let out = if plane_idx == 1 { &mut out_u } else { &mut out_v }; + if let Grid::Own(v) = out { + for r in 0..4usize { + v[(ur * 4 + r) * bw + uc * 4..][..4] + .copy_from_slice(&grid[r * 4..][..4]); + } + } + } + } + } + (out_u, out_v, 4, 4) + } else { let scan: &[u16] = if bw > bh { &SCAN_8X4 } else { &SCAN_4X8 }; let default_tx = fctx.intrabc_chroma_tx.with(std::cell::Cell::get).unwrap_or(TxType::DctDct); - let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh)); + let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh), bw, bh); for (plane_idx, buf) in [(1usize, ub), (2usize, vb)] { let skip_ctx = usize::from(around[plane_idx].0) + usize::from(around[plane_idx].1); @@ -18822,6 +20591,7 @@ fn sub8_leaf_chroma444( if plane_idx == 1 { out.0 = levels; } else { out.1 = levels; } } out + } }; fctx.intrabc_chroma_tx.with(|c| c.set(None)); pair @@ -18839,14 +20609,62 @@ fn sub8_leaf_chroma444( 0, reach, v, px, py, 4, TX4, base_q_idx, alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, None, smooth_neighbor_uv, fctx, )?; - (ug, vg) + (ug, vg, 4, 4) + } else if lossless(fctx) { + // lane-av1-llsub8: `read_tx_size` answers TX_4X4 for EVERY plane of + // a lossless block, so this rect leaf's chroma is (bw/4)*(bh/4) + // TX_4X4 units at their own 4x4 origins -- not the single + // TX_8X4/TX_4X8 rect unit the non-lossless arm below reads (that + // one is `av1_get_max_uv_txsize(BLOCK_8X4)`'s rect transform, which + // lossless never reaches). Measured on `ll444.obu`'s HORZ leaf at + // mi (8,16): the oracle codes U units at bc 0,1 with + // `get_txb_ctx`'s +10 rows (`txb_skip_cdf[0][10..12]`, + // plane pels 32 > tx pels 16) where the rect-unit read consumed + // `txb_skip_cdf[1][0]` -- the tile desynced at that U unit's + // all_zero symbol. Walk is plane-major like libaom + // `decode_token_recon_block`'s plane/row/col loop; each unit adds + // 3 to the chroma context (Chroma4's `big` rows, the same fold + // [`read_plane`]'s 128x128 caller uses); CFL is never allowed at + // lossless, so no alpha rides along. + let mut out_u = Grid::Own(vec![0i32; bw * bh]); + let mut out_v = Grid::Own(vec![0i32; bw * bh]); + for (plane_idx, buf) in [(1usize, u), (2usize, v)] { + for ur in 0..bh / 4usize { + for uc in 0..bw / 4usize { + let (umi_r, umi_c) = (lmi.0 + ur, lmi.1 + uc); + let (upx, upy) = (px + uc * 4, py + ur * 4); + let unit_around = neighbours.around_mi_rect((umi_r, umi_c), 4, 4); + let unit_reach = Reach::of(4, upx, upy, y.width, y.height, fctx); + let grid = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, plane_idx, unit_around[plane_idx], + uv_mode, uv_predict_mode, 0, unit_reach, buf, upx, upy, 4, + TX4, base_q_idx, None, None, Some(3), smooth_neighbor_uv, fctx, + )?; + let cell = grid_unit_state(&grid, 4, 0, 0, 4, 4); + if umi_r < neighbours.mi_rows { + neighbours.left[umi_r][plane_idx] = cell; + } + if umi_c < neighbours.mi_cols { + neighbours.above[umi_c][plane_idx] = cell; + } + let out = if plane_idx == 1 { &mut out_u } else { &mut out_v }; + if let Grid::Own(v) = out { + for r in 0..4usize { + v[(ur * 4 + r) * bw + uc * 4..][..4] + .copy_from_slice(&grid[r * 4..][..4]); + } + } + } + } + } + (out_u, out_v, 4, 4) } else { // `av1_get_max_uv_txsize(BLOCK_4X8/8X4)` at ss 0/0 is the rect // transform itself; its `tx_type` is mode-derived with the // <32 set (`decode_rect_split`'s own rule for this shape). let scan: &[u16] = if bw > bh { &SCAN_8X4 } else { &SCAN_4X8 }; let default_tx = default_intra_tx_type(uv_predict_mode as u8); - let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh)); + let mut out = (Grid::Zero(bw * bh), Grid::Zero(bw * bh), bw, bh); for plane_idx in 1..=2usize { let skip_ctx = usize::from(around[plane_idx].0) + usize::from(around[plane_idx].1); @@ -18874,20 +20692,224 @@ fn sub8_leaf_chroma444( } }; // libaom `av1_set_entropy_contexts` stamps above/left PER TRANSFORM UNIT: - // the leaf's own chroma span, not the 8x8 group's. + // the leaf's own chroma span, not the 8x8 group's. A rect leaf's lossless + // units (4x4) each carry their own state -- a 4:2:0-style whole-leaf smear + // gave one unit's state to its neighbour's cells (lane-av1-llsub8). + let (u_grid, v_grid, unit_w, unit_h) = grids; + // One unit covers `unit_w/MI` mi columns and `unit_h/MI` mi rows (a 4x4 + // unit: one cell each; the non-lossless rect unit: the whole leaf). + let (uw_cells, uh_cells) = ((unit_w / MI).max(1), (unit_h / MI).max(1)); + for ur in 0..h_mi / uh_cells { + for uc in 0..w_mi / uw_cells { + let (x0, y0) = (uc * unit_w, ur * unit_h); + let us = grid_unit_state(&u_grid, bw, x0, y0, unit_w, unit_h); + let vs = grid_unit_state(&v_grid, bw, x0, y0, unit_w, unit_h); + for cell in 0..uh_cells { + if lmi.0 + ur * uh_cells + cell < neighbours.mi_rows { + neighbours.left[lmi.0 + ur * uh_cells + cell][1] = us; + neighbours.left[lmi.0 + ur * uh_cells + cell][2] = vs; + } + } + for cell in 0..uw_cells { + if lmi.1 + uc * uw_cells + cell < neighbours.mi_cols { + neighbours.above[lmi.1 + uc * uw_cells + cell][1] = us; + neighbours.above[lmi.1 + uc * uw_cells + cell][2] = vs; + } + } + } + } + Ok((u_grid, v_grid, unit_w, unit_h)) +} + +/// [`neighbour_state`] over one `(unit_w x unit_h)` transform unit at offset +/// `(x0, y0)` inside a `bw`-wide assembled chroma grid -- the per-unit stamp +/// the rect arms need when a leaf carries more than one unit. +fn grid_unit_state(grid: &Grid, bw: usize, x0: usize, y0: usize, unit_w: usize, unit_h: usize) -> Neighbour { + let mut cul = 0u32; + let mut dc = None; + for r in 0..unit_h { + for c in 0..unit_w { + let v = grid[(y0 + r) * bw + x0 + c]; + cul += v.unsigned_abs(); + if r == 0 && c == 0 && v != 0 { + dc = Some(v < 0); + } + } + } + if cul == 0 { + return Neighbour::default(); + } + Neighbour { level: cul.min(7) as u8, dc } +} + + +/// [`sub8_leaf_chroma444`] for 4:2:2 (lane-av1-422g): an even-mi-column 4x4 +/// leaf is its plane's own chroma reference (`is_chroma_reference`'s +/// `!(mi_col & ss_x)` at ss_x 1 -- every even-column leaf, not 4:2:0's single +/// bottom-right one) and codes ONE TX_4X4 chroma unit per plane right after +/// its luma: `ss_size_lookup[BLOCK_4X4][1][0]` is BLOCK_4X4, so the (2, 4) +/// plane area rounds up to the square 4x4 read. The unit sits at the chroma +/// position (`px >> ss_x`), and its 4 chroma-px width spans TWO luma mi +/// columns, so the context reads go through +/// [`Neighbours::around_mi_422_chroma`] and the entropy stamp covers both +/// columns with the unit's whole-unit state. +#[allow(clippy::too_many_arguments)] +fn sub8_leaf_chroma422( + dec: &mut SymbolDecoder, + cdfs: &mut Cdfs, + neighbours: &mut Neighbours, + lmi: (usize, usize), + uv_mode: usize, + angle_delta_uv: i32, + alpha: Option<(i32, i32)>, + skip: bool, + intrabc_dv: Option<(i32, i32)>, + y: &PlaneBuf<'static>, + u: &mut PlaneBuf<'static>, + v: &mut PlaneBuf<'static>, + scan4: &[u16], + base_q_idx: u8, + smooth_neighbor_uv: bool, + // The owning luma leaf's own shape (`(4, 4)` for a split leaf, `(8, 4)` / + // `(4, 8)` for a rect pair's strip): libaom's `has_top_right` / + // `has_bottom_left` answer for this chroma TX_4X4 unit comes from the + // LEAF's own rect table row at the leaf's mi (`bsize` is the leaf, the + // unit covers it whole), never the standalone square-4x4 table the old + // `Reach::of(4, ..)` lookup used -- that said 1 where `has_tr_8x4` says 0 + // at mi(27,44) (the oracle's own EC_PRED prints `n_tr=0` there), so the + // D45 unit read undecoded pixels to its upper right. + leaf_shape: (usize, usize), + fctx: &crate::decode::FrameCtx, +) -> Result<(Grid, Grid)> { + let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; + // lane-av1-422kf2: libaom writes one MB_MODE_INFO per mi cell the LEAF + // covers, and `chroma_left_mbmi`/`chroma_above_mbmi` read whichever of + // those cells the next block's snap lands on -- an 8x4 strip's SM_V + // uv_mode must therefore be visible at BOTH of its mi columns, or the + // block to its right (mi (30,50): left neighbour cell (30,49)) missed the + // smooth neighbour and skipped libaom's strength-1 intra edge filter + // (class context-read-from-one-cell, the 4:2:2 sub-8 twin of the + // lane-kf900 snap fix). + neighbours.record_uv_mode_mi( + lmi.0, + lmi.1, + (leaf_shape.0 / MI).max(1), + (leaf_shape.1 / MI).max(1), + uv_predict_mode, + ); + let (px, py) = (lmi.1 * MI, lmi.0 * MI); + // lane-av1-422kf2: the unit's WRITE/PREDICTION anchor is the same floored + // chroma cell as the entropy anchor below -- libaom positions the sub-8 + // chroma plane block at `av1_setup_dst_planes`' mi-exact floor + // (`(mi_col & !1) * MI >> ss_x`), NOT at the odd leaf's own chroma x: + // the oracle's mi(18,55) TX_4X4 unit reconstructed chroma px 108..111 + // (a pure V-copy of the row above at 108..111), while the leaf's own + // chroma x is 110 -- anchoring there left px 108..109 unwritten (zeros) + // and stepped px 112..113 with the unit's right columns. + let (cpx, cpy) = (((lmi.1 & !1) * MI) >> ss_x(fctx), py >> ss_y(fctx)); + // lane-av1-422h: the entropy-context anchor is the unit's FLOOR chroma + // cell (`pd->above_entropy_context + (mi_col >> ss_x)`): an ODD-column + // leaf's 4-px unit starts at a chroma px that is NOT cell aligned, and + // both its ctx read and its ctx write live in the cell containing that + // start -- one luma mi column to the LEFT of the leaf's own. Even-column + // (cell-aligned) leaves keep their own column. The state write spans the + // anchor's two luma mi columns, so the second (odd) leaf of a split group + // overwrites exactly the cell the first one wrote, as libaom's + // `av1_set_entropy_contexts` per-TU writes do. + let ctx_mi = (lmi.0, lmi.1 & !1); + // lane-av1-422kf2: the square unit takes the leaf's OWN reach: a split + // leaf is a standalone BLOCK_4X4 (square table), a rect pair's strip is + // `of_rect` on the strip's true (8x4 / 4x8) shape -- libaom passes the + // LEAF's bsize to `has_top_right`/`has_bottom_left`, so a rect strip's + // answer comes from `has_tr_8x4`/`has_tr_4x8` at the strip's mi, not + // from a 4x4-block lookup. + let reach = if leaf_shape == (4, 4) { + Reach::of(4, px, py, y.width, y.height, fctx) + } else { + Reach::of_rect(leaf_shape.0, leaf_shape.1, px, py, y.width, y.height, fctx) + }; + let chroma_around = neighbours.around_mi_422_chroma(ctx_mi, 8, 4); + // lane-av1422sub8pix: the CfL AC signal spans the UNIT's luma footprint, + // anchored at the same FLOORED luma x the write/prediction anchor below + // uses -- `px` (the odd leaf's own luma x) steps half the span into the + // RIGHT neighbour group (t422 frame-1 leaf (1,23): the unit reconstructs + // chroma px 44..47 from luma 88..95, while a `px`-anchored source + // averaged luma 92..99 and every CFL unit of the group mismatched). + let ac = alpha.map(|_| cfl_src_rect((lmi.1 & !1) * MI, py, 8, 4)); + let grids: (Grid, Grid) = if skip { + // A skipped chroma-reference leaf still predicts (the CfL contribution + // survives a skip); no coefficient symbol exists. + if alpha.is_some() { + hit!(CHROMA_SKIP_CFL_HITS); + hit!(SKIP_CFL_HITS); + } + push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx); + push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx); + // The same arm-without-clear route the 4:2:0 tails count: a skipped + // leaf reads no coefficient, so an armed intrabc slot is dropped. + if fctx.intrabc_chroma_tx.with(std::cell::Cell::get).is_some() { + hit!(SKIPPED_INTRABC_CHROMA_ARM_HITS); + fctx.intrabc_chroma_tx.with(|c| c.set(None)); + } + (Grid::Zero(16), Grid::Zero(16)) + } else if let Some(dv) = intrabc_dv { + hit!(CHROMA422_SUB8_HITS); + // Frame copy at the DV; the residual still reads the ordinary chroma + // tables with the inherited luma `tx_type` (see the 4:2:0 tails). + let mut ub = vec![0u16; 16]; + mc::predict_with_filter( + &u.data, u.width, u.true_width, u.true_height, + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), + 4, 4, mc::InterpFilterKind::Bilinear, &mut ub, fctx, + ); + let mut vb = vec![0u16; 16]; + mc::predict_with_filter( + &v.data, v.width, v.true_width, v.true_height, + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), + 4, 4, mc::InterpFilterKind::Bilinear, &mut vb, fctx, + ); + set_palette_pred(ub, fctx); + let ug = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 1, chroma_around[1], DC_PRED, DC_PRED, + 0, reach, u, cpx, cpy, 4, TX4, base_q_idx, + None, None, None, smooth_neighbor_uv, fctx, + )?; + set_palette_pred(vb, fctx); + let vg = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 2, chroma_around[2], DC_PRED, DC_PRED, + 0, reach, v, cpx, cpy, 4, TX4, base_q_idx, + None, None, None, smooth_neighbor_uv, fctx, + )?; + fctx.intrabc_chroma_tx.with(|c| c.set(None)); + (ug, vg) + } else { + hit!(CHROMA422_SUB8_HITS); + let ug = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 1, chroma_around[1], uv_mode, uv_predict_mode, + angle_delta_uv, reach, u, cpx, cpy, 4, TX4, base_q_idx, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, None, smooth_neighbor_uv, fctx, + )?; + let vg = read_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 2, chroma_around[2], uv_mode, uv_predict_mode, + angle_delta_uv, reach, v, cpx, cpy, 4, TX4, base_q_idx, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, None, smooth_neighbor_uv, fctx, + )?; + (ug, vg) + }; + // libaom `av1_set_entropy_contexts` stamps above/left PER TRANSFORM UNIT: + // the unit's own chroma span -- 1 mi row tall, TWO luma mi columns wide + // (one chroma column) -- not the 8x8 group's. let (u_grid, v_grid) = grids; let u_state = neighbour_state(&u_grid); let v_state = neighbour_state(&v_grid); - for cell in 0..h_mi { - if lmi.0 + cell < neighbours.mi_rows { - neighbours.left[lmi.0 + cell][1] = u_state; - neighbours.left[lmi.0 + cell][2] = v_state; - } + if lmi.0 < neighbours.mi_rows { + neighbours.left[ctx_mi.0][1] = u_state; + neighbours.left[ctx_mi.0][2] = v_state; } - for cell in 0..w_mi { - if lmi.1 + cell < neighbours.mi_cols { - neighbours.above[lmi.1 + cell][1] = u_state; - neighbours.above[lmi.1 + cell][2] = v_state; + for cell in 0..2 { + if ctx_mi.1 + cell < neighbours.mi_cols { + neighbours.above[ctx_mi.1 + cell][1] = u_state; + neighbours.above[ctx_mi.1 + cell][2] = v_state; } } Ok((u_grid, v_grid)) @@ -18951,9 +20973,14 @@ fn decode_leaf_split4( // `uv_mode` and codes its own full-resolution 4x4 chroma unit right // after its luma -- there is no shared group unit at all. let chroma_444 = ss_x(fctx) == 0 && ss_y(fctx) == 0; + // lane-av1-422g: at ss (1,0) every even-mi-column leaf is its plane's own + // chroma reference (`is_chroma_reference`'s `!(mi_col & ss_x)`) and codes + // one TX_4X4 chroma unit per plane; odd-column leaves read no chroma. + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; // The last leaf's own `uv_predict_mode`, for the coarse above/left slots // the 4:2:0 tail fills from the group's single unit. let mut last_uv444 = DC_PRED; + let mut last_uv422 = DC_PRED; for i in 0..4usize { let (dr, dc) = (i / 2, i % 2); let lmi = (leaf_mi.0 + dr, leaf_mi.1 + dc); @@ -18971,7 +20998,18 @@ fn decode_leaf_split4( } else { leaf_modes[i - 1] }; - let has_chroma = chroma_444 || i == 3; + let has_chroma = if chroma_444 { + true + } else if chroma_422 { + // lane-av1-422h: `is_chroma_reference`'s column clause at ss_x 1 is + // `(mi_col & 1)` for a BLOCK_4X4 leaf -- the ODD-column leaf is the + // chroma reference (oracle, mi(30,42) split group: uv_mode read at + // mi(30,43) and mi(31,43) only). The even-column rule this + // replaces came from 422f's pre-partition-trace misreading. + (lmi.1 & 1) == 1 + } else { + i == 3 + }; let skip_ctx = neighbours.skip_txfm_ctx(lmi.0, lmi.1); let (skip, mode, angle_delta_y, chroma, filter_intra, intrabc) = read_intra_mode_sub8( dec, cdfs, leaf_above, leaf_left, has_chroma, enable_filter_intra, @@ -19060,6 +21098,14 @@ fn decode_leaf_split4( neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), fctx, )?; last_uv444 = DC_PRED; + } else if chroma_422 { + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, DC_PRED, 0, None, skip, + Some(dv), y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (4, 4), fctx, + )?; + last_uv422 = DC_PRED; } else { last_uv = Some((DC_PRED, 0, None)); // lane-av1txbands: the group's chroma is the CHROMA-REFERENCE @@ -19125,6 +21171,16 @@ fn decode_leaf_split4( neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), fctx, )?; last_uv444 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; + } else if chroma_422 { + let (uv_mode, angle_delta_uv, alpha) = + chroma.expect("4:2:2 reads uv_mode on even-column leaves"); + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, uv_mode, angle_delta_uv, alpha, skip, + None, y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (4, 4), fctx, + )?; + last_uv422 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; } else { last_uv = chroma; } @@ -19142,6 +21198,14 @@ fn decode_leaf_split4( neighbours.above_uv_mode[c] = last_uv444; neighbours.left_uv_mode[r] = last_uv444; (Grid::Zero(16), Grid::Zero(16)) + } else if chroma_422 { + // lane-av1-422g: each even-column leaf coded and reconstructed its + // own TX_4X4 chroma unit in the loop above (sub8_leaf_chroma422 + // stamped the per-leaf entropy state); only the coarse slots remain, + // filled from the group's last chroma-reference leaf (bottom-left). + neighbours.above_uv_mode[c] = last_uv422; + neighbours.left_uv_mode[r] = last_uv422; + (Grid::Zero(16), Grid::Zero(16)) } else { let (gpx, gpy) = (leaf_mi.1 * MI, leaf_mi.0 * MI); let (cpx, cpy) = (gpx >> ss_x(fctx), gpy >> ss_y(fctx)); @@ -19189,13 +21253,13 @@ fn decode_leaf_split4( let mut ub = vec![0u16; 16]; mc::predict_with_filter( &u.data, u.width, u.true_width, u.true_height, - mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_x(fctx)), + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), 4, 4, mc::InterpFilterKind::Bilinear, &mut ub, fctx, ); let mut vb = vec![0u16; 16]; mc::predict_with_filter( &v.data, v.width, v.true_width, v.true_height, - mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_x(fctx)), + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), 4, 4, mc::InterpFilterKind::Bilinear, &mut vb, fctx, ); let chroma_around = neighbours.around_mi(leaf_mi, 8); @@ -19253,7 +21317,8 @@ fn decode_leaf_split4( } // lane-av1-444: at 4:4:4 [`sub8_leaf_chroma444`] already stamped each // leaf's own span as it decoded; these placeholder grids carry no state. - if !chroma_444 { + // lane-av1-422g: the 4:2:2 per-leaf units stamp the same way. + if !chroma_444 && !chroma_422 { let round_up_even = |n: usize| n.div_ceil(2) * 2; let bound_h = round_up_even(neighbours.mi_rows); let bound_w = round_up_even(neighbours.mi_cols); @@ -19351,6 +21416,15 @@ fn decode_leaf_rect8( // full-resolution rect chroma unit right after its luma. let chroma_444 = ss_x(fctx) == 0 && ss_y(fctx) == 0; let mut last_uv444 = DC_PRED; + // lane-av1-422h: at ss (1,0) `is_chroma_reference` + // (av1_common_int.h:1459) resolves per strip shape -- + // `((mi_row & 1) || !(bh_mi & 1) || !ss_y) && ((mi_col & 1) || !(bw_mi & 1) || !ss_x)`: + // a HORZ pair is two BLOCK_8X4 strips at the group's even column, so + // BOTH strips are chroma references (`!(bw & 1)`); a VERT pair is two + // BLOCK_4X8 strips, and the column clause keeps only the ODD-column + // strip (i == 1, the same leaf the 4:2:0 rule reads chroma on). + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; + let mut last_uv422 = DC_PRED; for i in 0..2usize { let lmi = if vert { (leaf_mi.0, leaf_mi.1 + i) @@ -19369,7 +21443,13 @@ fn decode_leaf_rect8( } else { neighbours.mode_left_mi(lmi.0, lmi.1).unwrap_or(left_mode) }; - let has_chroma = chroma_444 || i == 1; + let has_chroma = if chroma_444 { + true + } else if chroma_422 { + !vert || i == 1 + } else { + i == 1 + }; let skip_ctx = neighbours.skip_txfm_ctx(lmi.0, lmi.1); let (skip, mode, angle_delta_y, chroma, filter_intra, intrabc) = read_intra_mode_sub8( dec, cdfs, leaf_above, leaf_left, has_chroma, enable_filter_intra, @@ -19382,6 +21462,11 @@ fn decode_leaf_rect8( neighbours.record_mode_mi(lmi.0, lmi.1, w_mi, h_mi, mode); let smooth_neighbor = is_smooth_mode(leaf_above) || is_smooth_mode(leaf_left); if let Some(dv) = intrabc { + // lane-av1-ibc444rect: the unskipped lossless luma walk this lane + // fixes (one rect unit -> per-4x4 inter units). + if !skip && lossless(fctx) { + hit!(INTRABC_RECT8_LOSSLESS_LUMA_HITS); + } // lane-av1txr: an intrabc `BLOCK_4X8`/`BLOCK_8X4` leaf. The // prediction is a frame copy at the DV and the residual reads the // INTER `LumaRect8x4` set -- but with `TxMode::Select` the leaf @@ -19400,6 +21485,10 @@ fn decode_leaf_rect8( let reach = Reach::of_rect(bw, bh, px, py, y.width, y.height, fctx); flush_recon(fctx, y, u, v); let mut luma_leaves: Vec<(usize, usize, usize, usize)> = Vec::new(); + // The non-var-tx band publish, deferred to AFTER the unit loop: + // libaom's `set_txfm_ctxs` runs at `parse_decode_block`'s tail, so + // a unit's own `txb_skip_ctx` read must see the PRE-block bands. + let mut publish = Some((bw, bh)); if tx_select && !skip { // `max_block_wide`/`max_block_high`: the frame's own mi grid, // so a leaf hanging over the right/bottom edge reads no split @@ -19422,13 +21511,34 @@ fn decode_leaf_rect8( &mut luma_leaves, ); hit!(RECT_INTRABC_VARTX_HITS); + publish = None; + } else if lossless(fctx) && !skip { + // lane-av1-ibc444rect: `read_tx_size`'s lossless first line + // (`decodeframe.c:1203`) answers TX_4X4 for EVERY plane before + // any tree, and a lossless frame's `TxMode` is `ONLY_4X4` + // (spec 6.8.20) so no var-tx tree is read either -- the leaf's + // coefficients are (bw/4)*(bh/4) inter TX_4X4 units at their + // own origins, plane-major, NOT the single rect transform the + // non-lossless arm reads (that one is + // `av1_get_max_uv_txsize(BLOCK_8X4)`'s rect, unreachable at + // lossless). Same unit structure the non-intrabc lossless + // split below walks; each unit predicts from the CURRENT + // frame at the DV. Measured on the lane's `e4` fixture + // (`ll444_ibc_rect.obu`): the single-rect read desynced the + // tile and tripped the lossless WHT assert `(4, 8) != (4, 4)` + // at `TxParams::run`. + for ur in 0..bh / 4usize { + for uc in 0..bw / 4usize { + luma_leaves.push((ur, uc, 4, 4)); + } + } + publish = Some((4, 4)); } else { luma_leaves.push((0, 0, bw, bh)); // The non-var-tx arm: a SKIPPED intrabc leaf (or a frame // outside `TxMode::Select`) publishes its own rect transform // (`set_txfm_ctxs`'s `skip && is_inter` branch writes the // block's own pixels -- the same size here). - txfm_partition_update_rect(neighbours, lmi, (bw, bh), (bw, bh)); } // The transform type an intrabc block's CHROMA inherits is the // `tx_type_map` entry at the chroma unit's co-located luma @@ -19487,6 +21597,17 @@ fn decode_leaf_rect8( ) }; let mut coding = cdfs.txb(set, DC_PRED); + // lane-av1-ibc444rect: `av1_read_tx_type` returns before any + // symbol for a lossless block (qindex == 0, decodemv.c:681) + // on EVERY plane and size -- the lossless units this arm now + // walks must not read the set's tx_type either (`read_plane` + // does the same for its own call sites). Measured on the + // lane's `ll444_ibc_rect.obu`: with the symbol read, the + // first unit's ladder diverged right after a matched + // `all_zero` (ours +4096 rng on the unused tx_type). + if lossless(fctx) { + coding.tx_type = None; + } let (levels, tx_type) = read_coeffs_rect( dec, &mut coding, tu_scan, tw, th, skip_ctx, dc_sign_ctx(around.2), TxType::DctDct, @@ -19495,11 +21616,28 @@ fn decode_leaf_rect8( chroma_tx = tx_type; fctx.luma_tx_type.with(|c| c.set(tx_type)); } - let residual = dequant_and_inverse_typed_wh( - &levels, tw, th, crate::decode::bit_depth(fctx), block_q_idx(fctx), - plane_q_delta(0, fctx).0, plane_q_delta(0, fctx).1, tx_type, - block_iqmatrix(fctx, 0, tw, th, tx_type), - ); + // lane-av1-ibc444rect: the residual goes through [`TxParams`] + // with the frame's lossless flag, exactly like + // [`read_plane`]'s own dequant -- at lossless `TxParams::run` + // is the Walsh-Hadamard inverse on every plane, and the + // `dequant_and_inverse_typed_wh` shortcut the lossy var-tx + // callers use has no lossless flag (it would run the DCT + // inverse over the WHT-ordered levels). Measured on the lane + // fixture: the DCT route left ±1..30 sample errors on every + // walked leaf's luma. + let tx = TxParams { + w: tw, + h: th, + bit_depth: crate::decode::bit_depth(fctx), + q_idx: block_q_idx(fctx), + dc_delta: plane_q_delta(0, fctx).0, + ac_delta: plane_q_delta(0, fctx).1, + tx_type, + qm: block_iqmatrix(fctx, 0, tw, th, tx_type), + stride: 0, + lossless: lossless(fctx), + }; + let residual = tx.run(&levels); if (tw, th) == (4, 4) { push_intra(0, tu_px, tu_py, 4, DC_PRED, 0, tu_reach, &residual, None, None, smooth_neighbor, fctx); } else { @@ -19517,6 +21655,11 @@ fn decode_leaf_rect8( neighbours.record_mi_luma(tu_mi, 4, &tu_grid); } } + // The deferred non-var-tx band publish (see `publish` above): the + // units' `txb_skip_ctx` reads ran against the pre-block bands. + if let Some((pub_w, pub_h)) = publish { + txfm_partition_update_rect(neighbours, lmi, (pub_w, pub_h), (bw, bh)); + } if single { let state = neighbour_state(&grid); for cell in 0..h_mi { @@ -19556,6 +21699,16 @@ fn decode_leaf_rect8( neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), fctx, )?; last_uv444 = DC_PRED; + } else if chroma_422 { + // lane-av1-422h: same at ss (1,0) -- the strip's own square + // TX_4X4 chroma unit at its halved position. + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, DC_PRED, 0, None, skip, + Some(dv), y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (bw, bh), fctx, + )?; + last_uv422 = DC_PRED; } else { last_uv = Some((DC_PRED, 0, None)); last_intrabc = Some(dv); @@ -19713,6 +21866,18 @@ fn decode_leaf_rect8( neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), fctx, )?; last_uv444 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; + } else if chroma_422 { + // lane-av1-422h: the strip's own square TX_4X4 chroma unit + // per plane right after its split luma (one per ref strip). + let (uv_mode, angle_delta_uv, alpha) = + chroma.expect("4:2:2 chroma references read uv_mode"); + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, uv_mode, angle_delta_uv, alpha, + skip, None, y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (bw, bh), fctx, + )?; + last_uv422 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; } else { last_uv = chroma; } @@ -19802,6 +21967,21 @@ fn decode_leaf_rect8( neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), fctx, )?; last_uv444 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; + } else if chroma_422 { + // lane-av1-422h: the strip's own square TX_4X4 chroma unit + // per plane right after its luma -- libaom codes each + // BLOCK_8X4 strip's chroma under the strip itself (both + // strips of a HORZ pair are chroma references), not one + // shared group unit. + let (uv_mode, angle_delta_uv, alpha) = + chroma.expect("4:2:2 chroma references read uv_mode"); + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, uv_mode, angle_delta_uv, alpha, + skip, None, y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (bw, bh), fctx, + )?; + last_uv422 = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; } else { last_uv = chroma; } @@ -19818,6 +21998,15 @@ fn decode_leaf_rect8( neighbours.above_uv_mode[c] = last_uv444; neighbours.left_uv_mode[r] = last_uv444; (Grid::Zero(16), Grid::Zero(16)) + } else if chroma_422 { + // lane-av1-422h: every chroma-reference strip coded and reconstructed + // its own chroma unit in the loop above (and stamped its own entropy + // span), so the 4:2:0 shared group unit below must not run. Only the + // coarse 16x16 slots remain: libaom's `above_uv_mode`/`left_uv_mode` + // end up holding the LAST chroma reference's mode (decode order). + neighbours.above_uv_mode[c] = last_uv422; + neighbours.left_uv_mode[r] = last_uv422; + (Grid::Zero(16), Grid::Zero(16)) } else { let (gpx, gpy) = (leaf_mi.1 * MI, leaf_mi.0 * MI); let (cpx, cpy) = (gpx >> ss_x(fctx), gpy >> ss_y(fctx)); @@ -19872,13 +22061,13 @@ fn decode_leaf_rect8( let mut ub = vec![0u16; 16]; mc::predict_with_filter( &u.data, u.width, u.true_width, u.true_height, - mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_x(fctx)), + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), 4, 4, mc::InterpFilterKind::Bilinear, &mut ub, fctx, ); let mut vb = vec![0u16; 16]; mc::predict_with_filter( &v.data, v.width, v.true_width, v.true_height, - mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_x(fctx)), + mv_to_q4(cpx, dv.1, ss_x(fctx)), mv_to_q4(cpy, dv.0, ss_y(fctx)), 4, 4, mc::InterpFilterKind::Bilinear, &mut vb, fctx, ); if leaf_skips[1] { @@ -19942,7 +22131,9 @@ fn decode_leaf_rect8( } // lane-av1-444: at 4:4:4 [`sub8_leaf_chroma444`] already stamped each // leaf's own span as it decoded; these placeholder grids carry no state. - if !chroma_444 { + // lane-av1-422h: same at ss (1,0) -- [`sub8_leaf_chroma422`] stamped each + // chroma-reference strip's own span in decode order. + if !(chroma_444 || chroma_422) { let round_up_even = |n: usize| n.div_ceil(2) * 2; let bound_h = round_up_even(neighbours.mi_rows); let bound_w = round_up_even(neighbours.mi_cols); @@ -20000,6 +22191,15 @@ const CDEF_DIRECTIONS: [[(i32, i32); 2]; 8] = [ const CDEF_VERY_LARGE: i32 = 0x4000; const CDEF_PRI_TAPS: [[i32; 2]; 2] = [[4, 2], [3, 3]]; const CDEF_SEC_TAPS: [i32; 2] = [2, 1]; +/// lane-av1422filter: libaom `av1_cdef_filter_fb` (cdef_block.c) remaps the +/// luma direction before filtering CHROMA whenever `xdec != ydec` — the +/// direction grid lives on the subsampled chroma grid, so a direction found +/// on the 8x8 luma block means a different line there. `conv422` applies +/// under 4:2:2 (`xdec` set), `conv440` under its mirror (not expressible in +/// the profiles this decoder accepts, kept for fidelity). 4:2:0 and 4:4:4 +/// (`xdec == ydec`) take no remap, exactly as before this lane. +const CDEF_DIR_CONV422: [usize; 8] = [7, 0, 2, 4, 5, 6, 6, 6]; +const CDEF_DIR_CONV440: [usize; 8] = [1, 2, 2, 2, 3, 4, 6, 0]; fn cdef_msb(x: i32) -> i32 { 31 - x.leading_zeros() as i32 @@ -21567,7 +23767,23 @@ fn rect_inter_chroma_set(w: usize, h: usize) -> Result { // block (`av1_get_max_uv_txsize` adjusts `TX_64X32`/`TX_32X64` to // `TX_32X32`); `get_txsize_entropy_ctx(TX_32X32)` is the 32x32 set. (32, 32) => TxbSet::Chroma32, + // lane-av1-422j: square chroma units of a 4:2:2 strip -- a 16x8 + // (8x16) luma strip's chroma plane block is 8x8 (16x16) square, and + // the square-block routing above sends it here. The sets are the + // exact `get_txsize_entropy_ctx` tables the square arms use. + (16, 16) => TxbSet::Chroma16, + (8, 8) => TxbSet::Chroma8, + (4, 4) => TxbSet::Chroma4, _ => { + // lane-av1-422l: the refusing (w, h) for the owning lane -- the + // 4:2:2 frontier stops here at (4, 32), the plane residual of an + // 8x32 luma block, which libaom itself marks BLOCK_INVALID + // (`av1_ss_size_lookup[BLOCK_8X32][1][0]`, common_data.c:38) and + // for which no TX_4X32 exists -- that chroma is coded as a + // TX_8X32-chunked merge, not a 4-px unit. + if crate::envflags::env_flag!("EC_AV1_TRACE_422") { + eprintln!("EC_422 rect_inter_chroma_set missing (w,h)=({w},{h})"); + } return Err(unsupported( "a rectangular inter chroma transform unit whose shape has no coefficient table set here", )); @@ -21621,6 +23837,11 @@ fn rect_scan(w: usize, h: usize) -> Result<&'static [u16]> { (4, 8) => &SCAN_4X8, (32, 8) => &SCAN_32X8, (8, 32) => &SCAN_8X32, + // lane-av1-422j: square units routed through the rect reader -- a + // 4:2:2 strip's square chroma plane block (8x8 under a 16x8 strip, + // 16x16 under an 8x16 one). The default 2D scan is exactly what the + // square reader uses for the same side. + (w, h) if w == h => default_scan(w), _ => { return Err(unsupported( "a rectangular transform unit whose shape has no coefficient scan table here", @@ -21882,9 +24103,38 @@ fn read_inter_rect_chroma( fctx: &crate::decode::FrameCtx, ) -> Result<(Grid, Grid, Vec<((usize, usize), usize, Grid, usize, usize)>)> { let (uw, uh) = (write_chroma_w.min(32), write_chroma_h.min(32)); + // lane-av1-422m, CORRECTED lane-av1-422n: an 8x32 luma block HAS no + // 4:2:2 plane residual block -- `av1_ss_size_lookup[BLOCK_8X32][1][0]` + // is BLOCK_INVALID (= 255, blockd.h) -- so libaom never codes its chroma + // as a (4, 32) unit, and no such coefficient set exists (no TX_4X32 + // either). The plane is still coded, CHUNKED: `decode_token_recon_block` + // (`decodeframe.c:1022`) steps the plane in `get_vartx_max_txsize` + // units, where the `BLOCK_INVALID` plane size indexes + // `max_txsize_rect_lookup` OUT OF BOUNDS and the byte read there in the + // pinned Release oracle build is TX_4X8 -- the committed + // "adjacent `vtx_tab[0]` = TX_4X4" reading was wrong (reviewer FAIL on + // e24dc84b). `decode_reconstruct_tx`'s + // `if (tx_size == plane_tx_size || plane)` never recurses for chroma, so + // every unit reads at TX_4X8: FOUR stacked 4x8 units per plane over the + // 4x32 chroma plane. The units KEEP a tx type: `av1_get_tx_type` + // (blockd.h) has no TX_4X4 early-out -- it derives from the block's + // inherited luma type reduced into the TX_4X8 ext-tx set + // (`reduce_inherited_chroma_tx_type`), exactly like every other rect + // unit here, so the 4:2:2 drop-the-type special case is gone. + let invalid_ss_plane = ss_x(fctx) == 1 + && ss_y(fctx) == 0 + && (write_chroma_w, write_chroma_h) == (4, 32); + let (uw, uh) = if invalid_ss_plane { (4, 8) } else { (uw, uh) }; + let inherit_tx_type = Some(luma_tx_type); let (nx, ny) = (write_chroma_w / uw, write_chroma_h / uh); let multi = nx * ny > 1; let set = rect_inter_chroma_set(uw, uh)?; + // lane-av1-422blockhalf: the assembled block grid is the PRED stride x + // the plane's true height -- at 4:2:2 a square block's plane is + // (side/2, side), so the old `chroma_side`-square sizing under-allocated + // every row past `chroma_stride` once the caller began passing the + // per-axis stride. + let assembled_h = write_chroma_h.max(chroma_side); let mut assembled: [Vec; 2] = [Vec::new(), Vec::new()]; // The multi-unit stamps below are rewritten by the caller's whole-block // record (`record_rect_mi`/`record_split_luma_rect_mi` write ONE @@ -21896,8 +24146,8 @@ fn read_inter_rect_chroma( if multi { hit!(CHROMA_SPLIT_TX_HITS); assembled = [ - vec![0i32; chroma_side * chroma_side], - vec![0i32; chroma_side * chroma_side], + vec![0i32; chroma_side * assembled_h], + vec![0i32; chroma_side * assembled_h], ]; } for plane_idx in 1..=2 { @@ -21910,7 +24160,19 @@ fn read_inter_rect_chroma( at_mi.1 + cu_col * (span_x / MI), ); let cu_around = if multi { - neighbours.around_mi_rect(cu_mi, span_x, span_y) + // lane-av1422ctxgather: at ss (1,0) the unit's above + // span covers `uw` chroma px = `2*uw` luma mi columns, + // so the plain per-mi gather counts every chroma + // column's whole-unit dc sign twice + // ([`Neighbours::around_mi_422_chroma`]; the left + // extent is 1:1 at ss_y 0). 4:2:0 keeps the per-mi + // gather (both extents duplicated there, measured + // elsewhere). + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + neighbours.around_mi_422_chroma(cu_mi, span_x, span_y) + } else { + neighbours.around_mi_rect(cu_mi, span_x, span_y) + } } else { around }; @@ -21929,10 +24191,13 @@ fn read_inter_rect_chroma( cu_x, cu_y, cu_pred, - Some(luma_tx_type), + inherit_tx_type, multi.then_some(3), fctx, )? .0; + if invalid_ss_plane { + hit!(CHROMA422_CHUNK_HITS); + } if multi { // Immediately, so the next unit of this block reads this // one's coefficient context (libaom updates the chroma @@ -21945,7 +24210,12 @@ fn read_inter_rect_chroma( } units.push((cu_mi, plane_idx, cu_grid, span_x, span_y)); } else { - assembled[plane_idx - 1] = embed_rect_grid(&cu_grid, uw, uh, chroma_side); + let mut full = vec![0i32; chroma_side * assembled_h]; + for rr in 0..uh { + full[rr * chroma_side..][..uw] + .copy_from_slice(&cu_grid[rr * uw..][..uw]); + } + assembled[plane_idx - 1] = full; } } } @@ -24525,7 +26795,19 @@ fn cdef_band( let t_uv = i32::from(cdef.uv_pri_strength[sidx]) << coeff_shift; let uv_sec_strength = i32::from(cdef.uv_sec_strength[sidx]) << coeff_shift; - let uv_dir = if t_uv != 0 { dir } else { 0 }; + // lane-av1422filter: the chroma direction is the luma one + // remapped through `conv422`/`conv440` under asymmetric + // subsampling (see [`CDEF_DIR_CONV422`]); identical to the + // raw luma direction for 4:2:0 and 4:4:4. + let uv_dir = if t_uv != 0 { + match (ss_x(fctx), ss_y(fctx)) { + (1, 0) => CDEF_DIR_CONV422[dir], + (0, 1) => CDEF_DIR_CONV440[dir], + _ => dir, + } + } else { + 0 + }; let enable_primary_uv = t_uv != 0; let enable_secondary_uv = uv_sec_strength != 0; if let Some(w) = wrote.as_deref_mut() { @@ -24728,8 +27010,11 @@ fn pipe_run( let j = k - 2; if let Some((sy2, su2, sv2)) = snap.as_mut() { snap_band(sy2.data.to_mut(), y, 0, j * 64, (j + 1) * 64, cfg.cdef_on); - snap_band(su2.data.to_mut(), u, 1, j * 32, (j + 1) * 32, cfg.cdef_on); - snap_band(sv2.data.to_mut(), v, 1, j * 32, (j + 1) * 32, cfg.cdef_on); + // lane-av1422filter: chroma band rows follow the frame's ss_y + // (4:2:2 chroma bands the luma 64-row grid, not 32). + let (c_lo, c_hi) = ((j * 64) >> ss_y(fctx), ((j + 1) * 64) >> ss_y(fctx)); + snap_band(su2.data.to_mut(), u, ss_y(fctx) as u32, c_lo, c_hi, cfg.cdef_on); + snap_band(sv2.data.to_mut(), v, ss_y(fctx) as u32, c_lo, c_hi, cfg.cdef_on); } } if cfg.cdef_on && k >= 3 && k - 3 < nb { @@ -24784,8 +27069,23 @@ fn pipe_run_lr( let (fw, fh) = (cfg.frame_w, cfg.frame_h); let dims = [ (fw, fh, 0u32, y.width, y.data.len()), - (fw.div_ceil(2), fh.div_ceil(2), 1, u.width, u.data.len()), - (fw.div_ceil(2), fh.div_ceil(2), 1, v.width, v.data.len()), + // lane-av1422filter: chroma plane extents and stripe geometry follow + // the frame's own subsampling -- 4:2:2 chroma is full-height with + // luma-grid stripes (only 4:2:0 halves both). + ( + round_ss(fw, ss_x(fctx)), + round_ss(fh, ss_y(fctx)), + ss_y(fctx) as u32, + u.width, + u.data.len(), + ), + ( + round_ss(fw, ss_x(fctx)), + round_ss(fh, ss_y(fctx)), + ss_y(fctx) as u32, + v.width, + v.data.len(), + ), ]; let mut planes: Vec = Vec::new(); for (p, &(pw, ph, ss, stride, len)) in dims.iter().enumerate() { @@ -24814,6 +27114,16 @@ fn pipe_run_lr( if lp.next == r_lo { continue; } + if r_lo == 0 { + // lane-av1lrflush: RU row 0 just entered this plane's + // processed range -- the band release flushed the frame's + // first restoration row through the pipeline. Process-global + // (not a `thread_local!` gate counter): the witnessing gate + // decodes on its own thread while this bump fires on a + // filter-pool worker, and frame 0's whole-frame LR runs on + // the gate's thread and must not satisfy the delta. + LR_PIPELINE_ROW0.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + } let (src, deb) = match lp.p { 0 => (&y.data, &sy2.data), 1 => (&u.data, &su2.data), @@ -24939,6 +27249,32 @@ fn wave_rows_complete(fctx: &crate::decode::FrameCtx) -> usize { static PIPE_FRAMES: AtomicU64 = AtomicU64::new(0); static PIPE_WHOLE: AtomicU64 = AtomicU64::new(0); +/// lane-av1lrflush: frames that CONSTRUCTED the filter pipeline, counted +/// unconditionally. Read by gates through [`pipeline_taken_frames`] as a +/// before/after delta -- the non-vacuity witness that a "pipelined" gate arm +/// really ran `pipe_run`/`pipe_run_lr` rather than silently falling back to +/// the whole-frame path. +static PIPELINE_TAKEN: AtomicU64 = AtomicU64::new(0); + +/// Current value of [`PIPELINE_TAKEN`], for a gate's own before/after delta. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn pipeline_taken_frames() -> u64 { + PIPELINE_TAKEN.load(std::sync::atomic::Ordering::Relaxed) +} + +/// lane-av1lrflush: RU-row-0 flushes the pipeline actually performed, one per +/// LR-active plane whose first restoration unit row enters `pipe_run_lr`'s +/// processed range. Process-global on purpose -- the filter-pool worker bumps +/// it, the gate's thread reads it -- unlike the `thread_local!` gate counters, +/// which a gate's own thread can satisfy from the whole-frame path alone. +static LR_PIPELINE_ROW0: AtomicU64 = AtomicU64::new(0); + +/// Current value of [`LR_PIPELINE_ROW0`], for a gate's before/after delta. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn lr_pipeline_row0_flushes() -> u64 { + LR_PIPELINE_ROW0.load(std::sync::atomic::Ordering::Relaxed) +} + /// Whether this frame's filters may run per superblock row. Everything that /// reads the picture out of band order, or the pipeline's own inputs out of /// row order, keeps the whole-frame path: superres (a between-CDEF-and-LR @@ -25561,6 +27897,37 @@ pub(crate) fn chroma_split_tx_hits() -> usize { CHROMA_SPLIT_TX_HITS.with(std::cell::Cell::get) } +thread_local! { + /// How many INTRA leaves of an inter frame's 8x8 block ran the lossless + /// 4:4:4 chroma walk ([`read_intra_chroma_lossless`], lane-av1-llintra8) + /// -- one bump per leaf, four units per plane inside it. A gate proving + /// the arm must see this nonzero; CHROMA_SPLIT_TX_HITS alone cannot + /// attribute its bumps to THIS leaf. + pub(crate) static LLINTRA8_CHROMA_WALK_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// [`LLINTRA8_CHROMA_WALK_HITS`]: lossless 4:4:4 chroma walks through an +/// inter frame's 8x8 INTRA leaf. +pub fn llintra8_chroma_walk_hits() -> usize { + LLINTRA8_CHROMA_WALK_HITS.with(|c| c.get()) +} + +thread_local! { + /// lane-av1sub8rect444: how many of `decode_intra_sub8_leaf`'s 8x4/4x8 + /// INTRA leaves ran the lossless 4:4:4 per-unit chroma walk (two TX_4X4 + /// units per plane, plane-major) instead of one TX_8X4/TX_4X8 rect unit + /// -- the shape whose unit count AND skip ctx the rect read got wrong. + /// A gate proving the arm fired; CHROMA_SPLIT_TX_HITS cannot attribute + /// its bumps to THIS leaf. + pub(crate) static LLSUB8RECT444_CHROMA_WALK_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// [`LLSUB8RECT444_CHROMA_WALK_HITS`]: lossless 4:4:4 chroma walks through a +/// sub-8 8x4/4x8 INTRA leaf. +pub fn llsub8rect444_chroma_walk_hits() -> usize { + LLSUB8RECT444_CHROMA_WALK_HITS.with(|c| c.get()) +} + fn read_sb128_root( dec: &mut SymbolDecoder, cdfs: &mut Cdfs, @@ -26223,7 +28590,13 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( // mirroring [`crate::tile::sb_coeff_key_frame_tile`]'s own // three-way write exactly. let part = if has_cols && has_rows { + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART mi_row={} mi_col={} bsize=12 ctx={} tell={} rng={}", sb_r * SB_MI, sb_c * SB_MI, ctx, dec.debug_bitpos(), dec.debug_state().0); + } let p = dec.symbol(&mut cdfs.partition_w64[ctx]); + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART_VAL mi_row={} mi_col={} bsize=12 value={}", sb_r * SB_MI, sb_c * SB_MI, p); + } if crate::envflags::env_flag!("EC_AV1_TRACE") { eprintln!("TRACE partition_w64 ctx={ctx} value={p}"); } @@ -26299,7 +28672,13 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( has_half(r32 * BLOCK_MI, BLOCK_MI, mi_rows), ); let part32 = if has_cols32 && has_rows32 { + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART mi_row={} mi_col={} bsize=9 ctx={} tell={} rng={}", r32 * BLOCK_MI, c32 * BLOCK_MI, ctx32, dec.debug_bitpos(), dec.debug_state().0); + } let p = dec.symbol(&mut cdfs.partition_w32[ctx32]); + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART_VAL mi_row={} mi_col={} bsize=9 value={}", r32 * BLOCK_MI, c32 * BLOCK_MI, p); + } if crate::envflags::env_flag!("EC_AV1_TRACE") { let (rng, _) = dec.debug_state(); eprintln!( @@ -26385,7 +28764,13 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( let at16 = (sr, sc); let ctx16 = neighbours.partition_ctx(at16, SUB); if has_cols16 && has_rows16 { + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART mi_row={} mi_col={} bsize=6 ctx={} tell={} rng={}", at16.0, at16.1, ctx16, dec.debug_bitpos(), dec.debug_state().0); + } let part16 = dec.symbol(&mut cdfs.partition_w16[ctx16]); + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART_VAL mi_row={} mi_col={} bsize=6 value={}", at16.0, at16.1, part16); + } if crate::envflags::env_flag!("EC_AV1_TRACE") { eprintln!( "TRACE partition_w16 mi=({},{}) ctx={ctx16} value={part16}", @@ -26709,8 +29094,14 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( } } let leaf_ctx = neighbours.partition_ctx_mi(leaf_mi, 8); + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART mi_row={} mi_col={} bsize=3 ctx={} tell={} rng={}", leaf_mi.0, leaf_mi.1, leaf_ctx, dec.debug_bitpos(), dec.debug_state().0); + } let part8 = dec.symbol(&mut cdfs.partition_w8[leaf_ctx]); + if crate::envflags::env_flag!("EC_TRACE") { + eprintln!("EC_PART_VAL mi_row={} mi_col={} bsize=3 value={}", leaf_mi.0, leaf_mi.1, part8); + } if crate::envflags::env_flag!("EC_AV1_TRACE") { eprintln!( "TRACE partition_w8 mi=({mr},{mc}) ctx={leaf_ctx} value={part8}" @@ -27751,8 +30142,20 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( lr.frame_restoration_type[p] != ec_av1_syntax::RestorationType::None && lr.loop_restoration_size[p] != 0 }); - let deblocked = - lr_active.then(|| (plane_snapshot(&y, 0), plane_snapshot(&u, 1), plane_snapshot(&v, 1))); + let deblocked = lr_active.then(|| { + ( + plane_snapshot(&y, 0), + // lane-av1422filter: the bands are the LR stripe-boundary context + // (`RESTORATION_UNIT_OFFSET >> ss_y` above/below each 64-luma-row + // stripe). Chroma stripes are half-height ONLY under 4:2:0; a + // 4:2:2 frame's chroma (ss_y = 0) stripes on the luma grid, so + // the hardcoded `1` saved bands at rows 26/60/92/124 where LR + // reads rows 54..57/118..121 -- every 4:2:2 boundary + // substitution read uninitialised zeros (frame-0 V (48,0)). + plane_snapshot(&u, ss_y(fctx) as u32), + plane_snapshot(&v, ss_y(fctx) as u32), + ) + }); // lane-tiny r4: post-deblock / post-CDEF dumps mirroring aomdec's own // EC_AV1_POSTDEBLOCK_DUMP (decodeframe.c ~5404) -- with the pre-filter // dump above these bisect WHICH filter stage introduced a mismatch. @@ -28390,7 +30793,13 @@ fn read_intra_chroma_lossless( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - let cu_mi = (at_mi.0 + oy / 2, at_mi.1 + ox / 2); + // Chroma pixels per mi cell: 2 at 4:2:0, 4 at 4:4:4. At + // 4:2:0 a TX_4X4 chroma unit spans two mi cells and anchors + // at the even one; at 4:4:4 it IS one mi cell. + let cu_mi = ( + at_mi.0 + oy / (MI >> ss_y(fctx)), + at_mi.1 + ox / (MI >> ss_x(fctx)), + ); // libaom's chroma entropy-context arrays are SUBSAMPLED: // `get_txb_ctx` reads exactly one entry per plane for a // TX_4X4 chroma unit (`a[0]`/`l[0]`). Our bands are luma-mi @@ -28399,8 +30808,12 @@ fn read_intra_chroma_lossless( // cell is past the band on a unit whose block hangs off the // frame edge, which libaom still codes. let cu_around = neighbours.around_mi(cu_mi, MI); + // The unit's origin and extent in LUMA pixels: `<< ss` at + // 4:2:0 (8x8 luma for a 4x4 chroma unit), identity at 4:4:4. let cu_reach = tu_reach( - side, side, ox * 2, oy * 2, 8, reach, px, py, frame_w, frame_h, fctx, + side, side, + ox << ss_x(fctx), oy << ss_y(fctx), 4 << ss_x(fctx), + reach, px, py, frame_w, frame_h, fctx, ); if let Some((ub, vb)) = palette_uv_bufs { let buf = if plane_idx == 1 { ub } else { vb }; @@ -28431,7 +30844,11 @@ fn read_intra_chroma_lossless( smooth_neighbor_uv, fctx, )?; - neighbours.record_mi_chroma(cu_mi, 8, 8, plane_idx, &cu_grid); + // The unit's own footprint on the LUMA mi grid: 8 luma px + // (two cells) at 4:2:0, 4 (one cell) at 4:4:4. + neighbours.record_mi_chroma( + cu_mi, 4 << ss_x(fctx), 4 << ss_y(fctx), plane_idx, &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = mu_units( if plane_idx == 1 { &mut *u_out } else { &mut *v_out }, @@ -28498,9 +30915,13 @@ fn read_inter_chroma_lossless( if cpx + ox >= u.true_width || cpy + oy >= u.true_height { continue; } - // The chroma neighbour bands are indexed in LUMA mi: 4 chroma - // pixels span 8 luma ones, i.e. 2 mi. - let cu_mi = (at_mi.0 + oy / 2, at_mi.1 + ox / 2); + // The chroma neighbour bands are indexed in LUMA mi: a 4-wide + // chroma unit spans `4 << ss` luma pixels, i.e. `4 >> ss` -- + // 2 mi cells at 4:2:0, one at 4:4:4. + let cu_mi = ( + at_mi.0 + oy / (4 >> ss_y(fctx)), + at_mi.1 + ox / (4 >> ss_x(fctx)), + ); // libaom's chroma entropy-context arrays are SUBSAMPLED: // `get_txb_ctx` reads exactly one entry per plane for a // TX_4X4 chroma unit (`a[0]`/`l[0]`). Our bands are luma-mi @@ -28537,7 +30958,13 @@ fn read_inter_chroma_lossless( )? .0; // Immediately, so the NEXT unit reads this one's context. - neighbours.record_mi_chroma(cu_mi, 8, 8, plane_idx, &cu_grid); + neighbours.record_mi_chroma( + cu_mi, + 4 << ss_x(fctx), + 4 << ss_y(fctx), + plane_idx, + &cu_grid, + ); hit!(CHROMA_SPLIT_TX_HITS); let dst = mu_units( if plane_idx == 1 { &mut *u_out } else { &mut *v_out }, @@ -28553,6 +30980,39 @@ fn read_inter_chroma_lossless( Ok(()) } +/// The 8x8 inter leaf's lossless 4:4:4 chroma arm (lane-av1-llinter), shared +/// by the single-ref and compound paths: the plane block is a 2x2 raster of +/// TX_4X4 units (`av1_get_tx_size`: lossless returns TX_4X4 for EVERY plane, +/// not just luma), read by the same per-unit walk the bigger inter blocks +/// run. Returns the two block grids composed at stride 8 (`Grid::Zero` when +/// every unit hung off the frame edge) and leaves each unit's own coefficient +/// context stamped in the neighbour bands -- the caller's tail must not let +/// its whole-block `record_mi` overwrite them. +#[allow(clippy::too_many_arguments)] +fn leaf8_inter_chroma_lossless( + dec: &mut SymbolDecoder, + cdfs: &mut Cdfs, + neighbours: &mut Neighbours, + u: &mut PlaneBuf<'static>, + v: &mut PlaneBuf<'static>, + su: Pred<'_>, + sv: Pred<'_>, + at_mi: (usize, usize), + (cpx, cpy): (usize, usize), + base_q_idx: u8, fctx: &crate::decode::FrameCtx, +) -> Result<(Grid, Grid)> { + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + at_mi, (cpx, cpy), (0, 0), (8, 8), (8, 8), 8, 0, + base_q_idx, &mut uo, &mut vo, fctx, + )?; + Ok(( + if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }, + if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }, + )) +} + /// Spec 5.11.25's `single_ref_p1`..`p6` tree (reachable only once `comp_mode` /// is known `SINGLE_REFERENCE` -- `decode_stream` refuses any frame with /// `reference_select` set before this is ever called, so that read is never @@ -28722,15 +31182,17 @@ impl<'p> RefPix<'p> { ( whole_plane(&g.y, g.width, g.height), { - // Reference pictures carry no subsampling field. A - // 4:4:4 chroma plane is luma-sized; 4:2:0 is the quarter. - let full = g.u.len() == g.width * g.height; - let (cw, ch) = if full { (g.width, g.height) } else { (g.width / 2, g.height / 2) }; + // No subsampling field on a stored reference: the + // chroma format comes off its own sample count -- + // 4:4:4 `w * h`, 4:2:2 `round_ss(w, 1) * h`, 4:2:0 + // `round_ss(w, 1) * round_ss(h, 1)`. The helper's own + // doc carries the measurement behind those three arms + // and the pre-existing odd-dimension 4:2:0 gap. + let (cw, ch) = ref_chroma_shape(g.u.len(), g.width, g.height); whole_plane(&g.u, cw, ch) }, { - let full = g.v.len() == g.width * g.height; - let (cw, ch) = if full { (g.width, g.height) } else { (g.width / 2, g.height / 2) }; + let (cw, ch) = ref_chroma_shape(g.v.len(), g.width, g.height); whole_plane(&g.v, cw, ch) }, ) @@ -28797,6 +31259,69 @@ fn whole_plane(data: &[u16], width: usize, height: usize) -> PlaneBuf<'_> { } } +/// A reference picture's own chroma plane shape, `(width, height)`, from its +/// luma size and its chroma sample count. A stored reference carries no +/// subsampling field, so the format is read back off the count -- and the +/// counts are the producer's own [`round_ss`] crops +/// (`decode.rs:25806`), so the test must use `round_ss` too and not a bare +/// halving: 4:4:4 stores `w * h`, 4:2:2 stores `round_ss(w, 1) * h` (half +/// width CEIL, full height), 4:2:0 stores `round_ss(w, 1) * round_ss(h, 1)`. +/// A floor test here silently misses every odd-width 4:2:2 reference and +/// drops it into the 4:2:0 arm -- the same defect one dimension over. +/// +/// The two-way test this replaces ("luma-sized, else a quarter") folded 4:2:2 +/// into the 4:2:0 shape entirely, so a 4:2:2 reference plane claimed +/// `h / 2` rows -- half the samples it actually holds. Every chroma MC +/// reading such a plane then had its source row clamped against +/// `true_height` (spec 7.11.3.4 / libaom's +/// `dec_calc_subpel_params_and_extend` clamps to the reference's valid +/// area), which folded every chroma row at or past the frame's midpoint +/// back onto the last valid row: on the pinned t422 fixture frame 1, the +/// 8x4 inter strip at luma (88, 208) MC-predicted chroma (88, 104) from +/// frame 0 with mv 0 and a pure copy, yet wrote (206, 204, 202, 200) x4 +/// rows where the reference holds (202, 204, 204, 167) / +/// (185, 190, 190, 165) / ... +/// **Ambiguity, measured rather than argued away:** the inference reads a +/// format off a length, so it is only as good as the lengths being +/// distinct. Brute-forced against the producer's own `round_ss` crops over +/// every `w, h` in `1..=128`, the 4:4:4 and 4:2:2 counts are distinct from +/// each other and from the 4:2:0 count, and both route correctly for +/// **every `w >= 2 && h >= 2`**. No stream this decoder accepts reaches a +/// 1-pixel chroma plane; the pinned fixture's chroma is 128x144. +/// +/// **Open gap, 4:2:0 at odd dimensions (pre-existing).** The 4:2:0 arm is +/// left at the old `(width / 2, height / 2)` floor, which is what the +/// two-way test this replaces produced -- that was the point, since no +/// 4:2:0 stream changed shape. It is nevertheless the wrong shape for an +/// odd-dimension 4:2:0 reference: the producer stored +/// `round_ss(w, 1) x round_ss(h, 1)`, so the floor arm under-declares. +/// Measured over the `1..=128` square, running each 4:2:0 count through +/// this very function: 12160 of the 16384 pairs come back smaller than the +/// plane actually holds, 12033 of those with `w >= 2` and 127 in the +/// `w == 1` column (at `w == 1, h == 1` the 4:4:4 arm catches the count +/// and `(1, 1)` is exact). Under-declaration at `h == 1` is **zero** over +/// the whole square: there the 4:2:0 count equals the 4:2:2 count, routes +/// into the 4:2:2 arm, and lands on the correct +/// `(round_ss(w, 1), 1)`. The `w == 1` residue is a *shape* error, not a +/// misroute -- the floor fallback simply cannot express +/// `(1, round_ss(h, 1))`. It is left alone because it predates this lane, +/// is identical to the parent, and no in-tree coverage exercises an +/// odd-dimension 4:2:0 reference. A ceil fallback +/// (`(round_ss(w, 1), round_ss(h, 1))`) would close it, at the cost of +/// departing from the parent on every odd-dimension 4:2:0 shape with +/// nothing in the tree to justify the change; that call belongs to a lane +/// that can bring odd-dimension 4:2:0 fixtures with it. +fn ref_chroma_shape(len: usize, width: usize, height: usize) -> (usize, usize) { + let half_w = round_ss(width, 1); + if len == width * height { + (width, height) + } else if len == half_w * height { + (half_w, height) + } else { + (width / 2, height / 2) + } +} + /// Resolves a reference's own planes -- the `ref_frame -> picture` lookup /// [`decode_inter_block`]'s single-ref path does, factored out so the /// compound path can call it twice (lane-av1comp), and the point where @@ -29346,6 +31871,8 @@ fn interintra_blend( bw: usize, bh: usize, stride: usize, + subw: usize, + subh: usize, ii_mode: u8, wedge: Option<(&'static [u8], usize)>, pred: &mut [u16], fctx: &crate::decode::FrameCtx, @@ -29392,25 +31919,38 @@ fn interintra_blend( let m = u32::from(match wedge { // lane-wii r2: wedge-interintra mask (aom_blend_a64_mask // over the wedge codebook, intra as src0, fixed sign 0). - // Luma plane: mask rows are luma-resolution, ms == side. - // 4:2:0 chroma: 2x2 box average (reconinter.c sub8x8 -- - // subw == subh == 1). - Some((mask, ms)) if ms == stride => mask[i * stride + j], - Some((mask, ms)) => { - let t = 2 * i * ms + 2 * j; - ((u32::from(mask[t]) - + u32::from(mask[t + 1]) - + u32::from(mask[t + ms]) - + u32::from(mask[t + ms + 1]) - + 2) - >> 2) as u8 - } - None => match ii_mode { - 0 => 32, + // `(subw, subh)` are the plane's own subsampling shifts; + // the four branches mirror aom_dsp/blend-a64-mask.c's + // `subw`/`subh` pair handling exactly: luma (0, 0) reads + // the direct sample, (1, 1) the 2x2 box average + // (reconinter.c sub8x8), and 4:2:2's (1, 0) the + // `AOM_BLEND_AVG` column pair. + Some((mask, ms)) => match (subw, subh) { + (0, 0) => u32::from(mask[i * ms + j]), + (1, 1) => { + let t = 2 * i * ms + 2 * j; + (u32::from(mask[t]) + + u32::from(mask[t + 1]) + + u32::from(mask[t + ms]) + + u32::from(mask[t + ms + 1]) + + 2) + >> 2 + } + (1, 0) => { + let t = i * ms + 2 * j; + (u32::from(mask[t]) + u32::from(mask[t + 1]) + 1) >> 1 + } + (_sw, _sh) => { + let t = 2 * i * ms + j; + (u32::from(mask[t]) + u32::from(mask[t + ms]) + 1) >> 1 + } + }, + None => u32::from(match ii_mode { + 0 => 32u8, 1 => II_WEIGHTS_1D[i * scale], 2 => II_WEIGHTS_1D[j * scale], _ => II_WEIGHTS_1D[i.min(j) * scale], - }, + }), }); let idx = i * stride + j; pred[idx] = ((m * u32::from(intra[i * bw + j]) + (64 - m) * u32::from(pred[idx]) + 32) @@ -29547,6 +32087,13 @@ pub(crate) fn obmc_plan( side: usize, write_w: usize, write_h: usize, + // lane-av1-llpred2: the FRAME's own subsampling pair -- the same pair the + // chroma window half in [`obmc_run`] shifts by. A rect strip's ss cannot + // be derived from a rect size over the square `chroma_side`: that ratio + // gave a 16x8 strip at 4:2:0 ss=(1,0) (losing its above-chroma skip) and + // divides by zero at 4:4:4 (`trailing_zeros(0)` = 64, a debug shift panic). + ss_x: usize, + ss_y: usize, chroma_side: usize, px: usize, py: usize, @@ -29591,10 +32138,19 @@ pub(crate) fn obmc_plan( let overlap_above = write_h.min(64) / 2; let overlap_left = write_w.min(64) / 2; // lane-inter8 r1 / lane-scaledref r1: `av1_skip_u4x4_pred_in_obmc` - // (`reconinter.c` 820) returns `dir == 0` when the chroma plane's own - // block is BLOCK_4X4/8X4/4X8 (an 8x8, 16x8 or 8x16 luma block at 4:2:0): - // the ABOVE pass skips chroma entirely, the LEFT pass still blends it. - let skip_chroma_above = matches!((write_w, write_h), (8, 8) | (16, 8) | (8, 16)); + // (`reconinter.c` 829) switches on the PLANE block + // (`get_plane_block_size`, ss-shifted): only 4x4/8x4/4x8 skip the ABOVE + // pass's chroma (`return dir == 0`), the LEFT pass still blends them. + // lane-av1-llpred: the old luma-shape list `(8,8)|(16,8)|(8,16)` + // hardcoded the 4:2:0 plane sizes; at 4:4:4 the plane block is the luma + // block itself (never 4-wide), so every one of those blocks was silently + // missing its above-pass chroma OBMC blend. + // lane-av1-llpred2: ss is the FRAME's own pair (`ss_x`/`ss_y(fctx)`, the + // same values [`obmc_run`]'s chroma windows shift by), never a ratio of + // the rect write size over the square `chroma_side` -- that ratio gave a + // 4:2:0 16x8 strip ss=(1,0) and dropped its above-chroma skip, and at + // 4:4:4 divided to zero (`trailing_zeros(0)` = 64, a debug shift panic). + let skip_chroma_above = obmc_skip_chroma_above(write_w, write_h, ss_x, ss_y); let mut above = Vec::new(); for (off4, span4, nb, src4) in overlappable_above(grid, mi_row, mi_col, bw4, mi_cols, max_nb(bw4)) { @@ -29666,6 +32222,56 @@ pub(crate) fn obmc_plan( }) } +/// `av1_skip_u4x4_pred_in_obmc`'s above-pass decision (libaom +/// `reconinter.c` 829): the PLANE block (`write_w >> ss_x`, `write_h >> +/// ss_y`) is 4x4, 8x4 or 4x8. `ss_x`/`ss_y` are the FRAME's own pair -- the +/// same values [`obmc_run`]'s chroma windows shift by -- never a ratio over +/// the square `chroma_side` (lane-av1-llpred2: that ratio dropped the +/// 4:2:0 16x8/8x16 skip and shifted by 64 at 4:4:4). Pure so the check +/// below pins the rect-strip decision without decoding a stream. +pub(crate) fn obmc_skip_chroma_above( + write_w: usize, + write_h: usize, + ss_x: usize, + ss_y: usize, +) -> bool { + matches!( + (write_w >> ss_x, write_h >> ss_y), + (4, 4) | (8, 4) | (4, 8) + ) +} + +#[cfg(test)] +mod obmc_skip_chroma_tests { + use super::obmc_skip_chroma_above; + + /// lane-av1-llpred2: the above-chroma skip keys off the PLANE block + /// under the frame's own ss pair. At 4:2:0 a 16x8/8x16 rect strip's + /// plane block is 8x4/4x8 and MUST still skip (the old `chroma_side` + /// ratio read ss=(1,0) off a 16x8 strip and made it blend); at 4:4:4 + /// the plane block is the luma block, so only true 4-wide/high shapes + /// skip and the shift never leaves `usize` range (the old ratio's + /// `trailing_zeros(0)` = 64 panicked a debug build). + #[test] + fn rect_strips_skip_above_chroma_at_420_and_shift_never_overflows() { + // 4:2:0 (ss 1,1): 8x8 -> 4x4, 16x8 -> 8x4, 8x16 -> 4x8 all skip. + assert!(obmc_skip_chroma_above(8, 8, 1, 1)); + assert!(obmc_skip_chroma_above(16, 8, 1, 1)); + assert!(obmc_skip_chroma_above(8, 16, 1, 1)); + // ... larger plane blocks blend, exactly libaom's own list. + assert!(!obmc_skip_chroma_above(16, 16, 1, 1)); + assert!(!obmc_skip_chroma_above(32, 16, 1, 1)); + assert!(!obmc_skip_chroma_above(16, 32, 1, 1)); + // 4:4:4 (ss 0,0): the plane block is the luma block itself. + assert!(obmc_skip_chroma_above(4, 4, 0, 0)); + assert!(obmc_skip_chroma_above(8, 4, 0, 0)); + assert!(obmc_skip_chroma_above(4, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(8, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(16, 8, 0, 0)); + assert!(!obmc_skip_chroma_above(8, 16, 0, 0)); + } +} + /// One OBMC neighbour as the PARSE thread resolved it (lane-defer8): every /// value [`obmc_run`] needs that lives in the mode-info grid or the /// neighbour bands, which the parse keeps overwriting as it walks on. @@ -29730,7 +32336,8 @@ pub(crate) fn obmc_run( let (mut tmp_y, mut tmp_u, mut tmp_v) = (Vec::new(), Vec::new(), Vec::new()); // lane-t900 r13 rung: EC_MCB="::[:]" (chroma plane - // 1 only) prints this block's chroma prediction rows before and after the + // 1 only; : are chroma-plane pixels, the oracle's own dump + // window) prints this block's chroma prediction rows before and after the // OBMC blend, matching the instrumented aomdec's EC_MCB dump. let ec_mcb: Option<(usize, usize, i64)> = crate::envflags::env_flag!("EC_MCB") .then(|| crate::envflags::var("EC_MCB").ok()) @@ -29743,22 +32350,23 @@ pub(crate) fn obmc_run( let (x, y) = (f[1].parse::().ok()?, f[2].parse::().ok()?); let fr = f.get(3).and_then(|s| s.parse::().ok()).unwrap_or(-1); let idx = PREFILT_PICTURE_IDX.load(std::sync::atomic::Ordering::SeqCst) as i64; - if x >= cpx && x < cpx + write_w / 2 && y >= cpy && y < cpy + write_h / 2 - && (fr < 0 || fr == idx) - { + // lane-av1ecmcb: the window is the CHROMA plane's own write region -- + // the oracle's EC_MCB spans are plane pixels, and at 4:4:4 (ss 0/0) + // the chroma block is full-size, so nothing halves. The old + // `write_w / 2` was a 4:2:0-era assumption that quartered the window + // (and the dumps below) at ss 0/0. + let (cw, ch) = (write_w >> ss_x(fctx), write_h >> ss_y(fctx)); + if x >= cpx && x < cpx + cw && y >= cpy && y < cpy + ch && (fr < 0 || fr == idx) { Some((x, y, idx)) } else { None } }); if let Some((_, _, idx)) = ec_mcb { - eprintln!( - "OUR_MCB pre f={idx} cpx={cpx} cpy={cpy} cw={} ch={}", - write_w / 2, - write_h / 2 - ); - for r in 0..write_h / 2 { - let row: Vec = (0..write_w / 2).map(|c| pred_u[r * chroma_side + c]).collect(); + let (cw, ch) = (write_w >> ss_x(fctx), write_h >> ss_y(fctx)); + eprintln!("OUR_MCB pre f={idx} cpx={cpx} cpy={cpy} cw={cw} ch={ch}"); + for r in 0..ch { + let row: Vec = (0..cw).map(|c| pred_u[r * chroma_side + c]).collect(); eprintln!("OUR_MCB prerow{r}: {row:?}"); } } @@ -29774,9 +32382,13 @@ pub(crate) fn obmc_run( if !skip_chroma_above { // lane-t900 r13 (measured, NOT a defect): libaom's min-4 clamp // sizes only the OBMC PREDICTION buffer; the blend length is the - // plain half (`build_obmc_inter_pred_above`: `overlap >> ss_y`). - let (cbw, cbh, cox) = (bw / 2, overlap_above / 2, ox / 2); - let cw = cbw.min(write_w / 2 - cox); + // plain overlap (`build_obmc_inter_pred_above`: + // `overlap >> ss_y`) -- the PLANE's own subsampling shift, 0 at + // 4:4:4 (lane-av1-llpred: the old `/2` hardcoded the 4:2:0 half + // and half-blended every 4:4:4 OBMC block's chroma). + let (cbw, cbh, cox) = + (bw >> ss_x(fctx), overlap_above >> ss_y(fctx), ox >> ss_x(fctx)); + let cw = cbw.min((write_w >> ss_x(fctx)) - cox); obmc_neighbour_pred(nu, cpx + cox, cpy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_u, fctx); obmc_blend_v(pred_u, chroma_side, cox, 0, cw, cbh, cbw, &tmp_u); obmc_neighbour_pred(nv, cpx + cox, cpy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_v, fctx); @@ -29791,7 +32403,8 @@ pub(crate) fn obmc_run( let (bw, bh, oy) = (overlap_left, nb.span4 * 4, nb.off4 * 4); obmc_neighbour_pred(ny, px, py + oy, nb.mv, bw, bh, true, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_y, fctx); obmc_blend_h(pred_y, side, 0, oy, bw, bh.min(write_h - oy), &tmp_y); - let (cbw, cbh, coy) = (overlap_left / 2, bh / 2, oy / 2); + let (cbw, cbh, coy) = + (overlap_left >> ss_x(fctx), bh >> ss_y(fctx), oy >> ss_y(fctx)); obmc_neighbour_pred(nu, cpx, cpy + coy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_u, fctx); if let Some((_, _, idx)) = ec_mcb { eprintln!( @@ -29803,14 +32416,15 @@ pub(crate) fn obmc_run( eprintln!("OUR_MCB lrow{r}: {row:?}"); } } - let ch = cbh.min(write_h / 2 - coy); + let ch = cbh.min((write_h >> ss_y(fctx)) - coy); obmc_blend_h(pred_u, chroma_side, 0, coy, cbw, ch, &tmp_u); obmc_neighbour_pred(nv, cpx, cpy + coy, nb.mv, cbw, cbh, false, nb.h_kind, nb.v_kind, nb.scale, &mut tmp_v, fctx); obmc_blend_h(pred_v, chroma_side, 0, coy, cbw, ch, &tmp_v); } if let Some((_, _, idx)) = ec_mcb { - for r in 0..write_h / 2 { - let row: Vec = (0..write_w / 2).map(|c| pred_u[r * chroma_side + c]).collect(); + let (cw, ch) = (write_w >> ss_x(fctx), write_h >> ss_y(fctx)); + for r in 0..ch { + let row: Vec = (0..cw).map(|c| pred_u[r * chroma_side + c]).collect(); eprintln!("OUR_MCB post f={idx} row{r}: {row:?}"); } } @@ -30349,7 +32963,17 @@ fn decode_inter_block( Some(s) if s.has_chroma => (s.pair_mi.1 * MI >> ss_x(fctx), s.pair_mi.0 * MI >> ss_y(fctx)), _ => (px >> ss_x(fctx), py >> ss_y(fctx)), }; - let chroma_side = side >> ss_x(fctx); + // lane-av1-422j: the chroma prediction/residual buffers are + // `chroma_side`-square and every consumer indexes them + // `row * chroma_side + col` over the WRITE rect (`write_chroma_w` x + // `write_chroma_h`). At ss (1,0) that rect is `side/2 x side` (an 8x16 + // strip's 4x16 chroma), so a `side >> ss_x` square is shorter than + // `row * chroma_side + write_chroma_w` on rows `>= side/2` -- frame 1's + // skipped VERT_B strip read `prediction[64..68]` out of the 64-sample + // buffer (reconstruct_mc_rect panic, decode.rs:29094). The enclosing + // square of the chroma rect is the max: unchanged at 4:2:0 (side/2) and + // 4:4:4 (side), so only 4:2:2 changes shape. + let chroma_side = (side >> ss_x(fctx)).max(side >> ss_y(fctx)); let (write_chroma_w, write_chroma_h) = match strip_chroma { Some(s) if s.has_chroma => { // 4:2:0: the PAIR's 8x4 / 4x8. 4:4:4: the strip's own 16x4 / @@ -30364,6 +32988,20 @@ fn decode_inter_block( } _ => (write_w >> ss_x(fctx), write_h >> ss_y(fctx)), }; + // lane-av1-422blockhalf: the chroma PREDICTION buffers take the PLANE + // BLOCK's own per-axis shape at 4:2:2 -- (side/2, side) -- instead of the + // enclosing square `chroma_side` the pre-port model indexed, and the + // masked-compound blend reads its luma mask through the plane's real + // subsampling shifts (aom_dsp/blend-a64-mask.c's four branches; the + // stop-note this lane owns). Every consumer below strides with + // `chroma_stride`. At 4:2:0 and 4:4:4 both values reduce to the square + // `chroma_side` verbatim, so only 4:2:2 changes shape. + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; + let (chroma_stride, chroma_buf_h) = if chroma_422 { + (write_chroma_w, write_chroma_h) + } else { + (chroma_side, chroma_side) + }; let (chroma_set, chroma_tx, scan_chroma) = if ss_x(fctx) == 0 && ss_y(fctx) == 0 && strip_chroma.is_none() { let tx = if side >= 64 { 32 } else { side }; @@ -31239,23 +33877,23 @@ fn decode_inter_block( }; if let Some(mask_y) = mask_y { mc::blend_masked_compound( - &inter0_y, &inter1_y, mask_y, side, side, side, false, &mut pred_y, fctx, + &inter0_y, &inter1_y, mask_y, side, side, side, 0, 0, &mut pred_y, fctx, ); } else { mc::combine_compound(&inter0_y, &inter1_y, fwd_offset, bck_offset, &mut pred_y, fctx); } - let mut inter0_u = vec![0i32; chroma_side * chroma_side]; + let mut inter0_u = vec![0i32; chroma_stride * chroma_buf_h]; mc::predict_compound_intermediate_kern( &pu0.data, pu0.width, pu0.true_width, pu0.true_height, mv_to_q4(cpx, mv0.1, ss_x(fctx)), - mv_to_q4(cpy, mv0.0, ss_x(fctx)), + mv_to_q4(cpy, mv0.0, ss_y(fctx)), scale0, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -31269,21 +33907,21 @@ fn decode_inter_block( crate::warp::warp_affine_compound( wp, &pu0.data, pu0.true_width as i32, pu0.true_height as i32, pu0.width as i32, &mut inter0_u, cpx as i32, cpy as i32, - chroma_side as i32, chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } - let mut inter1_u = vec![0i32; chroma_side * chroma_side]; + let mut inter1_u = vec![0i32; chroma_stride * chroma_buf_h]; mc::predict_compound_intermediate_kern( &pu1.data, pu1.width, pu1.true_width, pu1.true_height, mv_to_q4(cpx, mv1.1, ss_x(fctx)), - mv_to_q4(cpy, mv1.0, ss_x(fctx)), + mv_to_q4(cpy, mv1.0, ss_y(fctx)), scale1, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -31297,37 +33935,43 @@ fn decode_inter_block( crate::warp::warp_affine_compound( wp, &pu1.data, pu1.true_width as i32, pu1.true_height as i32, pu1.width as i32, &mut inter1_u, cpx as i32, cpy as i32, - chroma_side as i32, chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } - let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_side * chroma_side); + let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_stride * chroma_buf_h); if let Some(mask_y) = mask_y { + // lane-av1-422blockhalf: the blend walks this plane's own + // (chroma_stride x chroma_buf_h) rect through the plane's + // real subsampling shifts -- the mask read is aom_dsp/ + // blend-a64-mask.c's `(1, 0)` branch at 4:2:2, the direct + // luma sample at 4:2:0/4:4:4. mc::blend_masked_compound( &inter0_u, &inter1_u, mask_y, side, - chroma_side, - chroma_side, - ss_x(fctx) == 1 && ss_y(fctx) == 1, + chroma_stride, + chroma_buf_h, + ss_x(fctx), + ss_y(fctx), &mut pred_u, fctx, ); } else { mc::combine_compound(&inter0_u, &inter1_u, fwd_offset, bck_offset, &mut pred_u, fctx); } - let mut inter0_v = vec![0i32; chroma_side * chroma_side]; + let mut inter0_v = vec![0i32; chroma_stride * chroma_buf_h]; mc::predict_compound_intermediate_kern( &pv0.data, pv0.width, pv0.true_width, pv0.true_height, mv_to_q4(cpx, mv0.1, ss_x(fctx)), - mv_to_q4(cpy, mv0.0, ss_x(fctx)), + mv_to_q4(cpy, mv0.0, ss_y(fctx)), scale0, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -31341,21 +33985,21 @@ fn decode_inter_block( crate::warp::warp_affine_compound( wp, &pv0.data, pv0.true_width as i32, pv0.true_height as i32, pv0.width as i32, &mut inter0_v, cpx as i32, cpy as i32, - chroma_side as i32, chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } - let mut inter1_v = vec![0i32; chroma_side * chroma_side]; + let mut inter1_v = vec![0i32; chroma_stride * chroma_buf_h]; mc::predict_compound_intermediate_kern( &pv1.data, pv1.width, pv1.true_width, pv1.true_height, mv_to_q4(cpx, mv1.1, ss_x(fctx)), - mv_to_q4(cpy, mv1.0, ss_x(fctx)), + mv_to_q4(cpy, mv1.0, ss_y(fctx)), scale1, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -31369,20 +34013,26 @@ fn decode_inter_block( crate::warp::warp_affine_compound( wp, &pv1.data, pv1.true_width as i32, pv1.true_height as i32, pv1.width as i32, &mut inter1_v, cpx as i32, cpy as i32, - chroma_side as i32, chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } - let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_side * chroma_side); + let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_stride * chroma_buf_h); if let Some(mask_y) = mask_y { + // lane-av1-422blockhalf: the blend walks this plane's own + // (chroma_stride x chroma_buf_h) rect through the plane's + // real subsampling shifts -- the mask read is aom_dsp/ + // blend-a64-mask.c's `(1, 0)` branch at 4:2:2, the direct + // luma sample at 4:2:0/4:4:4. mc::blend_masked_compound( &inter0_v, &inter1_v, mask_y, side, - chroma_side, - chroma_side, - ss_x(fctx) == 1 && ss_y(fctx) == 1, + chroma_stride, + chroma_buf_h, + ss_x(fctx), + ss_y(fctx), &mut pred_v, fctx, ); } else { @@ -31398,8 +34048,8 @@ fn decode_inter_block( push_pred(fctx, build); ( Pred::Cur { plane: 0, stride: side, off: 0 }, - Pred::Cur { plane: 1, stride: chroma_side, off: 0 }, - Pred::Cur { plane: 2, stride: chroma_side, off: 0 }, + Pred::Cur { plane: 1, stride: chroma_stride, off: 0 }, + Pred::Cur { plane: 2, stride: chroma_stride, off: 0 }, ) } else { let mut built: [Vec; 3] = Default::default(); @@ -31408,8 +34058,8 @@ fn decode_inter_block( (pred_y, pred_u, pred_v) = (by, bu, bv); ( Pred::Inline(&pred_y, side), - Pred::Inline(&pred_u, chroma_side), - Pred::Inline(&pred_v, chroma_side), + Pred::Inline(&pred_u, chroma_stride), + Pred::Inline(&pred_v, chroma_stride), ) }; @@ -31450,30 +34100,62 @@ fn decode_inter_block( push_mc_rect(1, cpx, cpy, - chroma_side, + chroma_stride, write_chroma_w, write_chroma_h, su, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_stride * chroma_buf_h], fctx, ); push_mc_rect(2, cpx, cpy, - chroma_side, + chroma_stride, write_chroma_w, write_chroma_h, sv, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_stride * chroma_buf_h], fctx, ); luma_grid = Grid::Zero(side * side); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_stride * chroma_buf_h); + v_grid = Grid::Zero(chroma_stride * chroma_buf_h); } else { // lane-inter4 r2: a rect strip's coefficient context spans its // OWN width above and height left -- reading `side` cells both // ways indexes past the tile's last mi row for a bottom strip. let around = if rect_tu { - neighbours.around_mi_rect(at_mi, write_w, write_h) + // lane-av1422mi24: at ss (1,0) the rect strip's chroma + // above span is `write_w >> 1` chroma cells spread over + // `write_w` luma mi columns -- the per-mi gather counts + // every chroma column's whole-unit dc sign twice (the + // t422 frame-1 mi(26,60) strip's U dc_sign read one row + // high). Luma keeps the per-mi extents; chroma takes + // [`Neighbours::around_mi_422_chroma`]'s every-second- + // above-cell sampling. + let mut a = neighbours.around_mi_rect(at_mi, write_w, write_h); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + let c = neighbours.around_mi_422_chroma(at_mi, write_w, write_h); + a[1] = c[1]; + a[2] = c[2]; + } + a + } else if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + // lane-av1422mi24: at ss (1,0) a square block's chroma + // plane block is (side/2, side) -- `side` chroma 4-px + // above cells spread over `side` luma mi columns, one + // chroma column per PAIR of luma mi cells. The plain + // per-mi gather samples every second chroma column, and + // its dc-vote sum lands one sign row off (t422 frame 1, + // mi(24,56) U dc_sign: ours read dc_sign_cdf[0] where + // the oracle read row 1). Luma keeps the per-mi gather + // verbatim; only the two chroma planes take + // [`Neighbours::around_mi_422_chroma`]'s every-second- + // above-cell sampling (the same measured rule the strip + // and chunk arms already run). + let mut a = neighbours.around_mi(at, side); + let c = neighbours.around_mi_422_chroma(at, write_w, write_h); + a[1] = c[1]; + a[2] = c[2]; + a } else { neighbours.around_mi(at, side) }; @@ -31588,18 +34270,35 @@ fn decode_inter_block( // this arm has always coded. `chroma_side` // already carries the subsampling. let cu_tx = 32usize; - let chunk_chroma = chroma_side * 64 / side; - let units = chunk_chroma / cu_tx; + // lane-av1-422bigblock: a 64x64 mu chunk's + // chroma plane block is PER-AXIS + // (64 >> ss_x) x (64 >> ss_y) -- 32x64 at + // ss (1,0), i.e. TWO stacked TX_32X32 units + // per plane (`av1_get_max_uv_txsize` caps the + // unit at 32 on each axis). The old square-cut + // model walked `chroma_side`-square chunks: + // twice the units the oracle codes at 4:2:2, + // prediction windows indexed at the square + // `chroma_side` instead of the prediction + // buffer's own `chroma_stride`, and chunk + // columns at 64.. of a 64-wide chroma plane. + let chunk_chroma_w = (64usize) >> ss_x(fctx); + let chunk_chroma_h = (64usize) >> ss_y(fctx); + let units_w = chunk_chroma_w / cu_tx; + let units_h = chunk_chroma_h / cu_tx; // The unit's own footprint on the LUMA mi - // grid: 64 px (16 mi) at 4:2:0, 32 px (8 mi) - // at ss 0/0. `around_mi` reads and + // grid, per axis (32 << ss) px: 64x64 (16x16 + // mi) at 4:2:0, 32x32 (8x8 mi) at 4:4:4, + // 64x32 (16x8 mi) at 4:2:2. `around_mi_rect` + // reads and // `record_mi_chroma` stamps span exactly the // unit's own cells -- `get_txb_ctx` reads the // 8 context cells of the TX_32X32 itself, and // `av1_set_entropy_contexts` memsets the same // 8, so the unit over never sees this unit's // state and the unit below always does. - let unit_luma = cu_tx * (side / chroma_side); + let unit_luma_w = cu_tx << ss_x(fctx); + let unit_luma_h = cu_tx << ss_y(fctx); let cu_scan = default_scan(cu_tx); if lossless(fctx) { // lane-lossless2: TX_4X4 units over this @@ -31607,8 +34306,8 @@ fn decode_inter_block( read_inter_chroma_lossless( dec, cdfs, neighbours, u, v, su, sv, at_mi, (cpx, cpy), - (cc * chunk_chroma, cr * chunk_chroma), - (chunk_chroma, chunk_chroma), + (cc * chunk_chroma_w, cr * chunk_chroma_h), + (chunk_chroma_w, chunk_chroma_h), (write_chroma_w, write_chroma_h), chroma_side, mode_for_tx, base_q_idx, &mut u_units, &mut v_units, fctx, @@ -31625,24 +34324,28 @@ fn decode_inter_block( // Plane-major per chunk (libaom's plane // loop is outermost inside the mu walk); // within a plane the units walk raster. - for ur in 0..units { - for uc in 0..units { + for ur in 0..units_h { + for uc in 0..units_w { let unit_mi = ( at_mi.0 + cr * 16 - + ur * (unit_luma / MI), + + ur * (unit_luma_h / MI), at_mi.1 + cc * 16 - + uc * (unit_luma / MI), + + uc * (unit_luma_w / MI), ); // Per unit, AFTER the earlier // units' stamps: this unit's // coefficient context must see // them. let cu_around = neighbours - .around_mi(unit_mi, unit_luma); + .around_mi_rect( + unit_mi, + unit_luma_w, + unit_luma_h, + ); let (cu_x, cu_y) = ( - cpx + cc * chunk_chroma + cpx + cc * chunk_chroma_w + uc * cu_tx, - cpy + cr * chunk_chroma + cpy + cr * chunk_chroma_h + ur * cu_tx, ); // `av1_get_tx_type` (blockd.h: @@ -31673,11 +34376,16 @@ fn decode_inter_block( }, ) .map(|(_, _, _, _, t)| t); + // The prediction buffer is + // `chroma_stride`-strided (the + // plane block's own width at + // 4:2:2), not the square + // `chroma_side`. let cu_pred = src.offset( - (cr * chunk_chroma + (cr * chunk_chroma_h + ur * cu_tx) - * chroma_side - + cc * chunk_chroma + * chroma_stride + + cc * chunk_chroma_w + uc * cu_tx, ); let cu_grid = read_inter_plane( @@ -31707,8 +34415,8 @@ fn decode_inter_block( // context. neighbours.record_mi_chroma( unit_mi, - unit_luma, - unit_luma, + unit_luma_w, + unit_luma_h, plane_idx, &cu_grid, ); @@ -31723,11 +34431,18 @@ fn decode_inter_block( chroma_side * chroma_side, ); for rr in 0..cu_tx { - let start = (cr * chunk_chroma + // The ASSEMBLED grid stays at + // the square `chroma_side` + // stride the block tail's + // `mu_chroma_units` re-stamp + // indexes; the unit's true + // per-axis position is what + // changes. + let start = (cr * chunk_chroma_h + ur * cu_tx + rr) * chroma_side - + cc * chunk_chroma + + cc * chunk_chroma_w + uc * cu_tx; dst[start..start + cu_tx] .copy_from_slice( @@ -31798,12 +34513,12 @@ fn decode_inter_block( // root a rect (128x64/64x128) block's chroma is per mu // chunk too, so this test comes BEFORE the `rect_tu` one. u_grid = if u_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut u_units)) }; v_grid = if v_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut v_units)) }; @@ -31814,7 +34529,7 @@ fn decode_inter_block( read_inter_chroma_lossless( dec, cdfs, neighbours, u, v, su, sv, at_mi, (cpx, cpy), (0, 0), (write_chroma_w, write_chroma_h), - (write_chroma_w, write_chroma_h), chroma_side, + (write_chroma_w, write_chroma_h), chroma_stride, mode_for_tx, base_q_idx, &mut uo, &mut vo, fctx, )?; let zero = chroma_side * chroma_side; @@ -31824,9 +34539,19 @@ fn decode_inter_block( // whole-block record must not overwrite them with the // assembled grid (class `override-slot-on-one-arm`). mu_chroma = true; - } else if rect_tu { + } else if rect_tu + || (write_chroma_w, write_chroma_h) != (chroma_side, chroma_side) + { // One chroma read for the whole strip at 4:2:0, two // 32-capped units at 4:4:4 -- see the helper. + // lane-av1-422j: a 4:2:2 square block's chroma plane is the + // (side/2 x side) rect (a 32x32 block's 16x32), never + // `chroma_side`-square -- the square read below would pair + // a `chroma_side`-square unit with the 4:2:0 unit scan + // (one-coefficient-per-position assert in + // inverse_transform_2d_typed_wh). The rect reader codes + // the exact `av1_get_max_uv_txsize` unit (TX_16X32, + // `rect_inter_chroma_set`'s tables). (u_grid, v_grid, rect_chroma_units) = read_inter_rect_chroma( dec, cdfs, @@ -31839,7 +34564,7 @@ fn decode_inter_block( at_mi, (cpx, cpy), (write_chroma_w, write_chroma_h), - chroma_side, + chroma_stride, mode_for_tx, luma_tx_type, fctx, )?; @@ -32449,6 +35174,12 @@ fn decode_inter_block( if warp_params.is_some() && gm_ref.model == ec_av1_syntax::WarpModel::Affine { hit!(AFFINE_GM_HITS); } + // lane-av1gwarp12: the ROTZOOM sibling -- the only + // >TRANSLATION model vanilla aomenc can emit for a single-ref + // global-motion block (encoder search pinned to ROTZOOM). + if warp_params.is_some() && gm_ref.model == ec_av1_syntax::WarpModel::Rotzoom { + hit!(ROTZOOM_GM_WARP_HITS); + } } // lane-av112bitw: a local `WARPED_CAUSAL` projection (set above) // or a global warp model both land here with `warp_params` set -- @@ -32618,6 +35349,8 @@ fn decode_inter_block( side, write_w, write_h, + ss_x(fctx), + ss_y(fctx), chroma_side, px, py, @@ -32639,8 +35372,8 @@ fn decode_inter_block( return; }; let mut pred_y = refill(std::mem::take(&mut out[0]), side * side); - let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_side * chroma_side); - let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_side * chroma_side); + let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_stride * chroma_buf_h); + let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_stride * chroma_buf_h); if luma_scale == mc::REF_NO_SCALE { mc::predict_with_filters_kern( &py_ref.data, @@ -32663,9 +35396,9 @@ fn decode_inter_block( pu_ref.true_width, pu_ref.true_height, mv_to_q4(cpx, mv.1, ss_x(fctx)), - mv_to_q4(cpy, mv.0, ss_x(fctx)), - chroma_side, - chroma_side, + mv_to_q4(cpy, mv.0, ss_y(fctx)), + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -32678,9 +35411,9 @@ fn decode_inter_block( pv_ref.true_width, pv_ref.true_height, mv_to_q4(cpx, mv.1, ss_x(fctx)), - mv_to_q4(cpy, mv.0, ss_x(fctx)), - chroma_side, - chroma_side, + mv_to_q4(cpy, mv.0, ss_y(fctx)), + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -32710,10 +35443,10 @@ fn decode_inter_block( pu_ref.true_width, pu_ref.true_height, mv_to_q4(cpx, mv.1, ss_x(fctx)), - mv_to_q4(cpy, mv.0, ss_x(fctx)), + mv_to_q4(cpy, mv.0, ss_y(fctx)), luma_scale, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -32726,10 +35459,10 @@ fn decode_inter_block( pv_ref.true_width, pv_ref.true_height, mv_to_q4(cpx, mv.1, ss_x(fctx)), - mv_to_q4(cpy, mv.0, ss_x(fctx)), + mv_to_q4(cpy, mv.0, ss_y(fctx)), luma_scale, - chroma_side, - chroma_side, + chroma_stride, + chroma_buf_h, write_chroma_w, write_chroma_h, h_filter, @@ -32769,13 +35502,11 @@ fn decode_inter_block( if warp_plane_allowed(write_chroma_w, write_chroma_h) { crate::warp::warp_affine( params, &pu_ref.data, pu_ref.true_width as i32, pu_ref.true_height as i32, - pu_ref.width as i32, &mut pred_u, cpx as i32, cpy as i32, chroma_side as i32, - chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + pu_ref.width as i32, &mut pred_u, cpx as i32, cpy as i32, chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); crate::warp::warp_affine( params, &pv_ref.data, pv_ref.true_width as i32, pv_ref.true_height as i32, - pv_ref.width as i32, &mut pred_v, cpx as i32, cpy as i32, chroma_side as i32, - chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + pv_ref.width as i32, &mut pred_v, cpx as i32, cpy as i32, chroma_stride as i32, chroma_buf_h as i32, chroma_stride as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } @@ -32787,14 +35518,14 @@ fn decode_inter_block( if write_w != write_h { hit!(INTERINTRA_RECT_HITS); } - interintra_blend(y, px, py, write_w, write_h, side, ii, wedge_mask, &mut pred_y, fctx); + interintra_blend(y, px, py, write_w, write_h, side, 0, 0, ii, wedge_mask, &mut pred_y, fctx); interintra_blend( - u, cpx, cpy, write_chroma_w, write_chroma_h, chroma_side, ii, wedge_mask, - &mut pred_u, fctx, + u, cpx, cpy, write_chroma_w, write_chroma_h, chroma_stride, ss_x(fctx), + ss_y(fctx), ii, wedge_mask, &mut pred_u, fctx, ); interintra_blend( - v, cpx, cpy, write_chroma_w, write_chroma_h, chroma_side, ii, wedge_mask, - &mut pred_v, fctx, + v, cpx, cpy, write_chroma_w, write_chroma_h, chroma_stride, ss_x(fctx), + ss_y(fctx), ii, wedge_mask, &mut pred_v, fctx, ); } if let Some(plan) = &obmc { @@ -32823,7 +35554,7 @@ fn decode_inter_block( src.true_width, src.true_height, mv_to_q4(cpx, prev_mv.1, ss_x(fctx)), - mv_to_q4(cpy, prev_mv.0, ss_x(fctx)), + mv_to_q4(cpy, prev_mv.0, ss_y(fctx)), prev_scale, piece_w, piece_h, @@ -32832,7 +35563,7 @@ fn decode_inter_block( &mut piece, fctx, ); for row in 0..piece_h { - dst[row * chroma_side..row * chroma_side + piece_w] + dst[row * chroma_stride..row * chroma_stride + piece_w] .copy_from_slice(&piece[row * piece_w..(row + 1) * piece_w]); } } @@ -32857,8 +35588,8 @@ fn decode_inter_block( push_pred(fctx, build); ( Pred::Cur { plane: 0, stride: side, off: 0 }, - Pred::Cur { plane: 1, stride: chroma_side, off: 0 }, - Pred::Cur { plane: 2, stride: chroma_side, off: 0 }, + Pred::Cur { plane: 1, stride: chroma_stride, off: 0 }, + Pred::Cur { plane: 2, stride: chroma_stride, off: 0 }, ) } else { if interintra_mode.is_some() { @@ -32882,8 +35613,8 @@ fn decode_inter_block( // through to the ordinary whole-block predictor. ( Pred::Inline(&pred_y, side), - Pred::Inline(&pred_u, chroma_side), - Pred::Inline(&pred_v, chroma_side), + Pred::Inline(&pred_u, chroma_stride), + Pred::Inline(&pred_v, chroma_stride), ) }; @@ -32928,31 +35659,49 @@ fn decode_inter_block( push_mc_rect(1, cpx, cpy, - chroma_side, + chroma_stride, write_chroma_w, write_chroma_h, su, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_stride * chroma_buf_h], fctx, ); push_mc_rect(2, cpx, cpy, - chroma_side, + chroma_stride, write_chroma_w, write_chroma_h, sv, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_stride * chroma_buf_h], fctx, ); } luma_grid = Grid::Zero(side * side); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_stride * chroma_buf_h); + v_grid = Grid::Zero(chroma_stride * chroma_buf_h); } else { // lane-inter4 r2: a rect strip's coefficient context spans its // OWN width above and height left -- reading `side` cells both // ways indexes past the tile's last mi row for a bottom strip. let around = if rect_tu { - neighbours.around_mi_rect(at_mi, write_w, write_h) + // lane-av1422mi24: same 4:2:2 rect-strip chroma gather + // rule as the single-TU path above -- luma per-mi, + // chroma every-second above cell. + let mut a = neighbours.around_mi_rect(at_mi, write_w, write_h); + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + let c = neighbours.around_mi_422_chroma(at_mi, write_w, write_h); + a[1] = c[1]; + a[2] = c[2]; + } + a + } else if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + // lane-av1422mi24: same 4:2:2 square-block chroma gather + // rule as the single-TU path above -- luma per-mi, chroma + // every-second above cell. + let mut a = neighbours.around_mi(at, side); + let c = neighbours.around_mi_422_chroma(at, write_w, write_h); + a[1] = c[1]; + a[2] = c[2]; + a } else { neighbours.around_mi(at, side) }; @@ -32960,12 +35709,34 @@ fn decode_inter_block( // EVEN strip's mi origin and spans both strips, so its // above/left coefficient context is the pair's, not this // strip's row. + // lane-av1422ctxgather: at 4:2:2 (ss 1,0) a HORZ strip is + // its own chroma reference (`is_chroma_reference`'s + // `!(subsampling_y)` row clause) -- pair_mi is the strip + // itself and the context reads the strip's own 8x4, ONE + // luma-mi row tall, with the 4:2:2 above sampling + // ([`Neighbours::around_mi_422_chroma`]) -- and the same + // reroute catches 4:2:2 VERT: its (8, 16) pair span's + // above side covers one chroma column per two luma mi + // columns, the identical double-count. The plain per-mi + // gather survives only where the ss gate excludes it: + // the 4:2:0 pair merge (16, 8) and every 4:4:4 shape. let around_c = match strip_chroma { - Some(s) if s.has_chroma => neighbours.around_mi_rect( - s.pair_mi, - if s.horz { 16 } else { 8 }, - if s.horz { 8 } else { 16 }, - ), + Some(s) if s.has_chroma => { + let (pw, ph) = if s.horz { + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + (16, 4) + } else { + (16, 8) + } + } else { + (8, 16) + }; + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + neighbours.around_mi_422_chroma(s.pair_mi, pw, ph) + } else { + neighbours.around_mi_rect(s.pair_mi, pw, ph) + } + } _ => around, }; let luma_tx_type; @@ -33079,18 +35850,35 @@ fn decode_inter_block( // this arm has always coded. `chroma_side` // already carries the subsampling. let cu_tx = 32usize; - let chunk_chroma = chroma_side * 64 / side; - let units = chunk_chroma / cu_tx; + // lane-av1-422bigblock: a 64x64 mu chunk's + // chroma plane block is PER-AXIS + // (64 >> ss_x) x (64 >> ss_y) -- 32x64 at + // ss (1,0), i.e. TWO stacked TX_32X32 units + // per plane (`av1_get_max_uv_txsize` caps the + // unit at 32 on each axis). The old square-cut + // model walked `chroma_side`-square chunks: + // twice the units the oracle codes at 4:2:2, + // prediction windows indexed at the square + // `chroma_side` instead of the prediction + // buffer's own `chroma_stride`, and chunk + // columns at 64.. of a 64-wide chroma plane. + let chunk_chroma_w = (64usize) >> ss_x(fctx); + let chunk_chroma_h = (64usize) >> ss_y(fctx); + let units_w = chunk_chroma_w / cu_tx; + let units_h = chunk_chroma_h / cu_tx; // The unit's own footprint on the LUMA mi - // grid: 64 px (16 mi) at 4:2:0, 32 px (8 mi) - // at ss 0/0. `around_mi` reads and + // grid, per axis (32 << ss) px: 64x64 (16x16 + // mi) at 4:2:0, 32x32 (8x8 mi) at 4:4:4, + // 64x32 (16x8 mi) at 4:2:2. `around_mi_rect` + // reads and // `record_mi_chroma` stamps span exactly the // unit's own cells -- `get_txb_ctx` reads the // 8 context cells of the TX_32X32 itself, and // `av1_set_entropy_contexts` memsets the same // 8, so the unit over never sees this unit's // state and the unit below always does. - let unit_luma = cu_tx * (side / chroma_side); + let unit_luma_w = cu_tx << ss_x(fctx); + let unit_luma_h = cu_tx << ss_y(fctx); let cu_scan = default_scan(cu_tx); if lossless(fctx) { // lane-lossless2: TX_4X4 units over this @@ -33098,8 +35886,8 @@ fn decode_inter_block( read_inter_chroma_lossless( dec, cdfs, neighbours, u, v, su, sv, at_mi, (cpx, cpy), - (cc * chunk_chroma, cr * chunk_chroma), - (chunk_chroma, chunk_chroma), + (cc * chunk_chroma_w, cr * chunk_chroma_h), + (chunk_chroma_w, chunk_chroma_h), (write_chroma_w, write_chroma_h), chroma_side, mode_for_tx, base_q_idx, &mut u_units, &mut v_units, fctx, @@ -33116,24 +35904,28 @@ fn decode_inter_block( // Plane-major per chunk (libaom's plane // loop is outermost inside the mu walk); // within a plane the units walk raster. - for ur in 0..units { - for uc in 0..units { + for ur in 0..units_h { + for uc in 0..units_w { let unit_mi = ( at_mi.0 + cr * 16 - + ur * (unit_luma / MI), + + ur * (unit_luma_h / MI), at_mi.1 + cc * 16 - + uc * (unit_luma / MI), + + uc * (unit_luma_w / MI), ); // Per unit, AFTER the earlier // units' stamps: this unit's // coefficient context must see // them. let cu_around = neighbours - .around_mi(unit_mi, unit_luma); + .around_mi_rect( + unit_mi, + unit_luma_w, + unit_luma_h, + ); let (cu_x, cu_y) = ( - cpx + cc * chunk_chroma + cpx + cc * chunk_chroma_w + uc * cu_tx, - cpy + cr * chunk_chroma + cpy + cr * chunk_chroma_h + ur * cu_tx, ); // `av1_get_tx_type` (blockd.h: @@ -33164,11 +35956,16 @@ fn decode_inter_block( }, ) .map(|(_, _, _, _, t)| t); + // The prediction buffer is + // `chroma_stride`-strided (the + // plane block's own width at + // 4:2:2), not the square + // `chroma_side`. let cu_pred = src.offset( - (cr * chunk_chroma + (cr * chunk_chroma_h + ur * cu_tx) - * chroma_side - + cc * chunk_chroma + * chroma_stride + + cc * chunk_chroma_w + uc * cu_tx, ); let cu_grid = read_inter_plane( @@ -33198,8 +35995,8 @@ fn decode_inter_block( // context. neighbours.record_mi_chroma( unit_mi, - unit_luma, - unit_luma, + unit_luma_w, + unit_luma_h, plane_idx, &cu_grid, ); @@ -33214,11 +36011,18 @@ fn decode_inter_block( chroma_side * chroma_side, ); for rr in 0..cu_tx { - let start = (cr * chunk_chroma + // The ASSEMBLED grid stays at + // the square `chroma_side` + // stride the block tail's + // `mu_chroma_units` re-stamp + // indexes; the unit's true + // per-axis position is what + // changes. + let start = (cr * chunk_chroma_h + ur * cu_tx + rr) * chroma_side - + cc * chunk_chroma + + cc * chunk_chroma_w + uc * cu_tx; dst[start..start + cu_tx] .copy_from_slice( @@ -33291,19 +36095,19 @@ fn decode_inter_block( // `reconstruct_inter_block`'s `for (plane...)` guarded by // `xd->is_chroma_ref`) codes NO chroma transform here, so // neither symbol nor context exists. - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_stride * chroma_buf_h); + v_grid = Grid::Zero(chroma_stride * chroma_buf_h); } else if side > 64 { // Already read inside the mu-chunk loop above -- at the 128 // root a rect (128x64/64x128) block's chroma is per mu // chunk too, so this test comes BEFORE the `rect_tu` one. u_grid = if u_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut u_units)) }; v_grid = if v_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut v_units)) }; @@ -33314,7 +36118,7 @@ fn decode_inter_block( read_inter_chroma_lossless( dec, cdfs, neighbours, u, v, su, sv, at_mi, (cpx, cpy), (0, 0), (write_chroma_w, write_chroma_h), - (write_chroma_w, write_chroma_h), chroma_side, + (write_chroma_w, write_chroma_h), chroma_stride, mode_for_tx, base_q_idx, &mut uo, &mut vo, fctx, )?; let zero = chroma_side * chroma_side; @@ -33324,9 +36128,16 @@ fn decode_inter_block( // whole-block record must not overwrite them with the // assembled grid (class `override-slot-on-one-arm`). mu_chroma = true; - } else if rect_tu { + } else if rect_tu + || (write_chroma_w, write_chroma_h) != (chroma_side, chroma_side) + { // One chroma read for the whole strip at 4:2:0, two // 32-capped units at 4:4:4 -- see the helper. + // lane-av1-422j: same rule as the compound arm above -- a + // 4:2:2 square block's chroma plane is the + // (side/2 x side) rect, so the rect reader takes it + // instead of pairing a `chroma_side`-square unit with the + // 4:2:0 scan. (u_grid, v_grid, rect_chroma_units) = read_inter_rect_chroma( dec, cdfs, @@ -33339,7 +36150,7 @@ fn decode_inter_block( at_mi, (cpx, cpy), (write_chroma_w, write_chroma_h), - chroma_side, + chroma_stride, mode_for_tx, luma_tx_type, fctx, )?; @@ -34029,16 +36840,27 @@ fn decode_inter_block( } } } + // lane-av1-422k: the chroma PREDICTION shape is the plane block + // (`side >> ss_x`, `side >> ss_y`) -- square at 4:2:0/4:4:4, a + // (side/2, side) rect at 4:2:2. `chroma_side` (the 422j enclosing + // square of that rect) is the right size for BOOKKEEPING buffers but + // the wrong SHAPE to predict and reconstruct at: an intra-in-inter + // block's chroma prediction indexes its CFL signal and residual + // `row * chroma_w + col` over the plane block, and a 16x16 luma + // block's 8x16 chroma CFL signal is 128 samples -- predicting at the + // 16x16 square read `ac[128]` out of it (frame 1, px=192 py=96). + let chroma_w = side >> ss_x(fctx); + let chroma_h = side >> ss_y(fctx); if side > 64 { // Chroma is already coded and reconstructed per mu chunk above. luma_grid = Grid::Zero(side * side); u_grid = if u_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut u_units)) }; v_grid = if v_units.is_empty() { - Grid::Zero(chroma_side * chroma_side) + Grid::Zero(chroma_stride * chroma_buf_h) } else { Grid::Own(std::mem::take(&mut v_units)) }; @@ -34065,14 +36887,15 @@ fn decode_inter_block( if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - push_intra(1, + push_intra_unit(1, cpx, cpy, - chroma_side, + chroma_w, + chroma_h, uv_predict_mode, angle_delta_uv, reach, - &ZERO_RESIDUAL[..chroma_side * chroma_side], + &ZERO_RESIDUAL[..chroma_w * chroma_h], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx, @@ -34080,21 +36903,22 @@ fn decode_inter_block( if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - push_intra(2, + push_intra_unit(2, cpx, cpy, - chroma_side, + chroma_w, + chroma_h, uv_predict_mode, angle_delta_uv, reach, - &ZERO_RESIDUAL[..chroma_side * chroma_side], + &ZERO_RESIDUAL[..chroma_w * chroma_h], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx, ); luma_grid = Grid::Zero(side * side); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_w * chroma_h); + v_grid = Grid::Zero(chroma_w * chroma_h); } else { let around = neighbours.around_mi(at, side); if split_luma { @@ -34146,57 +36970,321 @@ fn decode_inter_block( u_grid = if uo.is_empty() { Grid::Zero(zero) } else { Grid::Own(uo) }; v_grid = if vo.is_empty() { Grid::Zero(zero) } else { Grid::Own(vo) }; mu_chroma = true; + } else if ss_x(fctx) == 0 && ss_y(fctx) == 0 && chroma_side > chroma_tx { + // lane-av1-rect128recon: at ss 0/0 the uv plane block of a + // 64x64 intra block inside an inter frame is 64x64 while + // `av1_get_max_uv_txsize` caps the unit at TX_32X32 -- FOUR + // plane-major TX_32X32 units (libaom + // `decode_token_recon_block`'s plane loop), each with its own + // neighbour context and `get_txb_ctx`'s offset-10 rows (+3 on + // the `txb_skip_chroma_32` table, lane-sb128b r3), each + // stamped immediately so the next unit reads it. The old arm + // read ONE whole-plane unit with the block-level context and + // no offset: three quarters of the plane's residual was never + // read, the unit's `txb_skip` came off the offset-7 row (444 + // witness f2, right-half intra 64x64: U unit (0,0) ctx 0 + // where aom reads 10), and the coded corner was even + // dequantized at the TX_64X64 dqDenom. + let mu_units_n = chroma_side / chroma_tx; + let mut u_acc = vec![0i32; chroma_side * chroma_side]; + let mut v_acc = vec![0i32; chroma_side * chroma_side]; + for plane_idx in 1..=2 { + let buf: &mut PlaneBuf<'static> = + if plane_idx == 1 { &mut *u } else { &mut *v }; + for cu_row in 0..mu_units_n { + for cu_col in 0..mu_units_n { + let cu_mi = ( + at_mi.0 + cu_row * (chroma_tx / MI), + at_mi.1 + cu_col * (chroma_tx / MI), + ); + let cu_around = neighbours.around_mi(cu_mi, chroma_tx); + let cu_reach = crate::decode::tu_reach( + side, + side, + cu_col * chroma_tx, + cu_row * chroma_tx, + chroma_tx, + reach, + px, + py, + y.width, + y.height, fctx, + ); + let cu_grid = read_plane( + dec, + cdfs, + chroma_set, + scan_chroma, + plane_idx, + cu_around[plane_idx], + mode, + uv_predict_mode, + angle_delta_uv, + cu_reach, + buf, + cpx + cu_col * chroma_tx, + cpy + cu_row * chroma_tx, + chroma_tx, + chroma_tx, + base_q_idx, + // CfL is capped at 32x32 (`is_cfl_allowed`), + // so a block this size never carries alpha. + None, + None, + Some(3), + smooth_neighbor_uv, fctx, + )?; + // Immediately, so the NEXT unit reads this one's + // coefficient context. + neighbours.record_mi_chroma( + cu_mi, chroma_tx, chroma_tx, plane_idx, &cu_grid, + ); + hit!(CHROMA_SPLIT_TX_HITS); + let acc = if plane_idx == 1 { &mut u_acc } else { &mut v_acc }; + for rr in 0..chroma_tx { + let start = + (cu_row * chroma_tx + rr) * chroma_side + cu_col * chroma_tx; + acc[start..start + chroma_tx] + .copy_from_slice(&cu_grid[rr * chroma_tx..][..chroma_tx]); + } + } + } + } + mu_chroma = true; + u_grid = Grid::Own(u_acc); + v_grid = Grid::Own(v_acc); + } else { + // lane-av1-422k: the chroma plane block is (`chroma_w`, + // `chroma_h`) -- the square read above at 4:2:0/4:4:4, one rect + // TX_{side/2}X{side} unit through [`read_rect_chroma_unit`] at + // 4:2:2 (the key-frame path's proven set/scan rows, and the + // per-chroma-cell context read [`around_mi_422_chroma`]). + let chroma_around = if chroma_w == chroma_h { + around } else { + neighbours.around_mi_422_chroma(at, side, side) + }; if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - u_grid = read_plane( - dec, - cdfs, - chroma_set, - scan_chroma, - 1, - around[1], - mode, - uv_predict_mode, - angle_delta_uv, - reach, - u, - cpx, - cpy, - chroma_side, - chroma_tx, - base_q_idx, - alpha.zip(ac).map(|((au, _), ac)| (au, ac)), - None, - None, - smooth_neighbor_uv, fctx, - )?; + u_grid = if chroma_w == chroma_h { + read_plane( + dec, + cdfs, + chroma_set, + scan_chroma, + 1, + chroma_around[1], + mode, + uv_predict_mode, + angle_delta_uv, + reach, + u, + cpx, + cpy, + chroma_side, + chroma_tx, + base_q_idx, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + None, + None, + smooth_neighbor_uv, fctx, + )? + } else if side == 64 { + // lane-av1-422inter: `av1_get_max_uv_txsize(BLOCK_64X64)` at + // ss (1,0) adjusts `max_txsize_rect_lookup[BLOCK_32X64]` = + // TX_32X64 down to TX_32X32 (`av1_get_adjusted_tx_size`), so + // the (side/2, side) = (32, 64) plane block codes TWO stacked + // SQUARE TX_32X32 units per plane, plane-major -- the + // key-frame path's own model (`decode_block`'s 4:2:2 + // chroma_tx table, "64 and 128: TX_32X64 / TX_64X64 adjust + // down to TX_32X32", proven byte-exact on this fixture's + // frame 0) and the twin of this function's own side>64 + // mu-chunk walk above. The whole-plane-block rect read this + // arm replaced handed [`read_coeffs_rect`] a 36x68 levels + // frame it never had (the frame-9 panic) and would have read + // a full TX_32X64 scan libaom never codes. + let cu_scan = default_scan(32); + let (cu_w, cu_h) = (32usize, 32usize); + let luma_span_x = cu_w << ss_x(fctx); + let luma_span_y = cu_h << ss_y(fctx); + let mut assembled = vec![0i32; chroma_side * chroma_side]; + for cu_row in 0..chroma_h / cu_h { + let cu_mi = (at_mi.0 + cu_row * (luma_span_y / MI), at_mi.1); + let cu_around = + neighbours.around_mi_422_chroma(cu_mi, luma_span_x, luma_span_y); + let cu_reach = tu_reach_rect( + side, + side, + 0, + cu_row * luma_span_y, + luma_span_x, + luma_span_y, + reach, + px, + py, + y.width, + y.height, fctx, + ); + let cu_grid = read_plane( + dec, + cdfs, + TxbSet::Chroma32, + &cu_scan, + 1, + cu_around[1], + mode, + uv_predict_mode, + angle_delta_uv, + cu_reach, + u, + cpx, + cpy + cu_row * cu_h, + cu_w, + cu_w, + base_q_idx, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + None, + // The uv plane block (32x64) is larger than the unit + // (32x32): `get_txb_ctx`'s offset-10 rows, +3 on the + // `txb_skip_chroma_32` table (lane-sb128b r3). + Some(3), + smooth_neighbor_uv, fctx, + )?; + hit!(CHROMA_SPLIT_TX_HITS); + hit!(CHROMA422_SQUARE_HITS); + // Immediately, so the next unit of this plane reads this + // one's coefficient context; the whole-block record below + // re-stamps the block over these and the tail's + // `mu_chroma_units` replay puts the per-unit state back + // (lane-dpm1). + neighbours.record_mi_chroma(cu_mi, luma_span_x, luma_span_y, 1, &cu_grid); + for rr in 0..cu_h { + let start = (cu_row * cu_h + rr) * chroma_side; + assembled[start..start + cu_w] + .copy_from_slice(&cu_grid[rr * cu_w..][..cu_w]); + } + } + mu_chroma = true; + Grid::Own(assembled) + } else { + let (rect_set, rect_scan): (TxbSet, &[u16]) = match side { + 4 => (TxbSet::Chroma4, default_scan(4)), + 8 => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), + 16 => (TxbSet::ChromaRect16x8, &SCAN_8X16[..]), + 32 => (TxbSet::ChromaRect32x16, &SCAN_16X32[..]), + _ => (TxbSet::Chroma32, default_scan(32)), + }; + read_rect_chroma_unit( + dec, cdfs, rect_set, rect_scan, chroma_w, chroma_h, 1, + chroma_around[1], uv_predict_mode, angle_delta_uv, reach, u, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + smooth_neighbor_uv, fctx, + )? + }; if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - v_grid = read_plane( - dec, - cdfs, - chroma_set, - scan_chroma, - 2, - around[2], - mode, - uv_predict_mode, - angle_delta_uv, - reach, - v, - cpx, - cpy, - chroma_side, - chroma_tx, - base_q_idx, - alpha.zip(ac).map(|((_, av), ac)| (av, ac)), - None, - None, - smooth_neighbor_uv, fctx, - )?; + v_grid = if chroma_w == chroma_h { + read_plane( + dec, + cdfs, + chroma_set, + scan_chroma, + 2, + chroma_around[2], + mode, + uv_predict_mode, + angle_delta_uv, + reach, + v, + cpx, + cpy, + chroma_side, + chroma_tx, + base_q_idx, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + None, + None, + smooth_neighbor_uv, fctx, + )? + } else if side == 64 { + // lane-av1-422inter: plane 2 of the TX_32X32-adjusted walk + // above -- same two stacked square units, plane-major (every + // U unit, then every V unit, libaom `decode_token_recon_block`'s + // per-mu-chunk plane loop). + let cu_scan = default_scan(32); + let (cu_w, cu_h) = (32usize, 32usize); + let luma_span_x = cu_w << ss_x(fctx); + let luma_span_y = cu_h << ss_y(fctx); + let mut assembled = vec![0i32; chroma_side * chroma_side]; + for cu_row in 0..chroma_h / cu_h { + let cu_mi = (at_mi.0 + cu_row * (luma_span_y / MI), at_mi.1); + let cu_around = + neighbours.around_mi_422_chroma(cu_mi, luma_span_x, luma_span_y); + let cu_reach = tu_reach_rect( + side, + side, + 0, + cu_row * luma_span_y, + luma_span_x, + luma_span_y, + reach, + px, + py, + y.width, + y.height, fctx, + ); + let cu_grid = read_plane( + dec, + cdfs, + TxbSet::Chroma32, + &cu_scan, + 2, + cu_around[2], + mode, + uv_predict_mode, + angle_delta_uv, + cu_reach, + v, + cpx, + cpy + cu_row * cu_h, + cu_w, + cu_w, + base_q_idx, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + None, + Some(3), + smooth_neighbor_uv, fctx, + )?; + hit!(CHROMA_SPLIT_TX_HITS); + hit!(CHROMA422_SQUARE_HITS); + neighbours.record_mi_chroma(cu_mi, luma_span_x, luma_span_y, 2, &cu_grid); + for rr in 0..cu_h { + let start = (cu_row * cu_h + rr) * chroma_side; + assembled[start..start + cu_w] + .copy_from_slice(&cu_grid[rr * cu_w..][..cu_w]); + } + } + mu_chroma = true; + Grid::Own(assembled) + } else { + let (rect_set, rect_scan): (TxbSet, &[u16]) = match side { + 4 => (TxbSet::Chroma4, default_scan(4)), + 8 => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), + 16 => (TxbSet::ChromaRect16x8, &SCAN_8X16[..]), + 32 => (TxbSet::ChromaRect32x16, &SCAN_16X32[..]), + _ => (TxbSet::Chroma32, default_scan(32)), + }; + read_rect_chroma_unit( + dec, cdfs, rect_set, rect_scan, chroma_w, chroma_h, 2, + chroma_around[2], uv_predict_mode, angle_delta_uv, reach, v, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + smooth_neighbor_uv, fctx, + )? + }; } } } @@ -34217,8 +37305,21 @@ fn decode_inter_block( // strip's own record wrote empty chroma state over those cells -- this // rewrite is what libaom's single `av1_set_contexts` call for the 8x4 // (4x8) chroma unit leaves behind. + // lane-av1-444interband: 4:2:0 ONLY. At ss 0/0 every strip IS its own + // chroma reference (`is_chroma_reference`, no mi parity test), its own + // `record_rect_mi` above already stamps exactly the strip's 16x4 (4x16) + // chroma span -- libaom `av1_set_entropy_contexts`, or + // `av1_reset_entropy_context` for a skipped strip (decodeframe.c:1180) + // -- and the pair-form 16x8 (8x16) span anchored at `pair_mi` (== the + // strip's own mi at ss 0/0) smeared the strip's state over one extra + // row/col of cells: a skipped strip wrote zero over `left[r+1][1..2]`, + // erasing the 16x16-intra block to its left's U/V stamps, and the strip + // below read its chroma `txb_skip` off the wrong CDF row (t6 frame 1, + // U unit (2,8): our base 0 vs aom's base 1, `left[2][1]` 0 vs 23 -- + // `INTER16_CHROMA_PAIR_HITS` fired 31x on a stream that has no pairs). let pair_chroma = strip_chroma .filter(|s| s.has_chroma) + .filter(|_| ss_x(fctx) == 1 && ss_y(fctx) == 1) .map(|s| (s, neighbour_state(&u_grid), neighbour_state(&v_grid))); // lane-vert46 r1: libaom stamps the chroma entropy context PER TRANSFORM // UNIT (`av1_set_entropy_contexts` inside `decode_reconstruct_tx`'s mu-chunk @@ -34236,17 +37337,37 @@ fn decode_inter_block( let cu = if lossless(fctx) { 4usize } else { 32usize }; let mut units = Vec::new(); if lossless(fctx) { - let (rows, cols) = ((write_h / 2).div_ceil(cu), (write_w / 2).div_ceil(cu)); + // lane-av1-llinter: a TX_4X4 chroma unit covers `4 << ss` LUMA + // pixels (8, x2-per-unit, at 4:2:0; 4, x1, at 4:4:4) -- the + // composed plane grid then holds a full cu-row per chroma row and + // each unit's own origin sits `(cu << ss) / MI` mi cells out. + // The hardcoded 4:2:0 /2-and-x2 math stamped half the plane with + // double spans at 4:4:4 and corrupted the next block's + // `txb_skip_ctx` (dodge2 frame 1, U unit mi (4,16) read row 11 + // where the oracle reads row 10). + let (rows, cols) = ( + (write_h >> ss_y(fctx)).div_ceil(cu), + (write_w >> ss_x(fctx)).div_ceil(cu), + ); for cr in 0..rows { for cc in 0..cols { - let cu_mi = (at.0 + cr * (cu * 2 / MI), at.1 + cc * (cu * 2 / MI)); + let cu_mi = ( + at.0 + cr * ((cu << ss_y(fctx)) / MI), + at.1 + cc * ((cu << ss_x(fctx)) / MI), + ); for (plane, grid) in [(1usize, &u_grid), (2usize, &v_grid)] { let mut unit = Vec::with_capacity(cu * cu); for rr in 0..cu { let start = (cr * cu + rr) * chroma_side + cc * cu; unit.extend_from_slice(&grid[start..start + cu]); } - units.push((cu_mi, plane, Grid::Own(unit), cu * 2, cu * 2)); + units.push(( + cu_mi, + plane, + Grid::Own(unit), + cu << ss_x(fctx), + cu << ss_y(fctx), + )); } } } @@ -34401,7 +37522,24 @@ fn decode_inter_block( } } if let Some((s, u_state, v_state)) = pair_chroma { - let (pw, ph) = if s.horz { (16usize, 8usize) } else { (8, 16) }; + // lane-av1422ctxgather: at 4:2:2 (ss 1,0) a horz strip is its own + // chroma reference -- no pair merge ever happened, so the write + // covers the strip's own 8x4: ONE luma-mi left row (libaom's + // `av1_set_contexts` for the TX_8X4 at ss_y 0 stamps + // `tx_size_high_unit` = 1 cell). The 4:2:0 pair's two-row (16, 8) + // span would overwrite the NEXT row's leaf-stamped level state + // (measured: t422 frame 1, the strip at mi(8,4) zeroed + // left[9][1] under the mi(8,2) 8x8's level 5 before the mi(9,4) + // strip's own all_zero read it one ctx row low). + let (pw, ph) = if s.horz { + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + (16usize, 4usize) + } else { + (16usize, 8usize) + } + } else { + (8, 16) + }; let round_up_even = |n: usize| n.div_ceil(2) * 2; let (bound_h, bound_w) = ( round_up_even(neighbours.mi_rows), @@ -34587,6 +37725,17 @@ fn decode_inter_sub8_split4( // frame 1: plane 0,1,2 per leaf in leaf order) -- there is no shared // group unit and no 2x2-piece group prediction. let chroma_444 = ss_x(fctx) == 0 && ss_y(fctx) == 0; + // 4:2:2 (lane-av1-422sub8rect): `is_chroma_reference` for a BLOCK_4X4 + // piece at ss (1, 0) is `(mi_col & 0x01) || !(bw & 0x01) || !ss_x` + // == ODD mi_col (av1_common_int.h:1459) -- pieces 1 and 3 of the group + // are their plane's own chroma references and each codes its own + // TX_4X4 unit right after its luma, exactly the key-frame split-group + // behaviour the pinned t422 fixture's frame 0 traces (groups (18,54) + // and (30,42): U+V read on BOTH odd-column leaves) and frame 1's + // inter group at mi(12,2) repeats (U+V TX_4X4 ctx 8 on leaf (12,3) + // alone -- the bottom-right leaf was skipped, so it codes nothing). + // The 4:2:0 shared group unit never exists at 4:2:2. + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; for i in 0..4usize { let (dr, dc) = (i / 2, i % 2); let lmi = (gr + dr, gc + dc); @@ -34639,7 +37788,9 @@ fn decode_inter_sub8_split4( } // lane-sub8intra: the `BLOCK_4X4` twin of the HORZ/VERT arm -- // same [`decode_intra_sub8_leaf`], no tx-depth symbol, chroma on - // the LAST sub-block (`is_chroma_reference` under 4:2:0). + // the chroma-reference sub-blocks (`is_chroma_reference`: the + // LAST one under 4:2:0, BOTH odd-column ones at 4:2:2, every + // one at 4:4:4). decode_intra_sub8_leaf( dec, cdfs, @@ -34648,7 +37799,7 @@ fn decode_inter_sub8_split4( group_mi, lmi, (B4, B4), - chroma_444 || i == 3, + chroma_444 || (cmi & 1 == 1 && chroma_422) || i == 3, skip, scan4, y, @@ -35020,6 +38171,164 @@ fn decode_inter_sub8_split4( neighbours.record_mi_chroma(lmi, B4, B4, 1, &ug); neighbours.record_mi_chroma(lmi, B4, B4, 2, &vg); } + // lane-av1-422sub8rect: the 4:2:2 per-piece arm. `is_chroma_reference` + // for a BLOCK_4X4 at ss (1, 0) is the odd mi_col (`av1_common_int.h` + // :1459), so THIS piece (right column of the group) is a chroma + // reference and codes its own U and V TX_4X4 units right after its + // luma -- measured on the pinned t422 fixture: frame 0 key-frame + // groups (18,54)/(30,42) read U+V on both odd-column leaves, and + // frame 1's inter group at mi(12,2) reads U+V TX_4X4 ctx 8 on leaf + // (12,3) alone (its bottom-right twin was skipped). + // + // The unit anchors at the FLOORED chroma cell + // (`av1_setup_dst_planes`' `(mi_col & !1) * MI >> ss_x`, the + // lane-av1-422kf2 rule), so the 4-px-wide square covers the group's + // whole chroma width, and the prediction walks + // `build_inter_predictors_sub8x8` (reconinter_template.inc): the + // left 2x4 half from the LEFT piece's own ref/mv/filters, the right + // 2x4 half from this piece's -- unless the left piece is intra (or + // off-frame), which makes `is_sub8x8_inter` false and predicts the + // whole 4x4 from THIS piece's own mv. A skipped reference piece + // still predicts (spec 7.11.3: `predict_inter_block_visit` runs + // before the `skip_txfm` guard) but codes no coefficients. + } else if chroma_422 && (cmi & 1) == 1 { + let (pc_ref, pc_mv, pc_hf, pc_vf) = piece[i].expect("inter piece recorded above"); + let unit_x = ((cmi & !1) * MI) >> ss_x(fctx); + let unit_y = py >> ss_y(fctx); + // `is_sub8x8_inter`'s left-neighbour probe (`mi[-1]`): the piece + // one mi to the LEFT, when it exists and is inter. + let piece_left = piece[i - 1]; + let build_c = move |_y: &mut PlaneBuf<'static>, + _u: &mut PlaneBuf<'static>, + _v: &mut PlaneBuf<'static>, + fctx: &crate::decode::FrameCtx, + out: &mut [Vec; 3]| { + let Some((pc_ref_y, sref_u, sref_v)) = ref_planes_deferred(pc_ref, refpix) else { + return; + }; + let pc_scale = mc::scale_factor(pc_ref_y.width, frame_width); + // The left piece's own reference planes + mv/filters, when it + // is an inter piece (`is_sub8x8_inter`'s `mi[-1]` probe). + let left = piece_left + .as_ref() + .map(|&(l_ref, l_mv, l_hf, l_vf)| { + (l_ref, l_mv, l_hf, l_vf) + }) + .and_then(|(l_ref, l_mv, l_hf, l_vf)| { + ref_planes_deferred(l_ref, refpix).map(|planes| { + let (lp_y, _, _) = planes; + let l_scale = mc::scale_factor(lp_y.width, frame_width); + (l_mv, l_hf, l_vf, planes, l_scale) + }) + }); + let mut pred_u = refill(std::mem::take(&mut out[1]), B4 * B4); + let mut pred_v = refill(std::mem::take(&mut out[2]), B4 * B4); + for (pi, (plane, dst)) in + [(sref_u, &mut pred_u), (sref_v, &mut pred_v)].into_iter().enumerate() + { + let mut buf = vec![0u16; B4 * B4]; + // Right 2x4 half: this piece's own ref/mv/filters. + let mut half = vec![0u16; 2 * 4]; + mc::predict_maybe_scaled( + &plane.data, + plane.width, + plane.true_width, + plane.true_height, + mv_to_q4(unit_x + 2, pc_mv.1, ss_x(fctx)), + mv_to_q4(unit_y, pc_mv.0, ss_y(fctx)), + pc_scale, + 2, + 4, + pc_hf, + pc_vf, + &mut half, fctx, + ); + for row in 0..4 { + buf[row * B4 + 2..row * B4 + 4] + .copy_from_slice(&half[row * 2..row * 2 + 2]); + } + // Left 2x4 half: the LEFT piece's own mv/filters + // (sub8x8-inter); a mixed group (left piece intra or + // off-frame) predicts it from THIS piece too, which + // reduces to the whole-4x4-from-own rule. + let (l_mv, l_hf, l_vf, l_planes, l_scale) = match left { + Some((l_mv, l_hf, l_vf, l_planes, l_scale)) => { + (l_mv, l_hf, l_vf, l_planes, l_scale) + } + None => (pc_mv, pc_hf, pc_vf, (pc_ref_y, sref_u, sref_v), pc_scale), + }; + // lane-av1422sub8pix: the left half predicts from the + // LEFT piece's own plane of its reference -- U for the U + // iteration, V for the V one. The old `l_ref_u` grab + // fed the V plane's left half from the reference's U + // plane (V cols 44..45 of the t422 frame-1 groups read + // U samples; U was exact, V wasn't). + let l_ref = if pi == 0 { + let (_, u, _) = l_planes; + u + } else { + let (_, _, v) = l_planes; + v + }; + mc::predict_maybe_scaled( + &l_ref.data, + l_ref.width, + l_ref.true_width, + l_ref.true_height, + mv_to_q4(unit_x, l_mv.1, ss_x(fctx)), + mv_to_q4(unit_y, l_mv.0, ss_y(fctx)), + l_scale, + 2, + 4, + l_hf, + l_vf, + &mut half, fctx, + ); + for row in 0..4 { + buf[row * B4..row * B4 + 2].copy_from_slice(&half[row * 2..row * 2 + 2]); + } + dst.copy_from_slice(&buf); + } + out[1] = pred_u; + out[2] = pred_v; + }; + let (pred_cu, pred_cv): (Vec, Vec); + let (su, sv) = if recon_deferred(fctx) { + push_pred(fctx, build_c); + ( + Pred::Cur { plane: 1, stride: B4, off: 0 }, + Pred::Cur { plane: 2, stride: B4, off: 0 }, + ) + } else { + let mut built: [Vec; 3] = Default::default(); + build_c(y, u, v, fctx, &mut built); + let [_, bu, bv] = built; + (pred_cu, pred_cv) = (bu, bv); + (Pred::Inline(&pred_cu, B4), Pred::Inline(&pred_cv, B4)) + }; + // The unit's entropy context: one chroma cell wide, floored -- + // [`Neighbours::around_mi_422_chroma`] at the unit's own 8x4 + // luma span (the [`sub8_leaf_chroma422`] rule). + let ctx_mi = (rmi, cmi & !1); + let ca = neighbours.around_mi_422_chroma(ctx_mi, 8, 4); + if skip { + push_mc(1, unit_x, unit_y, B4, su, &ZERO_RESIDUAL[..B4 * B4], fctx); + push_mc(2, unit_x, unit_y, B4, sv, &ZERO_RESIDUAL[..B4 * B4], fctx); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 1, &ZERO_RESIDUAL[..B4 * B4]); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 2, &ZERO_RESIDUAL[..B4 * B4]); + } else { + hit!(CHROMA422_INTER_SUB8_HITS); + let (ug, _) = read_inter_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 1, ca[1], 0, u, unit_x, unit_y, B4, + base_q_idx, su, Some(piece_tx_type), None, fctx, + )?; + let (vg, _) = read_inter_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 2, ca[2], 0, v, unit_x, unit_y, B4, + base_q_idx, sv, Some(piece_tx_type), None, fctx, + )?; + neighbours.record_mi_chroma(ctx_mi, 8, 4, 1, &ug); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 2, &vg); + } } neighbours.record_mode_mi(rmi, cmi, 1, 1, DC_PRED); neighbours.record_inter_rect_mi(lmi, 1, 1, skip, true, ref_frame, resolved_filter, false); @@ -35059,7 +38368,7 @@ fn decode_inter_sub8_split4( // frames mismatched ffmpeg by +-1..7 (class // `override-slot-on-one-arm`, this lane's own 10-bit film gate // regression at 1ad7e0fc; port of lane-av1-cfl's 7c6dad53). - if !chroma_444 && !intra_chroma { + if !chroma_444 && !chroma_422 && !intra_chroma { neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); } // lane-t900 r23 (class [[new-map-ignores-tile-edge]]: a neighbour map @@ -35071,10 +38380,12 @@ fn decode_inter_sub8_split4( // 0). No sub-8x8 piece can itself be a palette (`av1_allow_palette` // needs `bsize >= BLOCK_8X8`), so the group always clears. record_strip_palette(neighbours, (gr, gc), 8, 8, 0, [0u16; 8], 0, [0u16; 8]); - if !chroma_444 && !intra_chroma { + if !chroma_444 && !chroma_422 && !intra_chroma { // Chroma, once for the whole group, on the last sub-block's own `skip` // flag -- prediction from all four sub-blocks (2x2 pieces), residual as - // one TX_4X4 unit per plane. + // one TX_4X4 unit per plane. lane-av1-422sub8rect: 4:2:2 never takes + // this arm -- the shared group unit does not exist at ss (1, 0); each + // odd-column piece coded its own chroma inside the loop above. // `is_sub8x8_inter` (reconinter_template.inc:54) is false as soon as ANY // mi of the group is intra: the group's 4x4 chroma is then predicted WHOLE // from the chroma-reference (last) sub-block's own mv, not in 2x2 pieces. @@ -35267,9 +38578,20 @@ fn decode_intra_sub8_leaf( // No angle delta below 8x8 (`av1_use_angle_delta`), for luma or chroma. let angle_delta_y = 0; let (uv_mode, alpha) = if has_chroma { - // `is_cfl_allowed` is `wide <= 32 && high <= 32` -- true for this - // shape, so the 14-symbol CFL alphabet is the right one. - let uv_mode = dec.symbol(&mut cdfs.uv_mode_cfl[mode]); + // `is_cfl_allowed` (blockd.h): away from lossless it is + // `wide <= 32 && high <= 32` -- true for this shape; at lossless the + // CHROMA plane block must be a single TX_4X4, so at 4:4:4 only the + // 4x4 leaf keeps the 14-symbol CFL alphabet while an 8x4/4x8 leaf + // reads the 13-symbol `uv_mode_no_cfl` one (the t6 frame-1 8x4 leaf + // desynced at its uv_mode symbol reading the CFL alphabet, + // lane-av1llintercdf). At 4:2:0 a sub-8 shape's chroma block is + // always 4x4-or-smaller, so the predicate stays true and this read + // is unchanged. + let uv_mode = if cfl_allowed_px(bw, bh, fctx) { + dec.symbol(&mut cdfs.uv_mode_cfl[mode]) + } else { + dec.symbol(&mut cdfs.uv_mode_no_cfl[mode]) + }; if step { eprintln!( "EC_ISTEP mi_row={} mi_col={} name=uv_mode val={uv_mode} rng={}", @@ -35599,6 +38921,29 @@ fn decode_intra_sub8_leaf( // ours ctx 2 where libaom gathers 1). record_strip_palette(neighbours, (gr, gc), 8, 8, 0, [0u16; 8], 0, [0u16; 8]); if !has_chroma { + // lane-av1-422sub8rect: 4:2:2 has no shared group unit whose tail + // would stamp the mi map (`is_chroma_reference` runs per piece), so + // a non-referenced piece publishes its own cell -- libaom leaves + // `uv_mode` unset on it, `is_smooth` reads 0, i.e. DC_PRED. + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + neighbours.record_uv_mode_mi(lmi.0, lmi.1, 1, 1, DC_PRED); + } + return Ok(mode); + } + // lane-av1-422sub8rect: at 4:2:2 this (odd-column) piece is its plane's + // OWN chroma reference -- the key-frame split group's per-leaf TX_4X4 + // model, floored anchor and per-chroma-cell context included + // ([`sub8_leaf_chroma422`], measured on the pinned t422 fixture frame 0: + // groups (18,54)/(30,42) code U+V on both odd-column leaves), never a + // shared group unit. Inter frames code no intrabc, so `intrabc_dv` is + // `None` here. + if ss_x(fctx) == 1 && ss_y(fctx) == 0 { + sub8_leaf_chroma422( + dec, cdfs, neighbours, lmi, uv_mode, 0, alpha, skip, + None, y, u, v, scan4, base_q_idx, + neighbours.smooth_uv_neighbour(lmi.0, lmi.1, r, c, fctx), + (bw, bh), fctx, + )?; return Ok(mode); } // The group's single 4x4 chroma unit, intra-predicted from THIS @@ -35644,6 +38989,7 @@ fn decode_intra_sub8_leaf( } let ac = alpha.map(|_| if chroma_444 { cfl_src_rect(px, py, bw, bh) } else { cfl_src(gpx, gpy, 8) }); + let mut chroma_stamped_per_unit = false; let (u_grid, v_grid): (Grid, Grid) = if skip { if alpha.is_some() { hit!(CHROMA_SKIP_CFL_HITS); @@ -35660,6 +39006,95 @@ fn decode_intra_sub8_leaf( (Grid::Zero(16), Grid::Zero(16)) } } else if chroma_444 && bw != bh { + if lossless(fctx) { + // lane-av1sub8rect444: lossless codes TX_4X4 on EVERY plane + // (`av1_get_tx_size`, blockd.h:1383), so this leaf's 8x4/4x8 + // chroma plane block is a 1x2/2x1 raster of TX_4X4 units per + // plane, PLANE-MAJOR -- the same per-unit walk + // [`read_intra_chroma_lossless`] runs for whole blocks and this + // leaf's own luma `split` runs above, not one TX_8X4/TX_4X8 + // rect unit. The rect read was wrong twice over: its unit count + // left the second unit's coefficients in the bitstream, and its + // skip ctx fixed at above+left missed `get_txb_ctx`'s + // plane-block-bigger-than-transform term (libaom ctx 10+above + // +left, our tables' +3), where the oracle read ctx 11≡4. + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + for plane_idx in 1..3 { + for tu in 0..2usize { + let (ox, oy) = if vert { (0, tu * 4) } else { (tu * 4, 0) }; + // libaom's `max_blocks_wide/high` clip: a unit whose + // origin is past the frame edge is not coded at all + // (`decode_token_recon_block`). At 4:4:4 the unit's + // chroma origin is the leaf's own (px, py). + if px + ox >= u.true_width || py + oy >= u.true_height { + continue; + } + // At 4:4:4 a TX_4X4 chroma unit IS one mi cell. + let tu_mi = (lmi.0 + oy / MI, lmi.1 + ox / MI); + let tu_around = neighbours.around_mi(tu_mi, MI); + let tu_r = tu_reach( + bw, + bh, + ox, + oy, + 4, + reach_c, + px, + py, + y.width, + y.height, fctx, + ); + let buf: &mut PlaneBuf<'static> = + if plane_idx == 1 { &mut *u } else { &mut *v }; + // The plane block (8x4/4x8) is bigger than the TX_4X4 + // transform, so `get_txb_ctx`'s chroma ctx_offset is 10, + // not 7 -- our chroma tables carry the offset-10 rows at + // +3, the same `Some(3)` [`read_intra_chroma_lossless`] + // derives from `blk_w > 4 || blk_h > 4`. + let tu_grid = read_plane( + dec, + cdfs, + TxbSet::Chroma4, + scan4, + plane_idx, + tu_around[plane_idx], + mode, + uv_predict_mode, + angle_delta_uv, + tu_r, + buf, + px + ox, + py + oy, + 4, + TX4, + base_q_idx, + None, + None, + Some(3), + smooth_neighbor_uv, fctx, + )?; + // The unit's own coefficient context, stamped per unit + // (`av1_set_contexts`); the tail's whole-leaf chroma + // stamp below is skipped for this shape. + neighbours.record_mi_chroma(tu_mi, 4, 4, plane_idx, &tu_grid); + hit!(CHROMA_SPLIT_TX_HITS); + let dst = mu_units( + if plane_idx == 1 { &mut uo } else { &mut vo }, + bw * bh, + ); + for row in 0..4 { + let start = (oy + row) * bw + ox; + dst[start..start + 4].copy_from_slice(&tu_grid[row * 4..][..4]); + } + } + } + chroma_stamped_per_unit = true; + hit!(LLSUB8RECT444_CHROMA_WALK_HITS); + ( + if uo.is_empty() { Grid::Zero(bw * bh) } else { Grid::Own(uo) }, + if vo.is_empty() { Grid::Zero(bw * bh) } else { Grid::Own(vo) }, + ) + } else { // The leaf's own TX_8X4/TX_4X8 chroma unit: it IS the chroma plane // block, so `get_txb_ctx` fixes the skip context at above+left. let ca = neighbours.around_mi_rect(lmi, bw, bh); @@ -35698,6 +39133,7 @@ fn decode_intra_sub8_leaf( let ug = read_chroma(1, ca[1], alpha.zip(ac).map(|((au, _), ac)| (au, ac)))?; let vg = read_chroma(2, ca[2], alpha.zip(ac).map(|((_, av), ac)| (av, ac)))?; (ug, vg) + } } else { let chroma_around = neighbours.around_mi(if chroma_444 { lmi } else { group_mi }, if chroma_444 { 4 } else { 8 }); let ug = read_plane( @@ -35712,9 +39148,19 @@ fn decode_intra_sub8_leaf( )?; (ug, vg) }; + // The 4:4:4 lossless walk above already stamped these bands PER UNIT + // (raster-order last writer per cell, exactly libaom's per-entry last + // update); the whole-leaf aggregate would clobber the two units' distinct + // states with one, so it runs only for the one-unit shapes (the same rule + // [`decode_leaf8`]'s intrabc arm and the inter 8x8 leaf obey). The walk + // must skip the 4:2:0 group-tail below too: it spans the GROUP's two mi + // rows/cols with one composed state, which would overwrite the walk's + // own stamps with the whole-leaf aggregate. if chroma_444 { - neighbours.record_mi_chroma(lmi, bw, bh, 1, &u_grid); - neighbours.record_mi_chroma(lmi, bw, bh, 2, &v_grid); + if !chroma_stamped_per_unit { + neighbours.record_mi_chroma(lmi, bw, bh, 1, &u_grid); + neighbours.record_mi_chroma(lmi, bw, bh, 2, &v_grid); + } } else { let round_up_even = |n: usize| n.div_ceil(2) * 2; let bound_h = round_up_even(neighbours.mi_rows); @@ -35827,6 +39273,28 @@ fn decode_inter_sub8_rect2( // there is no shared group unit (aomdec EC_COEFF on // `av1-profile1-444.ivf` decode-order frame 1, mi (3,8)). let chroma_444 = ss_x(fctx) == 0 && ss_y(fctx) == 0; + // lane-av1-422blockhalf: at ss (1,0) the chroma reference is PER PIECE + // too, keyed by `is_chroma_reference`'s own terms: an 8x4 HORZ piece is + // 2 mi wide (`!(bw & 1)`), so BOTH pieces of the group are references; + // a 4x8 VERT piece is 1 mi wide, so only the ODD-column piece is + // (`mi_col & 1`) -- measured on the pinned t422 fixture frame 1: the + // horz group at mi (8,10)/(9,10) reads U+V TX_4X4 after EACH piece's + // luma (rng 37134/37852 then 63752/50952), and the vert group at + // (3,10)/(3,11) reads U+V on the odd-column piece (3,11) alone. The old + // `i == 1` rule coded the group's chroma on the wrong piece (and, for + // horz, half of the units) and desynced frame 1 at (8,10)'s uv_mode. + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; + // 4:4:4: every piece. 4:2:2: both horz pieces, the odd-column vert piece. + // 4:2:0 keeps its existing second-piece model untouched. + let piece_is_chroma_ref = |i: usize| -> bool { + if ss_x(fctx) == 0 && ss_y(fctx) == 0 { + true + } else if chroma_422 { + !vert || ((gc + i) & 1) == 1 + } else { + i == 1 + } + }; // This piece's first transform's luma `tx_type` (libaom `mbmi->tx_type`): // an inter block's chroma plane never codes its own symbol but inherits // the colocated luma type (`av1_get_tx_type`, blockd.h:1291). @@ -35887,7 +39355,7 @@ fn decode_inter_sub8_rect2( "EC_SUB8INTRA shape={}x{} sub={i} has_chroma={} skip={skip} mi={rmi},{cmi} tx_select={}", bw, bh, - i == 1, + piece_is_chroma_ref(i), fctx.tx_select_inter.with(std::cell::Cell::get), ); } @@ -35905,7 +39373,7 @@ fn decode_inter_sub8_rect2( group_mi, lmi, (bw, bh), - chroma_444 || i == 1, + piece_is_chroma_ref(i), skip, scan4, y, @@ -35916,7 +39384,7 @@ fn decode_inter_sub8_rect2( fctx.tx_select_inter.with(std::cell::Cell::get), reduced_tx_set, fctx, )?; - if i == 1 { + if piece_is_chroma_ref(i) { intra_chroma = true; } continue; @@ -36313,6 +39781,23 @@ fn decode_inter_sub8_rect2( push_mc_rect(2, px, py, SIDE, bw, bh, sv, &ZERO_RESIDUAL[..SIDE * SIDE], fctx); neighbours.record_mi_chroma(lmi, bw, bh, 1, &ZERO_RESIDUAL[..bw * bh]); neighbours.record_mi_chroma(lmi, bw, bh, 2, &ZERO_RESIDUAL[..bw * bh]); + } else if lossless(fctx) && !mono(fctx) { + // lane-av1-llsub8b: lossless codes TX_4X4 on EVERY plane + // (`av1_get_tx_size`, blockd.h:1383), so this 4:4:4 piece's + // (8,4)/(4,8) chroma plane block is a 2x1/1x2 raster of + // TX_4X4 units, not the ONE TX_8X4 rect unit the lossy arm + // below reads -- that single rect is what tripped + // `TxParams::run`'s WHT assert ((8,4) != (4,4), + // decode.rs:2566). The walk stamps each unit's own + // coefficient context, so -- unlike the lossy arm -- no + // whole-block `record_mi_chroma` runs after it: the walk's + // per-unit stamps ARE the block's chroma contexts (the same + // rule `leaf8_inter_chroma_lossless`'s caller obeys). + read_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + (rmi, cmi), (px, py), (0, 0), (bw, bh), (bw, bh), SIDE, 0, + base_q_idx, &mut Vec::new(), &mut Vec::new(), fctx, + )?; } else { let ca = neighbours.around_mi_rect(lmi, bw, bh); let (ug, _) = read_inter_plane_rect( @@ -36326,6 +39811,166 @@ fn decode_inter_sub8_rect2( neighbours.record_mi_chroma(lmi, bw, bh, 1, &ug); neighbours.record_mi_chroma(lmi, bw, bh, 2, &vg); } + // lane-av1-422blockhalf: the 4:2:2 per-piece arm. The chroma + // reference piece codes its own U and V TX_4X4 units right after its + // luma -- both pieces of a horz group, the odd-column piece of a + // vert one (see `piece_is_chroma_ref` above; measured on the pinned + // t422 fixture frame 1, horz group (8,10)/(9,10) and vert group + // (3,10)/(3,11)). The unit anchors at the FLOORED chroma cell + // (`av1_setup_dst_planes`' `(mi_col & !1) * MI >> ss_x`, the + // lane-av1-422kf2 rule) and reads through + // [`Neighbours::around_mi_422_chroma`]'s per-chroma-cell context. + // A horz piece IS 4x4 chroma (8 luma wide, ss_y 0): its unit + // predicts whole from its own mv/filters. A vert piece is 2 chroma + // px wide, so its 4-px unit predicts in halves -- + // `build_inter_predictors_sub8x8`'s rule: the left 2x4 from the + // piece to the LEFT (the group's own left piece, or the decoded + // neighbour when the group starts on an odd column), the right 2x4 + // from this piece. A skipped reference piece still predicts (spec + // 7.11.3) but codes no coefficients. + } else if chroma_422 && piece_is_chroma_ref(i) { + const B4: usize = 4; + let (pc_ref, pc_mv, pc_hf, pc_vf) = piece[i].expect("inter piece recorded above"); + let unit_x = ((lmi.1 & !1) * MI) >> ss_x(fctx); + let unit_y = py; + // The left 2x4 half's source: the in-group left piece when this + // piece is the group's second, else the decoded neighbour one mi + // to the left (an odd-column group start). Its interp filters + // are not on the mi grid, so an outside neighbour borrows this + // piece's own. + let left_piece = if i > 0 { + piece[i - 1] + } else if lmi.1 > 0 { + grid.get(rmi, lmi.1 - 1).filter(|mi| mi.is_inter).map( + |mi| { + ( + mi.ref_frame, + (i32::from(mi.mv.0), i32::from(mi.mv.1)), + pc_hf, + pc_vf, + ) + }, + ) + } else { + None + }; + let build_c = move |_y: &mut PlaneBuf<'static>, + _u: &mut PlaneBuf<'static>, + _v: &mut PlaneBuf<'static>, + fctx: &crate::decode::FrameCtx, + out: &mut [Vec; 3]| { + let Some((pc_ref_y, sref_u, sref_v)) = ref_planes_deferred(pc_ref, refpix) else { + return; + }; + let pc_scale = mc::scale_factor(pc_ref_y.width, frame_width); + let mut pred_u = refill(std::mem::take(&mut out[1]), B4 * B4); + let mut pred_v = refill(std::mem::take(&mut out[2]), B4 * B4); + for (plane, dst) in [(sref_u, &mut pred_u), (sref_v, &mut pred_v)] { + let mut buf = vec![0u16; B4 * B4]; + if vert { + // Right 2x4 half: this piece's own ref/mv/filters. + let mut half = vec![0u16; 2 * 4]; + mc::predict_maybe_scaled( + &plane.data, + plane.width, + plane.true_width, + plane.true_height, + mv_to_q4(unit_x + 2, pc_mv.1, ss_x(fctx)), + mv_to_q4(unit_y, pc_mv.0, ss_y(fctx)), + pc_scale, + 2, + 4, + pc_hf, + pc_vf, + &mut half, fctx, + ); + for row in 0..4 { + buf[row * B4 + 2..row * B4 + 4] + .copy_from_slice(&half[row * 2..row * 2 + 2]); + } + // Left 2x4 half: the piece to the left (an + // intra/off-frame neighbour reduces to whole-from-own, + // `is_sub8x8_inter`'s rule). + let (l_ref, l_mv, l_hf, l_vf) = match left_piece { + Some((l_ref, l_mv, l_hf, l_vf)) => (l_ref, l_mv, l_hf, l_vf), + None => (pc_ref, pc_mv, pc_hf, pc_vf), + }; + let Some((l_y, l_u, _)) = ref_planes_deferred(l_ref, refpix) else { + continue; + }; + mc::predict_maybe_scaled( + &l_u.data, + l_u.width, + l_u.true_width, + l_u.true_height, + mv_to_q4(unit_x, l_mv.1, ss_x(fctx)), + mv_to_q4(unit_y, l_mv.0, ss_y(fctx)), + mc::scale_factor(l_y.width, frame_width), + 2, + 4, + l_hf, + l_vf, + &mut half, fctx, + ); + for row in 0..4 { + buf[row * B4..row * B4 + 2] + .copy_from_slice(&half[row * 2..row * 2 + 2]); + } + } else { + mc::predict_maybe_scaled( + &plane.data, + plane.width, + plane.true_width, + plane.true_height, + mv_to_q4(unit_x, pc_mv.1, ss_x(fctx)), + mv_to_q4(unit_y, pc_mv.0, ss_y(fctx)), + pc_scale, + B4, + B4, + pc_hf, + pc_vf, + &mut buf, fctx, + ); + } + dst.copy_from_slice(&buf); + } + out[1] = pred_u; + out[2] = pred_v; + }; + let (pred_cu, pred_cv): (Vec, Vec); + let (su, sv) = if recon_deferred(fctx) { + push_pred(fctx, build_c); + ( + Pred::Cur { plane: 1, stride: B4, off: 0 }, + Pred::Cur { plane: 2, stride: B4, off: 0 }, + ) + } else { + let mut built: [Vec; 3] = Default::default(); + build_c(y, u, v, fctx, &mut built); + let [_, bu, bv] = built; + (pred_cu, pred_cv) = (bu, bv); + (Pred::Inline(&pred_cu, B4), Pred::Inline(&pred_cv, B4)) + }; + let ctx_mi = (lmi.0, lmi.1 & !1); + let ca = neighbours.around_mi_422_chroma(ctx_mi, 8, 4); + if skip { + push_mc(1, unit_x, unit_y, B4, su, &ZERO_RESIDUAL[..B4 * B4], fctx); + push_mc(2, unit_x, unit_y, B4, sv, &ZERO_RESIDUAL[..B4 * B4], fctx); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 1, &ZERO_RESIDUAL[..B4 * B4]); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 2, &ZERO_RESIDUAL[..B4 * B4]); + } else { + hit!(CHROMA422_INTER_SUB8_HITS); + let (ug, _) = read_inter_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 1, ca[1], 0, u, unit_x, unit_y, B4, + base_q_idx, su, Some(piece_tx_type), None, fctx, + )?; + let (vg, _) = read_inter_plane( + dec, cdfs, TxbSet::Chroma4, scan4, 2, ca[2], 0, v, unit_x, unit_y, B4, + base_q_idx, sv, Some(piece_tx_type), None, fctx, + )?; + neighbours.record_mi_chroma(ctx_mi, 8, 4, 1, &ug); + neighbours.record_mi_chroma(ctx_mi, 8, 4, 2, &vg); + } } neighbours.record_mode_mi(rmi, cmi, w_mi, h_mi, DC_PRED); neighbours.record_inter_rect_mi(lmi, w_mi, h_mi, skip, true, ref_frame, resolved_filter, false); @@ -36347,8 +39992,10 @@ fn decode_inter_sub8_rect2( // `uv_predict_mode`, and this DC stamp ran after it and flattened the // mi-exact cell (class `override-slot-on-one-arm`, this lane's own // 10-bit film gate regression at 1ad7e0fc; port of lane-av1-cfl's - // 7c6dad53). - if !chroma_444 && !intra_chroma { + // 7c6dad53). lane-av1-422blockhalf: 4:2:2 never takes it either -- the + // group unit does not exist there; every chroma-reference piece coded + // (and recorded) its own unit inside the loop above. + if !chroma_444 && !chroma_422 && !intra_chroma { neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); } // lane-t900 r23 (class [[new-map-ignores-tile-edge]]: a neighbour map @@ -36362,7 +40009,10 @@ fn decode_inter_sub8_rect2( record_strip_palette(neighbours, (gr, gc), 8, 8, 0, [0u16; 8], 0, [0u16; 8]); // lane-sub8intra: when the chroma-reference sub-block was INTRA it coded // and reconstructed the group's one chroma unit itself. - if !chroma_444 && !intra_chroma { + // lane-av1-422blockhalf: 4:2:2 never runs this tail -- the shared group + // unit does not exist at ss (1,0); each chroma-reference piece coded its + // own U/V TX_4X4 inside the loop above, exactly like the 4:4:4 arm. + if !chroma_444 && !chroma_422 && !intra_chroma { // The group's single 4x4 chroma unit per plane, on the chroma-reference // (second) sub-block's own skip flag. const B4: usize = 4; @@ -36678,18 +40328,30 @@ fn decode_inter_block8( // bookkeeping. Always `false` outside a `TxMode::Select` inter frame. let split8; const SIDE: usize = 8; - // lane-av1-444: this 8x8 leaf's chroma plane block is `8 >> ss` a side -- - // 4 at 4:2:0 (one TX_4X4 unit) and the full 8 at 4:4:4, where libaom - // codes ONE TX_8X8 unit (`av1_get_max_uv_txsize(BLOCK_8X8)` at ss 0/0, - // measured against aomdec's EC_COEFF on `av1-profile1-444.ivf` frame 1: - // plane=1 tx=TX_8X8 per 8x8 block, not a 4:2:0 4x4). - let chroma_side: usize = SIDE >> ss_x(fctx); - let (chroma_set, chroma_scan): (TxbSet, &[u16]) = if chroma_side == 8 { + // lane-av1-444 / lane-av1-422sub8rect: this 8x8 leaf's chroma plane block + // is `ss_size_lookup[BLOCK_8X8][ss_x][ss_y]` -- 4:2:0 BLOCK_4X4 (one + // TX_4X4 unit), 4:4:4 BLOCK_8X8 (ONE TX_8X8 unit, `av1_get_max_uv_txsize` + // at ss 0/0, measured against aomdec's EC_COEFF on `av1-profile1-444.ivf` + // frame 1), and 4:2:2 BLOCK_4X8 (ONE TX_4X8 RECT unit per plane, measured + // on the pinned t422 fixture: frame 1 mi(0,0) reads plane 1 tx_size 5 == + // TX_4X8 at rng 55168 right after the agreed luma TX_8X8 txb_skip -- the + // old `SIDE >> ss_x` square read was the first-divergence defect this + // port fixes). + let chroma_w: usize = SIDE >> ss_x(fctx); + let chroma_h: usize = SIDE >> ss_y(fctx); + let chroma_422 = ss_x(fctx) == 1 && ss_y(fctx) == 0; + let (chroma_set, chroma_scan): (TxbSet, &[u16]) = if chroma_422 { + // `get_txsize_entropy_ctx(TX_4X8)`: the rect fills its plane block, + // so the tables are the rect set and the SCAN_4X8 walk, exactly the + // pairing the key-frame BLOCK_4X8 arm (`decode_block`'s lane-av1-422f + // table) reads byte-exact. + (TxbSet::ChromaRect8x4, &SCAN_4X8[..]) + } else if chroma_w == 8 { (TxbSet::Chroma8, scan8) } else { (TxbSet::Chroma4, scan4) }; - let chroma_tx = if chroma_side == 8 { TX8 } else { TX4 }; + let chroma_tx = if chroma_w == 8 { TX8 } else { TX4 }; let (r, c) = outer_at; // lane-inter8 r2: this leaf's OWN mi cell, not the enclosing 16x16's -- @@ -36751,6 +40413,12 @@ fn decode_inter_block8( // stores `UV_DC_PRED`, exactly as [`decode_inter_block`] one level up. let mut uv_predict_mode = DC_PRED; let (luma_grid, u_grid, v_grid); + // lane-av1-llinter: set when a lossless 4:4:4 leaf's chroma went through + // the per-unit walk (`read_inter_chroma_lossless`) -- the walk stamps each + // TX_4X4 unit's own coefficient context, so the tail's whole-block + // `record_mi` gets its chroma half saved/restored around, exactly like + // `saved_luma_ctx` does for a `split8` luma. + let mut chroma_stamped_per_unit = false; let mut compound_ctx8: Option<(i8, i8, u8, u8)> = None; // lane-inter8 r1: this leaf's own resolved references, handed back so the // NEXT leaf of the same 16x16 can use them as its real above/left @@ -37190,98 +40858,100 @@ fn decode_inter_block8( }; if let Some(mask_y) = mask_y { mc::blend_masked_compound( - &inter0_y, &inter1_y, mask_y, SIDE, SIDE, SIDE, false, &mut pred_y, fctx, + &inter0_y, &inter1_y, mask_y, SIDE, SIDE, SIDE, 0, 0, &mut pred_y, fctx, ); } else { mc::combine_compound(&inter0_y, &inter1_y, fwd_offset, bck_offset, &mut pred_y, fctx); } - let mut inter0_u = vec![0i32; chroma_side * chroma_side]; + let mut inter0_u = vec![0i32; chroma_w * chroma_h]; mc::predict_compound_intermediate( &pu0.data, pu0.width, pu0.true_width, pu0.true_height, mv_to_q4(cpx, mv0.1, ss_x(fctx)), - mv_to_q4(cpy, mv0.0, ss_x(fctx)), + mv_to_q4(cpy, mv0.0, ss_y(fctx)), scale0, - chroma_side, - chroma_side, + chroma_w, + chroma_h, h_filter, v_filter, &mut inter0_u, fctx, ); - let mut inter1_u = vec![0i32; chroma_side * chroma_side]; + let mut inter1_u = vec![0i32; chroma_w * chroma_h]; mc::predict_compound_intermediate( &pu1.data, pu1.width, pu1.true_width, pu1.true_height, mv_to_q4(cpx, mv1.1, ss_x(fctx)), - mv_to_q4(cpy, mv1.0, ss_x(fctx)), + mv_to_q4(cpy, mv1.0, ss_y(fctx)), scale1, - chroma_side, - chroma_side, + chroma_w, + chroma_h, h_filter, v_filter, &mut inter1_u, fctx, ); - let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_side * chroma_side); + let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_w * chroma_h); if let Some(mask_y) = mask_y { mc::blend_masked_compound( &inter0_u, &inter1_u, mask_y, SIDE, - chroma_side, - chroma_side, - ss_x(fctx) == 1 && ss_y(fctx) == 1, + chroma_w, + chroma_h, + ss_x(fctx), +ss_y(fctx), &mut pred_u, fctx, ); } else { mc::combine_compound(&inter0_u, &inter1_u, fwd_offset, bck_offset, &mut pred_u, fctx); } - let mut inter0_v = vec![0i32; chroma_side * chroma_side]; + let mut inter0_v = vec![0i32; chroma_w * chroma_h]; mc::predict_compound_intermediate( &pv0.data, pv0.width, pv0.true_width, pv0.true_height, mv_to_q4(cpx, mv0.1, ss_x(fctx)), - mv_to_q4(cpy, mv0.0, ss_x(fctx)), + mv_to_q4(cpy, mv0.0, ss_y(fctx)), scale0, - chroma_side, - chroma_side, + chroma_w, + chroma_h, h_filter, v_filter, &mut inter0_v, fctx, ); - let mut inter1_v = vec![0i32; chroma_side * chroma_side]; + let mut inter1_v = vec![0i32; chroma_w * chroma_h]; mc::predict_compound_intermediate( &pv1.data, pv1.width, pv1.true_width, pv1.true_height, mv_to_q4(cpx, mv1.1, ss_x(fctx)), - mv_to_q4(cpy, mv1.0, ss_x(fctx)), + mv_to_q4(cpy, mv1.0, ss_y(fctx)), scale1, - chroma_side, - chroma_side, + chroma_w, + chroma_h, h_filter, v_filter, &mut inter1_v, fctx, ); - let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_side * chroma_side); + let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_w * chroma_h); if let Some(mask_y) = mask_y { mc::blend_masked_compound( &inter0_v, &inter1_v, mask_y, SIDE, - chroma_side, - chroma_side, - ss_x(fctx) == 1 && ss_y(fctx) == 1, + chroma_w, + chroma_h, + ss_x(fctx), +ss_y(fctx), &mut pred_v, fctx, ); } else { @@ -37296,8 +40966,8 @@ fn decode_inter_block8( push_pred(fctx, build); ( Pred::Cur { plane: 0, stride: SIDE, off: 0 }, - Pred::Cur { plane: 1, stride: chroma_side, off: 0 }, - Pred::Cur { plane: 2, stride: chroma_side, off: 0 }, + Pred::Cur { plane: 1, stride: chroma_w, off: 0 }, + Pred::Cur { plane: 2, stride: chroma_w, off: 0 }, ) } else { let mut built: [Vec; 3] = Default::default(); @@ -37306,8 +40976,8 @@ fn decode_inter_block8( (pred_y, pred_u, pred_v) = (by, bu, bv); ( Pred::Inline(&pred_y, SIDE), - Pred::Inline(&pred_u, chroma_side), - Pred::Inline(&pred_v, chroma_side), + Pred::Inline(&pred_u, chroma_w), + Pred::Inline(&pred_v, chroma_w), ) }; split8 = read_block_tx_size( @@ -37324,25 +40994,43 @@ fn decode_inter_block8( .is_some(); if skip { push_mc(0, px, py, SIDE, sy, &ZERO_RESIDUAL[..SIDE * SIDE], fctx); - push_mc(1, + // lane-av1-422sub8rect: the plane block is the (chroma_w, + // chroma_h) rect at 4:2:2 -- the recorded write is + // stride `chroma_w`, full `chroma_h` rows. + push_mc_rect(1, cpx, cpy, - chroma_side, + chroma_w, + chroma_w, + chroma_h, su, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_w * chroma_h], fctx, ); - push_mc(2, + push_mc_rect(2, cpx, cpy, - chroma_side, + chroma_w, + chroma_w, + chroma_h, sv, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_w * chroma_h], fctx, ); luma_grid = Grid::Zero(SIDE * SIDE); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_w * chroma_h); + v_grid = Grid::Zero(chroma_w * chroma_h); } else { let around = neighbours.around_mi(leaf_mi, 8); + // lane-av1-422sub8rect: the 4:2:2 chroma unit is the + // TX_4X8 rect -- its `txb_skip_ctx` reads per chroma + // 4-px cell ([`Neighbours::around_mi_422_chroma`], the + // key-frame BLOCK_4X8 arm's own context walk), and the + // coefficients go through the inter rect reader with the + // inherited luma tx type. + let chroma_around = if chroma_422 { + neighbours.around_mi_422_chroma(leaf_mi, 8, 8) + } else { + around + }; let (grid8, luma_tx_type) = read_inter_luma8( dec, cdfs, @@ -37360,42 +41048,97 @@ fn decode_inter_block8( split8, fctx, )?; luma_grid = grid8; - u_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 1, - around[1], - mode_for_tx, - u, - cpx, - cpy, - chroma_side, - base_q_idx, - su, - Some(luma_tx_type), - None, fctx, - )? - .0; - v_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 2, - around[2], - mode_for_tx, - v, - cpx, - cpy, - chroma_side, - base_q_idx, - sv, - Some(luma_tx_type), - None, fctx, - )? - .0; + // 4:4:4 lossless 8x8 inter leaf: the chroma plane block is + // the 8x8 leaf itself, read as one unit by the 444 walk + // (`chroma_w == 8` is `SIDE >> ss_x == 8`, i.e. ss_x 0). + // The 4:2:2 rect unit and the 4:2:0/4:4:4 square read are + // the `else` below, dispatched on `chroma_422`. + if chroma_w == 8 && lossless(fctx) && !mono(fctx) { + let (ug, vg) = leaf8_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + leaf_mi, (cpx, cpy), base_q_idx, fctx, + )?; + u_grid = ug; + v_grid = vg; + chroma_stamped_per_unit = true; + } else { + u_grid = if chroma_422 { + read_inter_plane_rect( + dec, + cdfs, + chroma_set, + (chroma_w, chroma_h), + chroma_w, + 1, + chroma_around[1], + mode_for_tx, + u, + cpx, + cpy, + su, + Some(luma_tx_type), + None, fctx, + )? + .0 + } else { + read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 1, + chroma_around[1], + mode_for_tx, + u, + cpx, + cpy, + chroma_w, + base_q_idx, + su, + Some(luma_tx_type), + None, fctx, + )? + .0 + }; + v_grid = if chroma_422 { + read_inter_plane_rect( + dec, + cdfs, + chroma_set, + (chroma_w, chroma_h), + chroma_w, + 2, + chroma_around[2], + mode_for_tx, + v, + cpx, + cpy, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0 + } else { + read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 2, + chroma_around[2], + mode_for_tx, + v, + cpx, + cpy, + chroma_w, + base_q_idx, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0 + }; + } } // lane-inter8 r2: the COMPOUND leaf used to return here // WITHOUT the end-of-function `record_mi`/`fill_lf_grid` the @@ -37451,7 +41194,32 @@ fn decode_inter_block8( palette_record8.2, palette_record8.3, ); + let saved_chroma_ctx = chroma_stamped_per_unit.then(|| { + ( + [ + [neighbours.left[leaf_mi.0][1], neighbours.left[leaf_mi.0][2]], + [neighbours.left[leaf_mi.0 + 1][1], neighbours.left[leaf_mi.0 + 1][2]], + ], + [ + [neighbours.above[leaf_mi.1][1], neighbours.above[leaf_mi.1][2]], + [neighbours.above[leaf_mi.1 + 1][1], neighbours.above[leaf_mi.1 + 1][2]], + ], + ) + }); neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]); + if let Some((left, above)) = saved_chroma_ctx { + // The walk's per-unit stamps are the block's real chroma + // coefficient contexts (`av1_set_contexts` per TX_4X4 + // unit); put them back over `record_mi`'s composed state. + for (cell, uv) in left.into_iter().enumerate() { + neighbours.left[leaf_mi.0 + cell][1] = uv[0]; + neighbours.left[leaf_mi.0 + cell][2] = uv[1]; + } + for (cell, uv) in above.into_iter().enumerate() { + neighbours.above[leaf_mi.1 + cell][1] = uv[0]; + neighbours.above[leaf_mi.1 + cell][2] = uv[1]; + } + } if let Some((left, above)) = saved_luma_ctx { for (cell, state) in left.into_iter().enumerate() { neighbours.left[leaf_mi.0 + cell][0] = state; @@ -37881,7 +41649,9 @@ fn decode_inter_block8( SIDE, SIDE, SIDE, - chroma_side, + ss_x(fctx), + ss_y(fctx), + chroma_w, px, py, cpx, @@ -37905,15 +41675,15 @@ fn decode_inter_block8( return; }; let mut pred_y = refill(std::mem::take(&mut out[0]), SIDE * SIDE); - let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_side * chroma_side); - let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_side * chroma_side); + let mut pred_u = refill(std::mem::take(&mut out[1]), chroma_w * chroma_h); + let mut pred_v = refill(std::mem::take(&mut out[2]), chroma_w * chroma_h); // Merge of lane-gmaffine (this leaf's own switchable filters) with // lane-scaledref (spec 7.11.3.3's scaled walk): same kernels either // way, only the sample walk differs. - for (plane, x, y, dim, dst) in [ - (sref_y, px, py, SIDE, &mut pred_y), - (sref_u, cpx, cpy, chroma_side, &mut pred_u), - (sref_v, cpx, cpy, chroma_side, &mut pred_v), + for (plane, x, y, (dim_w, dim_h), dst) in [ + (sref_y, px, py, (SIDE, SIDE), &mut pred_y), + (sref_u, cpx, cpy, (chroma_w, chroma_h), &mut pred_u), + (sref_v, cpx, cpy, (chroma_w, chroma_h), &mut pred_v), ] { let luma = std::ptr::eq(plane, sref_y); if luma_scale == mc::REF_NO_SCALE { @@ -37924,8 +41694,8 @@ fn decode_inter_block8( plane.true_height, mv_to_q4(x, mv.1, if luma { 0 } else { ss_x(fctx) }), mv_to_q4(y, mv.0, if luma { 0 } else { ss_y(fctx) }), - dim, - dim, + dim_w, + dim_h, h_filter, v_filter, dst, fctx, @@ -37939,8 +41709,8 @@ fn decode_inter_block8( mv_to_q4(x, mv.1, if luma { 0 } else { ss_x(fctx) }), mv_to_q4(y, mv.0, if luma { 0 } else { ss_y(fctx) }), luma_scale, - dim, - dim, + dim_w, + dim_h, h_filter, v_filter, dst, fctx, @@ -37962,19 +41732,21 @@ fn decode_inter_block8( SIDE as i32, SIDE as i32, 0, 0, fctx, ); // `av1_init_warp_params`'s per-plane `block_width/height < 8` - // bail-out: an 8x8 leaf's chroma plane is 4x4 in 420, so it is - // predicted translationally even when the luma warps. + // bail-out: an 8x8 leaf's chroma plane block is narrower than 8 + // at any subsampled format (4:2:0 4x4, 4:2:2 4x8), so it is + // predicted translationally even when the luma warps; 4:4:4's + // 8x8 chroma warps with the luma. #[allow(clippy::absurd_extreme_comparisons)] - if chroma_side >= 8 { + if chroma_w >= 8 { crate::warp::warp_affine( params, &sref_u.data, sref_u.true_width as i32, sref_u.true_height as i32, - sref_u.width as i32, &mut pred_u, cpx as i32, cpy as i32, chroma_side as i32, - chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + sref_u.width as i32, &mut pred_u, cpx as i32, cpy as i32, chroma_w as i32, + chroma_h as i32, chroma_w as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); crate::warp::warp_affine( params, &sref_v.data, sref_v.true_width as i32, sref_v.true_height as i32, - sref_v.width as i32, &mut pred_v, cpx as i32, cpy as i32, chroma_side as i32, - chroma_side as i32, chroma_side as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, + sref_v.width as i32, &mut pred_v, cpx as i32, cpy as i32, chroma_w as i32, + chroma_h as i32, chroma_w as i32, ss_x(fctx) as i32, ss_y(fctx) as i32, fctx, ); } } @@ -37986,12 +41758,14 @@ fn decode_inter_block8( // Non-wedge interintra blend, mutually exclusive with OBMC (the // motion_mode symbol is not read for an interintra block). if let Some(ii) = interintra_mode { - interintra_blend(y, px, py, SIDE, SIDE, SIDE, ii, wedge_mask, &mut pred_y, fctx); + interintra_blend(y, px, py, SIDE, SIDE, SIDE, 0, 0, ii, wedge_mask, &mut pred_y, fctx); interintra_blend( - u, cpx, cpy, chroma_side, chroma_side, chroma_side, ii, wedge_mask, &mut pred_u, fctx, + u, cpx, cpy, chroma_w, chroma_h, chroma_w, ss_x(fctx), ss_y(fctx), ii, wedge_mask, + &mut pred_u, fctx, ); interintra_blend( - v, cpx, cpy, chroma_side, chroma_side, chroma_side, ii, wedge_mask, &mut pred_v, fctx, + v, cpx, cpy, chroma_w, chroma_h, chroma_w, ss_x(fctx), ss_y(fctx), ii, wedge_mask, + &mut pred_v, fctx, ); } @@ -38003,8 +41777,8 @@ fn decode_inter_block8( push_pred(fctx, build); ( Pred::Cur { plane: 0, stride: SIDE, off: 0 }, - Pred::Cur { plane: 1, stride: chroma_side, off: 0 }, - Pred::Cur { plane: 2, stride: chroma_side, off: 0 }, + Pred::Cur { plane: 1, stride: chroma_w, off: 0 }, + Pred::Cur { plane: 2, stride: chroma_w, off: 0 }, ) } else { // The interintra predictor reads this block's own above/left @@ -38019,8 +41793,8 @@ fn decode_inter_block8( (pred_y, pred_u, pred_v) = (by, bu, bv); ( Pred::Inline(&pred_y, SIDE), - Pred::Inline(&pred_u, chroma_side), - Pred::Inline(&pred_v, chroma_side), + Pred::Inline(&pred_u, chroma_w), + Pred::Inline(&pred_v, chroma_w), ) }; split8 = read_block_tx_size( @@ -38037,25 +41811,43 @@ fn decode_inter_block8( .is_some(); if skip { push_mc(0, px, py, SIDE, sy, &ZERO_RESIDUAL[..SIDE * SIDE], fctx); - push_mc(1, + // lane-av1-422sub8rect: the plane block is the (chroma_w, + // chroma_h) rect at 4:2:2 -- the recorded write is stride + // `chroma_w`, full `chroma_h` rows. + push_mc_rect(1, cpx, cpy, - chroma_side, + chroma_w, + chroma_w, + chroma_h, su, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_w * chroma_h], fctx, ); - push_mc(2, + push_mc_rect(2, cpx, cpy, - chroma_side, + chroma_w, + chroma_w, + chroma_h, sv, - &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx, + &ZERO_RESIDUAL[..chroma_w * chroma_h], fctx, ); luma_grid = Grid::Zero(SIDE * SIDE); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_w * chroma_h); + v_grid = Grid::Zero(chroma_w * chroma_h); } else { let around = neighbours.around_mi(leaf_mi, 8); + // lane-av1-422sub8rect: the 4:2:2 chroma unit is the TX_4X8 + // rect -- its `txb_skip_ctx` reads per chroma 4-px cell + // ([`Neighbours::around_mi_422_chroma`], the key-frame + // BLOCK_4X8 arm's own context walk), and the coefficients go + // through the inter rect reader with the inherited luma tx + // type. + let chroma_around = if chroma_422 { + neighbours.around_mi_422_chroma(leaf_mi, 8, 8) + } else { + around + }; let (grid8, luma_tx_type) = read_inter_luma8( dec, cdfs, @@ -38073,42 +41865,96 @@ fn decode_inter_block8( split8, fctx, )?; luma_grid = grid8; - u_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 1, - around[1], - mode_for_tx, - u, - cpx, - cpy, - chroma_side, - base_q_idx, - su, - Some(luma_tx_type), - None, fctx, - )? - .0; - v_grid = read_inter_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 2, - around[2], - mode_for_tx, - v, - cpx, - cpy, - chroma_side, - base_q_idx, - sv, - Some(luma_tx_type), - None, fctx, - )? - .0; + // 4:4:4 lossless 8x8 inter leaf (compound twin of the single-ref + // arm above): the chroma plane block is the 8x8 leaf itself, read + // as one unit by the 444 walk. The 4:2:2 rect unit and the + // 4:2:0/4:4:4 square read are the `else` below. + if chroma_w == 8 && lossless(fctx) && !mono(fctx) { + let (ug, vg) = leaf8_inter_chroma_lossless( + dec, cdfs, neighbours, u, v, su, sv, + leaf_mi, (cpx, cpy), base_q_idx, fctx, + )?; + u_grid = ug; + v_grid = vg; + chroma_stamped_per_unit = true; + } else { + u_grid = if chroma_422 { + read_inter_plane_rect( + dec, + cdfs, + chroma_set, + (chroma_w, chroma_h), + chroma_w, + 1, + chroma_around[1], + mode_for_tx, + u, + cpx, + cpy, + su, + Some(luma_tx_type), + None, fctx, + )? + .0 + } else { + read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 1, + chroma_around[1], + mode_for_tx, + u, + cpx, + cpy, + chroma_w, + base_q_idx, + su, + Some(luma_tx_type), + None, fctx, + )? + .0 + }; + v_grid = if chroma_422 { + read_inter_plane_rect( + dec, + cdfs, + chroma_set, + (chroma_w, chroma_h), + chroma_w, + 2, + chroma_around[2], + mode_for_tx, + v, + cpx, + cpy, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0 + } else { + read_inter_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 2, + chroma_around[2], + mode_for_tx, + v, + cpx, + cpy, + chroma_w, + base_q_idx, + sv, + Some(luma_tx_type), + None, fctx, + )? + .0 + }; + } } } else { let mode = dec.symbol(&mut cdfs.y_mode[SIZE_GROUP_8]); @@ -38159,10 +42005,22 @@ fn decode_inter_block8( // but `DC_PRED` was refused here, which is what blocked the low-cq // CDEF arms and the 10-bit gates. let has_chroma = !mono(fctx); + // lane-av1-llintra8: `read_intra_mode_uv` (decodemv.c:145) picks the + // uv CDF row by `is_cfl_allowed` (cfl.h:23) -- at LOSSLESS that is + // "the chroma plane block is BLOCK_4X4" (cfl.h:29), for this + // BLOCK_8X8 leaf only at 4:2:0. The 4:4:4 lossless leaf reads the + // 13-symbol `uv_mode_no_cfl` alphabet; the unconditional CFL row + // consumed a different partition than aomdec at the leaf's own + // uv_mode symbol (class wrong-alphabet-same-value) and desynced + // every stream that reached the leaf's lossless chroma walk below. + // 4:2:0 and every non-lossless partition keep the CFL row + // (`cfl_allowed_px` answers true exactly as before). let uv_mode = if !has_chroma { DC_PRED - } else { + } else if cfl_allowed_px(SIDE, SIDE, fctx) { dec.symbol(&mut cdfs.uv_mode_cfl[mode]) + } else { + dec.symbol(&mut cdfs.uv_mode_no_cfl[mode]) }; if crate::envflags::env_flag!("EC_TRACE_MODE_STEP") { eprintln!( @@ -38318,17 +42176,17 @@ fn decode_inter_block8( PaletteY { size: n, colors, map } }); let palette_uv = palette_uv_pending.map(|(n, u_colors, v_colors)| { - // `av1_get_plane_block_size(BLOCK_8X8, 1, 1)` at the sequence's - // own subsampling: BLOCK_4X4 at 4:2:0, BLOCK_8X8 at 4:4:4 - // (`chroma_side`, lane-av1-444). + // `av1_get_plane_block_size(BLOCK_8X8, ss)` at the sequence's own + // subsampling: BLOCK_4X4 at 4:2:0, BLOCK_8X8 at 4:4:4, and at + // 4:2:2 the BLOCK_4X8 plane block (lane-av1-422sub8rect). let on = palette_onscreen_uv( (SIDE, SIDE), palette_onscreen(rmi, cmi, SIDE, SIDE, fctx), - (chroma_side, chroma_side), + (chroma_w, chroma_h), (ss_x(fctx), ss_y(fctx)), ); let map = - decode_color_index_map_wh(dec, cdfs, n, chroma_side, chroma_side, on, true); + decode_color_index_map_wh(dec, cdfs, n, chroma_w, chroma_h, on, true); hit!(PALETTE_UV_HITS); hit!(INTRA_IN_INTER_PALETTE_UV_HITS); hit_do! { @@ -38499,14 +42357,18 @@ fn decode_inter_block8( if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - push_intra(1, + // lane-av1-422sub8rect: the plane block is the (chroma_w, + // chroma_h) rect at 4:2:2 -- the recorded prediction/write uses + // the rect push. + push_intra_rect(1, cpx, cpy, - chroma_side, + chroma_w, + chroma_h, uv_predict_mode, angle_delta_uv, reach, - &ZERO_RESIDUAL[..chroma_side * chroma_side], + &ZERO_RESIDUAL[..chroma_w * chroma_h], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx, @@ -38514,21 +42376,22 @@ fn decode_inter_block8( if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - push_intra(2, + push_intra_rect(2, cpx, cpy, - chroma_side, + chroma_w, + chroma_h, uv_predict_mode, angle_delta_uv, reach, - &ZERO_RESIDUAL[..chroma_side * chroma_side], + &ZERO_RESIDUAL[..chroma_w * chroma_h], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx, ); luma_grid = Grid::Zero(SIDE * SIDE); - u_grid = Grid::Zero(chroma_side * chroma_side); - v_grid = Grid::Zero(chroma_side * chroma_side); + u_grid = Grid::Zero(chroma_w * chroma_h); + v_grid = Grid::Zero(chroma_w * chroma_h); } else { let around = neighbours.around_mi(leaf_mi, 8); luma_grid = if split8 { @@ -38572,56 +42435,117 @@ fn decode_inter_block8( )? }; let ac = alpha.map(|_| cfl_src(px, py, SIDE)); + // lane-av1-422sub8rect: at 4:2:2 the plane block is the BLOCK_4X8 + // rect and the key-frame arm's own reader applies -- one + // TX_4X8 `ChromaRect8x4` unit per plane through + // [`read_rect_chroma_unit`] with the per-chroma-cell context + // walk ([`Neighbours::around_mi_422_chroma`], the + // lane-av1-422f model this leaf's key-frame twin proves + // byte-exact). 4:2:0/4:4:4 keep the square [`read_plane`] read. + let (chroma_around_u, chroma_around_v) = if chroma_422 { + let ca = neighbours.around_mi_422_chroma(leaf_mi, 8, 8); + (ca[1], ca[2]) + } else { + (around[1], around[2]) + }; + if chroma_w == 8 && lossless(fctx) && !mono(fctx) { + // lane-av1-llintra8: lossless codes TX_4X4 on EVERY plane + // (`av1_get_tx_size`, blockd.h:1383), so this intra leaf's 8x8 + // chroma plane block is a 2x2 raster of TX_4X4 units per + // plane, plane-major -- the same per-unit walk the >=16x16 + // intra-in-inter block runs, not one TX_8X8 unit (whose WHT + // hits `TxParams::run`'s `(8, 8) != (4, 4)` lossless assert). + // The walk stamps each unit's own coefficient context + // (`record_mi_chroma` inside it), so the tail's whole-block + // `record_mi` gets its chroma half saved/restored around -- + // the same rule the INTER arms' + // `leaf8_inter_chroma_lossless` obeys. 4:2:0 keeps its single + // TX_4X4 unit in the `else` below. + let (mut uo, mut vo) = (Vec::new(), Vec::new()); + read_intra_chroma_lossless( + dec, cdfs, neighbours, u, v, leaf_mi, (px, py), (cpx, cpy), + SIDE, (chroma_w, chroma_w), (0, 0), + (chroma_w, chroma_w), chroma_w, reach, + (y.width, y.height), mode, uv_predict_mode, angle_delta_uv, + palette_uv_bufs.as_ref().map(|(a, b)| (&a[..], &b[..])), + smooth_neighbor_uv, base_q_idx, &mut uo, &mut vo, fctx, + )?; + u_grid = if uo.is_empty() { Grid::Zero(64) } else { Grid::Own(uo) }; + v_grid = if vo.is_empty() { Grid::Zero(64) } else { Grid::Own(vo) }; + chroma_stamped_per_unit = true; + hit!(LLINTRA8_CHROMA_WALK_HITS); + } else { if let Some((ub, _)) = &palette_uv_bufs { set_palette_pred(ub.clone(), fctx); } - u_grid = read_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 1, - around[1], - mode, - uv_predict_mode, - angle_delta_uv, - reach, - u, - cpx, - cpy, - chroma_side, - chroma_tx, - base_q_idx, - alpha.zip(ac).map(|((au, _), ac)| (au, ac)), - None, - None, - smooth_neighbor_uv, fctx, - )?; + u_grid = if chroma_422 { + read_rect_chroma_unit( + dec, cdfs, chroma_set, chroma_scan, chroma_w, chroma_h, 1, + chroma_around_u, uv_predict_mode, angle_delta_uv, reach, u, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + smooth_neighbor_uv, fctx, + )? + } else { + read_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 1, + chroma_around_u, + mode, + uv_predict_mode, + angle_delta_uv, + reach, + u, + cpx, + cpy, + chroma_w, + chroma_tx, + base_q_idx, + alpha.zip(ac).map(|((au, _), ac)| (au, ac)), + None, + None, + smooth_neighbor_uv, fctx, + )? + }; if let Some((_, vb)) = &palette_uv_bufs { set_palette_pred(vb.clone(), fctx); } - v_grid = read_plane( - dec, - cdfs, - chroma_set, - chroma_scan, - 2, - around[2], - mode, - uv_predict_mode, - angle_delta_uv, - reach, - v, - cpx, - cpy, - chroma_side, - chroma_tx, - base_q_idx, - alpha.zip(ac).map(|((_, av), ac)| (av, ac)), - None, - None, - smooth_neighbor_uv, fctx, - )?; + v_grid = if chroma_422 { + read_rect_chroma_unit( + dec, cdfs, chroma_set, chroma_scan, chroma_w, chroma_h, 2, + chroma_around_v, uv_predict_mode, angle_delta_uv, reach, v, + cpx, cpy, base_q_idx, None, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + smooth_neighbor_uv, fctx, + )? + } else { + read_plane( + dec, + cdfs, + chroma_set, + chroma_scan, + 2, + chroma_around_v, + mode, + uv_predict_mode, + angle_delta_uv, + reach, + v, + cpx, + cpy, + chroma_w, + chroma_tx, + base_q_idx, + alpha.zip(ac).map(|((_, av), ac)| (av, ac)), + None, + None, + smooth_neighbor_uv, fctx, + )? + }; + } } } // lane-txselect: a split leaf's plane-0 neighbour context is per 4x4 @@ -38665,7 +42589,32 @@ fn decode_inter_block8( palette_record8.2, palette_record8.3, ); + let saved_chroma_ctx = chroma_stamped_per_unit.then(|| { + ( + [ + [neighbours.left[leaf_mi.0][1], neighbours.left[leaf_mi.0][2]], + [neighbours.left[leaf_mi.0 + 1][1], neighbours.left[leaf_mi.0 + 1][2]], + ], + [ + [neighbours.above[leaf_mi.1][1], neighbours.above[leaf_mi.1][2]], + [neighbours.above[leaf_mi.1 + 1][1], neighbours.above[leaf_mi.1 + 1][2]], + ], + ) + }); neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]); + if let Some((left, above)) = saved_chroma_ctx { + // The walk's per-unit stamps are the block's real chroma coefficient + // contexts (`av1_set_contexts` per TX_4X4 unit); put them back over + // `record_mi`'s one composed state. + for (cell, uv) in left.into_iter().enumerate() { + neighbours.left[leaf_mi.0 + cell][1] = uv[0]; + neighbours.left[leaf_mi.0 + cell][2] = uv[1]; + } + for (cell, uv) in above.into_iter().enumerate() { + neighbours.above[leaf_mi.1 + cell][1] = uv[0]; + neighbours.above[leaf_mi.1 + cell][2] = uv[1]; + } + } // lane-uv8 r1: this leaf never stamped a mode band at all, so the block // below/right of it read whatever block last wrote the coarse [`SUB`] // slot -- now that an intra leaf here can code a smooth/directional @@ -39202,6 +43151,12 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( let snap_on = pipe_on && (cdef_on || lr_active); let mut pipe_snap = snap_on.then(|| (snap_alloc(&y), snap_alloc(&u), snap_alloc(&v))); let mut pipe = pipe_on.then(|| { + // lane-av1lrflush: counted unconditionally (unlike `PIPE_FRAMES` + // below, which is `EC_AV1_WAVE_STATS`-gated) so a gate can prove a + // pipelined arm actually took the pipeline even when + // `filter_threads()`'s once-per-process env read was already cached + // by an earlier test in the same binary. + PIPELINE_TAKEN.fetch_add(1, std::sync::atomic::Ordering::Relaxed); if wave_stats() { PIPE_FRAMES.fetch_add(1, Relaxed); } @@ -40549,22 +44504,50 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( // so there is no pair: each strip codes // and predicts its own chroma from its // own motion (`prev` = None). - let strip_has_chroma = - i % 2 == 1 || (ss_x(fctx) == 0 && ss_y(fctx) == 0); - let pair_mi = if !strip_has_chroma || ss_x(fctx) == 0 { - at_mi - } else if horz { - (at_mi.0 - 1, at_mi.1) + // lane-av1-422l: a strip pairs along its + // OWN subsampled axis -- horz strips pair + // on rows (no pair once ss_y == 0: chroma + // has no row parity, every 16x4 strip is + // its own reference, exactly the intra + // strip arm's `else if ss_y(fctx) == 0`); + // vert strips pair on columns (ss_x == 0 + // => every strip self-pairs, 4:2:2 keeps + // the 4:2:0 column pairing -- a VERT_4 + // 4x16 strip's `ss_size_lookup` chroma + // at ss (1,0) is BLOCK_INVALID, so only + // the pair shape can ever be coded). + let strip_has_chroma = if horz { + i % 2 == 1 || ss_y(fctx) == 0 } else { - (at_mi.0, at_mi.1 - 1) + i % 2 == 1 || ss_x(fctx) == 0 }; + let pair_mi = + if !strip_has_chroma + || (if horz { + ss_y(fctx) == 0 + } else { + ss_x(fctx) == 0 + }) + { + at_mi + } else if horz { + (at_mi.0 - 1, at_mi.1) + } else { + (at_mi.0, at_mi.1 - 1) + }; fctx.inter_strip_chroma.with(|c| { c.set(Some(InterStripChroma { has_chroma: strip_has_chroma, horz, pair_mi, - prev: if strip_has_chroma && ss_x(fctx) == 1 { - fctx.inter_last_mc.with(std::cell::Cell::get) + prev: if strip_has_chroma + && (if horz { + ss_y(fctx) == 1 + } else { + ss_x(fctx) == 1 + }) { + fctx.inter_last_mc + .with(std::cell::Cell::get) } else { None }, @@ -41810,7 +45793,15 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (false, None) => None, } } else { - lr_active.then(|| (plane_snapshot(&y, 0), plane_snapshot(&u, 1), plane_snapshot(&v, 1))) + // lane-av1422filter: chroma band geometry follows the frame's own + // ss_y (see the keyframe path's note) -- 4:2:2 stripes full-height. + lr_active.then(|| { + ( + plane_snapshot(&y, 0), + plane_snapshot(&u, ss_y(fctx) as u32), + plane_snapshot(&v, ss_y(fctx) as u32), + ) + }) }; // lane-tiny r4: post-deblock / post-CDEF dumps mirroring aomdec's own // EC_AV1_POSTDEBLOCK_DUMP (decodeframe.c ~5404) -- with the pre-filter @@ -41966,6 +45957,53 @@ mod tests { RefPix::ready(refs) } + /// lane-av1422stripwrite: the reference chroma shape is read back off the + /// stored plane's own sample count, so the counts the PRODUCER writes + /// (`round_ss` crops, `decode.rs:25806`) must route back to the shape + /// they came from. A floor half-width here passes every even-width case + /// -- the pinned fixture's 256-wide frame included -- and silently drops + /// every odd-width 4:2:2 reference into the 4:2:0 arm, which is the + /// exact defect this lane fixed, one dimension over. So the table below + /// is driven off `round_ss`, not off hand-written numbers, and sweeps + /// odd and even widths. + #[test] + fn a_reference_chroma_sample_count_routes_back_to_its_own_format() { + for w in [2usize, 3, 4, 5, 8, 9, 16, 17, 64, 65, 128, 129] { + for h in [2usize, 3, 4, 5, 8, 9, 64, 65, 144, 145] { + let cases = [ + ("4:4:4", round_ss(w, 0) * round_ss(h, 0), (w, h)), + ("4:2:2", round_ss(w, 1) * round_ss(h, 0), (round_ss(w, 1), h)), + ( + "4:2:0", + round_ss(w, 1) * round_ss(h, 1), + (w / 2, h / 2), + ), + ]; + for (name, len, want) in cases { + assert_eq!( + ref_chroma_shape(len, w, h), + want, + "{name} reference of {w}x{h} (chroma {len} samples) \ + must route back to its own shape" + ); + } + } + } + } + + /// lane-av1422stripwrite: the whole point of the 4:2:2 arm is that it + /// claims the frame's FULL chroma height -- that is what stops every + /// chroma MC sourcing a row at or past the midpoint from being clamped + /// against `true_height`. Pinned on the t422 shape. + #[test] + fn a_422_reference_claims_the_full_chroma_height() { + // 256x144 luma at ss (1, 0): chroma is 128 wide and 144 rows tall. + let (cw, ch) = ref_chroma_shape(round_ss(256, 1) * 144, 256, 144); + assert_eq!((cw, ch), (128, 144)); + // The bug's own signature: 72 rows claimed for 144 rows held. + assert!(ch > 144 / 2, "a 4:2:2 reference must not claim half its rows"); + } + /// [`last_only`] plus `GOLDEN_FRAME` (index 4 of the name-keyed array) /// and `ALTREF_FRAME` (index 7, the frame two back, which the encoder /// keeps in the slot the current frame refreshes): what a frame this diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index eb48b255..c6239af0 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -1548,7 +1548,10 @@ pub struct Picture { pub height: usize, /// The luma plane, `width * height` samples in raster order. pub y: Vec, - /// The U plane, at half the width and half the height. + /// The U plane: half the width, and the frame's own chroma height -- a + /// quarter of the luma samples at 4:2:0, half at 4:2:2, all of them at + /// 4:4:4. A consumer that only knows the luma size reads the chroma + /// format off this sample count (see `decode::ref_chroma_shape`). pub u: Vec, /// The V plane, the same shape as U. pub v: Vec, @@ -6801,6 +6804,8 @@ fn obmc_prediction( side, side, side, + crate::decode::ss_x(fctx), + crate::decode::ss_y(fctx), side / 2, x, y, diff --git a/crates/ec-av1/src/gate_coverage.rs b/crates/ec-av1/src/gate_coverage.rs index 087cfb69..d1835d40 100644 --- a/crates/ec-av1/src/gate_coverage.rs +++ b/crates/ec-av1/src/gate_coverage.rs @@ -119,15 +119,50 @@ enum On { /// only a gate that spells an on-value at that bit depth retires an entry. #[cfg(test)] const DEFAULT_ON_TOOLS: &[(&str, &[&str], &str, On)] = &[ - ("enable-tx-size-search", &["enable-tx-size-search"], "1", On::NonZero), - ("enable-directional-intra", &["enable-directional-intra"], "1", On::NonZero), - ("enable-smooth-interintra", &["enable-smooth-interintra"], "1", On::NonZero), - ("enable-interintra-wedge", &["enable-interintra-wedge"], "1", On::NonZero), - ("enable-diff-wtd-comp", &["enable-diff-wtd-comp"], "1", On::NonZero), - ("enable-onesided-comp", &["enable-onesided-comp"], "1", On::NonZero), + ( + "enable-tx-size-search", + &["enable-tx-size-search"], + "1", + On::NonZero, + ), + ( + "enable-directional-intra", + &["enable-directional-intra"], + "1", + On::NonZero, + ), + ( + "enable-smooth-interintra", + &["enable-smooth-interintra"], + "1", + On::NonZero, + ), + ( + "enable-interintra-wedge", + &["enable-interintra-wedge"], + "1", + On::NonZero, + ), + ( + "enable-diff-wtd-comp", + &["enable-diff-wtd-comp"], + "1", + On::NonZero, + ), + ( + "enable-onesided-comp", + &["enable-onesided-comp"], + "1", + On::NonZero, + ), ("enable-fwd-kf", &["enable-fwd-kf"], "0", On::NonZero), ("deblocking", &["loopfilter-control"], "1", On::NonZero), - ("multi-tile", &["tile-columns", "tile-rows"], "0", On::NonZero), + ( + "multi-tile", + &["tile-columns", "tile-rows"], + "0", + On::NonZero, + ), ("intrabc-search", &["cpu-used"], "0", On::AtMost(2)), ]; @@ -167,10 +202,14 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ "enable-flip-idtx", "never spelled; the flip/identity transform types are unproven by a real stream", ), - ( - "enable-global-motion", - "off in 5 gates, on in none at 8 bits; lane-gm owns the global-warp prediction that is still missing", - ), + // `enable-global-motion` LEFT this list on 2026-09-25 (lane-av1gwarp12 r2): + // `a_real_affine_global_motion_stream_decodes_pixel_exact` loops + // `for depth in [8u32, 10u32]` passing `--enable-global-motion=1` and + // pixel-compares both depths, so the 8-bit hole has been closed since + // lane-gmaffine r1 -- the entry survived because no suite ran a tree + // containing both the gate and this test until the ROTZOOM suite. + // The 12-bit ROTZOOM gate rides the high-depth bucket via `encode_12bit(` + // in `is_ten_bit`, so it plays no part in this retirement. ( "enable-rect-tx", "never spelled; rect transforms reach the decoder only through partition shape, never through a gate that names the tool", @@ -178,7 +217,8 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ ]; #[cfg(test)] -const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // lane-cwarp's 10-bit compound-global-warp gate closed `enable-global-motion` +const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ + // lane-cwarp's 10-bit compound-global-warp gate closed `enable-global-motion` // and `enable-dist-wtd-comp` at 10 bits without deleting their entries here, // so this list was already stale (and this test already red) at main 9c35ecc; // lane-tiles r11's multi-tile 10-bit gates then closed `enable-ab-partitions`, @@ -240,8 +280,8 @@ const NEVER_ON_10BIT: &[(&str, &str)] = &[]; #[cfg(test)] mod tests { use super::{ - ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_8BIT, NEVER_EXERCISED_10BIT, - NEVER_ON_10BIT, NEVER_ON_8BIT, On, TOOL_UNIVERSE, + On, ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_10BIT, + NEVER_EXERCISED_8BIT, NEVER_ON_10BIT, NEVER_ON_8BIT, TOOL_UNIVERSE, }; use std::collections::{BTreeMap, BTreeSet}; @@ -438,11 +478,19 @@ mod tests { } fn is_ten_bit(body: &str) -> bool { + // The lists pin two buckets, 8-bit and high-bit-depth; 12-bit gates + // count in the high-depth bucket (lane-av1gwarp12's ROTZOOM gate was + // the first 12-bit gate to positively enable a listed tool, and the + // 10-bit-only spellings mis-filed it as 8-bit). body.contains("encode_10bit_gradients") || body.contains("ten_bit_tool_gate(") || body.contains("--bit-depth=10") || body.contains("--input-bit-depth=10") || body.contains("yuv420p10le") + || body.contains("encode_12bit(") + || body.contains("--bit-depth=12") + || body.contains("--input-bit-depth=12") + || body.contains("yuv420p12le") } /// Flags a gate positively enables (`=1`), at gates of the given depth. @@ -534,7 +582,9 @@ mod tests { } /// [`DEFAULT_ON_TOOLS`] per depth: `tool -> (off in N gates, on in N, defaulted in N)`. - fn default_on_settings(ten_bit: bool) -> (usize, BTreeMap<&'static str, (usize, usize, usize)>) { + fn default_on_settings( + ten_bit: bool, + ) -> (usize, BTreeMap<&'static str, (usize, usize, usize)>) { let gates: Vec<&str> = gate_bodies() .into_iter() .filter(|b| covers_depth(b, ten_bit)) diff --git a/crates/ec-av1/src/mc.rs b/crates/ec-av1/src/mc.rs index bbffbfc4..a9c96c6c 100644 --- a/crates/ec-av1/src/mc.rs +++ b/crates/ec-av1/src/mc.rs @@ -2142,8 +2142,11 @@ pub(crate) fn diffwtd_mask( /// (64-m)*pred1) >> 6` (a plain, unrounded shift, matching the C `>>` on /// `int32_t`) then one final [`round2`] by [`INTER_POST_ROUND`]. `mask` is /// always the LUMA-resolution mask (`mask_stride` == luma block width); -/// `subsampled` selects the 2x2-average chroma read (spec 7.11.3.14 / -/// libaom's `subw == 1 && subh == 1` branch) vs. the direct luma read. +/// `(subw, subh)` are the PLANE's own subsampling shifts and pick the mask +/// read exactly as aom_dsp/blend-a64-mask.c's four `subw`/`subh` branches do: +/// `(0, 0)` the direct luma sample, `(1, 1)` the 2x2 box average, +/// `(1, 0)`/`(0, 1)` the `AOM_BLEND_AVG` pair average on the subsampled axis +/// alone (4:2:2). #[allow(clippy::too_many_arguments)] pub(crate) fn blend_masked_compound( pred0: &[i32], @@ -2152,7 +2155,8 @@ pub(crate) fn blend_masked_compound( mask_stride: usize, w: usize, h: usize, - subsampled: bool, + subw: usize, + subh: usize, dst: &mut [u16], fctx: &crate::decode::FrameCtx, ) { @@ -2162,17 +2166,30 @@ pub(crate) fn blend_masked_compound( let post_round = INTER_POST_ROUND - round_delta(u32::from(crate::decode::bit_depth(fctx))); for i in 0..h { for j in 0..w { - let m = if subsampled { - let idx = (2 * i) * mask_stride + 2 * j; - round2( - i32::from(mask[idx]) - + i32::from(mask[idx + 1]) - + i32::from(mask[idx + mask_stride]) - + i32::from(mask[idx + mask_stride + 1]), - 2, - ) - } else { - i32::from(mask[i * mask_stride + j]) + let m: i32 = match (subw, subh) { + (0, 0) => i32::from(mask[i * mask_stride + j]), + (1, 1) => { + let idx = (2 * i) * mask_stride + 2 * j; + round2( + i32::from(mask[idx]) + + i32::from(mask[idx + 1]) + + i32::from(mask[idx + mask_stride]) + + i32::from(mask[idx + mask_stride + 1]), + 2, + ) + } + // aom_blend_a64_mask_c's `subw == 1 && subh == 0` branch: + // `AOM_BLEND_AVG(mask[2 * j], mask[2 * j + 1])` per row. + (1, 0) => { + let idx = i * mask_stride + 2 * j; + (i32::from(mask[idx]) + i32::from(mask[idx + 1]) + 1) >> 1 + } + // the `subw == 0 && subh == 1` branch: averaged down the + // columns instead. + (_sw, _sh) => { + let idx = (2 * i) * mask_stride + j; + (i32::from(mask[idx]) + i32::from(mask[idx + mask_stride]) + 1) >> 1 + } }; let res = (m * pred0[i * w + j] + (64 - m) * pred1[i * w + j]) >> 6; // `post_round` above: `INTER_POST_ROUND - round_delta` -- see diff --git a/crates/ec-av1/src/refusal_inventory.rs b/crates/ec-av1/src/refusal_inventory.rs index b4f1d27d..8bb391a5 100644 --- a/crates/ec-av1/src/refusal_inventory.rs +++ b/crates/ec-av1/src/refusal_inventory.rs @@ -42,6 +42,10 @@ const REFUSALS: &[&str] = &[ // strings never landed here (continuation 8's suite run caught the // drift); both are decoder-side "no table for that shape yet" guards on // 4:4:4 rect strips, same family as the rect luma/chroma entries below. + // lane-av1-refusalaudit: the 64-axis one is PROVEN unreachable -- its + // chroma-unit table covers every conformant strip unit in both supported + // chroma formats (enumeration in PROVEN; the witness2 hunt reached + // nothing). The chroma-size one below is still live. "a 64-axis strip whose chroma unit has no coefficient table", "a rectangular chroma transform whose size has no coefficient table", "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here", @@ -271,6 +275,15 @@ const PROVEN: &[(&str, &str)] = &[ // `(side, write_w, write_h)` triples `INTER_BLOCK_SHAPES` lists, and // `rect_inter_residual_supported` covers every rectangular one -- the only // footprints `reject_residual` is set for. + // lane-av1-witness2 (8 more inter encodes: banded and busy content, + // --max-partition-size=32, a single-ref arm, cq 20..45, cpu-used 0..1): + // no refusal -- every rect strip the encoder produced sat inside the + // supported set. Static half, from the same hunt: the supported list plus + // the partition walker's piece set (SB pieces 64x32/32x64/64x16/16x64, + // the 32- and 16-level rect/1:4/AB twins, 128 halves tiled as two + // TX_64X64) enumerate every rect footprint AV1 partitioning can present; + // 1:4 stops at 64 because the 128 root has no 1:4 symbol. No conformant + // stream can name an unsupported footprint. ( "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding", "a_block_shape_census_over_three_real_streams_leaves_the_rect_residual_refusal_unreachable", @@ -294,6 +307,12 @@ const PROVEN: &[(&str, &str)] = &[ // lane-t900 r20, census: the rect transform tables and scans, enumerated // over the shapes the measured block-shape domain hands each helper (block // footprint, 4:2:0 chroma unit, rect var-tx leaf, clamped coded corner). + // lane-av1-witness2 (8 inter encodes, --enable-tx-size-search=1, rect+1:4 + // on, --min-partition-size=4, 4:2:0 and 4:4:4, sb 64/128, cq 10..45, + // cpu-used 0..2): no refusal while the domain was genuinely exercised -- + // whole-block 32x8 inter TUs and sub-8 rect pieces decoded. The fourteen + // rect shapes the enumeration covers are the whole alphabet, so the `_` + // arm has no conformant input. ( "a rectangular inter luma transform unit whose shape has no coefficient table set here", "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan", @@ -478,6 +497,13 @@ const PROVEN: &[(&str, &str)] = &[ // `segment_id` symbols, and nothing else; the map-inheritance defect that // census surfaced (verbatim copy, decodemv.c:342) is fixed and witnessed // by `a_real_aomenc_segmentation_stream_with_map_inheritance_decodes_ // pixel_exact`. + // lane-av1-witness2 re-confirmed the census on the current aomenc build: + // it has no --enable-segmentation flag at all (aq-mode is the only + // segmentation driver; aq-mode 4 is out of range for the build), and 8 + // aq-mode recipes (1/2/3, + --delta-lf-mode=1, 4:4:4, banded content) + // wrote SEG_LVL_ALT_Q tables and segment_id symbols where segmentation + // engaged, decoded clean, and never coded one of the three + // mode-overriding features. ( "a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV (this decoder reads segment_id but never lets a segment override a block's reference, skip or mode)", "a_frame_whose_segmentation_overrides_a_block_mode_is_refused_by_name", @@ -514,6 +540,19 @@ const PROVEN: &[(&str, &str)] = &[ "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)", "every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table", ), + // lane-av1-refusalaudit, enumeration + witness2 hunt: decode_block_rect64's + // chroma-unit table covers every conformant 64-axis strip unit in both + // supported chroma formats -- at 4:4:4 the strips 64x32/32x64/64x16/16x64 + // tile to (32,32)/(32,16)/(16,32); at 4:2:0 the halved footprints land on + // (32,16)/(16,32)/(32,8)/(8,32). A 128-root half is + // `decode_block_128rect`'s, and the 128 root has no 1:4 arm. The hunt (8 + // real aomenc key-frame encodes: screen+intrabc, rect+1:4, sb 64 and 128, + // cq 10..63, cpu-used 0..2) never reached the arm; the three streams that + // decode to completion never enter decode_block_rect64 at all. + ( + "a 64-axis strip whose chroma unit has no coefficient table", + "every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table", + ), // lane-t900 r33, enumeration: each of the four symbols this guard tests is // read under a size gate that no 128-pixel side passes (the call site's // literal `cfl=false`, `filter_intra_size_class_rect`'s table, and @@ -1472,6 +1511,162 @@ mod tests { ); } + /// lane-av1-refusalaudit, ENUMERATION for "a 64-axis strip whose chroma + /// unit has no coefficient table" -- [`decode_block_rect64`]'s `_` arm, + /// reached only for depth-0, non-skip, non-lossless superblock-level + /// HORZ/VERT/1:4 strips. + /// + /// The unit is the strip's chroma shape capped at 32 per axis + /// (`(chroma_w.min(32), chroma_h.min(32))`), so the enumeration walks the + /// strip domain -- the 64-axis 2:1 and 1:4 footprints, the only shapes the + /// two callers (`read_sb128_root`, `decode_intra_rect_in_inter`) hand the + /// function -- through both supported chroma formats (4:4:4 and 4:2:0; + /// every mixed format is refused at the sequence header) against the + /// `match` arms read out of decode.rs itself (class + /// `table-and-reader-move-together`). + /// + /// lane-av1-witness2 hunted the shape with 8 real aomenc key-frame encodes + /// (screen+intrabc, rect+1:4, sb 64 and 128, cq 10..63, cpu-used 0..2): + /// no recipe reached the arm, and the three streams that decode to + /// completion never enter `decode_block_rect64` at all. + #[test] + fn every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table() { + let src = include_str!("decode.rs"); + + // (1) The caller set. Each call's enclosing function is the last + // top-level `fn` before it. + let fn_starts: Vec<(usize, String)> = src + .match_indices("\nfn ") + .map(|(i, _)| { + let rest = &src[i + 4..]; + let name = rest[..rest.find('(').unwrap_or(0)].to_string(); + (i, name) + }) + .collect(); + let mut callers: BTreeSet = BTreeSet::new(); + for (at, _) in src.match_indices("decode_block_rect64(") { + let enclosing = fn_starts + .iter() + .filter(|(i, _)| *i < at) + .next_back() + .expect("a decode_block_rect64 call outside any function"); + if enclosing.1 != "decode_block_rect64" { + callers.insert(enclosing.1.clone()); + } + } + let expected: BTreeSet = ["decode_intra_rect_in_inter", "read_sb128_root"] + .iter() + .map(|s| s.to_string()) + .collect(); + assert_eq!( + callers, expected, + "the set of functions that call decode_block_rect64 changed -- re-derive the \ + strip domain below from the new caller (a 128-sided or sub-8 caller makes the \ + refusal live)" + ); + + // (2) The unit derivation, asserted against its own source before it + // is applied: chroma shape = the strip halved by the plane's + // subsampling; unit = each axis capped at 32. + let body_at = src + .find("fn decode_block_rect64(") + .expect("decode_block_rect64 is gone"); + let rest = &src[body_at..]; + let body = &rest[..rest.find("\nfn ").expect("unterminated fn")]; + assert!( + body.contains("(bw >> ss_x(fctx), bh >> ss_y(fctx))"), + "decode_block_rect64's chroma shape is no longer the strip halved by the \ + plane's subsampling -- re-derive this enumeration" + ); + const CAP: &str = "let (uw, uh) = (chroma_w.min(32), chroma_h.min(32));"; + assert_eq!( + src.matches(CAP).count(), + 1, + "the 32-per-axis chroma unit cap is no longer spelled the way this enumeration \ + mirrors it" + ); + + // (3) The table, read out of the match that follows the cap. + let from = body.find(CAP).expect("cap is outside decode_block_rect64"); + let to = body + .find("a 64-axis strip whose chroma unit has no coefficient table") + .expect("the refusal string is gone from decode_block_rect64"); + let table = &body[from..to]; + let mut arms: BTreeSet<(usize, usize)> = BTreeSet::new(); + let bytes = table.as_bytes(); + for (i, _) in table.match_indices('(') { + let mut j = i + 1; + let mut w = 0usize; + while j < bytes.len() && bytes[j].is_ascii_digit() { + w = w * 10 + usize::from(bytes[j] - b'0'); + j += 1; + } + if j == i + 1 || !table[j..].starts_with(", ") { + continue; + } + j += 2; + let mut h = 0usize; + let start_h = j; + while j < bytes.len() && bytes[j].is_ascii_digit() { + h = h * 10 + usize::from(bytes[j] - b'0'); + j += 1; + } + if j == start_h || !table[j..].starts_with(") =>") { + continue; + } + // Only an arm HEAD counts, never a `(32, 8)` inside prose. + arms.insert((w, h)); + } + let handled: BTreeSet<(usize, usize)> = [(32, 32), (32, 16), (16, 32), (32, 8), (8, 32)] + .into_iter() + .collect(); + assert_eq!( + arms, handled, + "decode_block_rect64's chroma-unit table changed -- re-derive the enumeration \ + (a unit outside these five arms makes the refusal live for some strip)" + ); + + // (4) The enumeration: every 64-axis 2:1 and 1:4 strip (the shapes + // superblock partitioning presents at the 64 level) x every supported + // chroma format lands on a handled arm. + let mut checked = 0u32; + let mut hit: BTreeSet<(usize, usize)> = BTreeSet::new(); + for wl in 4..=6u32 { + for hl in 4..=6u32 { + let (bw, bh) = (1usize << wl, 1usize << hl); + if bw.max(bh) != 64 { + continue; + } + let ratio = bw.max(bh) / bw.min(bh); + if ratio != 2 && ratio != 4 { + continue; + } + // (ss_x, ss_y): (0, 0) is 4:4:4, (1, 1) is 4:2:0. The mixed + // formats are refused by name at the sequence header. + for (ss_x, ss_y) in [(0usize, 0usize), (1, 1)] { + let (chroma_w, chroma_h) = (bw >> ss_x, bh >> ss_y); + let unit = (chroma_w.min(32), chroma_h.min(32)); + assert!( + arms.contains(&unit), + "a {bw}x{bh} strip at subsampling ({ss_x},{ss_y}) resolves to the \ + chroma unit {unit:?}, which has no coefficient table -- the \ + refusal is LIVE for a conformant stream" + ); + hit.insert(unit); + checked += 1; + } + } + } + assert_eq!( + checked, 8, + "the strip domain is not the four 64-axis strips x two supported formats" + ); + assert_eq!( + hit, handled, + "the enumeration stopped exercising every arm -- the proof went vacuous" + ); + } + /// lane-t900 r33, ENUMERATION for "CfL, filter intra or a palette on a /// 128-root HORZ/VERT intra block". /// diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index fc5f3f9f..2f9d5462 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -126,6 +126,23 @@ pub fn rect_intrabc_reads() -> usize { crate::decode::rect_intrabc_reads() } +/// lane-av1-ibc444rect: unskipped intrabc 8x4/4x8 leaves whose luma a lossless +/// frame walked as per-4x4 inter units. +pub fn intrabc_rect8_lossless_luma_hits() -> usize { + crate::decode::intrabc_rect8_lossless_luma_hits() +} + +/// lane-av1-ibc444rect: unskipped intrabc 8x4/4x8 leaves whose chroma a +/// lossless 4:4:4 frame walked as per-4x4 `Chroma4` units. +pub fn intrabc_rect8_lossless_chroma_hits() -> usize { + crate::decode::intrabc_rect8_lossless_chroma_hits() +} + +/// Gate-side reset for the lane-av1-ibc444rect counters above. +pub fn reset_ibc444rect_hits() { + crate::decode::reset_ibc444rect_hits() +} + /// `(y, uv)` palette blocks RECONSTRUCTED inside an inter frame (lane-t900 /// r22) -- the counter a screen-content witness gate reads to prove it /// exercises the inter-frame palette path, not the key frame's. @@ -2209,6 +2226,62 @@ pub(crate) mod tests { let frames = decode_stream(&stream).expect("the 4:2:0 control must decode"); assert_eq!(frames.len(), 1, "{NAME}: the 4:2:0 control decoded no frame"); } + /// lane-av1-422bigblock: the two witnessed 4:2:2 big-block defects, pinned + /// as fixtures (`git add -f`; `fixtures/` is gitignored). + /// + /// `422_allskip_2f.obu` (62 bytes) is a 128x128 profile-2 key frame plus + /// its all-skip first inter frame: the pre-port decoder read phantom + /// coefficient units in the inter frame and then panicked in + /// `reconstruct_mc_rect` on a full-height 4:2:2 chroma rect. At this + /// lane's HEAD the block-half port's per-axis plane-block model already + /// has it entropy-locked (all 20 key-frame coefficient units pair + /// rng-for-rng with the instrumented oracle, the inter frame reads + /// zero, matching the oracle) and pixel-exact vs aomdec. + /// + /// `422_sb128_3f.obu` (12543 bytes) carries the f2 128x128 + /// `PARTITION_NONE` non-skip inter block: the mu-chunk chroma walk cut + /// each chunk's 32x64 chroma into a `chroma_side`-square 64x64 (twice + /// the units the oracle codes), indexed the prediction buffer at the + /// square `chroma_side` instead of `chroma_stride` (the empty-slice + /// panic at `push_mc_rect_tx`'s densify), and the reference plane + /// resolution guessed every non-4:4:4 picture quarter-height, so the + /// bottom mu-chunk row predicted from a clamped row-63 edge. All fixed; + /// both witnesses decode pixel-exact vs aomdec on the lane's local + /// `EC_AV1_ALLOW_422_PROBE` patch-run-restore build (recipe and measured + /// numbers in `lanes/av1422bigblock.report.md`). + /// + /// `decode_stream` itself still refuses 4:2:2 at the sequence header -- + /// unconditionally, per the standing family rule -- so the committed + /// assertion is the byte pin (fnv1a64, the same load-bearing-identity + /// fingerprint as the cdf-forwarding gate) plus the refusal-by-name + /// contract over the pinned bytes. + #[test] + fn the_pinned_422_bigblock_witnesses_are_present_and_refuse_by_name() { + const NAME: &str = "the_pinned_422_bigblock_witnesses_are_present_and_refuse_by_name"; + const REFUSAL: &str = "a chroma format of 4:2:2"; + for (file, bytes, fp) in [ + ("422_allskip_2f.obu", 62usize, 0x7e4d69d3c728c55f_u64), + ("422_sb128_3f.obu", 12543, 0x5171e0aab8000da7), + ] { + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("fixtures") + .join(file); + let data = std::fs::read(&path).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned witness {} is missing ({e}) -- the gate cannot run", + path.display() + ) + }); + assert_eq!(data.len(), bytes, "{NAME}: {file} size drifted"); + assert_eq!(fnv1a64(&data), fp, "{NAME}: {file} bytes drifted"); + let err = decode_stream(&data).unwrap_err().to_string(); + assert!( + err.contains(REFUSAL), + "{NAME}: {file} must refuse by name, got: {err}" + ); + } + } + /// lane-av1-qmatrix: WITNESS for the lifted `using_qmatrix` refusal (the /// old gate `a_frame_using_quantisation_matrices_is_refused_by_name` is @@ -5399,6 +5472,889 @@ pub(crate) mod tests { } } + /// lane-av1-llband: the pinned 4:4:4 LOSSLESS key frame + /// (`fixtures/ll444-lossless-key.obu`, the `ll444` recipe's frame 0 -- + /// `testsrc2 128x96` yuv444p cut to its key frame) decodes sample-exact, + /// and its HORZ/VERT strips really walked their chroma as 4x4 units at + /// subsampling 0/0 (one unit per mi cell). That unit walk used the 4:2:0 + /// span (8 luma px per 4x4 chroma unit) unconditionally, so every unit + /// past the first column/row read its `txb_skip` context two mi cells + /// over and stamped a 2-cell smear -- the 178-byte key-frame miss, first + /// divergence at the 16x8 leaf mi (16,24)'s U bc=2 unit (oracle + /// `txb_skip` base 0 off `above[26]`, ours base 1 off the polluted + /// `above[29]`). The counter assertion is the non-vacuity half (class + /// `gate-blind-to-feature`): a stream that never reaches the 4:4:4 unit + /// walk must not pass. + #[test] + fn a_real_aomenc_lossless_444_key_frame_decodes_sample_exact() { + const NAME: &str = "a_real_aomenc_lossless_444_key_frame_decodes_sample_exact"; + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + let Ok(stream) = std::fs::read(pin_dir().join("ll444-lossless-key.obu")) else { + eprintln!( + "SKIP {NAME}: no pinned bytes at {} -- regenerate with \ + `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ + --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs", + pin_dir().join("ll444-lossless-key.obu").display() + ); + return; + }; + // Blindness guard: the pinned fixture must really be a lossless frame. + let mut parser = Av1Parser::new(); + let mut pos = 0usize; + let mut lossless = false; + while pos < stream.len() { + let obu = parser.parse_obu(&stream[pos..]).expect("aomenc OBU parses"); + pos += obu.total_size.max(1); + if let ObuKind::FrameHeader(h) | ObuKind::Frame(h, _) = obu.kind { + lossless = h.lossless.iter().all(|&l| l); + } + } + assert!(lossless, "{NAME} went blind: the pinned frame is not lossless"); + let before = crate::decode::rect_split_lossless_chroma444_hits(); + let ours = decode_stream(&stream).expect("a 444 lossless key-frame stream decodes"); + assert_eq!(ours.len(), 1, "{NAME}: frame count"); + assert!( + crate::decode::rect_split_lossless_chroma444_hits() > before, + "{NAME} went blind: no lossless HORZ/VERT strip walked its chroma \ + as 4x4 units at subsampling 0/0" + ); + let refs = Command::new("ffmpeg") + .args(["-v", "error", "-f", "obu", "-i", "-", "-f", "rawvideo", "-pix_fmt", "yuv444p", "-"]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .and_then(|mut child| { + use std::io::Write as _; + child.stdin.as_mut().expect("stdin").write_all(&stream)?; + child.wait_with_output() + }) + .expect("ffmpeg 444 decode failed"); + assert!(refs.status.success(), "{}", String::from_utf8_lossy(&refs.stderr)); + let frame = &ours[0]; + let planes = [ + (&frame.y, frame.width * frame.height), + (&frame.u, frame.width * frame.height), + (&frame.v, frame.width * frame.height), + ]; + let mut off = 0usize; + for (plane, (g, len)) in planes.iter().enumerate() { + let raw = &refs.stdout[off..off + len]; + let bad = g.iter().zip(raw.iter()).filter(|&(&a, &b)| a != u16::from(b)).count(); + assert_eq!(bad, 0, "{NAME}: plane {plane}: {bad} samples differ"); + off += len; + } + } + + /// As [`ffmpeg_decode_sequence`], for a 4:4:4 stream: chroma planes are + /// FULL resolution (`yuv444p` rawvideo), the shape lane-av1-llinter's + /// lossless profile-1 fixture codes. + fn ffmpeg_decode_sequence_444( + stream: &[u8], + width: usize, + height: usize, + frames: usize, + ) -> Vec { + let out = run_with_stdin( + Command::new("ffmpeg").args([ + "-v", "error", "-f", "obu", "-i", "-", "-f", "rawvideo", "-pix_fmt", "yuv444p", "-", + ]), + stream, + ); + assert!( + out.status.success(), + "ffmpeg refused the 4:4:4 stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let plane = width * height; + let frame_bytes = 3 * plane; + assert_eq!( + out.stdout.len(), + frame_bytes * frames, + "expected {frames} 4:4:4 frames, ffmpeg said: {}", + String::from_utf8_lossy(&out.stderr) + ); + (0..frames) + .map(|i| { + let base = i * frame_bytes; + Pic { + width, + height, + y: out.stdout[base..base + plane].iter().map(|&v| u16::from(v)).collect(), + u: out.stdout[base + plane..base + 2 * plane].iter().map(|&v| u16::from(v)).collect(), + v: out.stdout[base + 2 * plane..base + 3 * plane].iter().map(|&v| u16::from(v)).collect(), + } + }) + .collect() + } + + /// lane-av1-llinter: the firing gate for the lossless 4:4:4 INTER chroma + /// fix. The fixture is the report's dodge2 stream pinned into `fixtures/`: + /// aomenc profile 1 over testsrc2 128x96 yuv444p, `--lossless=1`, + /// `--sb-size=64 --min-partition-size=64 --max-partition-size=64`, 6 + /// frames; 37658 bytes, sha256 + /// `5a070fa351a3f2109de855234f2b3d0a872970f3e7f658db21f65c12eeb135b4`. + /// The firing counter is the EXISTING `decode::chroma_split_tx_hits` (one + /// bump per lossless chroma TX unit read): with min=max partition 64 the + /// roots stay whole 64x64 inter blocks -- no 8x8 leaf exists in this + /// stream -- so every chroma unit goes through the big-block ss-aware + /// lossless route this lane fixed (fixes 2-5). A 4:2:0 lossless stream + /// fires the same counter, but the fixture bytes are pinned, so the gate + /// cannot run on anything else; the pre-fix 4:2:0-hardcoded math corrupts + /// at 4:4:4, so the pixel-exact compares are what prove the ss-aware path + /// (class `gate-blind-to-feature`). Every frame must come out pixel-exact + /// through BOTH the oracle `aomdec --rawvideo` and ffmpeg. The + /// default-partition ll444 stream is deliberately NOT claimed here: its + /// key frame is still the intra lane's named sub8-chroma stop + /// (lanes/av1llintra.report.md). + #[test] + fn a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact() { + const NAME: &str = "a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact"; + const FIXTURE_LEN: usize = 37658; + const FIXTURE_FNV: u64 = 0xf68d_c26f_a14d_283c; + const W: usize = 128; + const H: usize = 96; + const FRAMES: usize = 6; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_minp64_inter.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let before = crate::decode::chroma_split_tx_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + let hits = crate::decode::chroma_split_tx_hits(); + assert!( + hits > before, + "{NAME}: gate is vacuous -- no lossless chroma TX unit was read \ + (delta {before} -> {hits})" + ); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-ll444-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate() { + let base = i * W * H * 3; + for ((plane, off), p) in [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!(bad, 0, "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate() { + for (p, (g, r)) in [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!(bad, 0, "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1llpredgate2: the debug-exact pin for the ss-aware + /// `obmc_skip_chroma_above` decision (lane-av1-llpred2). Fixture is the + /// llpred/llpred2 reports' stream pinned into `fixtures/`: testsrc2 + /// 128x96 yuv444p, aomenc `--profile=1 --lossless=1 --enable-palette=0 + /// --enable-intrabc=0 --min-partition-size=8 --max-partition-size=64`, + /// 6 frames; 34037 bytes, sha256 + /// `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc`. + /// + /// This is a DEBUG-build path by construction: the old ratio-based ss + /// derivation read `write_h >> trailing_zeros(0)` = `>> 64` on this + /// stream's 4:4:4 OBMC rect strips, a panic ONLY under + /// debug_assertions (release wraps and was already byte-exact), so + /// `cargo test`'s default dev profile is the profile where the defect + /// class reproduces and where the parent's byte-exact proof was + /// measured. + /// + /// No skip-arm counter gate is possible on this stream, measured: + /// OBMC runs 77 times with 20 rect leaves, but + /// `obmc_skip_chroma_above` returns true 0 times -- at 4:4:4 the skip + /// needs a 4x4/8x4/4x8 PLANE block and min-partition-8 never codes one. + /// So per the lane ticket the proof splits in two: the decision TABLE + /// (4:2:0 rect strips still skip, 4:4:4 shifts never leave `usize`) + /// stays pinned by `decode::obmc_skip_chroma_tests:: + /// rect_strips_skip_above_chroma_at_420_and_shift_never_overflows`, + /// and THIS stream gate pins the end-to-end behaviour -- every sample + /// of every frame must match the oracle aomdec exactly, so a returning + /// chroma diff (the lane-av1-llpred ss-blind re-blend class + /// `obmc-ss-blind-chroma-above`) or the debug shift panic goes red + /// here by name. + #[test] + fn a_lossless_444_min_partition8_inter_stream_decodes_sample_exact() { + const NAME: &str = "a_lossless_444_min_partition8_inter_stream_decodes_sample_exact"; + const FIXTURE_LEN: usize = 34037; + const FIXTURE_FNV: u64 = 0x2c8f_4a2c_c025_52da; + const W: usize = 128; + const H: usize = 96; + const FRAMES: usize = 6; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_minp8_inter.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-llminp8-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate() { + let base = i * W * H * 3; + for ((plane, off), p) in [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ \ + (class obmc-ss-blind-chroma-above)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate() { + for (p, (g, r)) in [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!(bad, 0, "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ"); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1-444sb: the byte-exact pin for the ss-aware 128-rect chroma + /// unit walk (`decode_block_128rect`). The parent walk hardcoded the + /// 4:2:0 mu-chunk span -- one 32x32 chroma unit per 64x64 chunk, chunk + /// offsets `*32`, clip step `*8` -- so at 4:4:4 a 128-root HORZ/VERT + /// intra block coded HALF its chroma units, left the remaining units' + /// coefficients unread and desynced the tile from the first such block + /// on; every superblock after SB(0,0) carried damage and the chroma + /// first-diffs sat on the 64/128 grid. + /// + /// `crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, 794 bytes, + /// sha256 + /// `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`: + /// `ffmpeg -i bands444.y4m -frames:v 3 -vf scale=192:160 -pix_fmt + /// yuv444p -f yuv4mpegpipe` piped to `aomenc --codec=av1 --profile=1 + /// --passes=1 --end-usage=q --cq-level=32 --cpu-used=0 --threads=1 + /// --row-mt=0 --sb-size=128 --lag-in-frames=0 --auto-alt-ref=0 + /// --kf-max-dist=1000 --i444 --enable-restoration=1 --obu --limit=3`. + /// Real content is required: the synthetic lavfi sources this lane swept + /// (testsrc2/testsrc/smptebars/mandelbrot/gradients) all decode frame 0 + /// exact because they never force a 128-root rect; bands does (kf + /// PARTITION_VERT 64x128 at mi(0,32) plus an intra-in-inter 64x128). + /// + /// Non-vacuity via the `decode::intra_sb128_hits` delta: a stream that + /// stopped coding 128-axis intra blocks reads 0 and the gate fails + /// instead of passing over a decode that never reached the fixed body + /// (class `gate-blind-to-feature`). The oracle arms pin every sample of + /// every frame against both aomdec and ffmpeg, so a returning chroma + /// span regression goes red here by name. + #[test] + fn a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact() { + const NAME: &str = "a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact"; + const FIXTURE_LEN: usize = 794; + const FIXTURE_FNV: u64 = 0xf5a7_27f4_3fa7_abc3; + const W: usize = 192; + const H: usize = 160; + const FRAMES: usize = 3; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_sb128rect_lr_witness.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let before = crate::decode::intra_sb128_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + let (horz, vert, _) = crate::decode::intra_sb128_hits(); + assert!( + horz - before.0 + (vert - before.1) > 0, + "{NAME}: this stream coded NO 128-axis intra block -- the fixed body \ + never ran (class gate-blind-to-feature)" + ); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + // All three frames are pinned byte-exact against both oracles (the + // aomdec/ffmpeg arms below run over `.take(3)`): frame 0's keyframe + // PARTITION_VERT 64x128, frame 1's inter pieces, and frame 2 -- whose + // right superblock column (the 128-root VERT piece at the frame edge) + // is three intra blocks (64x64, 64x32, 64x32) whose chroma units ride + // the inter-frame intra tail. That tail read ONE whole-plane chroma + // unit with the block-level context where 4:4:4 codes four + // plane-major TX_32X32 units with per-unit contexts and the + // offset-10 `get_txb_ctx` rows, which left three quarters of the + // planes' residual unread and misaligned the symbol stream from the + // first chroma unit on (f2 PREFILT Y 6952 / U 9568 / V 13496, first + // diffs entering at column 128). Fixed on lane-av1-rect128recon; + // the earlier "LR never restores RU row 0" attribution on this frame + // was a stage-ladder mixup, refuted in lane-av1lrflush r3. + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = + std::env::temp_dir().join(format!("ec-av1-444sb-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate().take(3) { + let base = i * W * H * 3; + for ((plane, off), p) in + [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = + plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ \ + (class 444-128rect-chroma-span)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + + // ffmpeg's decoder: same frames, full-resolution chroma. Same + // three-frame scope as the aomdec arm above. + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in frames.iter().zip(refs.iter()).enumerate().take(3) { + for (p, (g, r)) in + [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!( + bad, 0, + "{NAME}: ffmpeg frame {i} plane {p}: {bad} samples differ" + ); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1lrflush: the pipelined loop-restoration band release flushes + /// RU row 0 on the inter frame whose top superblock row carries a + /// 128-root rect -- the exact shape lanes/av1444sb.report.md r2 named as + /// its stop-with-site DEFECT 3 ("`pipe_run_lr`'s `rrows` branch plus the + /// `ls.note`/`ls.close` band release never flushes RU row 0 on frame 2"). + /// r3 REFUTED that defect by measurement: on this fixture the filter + /// pipeline (deblock/CDEF/LR band workers over `ls.note` releases) + /// produces output byte-identical to the whole-frame path on every frame + /// -- this gate pins that refutation so a future band-accounting + /// regression on a 128-root-rect inter frame cannot land silently. + /// + /// Non-vacuity, twice over: the `PIPELINE_TAKEN` delta proves the second + /// decode really constructed the pipeline on both inter frames (frame 0 + /// is a key frame and the key-frame path runs whole-frame filters by + /// construction), and the `LR_PIPELINE_ROW0` delta proves the pipeline's + /// band release itself flushed RU row 0 -- a process-global counter + /// bumped by `pipe_run_lr`'s worker, so frame 0's whole-frame LR (which + /// runs on the gate's own thread and satisfies the thread-local + /// `LR_STRIPE0_HITS`) cannot fake it. Frames 0/1 are additionally asserted + /// byte-exact against BOTH the oracle aomdec and ffmpeg THROUGH the + /// pipeline. (Frame 2's own residual is the entropy lane's inter + /// rect-strip recon defect -- see lanes/av1lrflush.report.md r3 -- and + /// is identical on the serial and pipelined runs, so the pipeline + /// equality covers it without pinning its wrong samples.) + #[test] + fn a_444_sb128_witness_lr_pipeline_flushes_ru_row_0_pixel_exact() { + const NAME: &str = "a_444_sb128_witness_lr_pipeline_flushes_ru_row_0_pixel_exact"; + const FIXTURE_LEN: usize = 794; + const FIXTURE_FNV: u64 = 0xf5a7_27f4_3fa7_abc3; + const W: usize = 192; + const H: usize = 160; + const FRAMES: usize = 3; + /// The inter (pipelinable) frames of the witness; frame 0 is the key + /// frame and never constructs the pipeline. + const INTER_FRAMES: u64 = 2; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_sb128rect_lr_witness.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot \ + run, which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let serial = decode_stream(&stream) + .unwrap_or_else(|e| panic!("{NAME}: serial decode failed: {e}")); + assert_eq!(serial.len(), FRAMES, "{NAME}: frame count"); + + let pipe_before = crate::decode::pipeline_taken_frames(); + let row0_before = crate::decode::lr_pipeline_row0_flushes(); + let piped = { + let _bands = crate::par::override_filter_threads(4); + decode_stream(&stream) + .unwrap_or_else(|e| panic!("{NAME}: pipelined decode failed: {e}")) + }; + assert_eq!(piped.len(), FRAMES, "{NAME}: frame count"); + assert_eq!( + crate::decode::pipeline_taken_frames() - pipe_before, + INTER_FRAMES, + "{NAME}: the filter pipeline did not take both inter frames -- the \ + arm decoded serial and proves nothing (class \ + gate-blind-to-feature)" + ); + // f1 restores all three planes, f2 all but U -> 3 + 2 row-0 flushes. + // `LR_PIPELINE_ROW0` is process-global and bumped by the pipeline's + // own worker, so this delta cannot be satisfied by frame 0's + // whole-frame LR (which runs on this test's thread and never touches + // the counter). + assert_eq!( + crate::decode::lr_pipeline_row0_flushes() - row0_before, + 5, + "{NAME}: the pipeline never flushed RU row 0 ({} planes' worth \ + expected) -- the named defect class is present (class \ + lr-band-release)", + 5 + ); + + // The refutation itself: pipeline == serial, byte for byte, on every + // frame -- including frame 2, the 128-root-rect inter frame the + // r2 defect named. + for (i, (s, p)) in serial.iter().zip(piped.iter()).enumerate() { + for (pl, (a, b)) in + [(&s.y, &p.y), (&s.u, &p.u), (&s.v, &p.v)].into_iter().enumerate() + { + assert_eq!( + a, b, + "{NAME}: pipelined frame {i} plane {pl} differs from the \ + whole-frame path (class lr-band-release)" + ); + } + } + + // Frames 0/1 through the PIPELINE, byte-exact vs both oracles. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-lrflush-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in piped.iter().enumerate().take(2) { + let base = i * W * H * 3; + for ((plane, off), p) in + [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p} THROUGH THE PIPELINE: \ + {bad} samples differ (class lr-band-release)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + if have_ffmpeg() { + let refs = ffmpeg_decode_sequence_444(&stream, W, H, FRAMES); + for (i, (got, want)) in piped.iter().zip(refs.iter()).enumerate().take(2) { + for (p, (g, r)) in + [(&got.y, &want.y), (&got.u, &want.u), (&got.v, &want.v)] + .iter() + .enumerate() + { + let bad = g.iter().zip(r.iter()).filter(|(a, b)| a != b).count(); + assert_eq!( + bad, 0, + "{NAME}: ffmpeg frame {i} plane {p} THROUGH THE PIPELINE: \ + {bad} samples differ" + ); + } + } + } else { + eprintln!("SKIP {NAME} ffmpeg arm: no ffmpeg"); + } + } + + /// lane-av1-444interband: the DEFAULT-partition lossless 4:4:4 pin for + /// the inter 16x4/4x16 strip's chroma band stamping (the pair_chroma + /// 4:2:0-only gate, commit d5325172). Fixture pinned into `fixtures/`: + /// testsrc2 128x96 yuv444p, aomenc `--profile=1 --lossless=1 + /// --enable-palette=0 --enable-intrabc=0 --passes=1 --cpu-used=4 + /// --limit=6 --obu` (the av1llkf.report.md recipe), 6 frames; 32487 + /// bytes, sha256 + /// `1e6dd4e05038c8d51e2c8d29f8c337130c4fea0aed629415535e6e53af9a2c72`. + /// + /// This is the stream whose frame 1 desynced at the 16x4 inter strip + /// mi(2,8) -- its U bc=0 `txb_skip` read base 0 where aom reads base 1, + /// because the skipped strip (1,8)'s pair-form context stamp smeared + /// zero over `left[2][1]`. Two pins, both measured at d5325172: + /// end-to-end, every sample of every frame must match the oracle + /// aomdec exactly (the pre-fix tree refuses mid-frame-1, so the gate + /// is red by refusal, not by silent pass), and the 1:4 counter delta + /// must show the strips decoded WITHOUT the pair rewrite firing + /// (`horz4=20 vert4=28 chroma_pairs=0` -- chroma_pairs > 0 on this + /// pairless 4:4:4 stream is the defect reappearing, the + /// class `pair-rewrite-at-ss0`). + #[test] + fn a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact() { + const NAME: &str = "a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact"; + const FIXTURE_LEN: usize = 32487; + const FIXTURE_FNV: u64 = 0x5278_9f0f_ce2d_1e52; + const W: usize = 128; + const H: usize = 96; + const FRAMES: usize = 6; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_defaultp_inter_strip.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + let strips_before = decode::inter16_rect4_counters(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + let strips_after = decode::inter16_rect4_counters(); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + // The 1:4 strips must have fired, and the 4:2:0 pair rewrite must + // NOT have (there are no chroma pairs at ss 0/0). + let (horz4, vert4, chroma_pairs) = ( + strips_after.0 - strips_before.0, + strips_after.1 - strips_before.1, + strips_after.2 - strips_before.2, + ); + assert_eq!(horz4, 20, "{NAME}: HORZ_4 strip count moved"); + assert_eq!(vert4, 28, "{NAME}: VERT_4 strip count moved"); + assert_eq!( + chroma_pairs, 0, + "{NAME}: chroma pairs closed on a 4:4:4 stream \ + (class pair-rewrite-at-ss0)" + ); + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-ll444dp-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + for (i, f) in frames.iter().enumerate() { + let base = i * W * H * 3; + for ((plane, off), p) in [(&f.y, 0usize), (&f.u, W * H), (&f.v, 2 * W * H)] + .into_iter() + .zip(["y", "u", "v"]) + { + let want = &ref_raw[base + off..base + off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec frame {i} plane {p}: {bad} samples differ \ + (class pair-rewrite-at-ss0)" + ); + } + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + } + + /// lane-av1-leaf8oob: the OOB pin for [`decode_leaf8`]'s intrabc chroma + /// frame-copy buffers. The closure hardcoding the leaf's chroma + /// prediction at `4x4` (`vec![0u16; 4 * 4]`, `predict_with_filter` at + /// `4, 4`) carried the 4:2:0 halving of an 8x8 luma leaf into every + /// subsampling: at 4:4:4 the leaf's own chroma plane block is 8x8 + /// (`csz == 8`), so the 16-sample override reached + /// [`PlaneBuf::reconstruct`] as an 8x8 prediction and indexed + /// `prediction[16]` of a 16-sample buffer -- + /// `index out of bounds: the len is 16 but the index is 16` at the + /// reconstruct call, on every conformant stream of this shape (a panic, + /// never a refusal). Same signature class as lane-lossless128's + /// 128-axis lossless extent (`len 16, index 16` there too). + /// + /// `crates/ec-av1/fixtures/444_leaf8_oob.obu`, 3577 bytes, sha256 + /// `72bed2791d1ceba8be7926a052c7838c5d96d4f9d56d28fb69789a753d3593af` + /// (force-added past the `fixtures` gitignore like every sibling + /// fixture): the lane ticket's witness-hunt reproducer (s1a/s2e) -- a + /// 320x256, 3-frame, 8-bit 4:4:4 screen-content keyframe run whose + /// census pins 4 intrabc 8x8 leaves (the oracle's own MB dump opens on + /// unbroken inter-classified intra = intrabc blocks). The encoding + /// recipe is not independently recoverable in this lane; the bytes are + /// pinned by length + FNV-1a64 here and by the oracle raw fingerprint + /// below. + /// + /// WHAT THIS GATE DOES NOT CLAIM: sample-exactness -- and it pins no + /// pixel baseline. Measured against the oracle aomdec (`--rawvideo`; + /// comparison method ground-truthed by the green + /// `a_lossless_sb128_rect_intra_block_decodes_sample_exact` and + /// `a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` + /// witnesses on this same tree), this stream DIVERGES and its output is + /// not even self-deterministic: frame 0's first differing LUMA sample + /// is at (275,128), the (y, u, v) differing counts per frame are + /// (20811, 35467, 32320)/(20308, 39177, 35994)/(20131, 39588, 36601) of + /// 81920 samples per plane, and under `EC_AV1_PLANE_SENTINEL=1` the + /// chroma counts move (u f0 35467 -> 35630) while luma stays put. + /// Sentinel-vs-uninit output diffing localises that dependence to 458 + /// WHOLE 8x8 chroma blocks (frame 0: chroma x >= 96, y >= 64) reading + /// samples this decode never wrote -- ambient memory in those slots, + /// hence any pixel-exact assert here drifts run to run with the batch. + /// Both facts belong to ONE pre-existing defect this lane must not + /// chase (the ticket's fix touches only leaf8's chroma prediction + /// buffers, which cannot feed a luma sample, and the pre-fix run never + /// got past the panicked leaf): a decode desync on this stream around + /// frame-0 SB (3..4, 2), after which samples diverge from the oracle + /// and the misread layout leaves chroma blocks unreconstructed. + /// Disposition: `deferred(unblock: divergence lane -- EC trace pairing + /// against the oracle on this fixture)`. So this gate pins exactly what + /// its ticket owns: fixture identity, a decode that RUNS TO COMPLETION + /// where the old code died with `len 16, index 16`, and the arm counter. + /// + /// Assertions (all before/without any skip path): + /// 1. fixture bytes: exact length + FNV-1a64; + /// 2. `decode_stream` succeeds -- 3 frames, 320x256 (the pre-fix run + /// died here with the len-16/index-16 panic); + /// 3. non-vacuity: `leaf8_intrabc_hits` moves (measured 0 -> 4), so the + /// arm owning the fixed buffers really fired; + /// 4. the oracle aomdec still decodes the pinned bytes (raw size + + /// fingerprint), anchoring the deferred divergence comparison. + #[test] + fn an_intrabc_8x8_leaf_chroma_frame_copy_at_444_decodes_without_the_oob() { + const NAME: &str = "an_intrabc_8x8_leaf_chroma_frame_copy_at_444_decodes_without_the_oob"; + const FIXTURE_LEN: usize = 3577; + const FIXTURE_FNV: u64 = 0x86b9_3a51_fe16_353c; + const W: usize = 320; + const H: usize = 256; + const FRAMES: usize = 3; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/444_leaf8_oob.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + crate::decode::reset_leaf8_intrabc_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the pinned stream no longer decodes cleanly: {e}") + }); + assert!( + crate::decode::leaf8_intrabc_hits() > 0, + "{NAME}: gate is vacuous -- no intrabc 8x8 leaf was decoded, so the arm \ + owning the fixed chroma buffers never fired" + ); + assert_eq!(frames.len(), FRAMES, "{NAME}: frame count"); + for f in &frames { + assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions"); + } + + // The oracle aomdec, rawvideo out: FRAMES concatenated yuv444p frames. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-leaf8oob-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3 * FRAMES, "{NAME}: aomdec raw size"); + assert_eq!( + fnv1a64(&ref_raw), + 0x3821_0bcb_f572_973c, + "{NAME}: aomdec raw fingerprint moved" + ); + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + } /// lane-lossless128: a LOSSLESS key frame that codes a 128-axis /// (`BLOCK_64X128`) intra block -- the shape libaom's `read_tx_size` forces /// to `TX_4X4` on its very first line (`decodeframe.c:1183`), so every plane @@ -5628,6 +6584,122 @@ pub(crate) mod tests { ); } + /// lane-av1-ibc444rect: an unskipped intrabc `BLOCK_8X4`/`BLOCK_4X8` leaf + /// on a lossless 4:4:4 frame walks its coefficients as per-4x4 inter + /// `TX_4X4` units on every plane -- `read_tx_size`'s lossless first line + /// (`decodeframe.c:1203`) forces TX_4X4 before any tree, the frame's + /// `TxMode` is `ONLY_4X4` so no var-tx tree is read either, and + /// `av1_read_tx_type`'s qindex==0 early return (`decodemv.c:681`) drops + /// the tx_type symbol the lossy 4x4 inter sets carry -- NOT the single + /// `LumaRect8x4Inter`/`ChromaRect8x4` rect unit the non-lossless arm + /// reads, and not the lossy per-unit arm's tx_type read. + /// + /// The pinned fixture `ll444_ibc_rect.obu` (99614 bytes, provenance in + /// `lanes/av1ibc444rect.report.md`) is a lossless `--profile=1 --i444 + /// --enable-intrabc=1` key frame. r1 pinned the (then-known) leaf8 + /// `palette_window` panic as its alignment witness; with that blocker + /// fixed upstream (lane-av1leaf8oob) the frame decodes to completion and + /// this gate is the FULL-FRAME exact `aomdec` comparison its r1 doc + /// promised, flipped by lane-av1-ibcskip2 -- which also closed the + /// SKIPPED intrabc sub8 chroma cells the r1 measurement called out: a + /// skipped intrabc leaf's chroma is the bare frame copy at the DV + /// (libaom's `av1_build_inter_predictors_sb` runs regardless of `skip`), + /// never the intra-DC push that arm used to run. Fail-before, measured on + /// this tree with the DV-copy arm cut back to the intra push: 2794 U + + /// 2830 V samples differ across 180 distinct 4x4 cells, 175 of them + /// exactly this frame's skipped intrabc leaves, luma clean; with the arm, + /// 0 differing samples on every plane. + #[test] + fn a_lossless_444_intrabc_rect_leaf_walks_per_4x4_units() { + const NAME: &str = "a_lossless_444_intrabc_rect_leaf_walks_per_4x4_units"; + const FIXTURE_LEN: usize = 99614; + const FIXTURE_FNV: u64 = 0xa1b6_a84e_ac6a_656f; + const W: usize = 320; + const H: usize = 240; + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("fixtures/ll444_ibc_rect.obu"); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); + + let _guard = lock_gate_counters(); + crate::decode::reset_ibc444rect_hits(); + crate::decode::reset_skipped_intrabc_dv_copy_hits(); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: the fixture must decode to completion (the leaf8 \ + chroma buffers were fixed upstream): {e}") + }); + assert_eq!(frames.len(), 1, "{NAME}: shown frame count"); + let luma = crate::decode::intrabc_rect8_lossless_luma_hits(); + let chroma = crate::decode::intrabc_rect8_lossless_chroma_hits(); + assert_eq!( + (luma, chroma), + (339, 339), + "{NAME}: the per-4x4 walk must fire on the fixture's full unskipped \ + intrabc rect census (got luma {luma}, chroma {chroma}) -- zero \ + means the fixture no longer reaches the fixed body (class \ + gate-blind-to-feature), more means the entropy desynced and \ + garbage blocks read as intrabc rect leaves" + ); + let dv_skips = crate::decode::skipped_intrabc_dv_copy_hits(); + assert_eq!( + dv_skips, 150, + "{NAME}: the skipped-intrabc DV-copy chroma arm must fire on every \ + one of the fixture's 150 skipped intrabc leaves (got {dv_skips}) \ + -- zero means the arm is unreachable (class gate-blind-to-feature)" + ); + + // The oracle aomdec, rawvideo out: one concatenated yuv444p frame. + if aomdec_path().is_file() { + let dir = std::env::temp_dir().join(format!("ec-av1-ibcskip2-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).expect("scratch dir"); + let raw = dir.join("aomdec.raw"); + let out = Command::new(aomdec_path()) + .args(["--codec=av1", "--rawvideo", "-o"]) + .arg(&raw) + .arg(&obu) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("aomdec failed to run"); + assert!( + out.status.success(), + "{NAME}: the oracle aomdec refused the stream: {}", + String::from_utf8_lossy(&out.stderr) + ); + let ref_raw = std::fs::read(&raw).expect("aomdec rawvideo output"); + let _ = std::fs::remove_dir_all(&dir); + assert_eq!(ref_raw.len(), W * H * 3, "{NAME}: aomdec raw size"); + let f = &frames[0]; + for (plane, off, p) in + [(&f.y, 0usize, "Y"), (&f.u, W * H, "U"), (&f.v, 2 * W * H, "V")] + { + let want = &ref_raw[off..off + W * H]; + let bad = plane.iter().zip(want).filter(|&(&a, &b)| a as u8 != b).count(); + assert_eq!( + bad, 0, + "{NAME}: aomdec plane {p}: {bad} samples differ -- a \ + regression here reopens the skipped-intrabc sub8 chroma \ + predictor or the rect walk" + ); + } + } else { + eprintln!("SKIP {NAME} aomdec arm: no oracle aomdec at {}", aomdec_path().display()); + } + eprintln!( + "{NAME}: frame sample-exact vs oracle aomdec; {luma}+{chroma} rect \ + walks, {dv_skips} skipped-intrabc DV copies" + ); + } + /// lane-dkey: the palette-neighbour-band gate. A palette-Y block's size and /// colours used to stay standing in the mi-granular above/left bands after a /// sub-8x8 group was decoded next to it -- the sub-8x8 readers published @@ -8763,6 +9835,54 @@ pub(crate) mod tests { y4m } + /// lane-av1gwarp12 fixture: rotating + uniformly zooming mandelbrot as a + /// C420p12 y4m. Rotation composed with a UNIFORM scale is a similarity + /// transform -- exactly the family a 4-parameter ROTZOOM global model + /// expresses (the affine gate needs the anisotropic stretch to force + /// 6 parameters; this lane needs the model vanilla aomenc actually + /// searches, ROTZOOM). + fn y4m_12bit_rotzoom_gm_source(frames: usize) -> Vec { + const W: usize = 128; + const H: usize = 128; + let source = format!( + "mandelbrot=size=192x192:rate=25,rotate=a=0.12*t:c=black,\ + scale=w='ceil(192*(1+0.04*n)/2)*2':h='ceil(192*(1+0.04*n)/2)*2':eval=frame,\ + crop={W}:{H}" + ); + let duration = (frames as f64 / 25.0).to_string(); + let ff_args: Vec<&str> = vec![ + "-v", + "error", + "-f", + "lavfi", + "-i", + &source, + "-pix_fmt", + "yuv420p12le", + // y4m has no official 12-bit tag, same as the 10-bit gate. + "-strict", + "-1", + "-t", + &duration, + "-f", + "yuv4mpegpipe", + "-", + ]; + let out = Command::new("ffmpeg") + .args(&ff_args) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("ffmpeg failed to run"); + assert!( + out.status.success(), + "ffmpeg fixture: {}", + String::from_utf8_lossy(&out.stderr) + ); + out.stdout + } + /// The 12-bit coding recipe shared by the witness gates (cpu-used=0 so /// every search runs; explicit CDEF/restoration ON). Warp/global-motion /// are deliberately NOT spelled here: this aomenc honours the LAST @@ -9637,6 +10757,13 @@ pub(crate) mod tests { "reelb_arf_witness.obu", "palette_screen_witness.obu", "palette_screen_witness_10bit.obu", + // lane-av1wavefront: the 4:4:4 inter witness. The wavefront's + // replay-side chroma (`mv_to_q4(.., ss_x(fctx))` in the deferred + // builds, `exec_intra`'s CfL AC) used to read the worker's fresh + // `FrameCtx` 4:2:0 DEFAULT instead of the frame's subsampling -- + // invisible on the three 4:2:0 streams above, chroma-only loss on + // this one (f1 U 17504 / V 3, f2 U 25472 / V 1472 at PREFILT). + "444_sb128rect_lr_witness.obu", ] { let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) .join("fixtures") @@ -20403,6 +21530,99 @@ pub(crate) mod tests { } } + /// lane-av1gwarp12: the SINGLE-reference GLOBAL-warp witness at 12 bits + /// -- the open half lane-av112bitw recorded (engagement 0 on every prior + /// 12-bit content). The decode path is the same `warp_affine` with + /// `warp_round_0(12)` the local-warp witness proved, fed by + /// `global_warp_params(gm_ref.params)` at `decode_inter_block`'s + /// single-ref arm -- but composition had no stream: the travelling-box + /// source fits only TRANSLATION global models (excluded by + /// `is_global_mv_block`), and the rotating mandelbrot reached the global + /// models only on compound blocks. This recipe closes it: rotation + + /// uniform zoom (a similarity transform, ROTZOOM's exact family), the + /// compound tools off so a global model can only ride a single-reference + /// GLOBALMV block, and partitions pinned to 32 so the 8x8 leaf arm is + /// structurally out of the stream. Vanilla aomenc pins its gm search to + /// ROTZOOM (`global_motion_facade.c:24`), so every >TRANSLATION model a + /// real aomenc emits is ROTZOOM; AFFINE needs the widened side build + /// (`a_real_affine_global_motion_stream_decodes_pixel_exact`). + /// + /// Non-vacuous by construction: `rotzoom_gm_warp_hits()` hard-asserts a + /// 16x16+ block was really predicted through the global warp with a + /// ROTZOOM model, the zero `compound_warp_hits` delta keeps the + /// single-reference premise honest, and every plane of every frame + /// compares against ffmpeg. + #[test] + fn a_real_rotzoom_global_warp_12bit_stream_decodes_pixel_exact() { + const NAME: &str = "a_real_rotzoom_global_warp_12bit_stream_decodes_pixel_exact"; + let _gate_lock = lock_gate_counters(); + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + if !have_aomenc() { + eprintln!("SKIP {NAME}: no aomenc at {}", aomenc_path().display()); + return; + } + const W: usize = 128; + const H: usize = 128; + const FRAMES: usize = 16; + let y4m = y4m_12bit_rotzoom_gm_source(FRAMES); + let stream = encode_12bit( + &y4m, + FRAMES, + &[ + "--enable-global-motion=1", + "--enable-warped-motion=0", + "--enable-obmc=0", + "--enable-masked-comp=0", + "--enable-interintra-comp=0", + "--enable-onesided-comp=0", + "--enable-ref-frame-mvs=0", + "--min-partition-size=32", + "--max-partition-size=32", + ], + ); + assert_12bit_sequence_header(&stream, NAME); + let (before_rotzoom, before_affine, before_selected, before_compound) = ( + decode::rotzoom_gm_warp_hits(), + decode::affine_gm_hits(), + decode::warp_selected_hits(), + decode::compound_warp_hits(), + ); + let frames = decode_stream(&stream).unwrap_or_else(|e| { + panic!("{NAME}: decode_stream refused a real 12-bit global-warp stream: {e}") + }); + assert_eq!(frames.len(), FRAMES); + let (delta_rotzoom, delta_affine, delta_selected) = ( + decode::rotzoom_gm_warp_hits() - before_rotzoom, + decode::affine_gm_hits() - before_affine, + decode::warp_selected_hits() - before_selected, + ); + eprintln!( + "{NAME}: gm_warp_engagement rotzoom(single-ref global warp)={delta_rotzoom} \ + affine={delta_affine} selected_local_warp={delta_selected}" + ); + assert!( + delta_rotzoom > 0, + "{NAME}: decoded but no single-reference ROTZOOM global-warp block fired -- \ + the 12-bit single-ref global-warp path is unexercised and the pixel \ + compare would prove nothing" + ); + assert_eq!( + decode::compound_warp_hits() - before_compound, + 0, + "{NAME}: a compound warp block ran -- the single-reference premise is gone" + ); + let ffmpeg_frames = ffmpeg_decode_sequence_12bit(&stream, W, H, FRAMES); + for (i, (ours, reference)) in frames.iter().zip(&ffmpeg_frames).enumerate() { + assert_eq!(ours.y, reference.y, "{NAME} frame {i} luma vs ffmpeg"); + assert_eq!(ours.u, reference.u, "{NAME} frame {i} U vs ffmpeg"); + assert_eq!(ours.v, reference.v, "{NAME} frame {i} V vs ffmpeg"); + } + eprintln!("{NAME}: {FRAMES} frames pixel-exact vs ffmpeg, rotzoom_gm_warp_hits={delta_rotzoom}"); + } + /// lane-gmaffine r1: the two 8x8-LEAF motion gates. `decode_inter_block8` /// is a separate function from [`decode_inter_block`], and until this /// round it refused both `GLOBALMV` ("GLOBALMV (round 3)") and diff --git a/lanes/av1422.report.md b/lanes/av1422.report.md new file mode 100644 index 00000000..a87b86ba --- /dev/null +++ b/lanes/av1422.report.md @@ -0,0 +1,64 @@ +# lane-av1-422 — 4:2:2 chroma behind the header refusal + +## Outcome + +STOP with the refusal in place (`stream.rs` `subsampling_x != subsampling_y`, byte-identical to main). +Not pixel-exact yet: the bypassed-refusal probe still desyncs/pantes on the census fixture +(`aomenc --profile=2`, 256x144, 16 frames, testsrc2 422 y4m). Next wrong site named below. + +Landed on this branch: the finished, provably 420/444-invariant slice of the class fix. +`cargo check -p ec-av1 --all-targets`: **0 warnings**. + +## Fixture provenance + +- `ffmpeg -f lavfi -i testsrc2=256x144:rate=30 -frames:v 16 -pix_fmt yuv422p /tmp/t422.y4m` +- `aomenc --codec=av1 --profile=2 --obu -w 256 -h 144 --passes=1 --end-usage=q --cq-level=32 --cpu-used=3 --limit=16` +- Refusal string confirmed firing on main before any edit (decode_probe on the OBU). +- Oracle decode: `$HOME/.cache/aom-oracle/build/aomdec` (I422 raw). ffmpeg 8.1.2 available; aomdec used as primary pixel oracle. + +## Class (confirmed against the aom oracle source, `~/.cache/aom-oracle/src`) + +At ss (1,0) chroma width halves, height does not. Sites assume either a single shared +`ss` for both axes or an `ss==(0,0) ? 444 : 420` two-arm split, so 422 falls into the 420 arm. +Ground truth tables: `av1_ss_size_lookup` (common_data.c:17), `is_chroma_reference` +(av1_common_int.h:1454), `av1_get_max_uv_txsize` (blockd.h:1372). + +## Fixes landed (all keyed to reachability only at ss 1,0; 420/444 arms byte-identical) + +1. `decode_rect_split` chroma: square chroma rows (8,8)/(16,16)/(32,32) routed through the + square reader via the `chroma_tiled` arm (libaom: chroma of a 16x8/32x16/64x32 luma strip + is an 8x8/16x16/32x32 square). Includes 4:2:2 CFL strip support via the same path. +2. `decode_rect4_16_strip`: (8,8) arm + 422 strips are their own chroma reference + (`ss_size_lookup[16X4][1][0]` = BLOCK_8X4, per-strip, no 4:2:0 pair merge); also fixed a + `lmi.1 - 1` underflow the 422 has_chroma change exposed. +3. `decode_leaf_rect` chroma match: (16,16) and (8,32) rows. +4. `decode_block_rect4` chroma match: (16,8) and (8,4) rows; the portrait-leaf unreachable now + names the shape. +5. `cfl_ac_ss`: `cfl_luma_subsampling_422_lbd_c` branch (horizontal luma pairs, full height, + `(a+b) << 2`), before the 4:2:0 square/rect helpers. +6. `mv_to_q4` Y axis: 8 call sites passed `ss_x(fctx)` for the row component — now `ss_y` + (sub-8x8/inter chroma MC bilinear predict sites). +7. `has_chroma` for 1:4 strip pairs (decode_rect4_16 + inter twin): `i % 2 == 1 || ss_y == 0` + (is_chroma_reference's row-parity clause drops out when ss_y=0). +8. `CHROMA422_SQUARE_HITS` counter (decode.rs): incremented only when a square chroma + coefficient unit is read on a frame with ss (1,0); a restored `/2 chroma height` diverts + 4:2:2 squares onto the rect rows and the counter reads 0. Accessor `chroma422_square_hits()`. + No gate asserts it yet — the refusal still gates all 422 decode (deferred below). + +## Next wrong site (first blocker on the fixture, in parent's order) + +`decode_block` (~line 16621 on this tree): the `ss==(0,0) ? 444 : 420` tx-size arm. Its whole +chroma section walks `cn x cn` square `chroma_tx` units; at 4:2:2 a square luma block's chroma +is (side/2, side) — a RECT plane block (e.g. 8x16 for a 16x16 block) needing rect chroma sets +and a non-square unit walk. Same open class after it: `decode_inter_block`'s square-chroma +arms (~31922/33422), `film_grain.rs` `apply_grain` (hardcoded 420 subblock halving), and the +1:4 portrait-leaf question — `ss_size_lookup[BLOCK_8X32][1][0]` is BLOCK_INVALID yet the +aomenc fixture carries 8x32 leaves that aomdec accepts, so the upstream desync (decode_block / +inter chroma) is still producing phantom partitions; that ordering must be re-checked once the +square-chroma sites land. + +## Deferred + +- Refusal lift + witness gate (`chroma422_square_hits()` + pixel-exact vs aomdec/ffmpeg): + deferred(until decode_block/inter square-chroma class lands and the probe is pixel-exact). + Refusal stays; a lifted refusal with wrong pixels is a fail. diff --git a/lanes/av1422b.report.md b/lanes/av1422b.report.md new file mode 100644 index 00000000..f89980a2 --- /dev/null +++ b/lanes/av1422b.report.md @@ -0,0 +1,90 @@ +# lane-av1-422b — decode_block square-chroma walk (4:2:2, refusal still up) + +## Outcome + +STOP with the refusal in place (`stream.rs` `subsampling_x != subsampling_y`, +byte-identical to main — restored before the commit; no bypass committed). +Not pixel-exact yet: the bypassed-refusal probe desyncs INSIDE the first +16x16 `PARTITION_HORZ_A` of frame 0, before `decode_block`'s own chroma walk +is ever reached. Next wrong site named below. + +## Landed (all keyed to reachability only at ss (1,0); 420/444 arms unchanged) + +1. `decode_block` tx-size arm: new 4:2:2 branch — the uv plane block is + `(side/2, side)` (`ss_size_lookup[..][1][0]`), so + `av1_get_max_uv_txsize` is the SQUARE transform of the smaller dimension + capped at TX_32X32: 4→TX_4X4 (2x4 rounds to BLOCK_4X4), 8→TX_4X4, + 16→TX_8X8, 32→TX_16X16, 64→TX_32X32, 128→TX_32X32 (BLOCK_64X128 adjusts + TX_64X64 down). Units stay square; the unit GRID is `(side/2)/tx` wide by + `side/tx` tall — never square above a 4x4 luma block. +2. All three chroma walks in `decode_block` (skip arm, single-luma-TU arm, + multi-TU mu-chunk arm) generalized from square `cn x cn` to + `cn_cols x cn_rows`; each unit's luma anchor split per axis + (`chroma_tx << ss_x` wide, `chroma_tx << ss_y` tall): `around_mi_rect`, + `tu_reach_rect` (new helper; keeps the square mismatch counter semantics), + `record_mi_chroma(cu_mi, span_x, span_y, ...)`, units tuples widened to + carry both spans. +3. intrabc chroma prediction buffers sized `chroma_side x chroma_height`. +4. `TxbSet::Chroma8`/`Chroma16` `txb_skip` tables widened to six rows: + rows 3..6 are `av1_default_txb_skip_cdfs[q][TX_8X8/16X16][10..13]` + (`get_txb_ctx`'s `+10` rows; neutral 16384 in libaom — its encoder never + reaches them at 4:2:0/4:4:4, a 4:2:2 plane block larger than an 8x8/16x16 + transform does). Mirrors the existing `TXB_SKIP_CHROMA_4_BIG`/ + `CHROMA_32_BIG` assembly. Unused rows are never adapted, so 420/444 CDF + adaptation is unchanged. +5. `chroma422_square_hits()` made `pub` and printed by `examples/decode_probe.rs` + (like every other capability counter) for the witness gate later. +6. `EC_PART`/`EC_PART_VAL` traces behind `EC_TRACE` at the 64/32/16/8-level + partition symbol reads, byte-format-matched to the oracle aomdec's own + trace (same instrumented-oracle pairing the file already uses elsewhere). + +## Measurement (local bypass, NOT committed) + +Fixture: `ffmpeg testsrc2 256x144 yuv422p` → `aomenc --profile=2 --obu +-w 256 -h 144 --passes=1 --end-usage=q --cq-level=32 --cpu-used=3 --limit=16` +(sha256 d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129); +oracle `aomdec --rawvideo` (I422). + +- With the refusal bypassed, `decode_block`'s new arm runs and the pre-existing + `txb_skip[3]` panic is gone (the widening in 4 fixes it). +- Desync localization via `EC_TRACE=1` partition pairing: every partition + symbol pairs rng-for-rng with the oracle through the 64→32 split and the + FIRST 16x16 (`(0,0)` value 4 = HORZ_A, rng 57096→45060→49312 identical). + The oracle's NEXT 16-level read is `(0,4)` at tell 1079; ours is the second + quadrant at tell 700 — the divergence is inside HORZ_A's own pieces: + the two 8x8 leaves (`decode_leaf8`, whose chroma at 4:2:2 is 4x8 = two TX_4X4 + units per plane) and/or the 16x8 bottom strip (`decode_rect_split`'s + `chroma_tiled` (8,8) arm — its `EC_RECTCHROMA_GAP luma=16x8 tx=8x8 + chroma=8x8` diagnostic fires right before the panic point). + +## The 8x32/32x64 leaf note, resolved against the oracle source + +`av1_ss_size_lookup[..][1][0]` (common_data.c:17): 16X4→8X4 VALID, 32X8→16X8 +VALID, 64X16→32X16 VALID, but 4X16, 8X32, 16X64 (the TALL 1:4 shapes) are +BLOCK_INVALID at 4:2:2. libaom's ENCODER disables exactly those: +`partition_search.c` (`part4_search_allowed`) requires +`get_plane_block_size(subsize, ss_x, ss_y) != BLOCK_INVALID` before a HORZ_4/ +VERT_4 may be coded. So aomenc never writes tall 1:4 leaves at 4:2:2 — the +4x16 leaf our decoder tripped on (`EC_RECTCHROMA_GAP` then the closed-shape +unreachable in `decode_rect4_16_strip`) is a phantom partition produced by the +upstream desync above, not a missing portrait block size. Nothing invented; +the shape guard stays closed. + +## Next wrong site + +`decode_rect_split`'s `chroma_tiled` square-chroma arm for 16x8 strips and +`decode_leaf8`'s 4x8 chroma (first HORZ_A pieces) — re-check those against +the oracle's `EC_COEFF` pairing before re-touching `decode_block`'s walk. + +## Gates + +- `a_real_aomenc_128x128_none_inter_blocks_coded_chroma_per_mu_chunk_decodes_ + pixel_exact` (420): PASS. +- `a_non_420_subsampled_sequence_header_is_refused_by_name` (422 refusal + + 420 control): PASS. +- 444 check: `aomenc --profile=1` testsrc2 256x144 through `decode_probe` + byte-compares IDENTICALLY at clean 5674d2c5 and with this diff (first diff + at char 50689 on both — pre-existing branch behavior against this quick + oracle recipe, not touched by this slice; the merged-main 444 gate + c3c67f17 is not on this branch yet). +- `cargo check -p ec-av1 --all-targets`: 0 warnings. diff --git a/lanes/av1422bigblock.report.md b/lanes/av1422bigblock.report.md new file mode 100644 index 00000000..1ab9055f --- /dev/null +++ b/lanes/av1422bigblock.report.md @@ -0,0 +1,187 @@ +# lane-av1-422bigblock — the two witnessed 4:2:2 big-block defects + +Branch `lane-av1-422bigblock`, HEAD `213c1eb0` (contains the block-half port). +Target dir `$HOME/.cache/cargo-target-av1422bigblock` throughout. No push. + +## Verdict + +Both witnessed defects are fixed and both witnesses are pixel-exact vs aomdec. +The panic the ticket predicted for defect 1 no longer reproduces at this HEAD — +the block-half port had already fixed the all-skip inter frame; re-verified, not +assumed. Defect 2 needed three fixes, two of them found below the historical +panic line. The 4:2:0/4:4:4 behavior is unchanged (targeted gates green, t422 +frame 0 byte-exact at all four stages). Defect 3 (Main's IRC addition, the +s2.obu crash) is fixed as a crash; s2's remaining divergence is a pre-existing +sub-8 chroma class, fingerprinted for its owning lane. Committed code still +refuses 4:2:2 at the sequence header; the `EC_AV1_ALLOW_422_PROBE` bypass was +applied and reverted per probe run and is **not** in the commit. + +## Fixtures (pinned, `git add -f`; `fixtures/` is gitignored) + +| fixture | bytes | sha256 | fnv1a64 | +|---|---|---|---| +| `422_allskip_2f.obu` | 62 | `ba4932c14f95971b5f25321b04abce80c9fdd5de4b1fe6fffcdad82aaea87ce1` | `0x7e4d69d3c728c55f` | +| `422_sb128_3f.obu` | 12543 | `0b851799d99cb4d141a7d042138a3999aad7e0fb24d69c670bca1d38c286dce9` | `0x5171e0aab8000da7` | + +Provenance: the witness hunt's artifacts under `~/.cache/av1422sb128wit/` +(`422_allskip_2f.obu` = `b422_wit2f.obu`, `422_sb128_3f.obu` = `b422b_3f.obu`; +oracle refs `b422_wit.ref.yuv`). NOTE: the ticket said `422_sb128_3f.obu` is +10175 bytes; the live file is 12543 bytes and its sha256 matches the ticket — +the byte count in the charter is stale, the hash is authoritative. + +Gate: `the_pinned_422_bigblock_witnesses_are_present_and_refuse_by_name` +(stream.rs) asserts both byte pins and the refusal-by-name contract. +`decode_stream` still refuses 4:2:2 unconditionally in committed code, so a +committed gate cannot decode these streams; the decode-completes + counters + +pixel-exact assertions were measured through the probe build and are +reproducible from the recipe below. The counters over the sb128 witness: +`chroma422_square: 32`; over s2: `chroma422_square: 68, chroma422_rect: 222, +chroma422_sub8: 24, chroma422_chunk: 40`, `part128 none=3`. + +## Reproduce (patch-run-restore, local only) + +``` +sed 's/if seq.subsampling_x != seq.subsampling_y {/if seq.subsampling_x != seq.subsampling_y \&\& std::env::var_os("EC_AV1_ALLOW_422_PROBE").is_none() {/' -i crates/ec-av1/src/stream.rs +CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1422bigblock cargo build -p ec-av1 --example decode_probe --features gate-counters +EC_AV1_ALLOW_422_PROBE=1 EC_PROBE_OUT=/tmp/ours.raw \ + $HOME/.cache/cargo-target-av1422bigblock/debug/examples/decode_probe crates/ec-av1/fixtures/422_sb128_3f.obu +$HOME/.cache/aom-oracle/build/aomdec --rawvideo -o /tmp/oracle.raw crates/ec-av1/fixtures/422_sb128_3f.obu +cmp /tmp/ours.raw /tmp/oracle.raw # identical +git checkout -- crates/ec-av1/src/stream.rs +``` + +## Defect 1 — all-skip 422 inter desync: NOT REPRODUCING at HEAD (fixed upstream) + +At `213c1eb0` the witness decodes clean: `OK: 2 frames decoded, 128x128`, no +panic, no phantom reads. Evidence: + +- Entropy: our `EC_TRACE_COEFF` pairs rng-for-rng with the instrumented + oracle's — frame 0 codes 20 coefficient units (one nonzero 32x32 luma unit + + 4 stacked-chroma per 32x32 quadrant), identical rng sequence on both sides; + frame 1 codes **zero** units on both sides (all-skip, as the oracle). +- Pixels: the shown frame is byte-identical to `aomdec --rawvideo`. + +The ticket's "~20 phantom units + reconstruct_mc_rect side=64 w=64 h=128 panic" +is the pre-blockhalf state; the per-axis plane-block model fixed both the +phantom reads and the geometry. No code change needed here. The full hunt +stream `b422_wit.obu` (6 frames) also decodes OK at HEAD. + +## Defect 2 — 128-root square-cut chroma chunking: three stacked causes + +The historical `range end 4128 > 4096` (decode.rs:34279) no longer reproduces; +at HEAD the same block panicked deeper, in `push_mc_rect_tx`'s stride-densify +(`range end index 32 out of range for slice of length 0`). The f2 128x128 +PARTITION_NONE non-skip inter block carries all three causes; the oracle codes +16 chroma units (8 per plane, 2 stacked TX_32X32 per 64x64 mu chunk). + +1. **Square-cut chunking** (`decode_inter_block`, both the inter-luma and the + intra-in-inter walk): `chunk_chroma = chroma_side * 64 / side` cut each + chunk's per-axis `(64>>ss_x) x (64>>ss_y)` chroma into a + `chroma_side`-square 64x64 — twice the units the oracle codes at 4:2:2. + Fixed per-axis (`chunk_cw/chunk_ch`, `units_w/units_h`), unit luma spans + `(32<> ss_x)/chroma_tx).max(1)` for the width axis + plus the added `cn_h = ((64 >> ss_y)/chroma_tx).max(1)` for the height + axis, per-axis chunk offsets `(64 >> ss)` and clamp strides `(16 >> ss)` — + at ss(0,0) the code reduces line-for-line to `349b3918`'s form, so the + merge with that chain is a semantic union. DISCLOSED 4:4:4 behavior change: + the parent's walk was provably broken at ss(0,0) (one unit per chunk instead + of four; the stale assert caught it) and this rewrite, like `349b3918`, + codes the four units — NOT byte-identical to parent at 4:4:4, by design, + and pinned by `349b3918`'s own witness on the merged tree (see the identity + section). DISCLOSED 4:2:0 identity: at ss(1,1) every new expression reduces + to the old constant (32, offsets 32, strides 8, one unit). + +Result: s2.obu decodes all 16 frames, no panic (`OK: 16 frames decoded, +256x144`). The crash the charter assigned is closed. **Deferred (named for its +owning lane):** s2's frame 0 diverges from aomdec (~45% of samples, maxabs +~180, Y first diff at sample 126) with an entropy desync: the oracle codes +1089 coefficient units in frame 0, ours 541, first divergence at unit 38 — a +plane-2 **TX_4X8** chroma unit at **mi(12,24)** (oracle `all_zero=0 +rng=48745`, ours `rng=41584`). Class: sub-8/odd-strip 4:2:2 chroma under the +128-rect intra path (the `ss_size_lookup` BLOCK_INVALID family), pre-existing +— the base tree panics at frame 0's assert and never produced pixels. At base +the stream could not be measured at all; the pre-fix re-run log is +`/tmp/sa422/re-run-av1422ctxgather.log`. Fingerprint: `/tmp/sa422/s2f0.obu`, +unit 38, mi(12,24), TX_4X8, plane 2. + +## 4:2:0/4:4:4 identity + t422 + +- `a_real_aomenc_10bit_inter_sequence_decodes_pixel_exact` — green. +- `a_real_aomenc_stream_with_two_tile_rows_decodes_through_decode_stream` + (live aomenc, 420, inter, tiles) — green. +- `a_lossless_sb128_rect_intra_block_decodes_sample_exact` — green. LABEL + CORRECTION (review finding 2): this stream is 4:2:0 (seq_profile 0 in the + fixture bytes), NOT 4:4:4 as this report first claimed; it is a 4:2:0 + lossless sb128 gate and proves nothing about 4:4:4. +- 4:4:4 evidence, done properly: `444_sb128rect_lr_witness.obu` (sha256 + `27825e14…`, the lane-av1-444sb witness, 192x160 profile-1, 3 frames) was + decoded on THIS tree (`OK: 3 frames decoded`) and its output is + BYTE-IDENTICAL to the parent commit's output on the same stream — measured + by stash-and-rebuild, all three frames — so the rewrite is proven + output-neutral on it. The stream itself still diverges from aomdec on this + ancestry, identically before and after the fix: this branch predates the + 444 chain's chroma-context fixes (`9e77c16b` ss-aware chroma-above skip, + `76f8c3fe`), the desync starts at frame-0 Y sample 128 (the first + 128-column superblock) and the first 128-rect block never fires downstream + of it, so `decode_block_128rect` codes no samples on this stream on this + ancestry. `349b3918`'s own gate + (`a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact`, + frames 0/1 byte-exact vs aomdec AND ffmpeg) is the merged-tree pin: at + ss(0,0) this lane's walk reduces verbatim to that reviewed form. +- `a_128_root_block_with_a_real_residual_decodes_exact_through_both_decoders` + and `a_128_root_compound_block_decodes_exact_through_both_decoders` (solo, + they pin the process-global superblock size) — green. +- t422 frame 0 (`/tmp/i422/t422_1f.obu`) byte-exact vs the instrumented oracle + at PREFILT, POSTDEBLOCK, POSTCDEF and FINAL on Y, U and V; t422 16-frame + stream decodes with the same frame count as the parent (15 shown of 16 frame + OBUs, unchanged at HEAD — the 16th is an `OBU_TILE_LIST` quirk, not a + regression). + +`cargo check -p ec-av1`: 0 warnings. Committed on the branch, no push. diff --git a/lanes/av1422blockhalf.report.md b/lanes/av1422blockhalf.report.md new file mode 100644 index 00000000..eed75c47 --- /dev/null +++ b/lanes/av1422blockhalf.report.md @@ -0,0 +1,133 @@ +# lane-av1-422blockhalf — `decode_inter_block`'s 4:2:2 chroma half ported to the +# per-axis plane-block model (per-axis pred buffers + real-subsampling masked +# compound blend), the `EC_RECTCHROMA_GAP` 16x8 / 8x32 chroma shapes coded as +# the (4, 8) unit tiling the Release oracle's OOB `max_txsize_rect_lookup[ +# BLOCK_INVALID]` byte produces, and `decode_inter_sub8_rect2`'s has_chroma +# gating moved from `i == 1` to the per-piece `is_chroma_reference` rule; +# frame 0 stays byte-exact at PREFILT/POSTDEB/POSTCDEF, all 16 frames now +# decode (the frame-11 `(4, 32)` refusal is gone), and the inter-frame +# divergence is REMEASURED and REATTRIBUTED to a partition-dispatch defect +# upstream of the chroma half (ours dispatches SPLIT4 where the oracle codes +# HORZ at mi(8,10)) — frame exactness NOT claimed for frames 1+ + +## Outcome + +1. `decode_inter_block`'s chroma PREDICTION buffers (compound and + single-ref arms, OBMC plan, interintra stride, skip pushes, su/sv Pred + strides, the `read_inter_rect_chroma`/`read_inter_chroma_lossless` pred + strides) are keyed to the PLANE BLOCK's own per-axis shape at ss (1, 0): + `(chroma_stride, chroma_buf_h) = (write_chroma_w, write_chroma_h)` + instead of the enclosing square `chroma_side`. The two masked-compound + blend sites now pass the plane's REAL subsampling shifts — the + stop-note's pre-port direct luma-resolution mask read is gone + (aom_dsp/blend-a64-mask.c's `(1, 0)` branch at 4:2:2). Every replaced + expression reduces to the parent values at 4:2:0/4:4:4 + (`chroma_stride == chroma_buf_h == chroma_side` there), byte-identical + by construction. +2. `read_inter_rect_chroma` now takes the per-axis stride correctly: its + assembled block grid is `stride x plane-height` (`assembled_h`), the + single-unit embed included — the old square `chroma_side * chroma_side` + allocation panicked (`range end index 20 out of range for slice of + length 16`) the moment the per-axis stride reached it. +3. `decode_rect_split`'s 4:2:2 BLOCK_INVALID chroma planes: the tall/wide + 1:2 and 1:4 strips (`8x16, 16x32, 32x64, 8x32, 16x64`, + `64x128` for + 128-SB streams) have NO chroma plane block + (`av1_ss_size_lookup[...][1][0] == BLOCK_INVALID`); the plane is still + coded, tiled into (4, 8) rect units — the Release oracle's + out-of-bounds `max_txsize_rect_lookup[BLOCK_INVALID]` byte is TX_4X8 + (lane-av1-422m's measurement), and `decode_token_recon_block` steps the + plane in that unit shape. Units read `TxbSet::ChromaRect8x4`/`SCAN_4X8` + with `around_mi_422_chroma` ctx, mode-indexed intra tx type (the + `< 32` square-up rule, pre-existing rect units unchanged at DctDct), + per-unit stamps + units replay. SKIP strips predict per (4, 8) unit as + well (`decode_token_recon_block`'s per-TU plane walk runs before the + skip guard) — the old single whole-plane zero push asked the intra + predictor for a 1:8 rect (`dc_rect_multiplier` panic, bw=8 bh=64). + `EC_RECTCHROMA_GAP` now prints only truly-unhandled shapes (it used to + misfire on every tiled square — the parent lane's `chroma=8x8` rows); + it prints ZERO times on the fixture now. `chroma422_chunk` = 344 on the + full fixture (new units provably fire). +4. `decode_inter_sub8_rect2`'s has_chroma gating: per-piece + `is_chroma_reference` — 4:4:4 every piece, 4:2:2 both horz pieces + (`!(bw & 1)`) / the odd-column vert piece (`mi_col & 1`), 4:2:0 keeps + `i == 1` verbatim. The inter pieces take a per-piece inline chroma arm + at 4:2:2 (U then V TX_4X4 at the floored cell, `around_mi_422_chroma` + ctx, inherited piece tx type; horz predicts whole-from-own mv, vert + predicts halves `build_inter_predictors_sub8x8`-style, left half from + the in-group left piece or the decoded grid neighbour when the group + starts on an odd column — filters unavailable on the grid, so an + outside neighbour borrows this piece's filters). The 4:2:0 group tail + (and the group DC stamp) are gated off at 4:2:2. +5. MEASURED (17-frame probe, per-OBU cut harness `/tmp/i422/cut_frames.py`, + comparator ours-padded-u8-cropped vs instrumented + `$HOME/.cache/aom-oracle/build` aomdec-cropped-u8; fixture `/tmp/t422.obu` + sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`): + - frame 0: byte-exact at PREFILT, POSTDEB and POSTCDEF on Y, U and V — + 0 diffs everywhere (FINAL not re-run this round; frame 0's final state + is bracketed by POSTCDEF on a key frame). + - all 16 frames decode, exit 0 — the parent lane's frame-11 refusal + (`a coded HORZ/VERT strip whose chroma transform has no rect + coefficient tables here`, the `luma=8x32 tx=8x8 chroma=4x32` GAP) is + gone. + - frames 1..15 still diverge (~24-36k Y, ~13-18k U/V per stage; ladder + in `/tmp/i422/ladder/`). **Frame exactness is NOT claimed.** +6. REATTRIBUTION (the round's real finding): the frames-1+ divergence is + NOT the chroma half. Strict stream-order EC_ISTEP pairing on the + frames-0-1 cut puts the first entropy divergence at index 167 — the + 8x8 group at mi(8,10): the ORACLE codes PARTITION_HORZ (pieces (8,10) + and (9,10) only, both intra with uv; oracle partition trace + `EC_PART mi_row=8 mi_col=10 bsize=3 ctx=0 value=1`) while OURS + dispatches decode_inter_sub8_split4 (EC_SUB8INTRA: `shape=4x4 sub=0 + has_chroma=false mi=8,10` ... four pieces, one extra uv_mode + consumption on the (9,11) odd piece). Same bits, different partition + outcome at the 8x8-leaf partition read (`partition_w8` ctx/value — + ours `ctx=2` at the (8,8) sibling). Every downstream diff in the + ladder is walk-shift noise from that point. This is a pre-existing + defect upstream of the named chroma surfaces, newly visible now that + the chroma shapes no longer refuse. + +## Decision + +- The header refusal STAYS unconditional in `stream.rs`; the bypass was + local-only, applied and reverted byte-identical (0 occurrences left; + `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name` + green after the revert). +- 4:2:0/4:4:4 untouched by construction (ss-keyed arms; the 4:2:0 sub8 + group tail and `i == 1` rule verbatim). +- `read_coeffs_rect` untouched; the 4:2:0 group-tail SKIP arm untouched. + +## Deferred + +(a) The (8,10)-class partition-dispatch defect (ours SPLIT4 vs oracle + HORZ) — the frames-1+ exactness blocker. Unblock: capture the 8x8 + leaf partition context both sides (ours `EC_TRACE_PART`, oracle's + shipped partition probe) and compare `partition_ctx_mi` vs libaom's + `partition_context` gather at that leaf; the chroma half itself is + now shape-honest and rides on the fix. +(b) 4-wide strips (4x16, 4x8 luma) at 4:2:2: `decode_rect_split` still + refuses `(2, 16)` chroma by name (no pair-anchor machinery there; the + 4:2:0 `(4, 16)` single-unit arm would be wrong at ss (1, 0)). + Unblock: the split4-style floored-pair anchor ported to the 1-mi-wide + strip callers, then the OOB (4, 8) tiling. +(c) 128-root 4:2:2 chroma chunking (`decode_inter_block`'s side > 64 + mu-chunk chroma) still passes the square `chroma_side` geometry — + unreachable on <=64-superblock streams (this fixture is 64-SB); + flagged for whoever lands 4:2:2 128-SB support. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422blockhalf`): + 0 warnings, 0 errors. +- Refusal gate green post-revert (1 passed). +- Probe: `OK: 16 frames decoded`; 0 `EC_RECTCHROMA_GAP` prints; + `chroma422_chunk=344`, `chroma422_square=197` on the full fixture. +- Ladder: frame 0 = 0 diffs at PREFILT/POSTDEB/POSTCDEF (Y=U=V); frames + 1..15 divergent (see 5/6 — attributed, not claimed). + +## State + +- Commit on lane-av1-422blockhalf (no push): the per-axis decode_inter_block + chroma half, the read_inter_rect_chroma stride fix, the decode_rect_split + (4, 8) chroma tiling incl. per-unit skip prediction, the rect2 per-piece + has_chroma gating, and this report. +- Ladder dumps under `/tmp/i422/ladder/` (scratch, not committed). diff --git a/lanes/av1422ctxgather.report.md b/lanes/av1422ctxgather.report.md new file mode 100644 index 00000000..773a30e1 --- /dev/null +++ b/lanes/av1422ctxgather.report.md @@ -0,0 +1,94 @@ +# lane-av1422ctxgather — the 4:2:2 strip chroma context gather and the +# clobbering pair write fixed at source; 4:2:0/4:4:4 byte-identical; the +# 4:2:2 header refusal STAYS + +## Outcome + +1. **The clobber (the anchor's root cause).** `decode_inter_block`'s + `pair_chroma` write hardcoded the 4:2:0 pair span `(pw, ph) = (16, 8)` + for every horz strip. At 4:2:2 (ss 1,0) a horz 16x4 strip is its OWN + chroma reference (`is_chroma_reference`'s `!(subsampling_y)` row + clause) — no pair merge ever happened, `pair_mi` is the strip itself, + and the two-row span overwrote one row it does not own. Measured + (t422 frame 1, EC422WATCH probe, since removed): the inter strip at + mi(8,4) zeroed `left[9][1]` under the mi(8,2) 8x8 leaf's level 5 + before the mi(9,4) strip's own U `all_zero` read it one ctx row low + (ours base 0 + 7, oracle base 1 + 7 — the parent lane's anchor + facts, reproduced). The span is now `(16, 4)` at ss (1,0); 4:2:0 + keeps `(16, 8)`; VERT keeps `(8, 16)` in every format. +2. **The inter strip's chroma gather.** `decode_inter_block`'s + `around_c` gathered the horz strip's context with + `around_mi_rect(pair_mi, 16, 8)` — the pair span AND the plain + per-mi above sampling (one chroma 4-px column spans two luma mi + columns at ss_x 1, so every column's whole-unit dc sign is counted + twice). At ss (1,0) it now reads `(16, 4)` through + [`Neighbours::around_mi_422_chroma`]; the 4:2:0 pair merge keeps the + (16, 8) span and the per-mi gather, as does 4:4:4. The same reroute + catches 4:2:2 VERT (pair span (8, 16)): its above side covers one + chroma column per two luma mi columns — the identical double-count — + so it reads through [`around_mi_422_chroma`] too, and is + oracle-correct there. Only the ss gate's excluded shapes (4:2:0 + VERT/4:4:4 VERT) keep the plain gather. +3. **The intra strip's chroma gather** (the charter's named site, + `decode_rect4_16_strip` ~15331): the else arm's + `around_mi_rect(pair_mi, pw, ph)` is routed through + [`around_mi_422_chroma`] at ss (1,0) — the same measured rule as the + other chroma gathers (10754/13774/15297/17862/18061). Shapes at other + subsamplings keep the original gather. +4. **Class sweep found one more instance, fixed:** + `read_inter_rect_chroma`'s chunked units (`multi` arm) gathered each + unit with `around_mi_rect(cu_mi, span_x, span_y)`; at ss (1,0) the + unit's above span covers `2*uw` luma mi columns and the per-mi gather + double-counts every column. Now routed through [`around_mi_422_chroma`] + at ss (1,0) only; the `else` (4:2:0/4:4:4) arm is the original + expression verbatim. +5. Untouched, byte-identical: the intra strip's own chroma write (its + pair is already `(16, 4)` at 4:2:2), `decode_rect4_16_intrabc`'s pair + write (intrabc counters are 0 on the pinned fixture and intrabc has + its own inventory discipline), the 4:2:0 group-tail chroma SKIP arm + (reserved for its owning lane), `stream.rs`, and the 4:2:2 header + refusal. The `EC_AV1_ALLOW_422_PROBE` bypass was applied to stream.rs + for the probe runs and reverted; `git status` names only decode.rs. + +## Verification + +- **The anchor, before/after (probed, EC422WATCH + EC_DCDUMP):** before, + `inter_pair` wrote `left[9][1] 5 -> 0` and the mi(9,4) strip's U gather + read `left=[None/0]` -> base 0; after, nothing writes row 9 between the + leaf's stamp and the gather, the gather reads `left=[Some(true)/5]` -> + base 1 = the oracle's row. First U divergence at the parent's anchor + (pre-all_zero rng 49672) is gone. +- **t422 inter ladder re-measured** (decode_probe + EC_AV1_{PREFILT, + POSTDEBLOCK,POSTCDEF}_DUMP vs the parent's oracle dumps, + /tmp/i422/ladder/oracle, our dumps /tmp/i422/av1422ctxgather/final): + frame 0 is **exact at all three stages (0 diffs per plane per frame)**. + Frame 1 pre-fix Y=23948 U=13513 V=13544 -> post-fix Y=1739 U=4346 + V=4974 (first Y diff moved from the anchor's ctx row to y=96 x=240; + first chroma diffs at chroma (0,44)/(2,44)). Frames 2-15 improved on + every plane (no frame regressed) but remain nonzero. +- **Frame exactness claimed ONLY where measured 0:** frame 0 at all + stages. Frames 1+ are NOT claimed. The residual is downstream of this + lane's class: frame 1's first Y diff sits at (96, 240) (mi(24,60)) and + the first U/V diffs at chroma (2,44)/(0,44) — neither is a strip + gather nor a pair write; attributing them is the next lane's first + diff. +- **4:2:0/4:4:4 identity:** all four edits are gated + `ss_x(fctx) == 1 && ss_y(fctx) == 0` with the non-4:2:2 arm the + original expression verbatim; the lossless 4:4:4 stream gates stay + green — `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`, + `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact`: + 3 passed, 0 failed. +- `cargo check -p ec-av1` (target dir `~/.cache/cargo-target-av1422ctxgather`): + **0 warnings, 0 errors**. +- Probes: the temporary EC422WATCH write-watch was removed before the + final build and commit; the final ladder was re-run on the clean tree + and matches the probed run exactly (the watch was eprintln-only). + +## State + +- Commit on lane-av1422ctxgather (no push): the four gated edits in + `crates/ec-av1/src/decode.rs` + this report. +- Next stop named for the owning lane: the frame-1 Y diff at mi(24,60) + and the chroma diffs at chroma (0,44)/(2,44) — re-run the stage ladder + and the EC_ISTEP/EC_COEFF pairing from there. diff --git a/lanes/av1422d.report.md b/lanes/av1422d.report.md new file mode 100644 index 00000000..162bca15 --- /dev/null +++ b/lanes/av1422d.report.md @@ -0,0 +1,92 @@ +# lane-av1-422d — 8x8 leaf chroma unit ported at ss (1,0); refusal stays + +## Outcome + +STOP with the 4:2:2 header refusal in place. `decode_leaf8`'s chroma walk now +ports the 4:2:2 leaf unit (ONE 4x8 rect transform unit per plane, +`TxbSet::ChromaRect8x4` + `SCAN_4X8`, one txb_skip + one scan), and every leaf8 +chroma read on the measured fixture is rng-for-rng EXACT against the oracle. +The stream still desyncs LATER, at `decode_leaf_rect`'s chroma arm (next +section), so the refusal is retained byte-identical and the probe bypass was +reverted before commit. + +## Change (all inside decode_leaf8's own chroma scope) + +- `decode_leaf8` (decode.rs): `chroma_422 = ss_x == 1 && ss_y == 0`; all three + arms (skip, single-8x8-unit, TX4) branch to `leaf8_chroma422_unit` for the + rect unit. The 4:2:0 `(4, TxbSet::Chroma4, scans.1)` selection and the 4:4:4 + arm are untouched. The chroma unit does NOT follow the luma var-tx split + (`uv_txsize` is `av1_get_max_uv_txsize` of the block, still one 4x8 unit + when luma resolves TX_4X4). The intrabc DV copy covers the whole plane block + (4x8) at ss (1,0). +- `leaf8_chroma422_unit` (new, next to `decode_leaf8`): mirrors + `sub8_leaf_chroma444`'s rect arm at the leaf's halved position — entropy + context from the leaf's own 8x8 luma-span above/left state (no `+3`, the + unit covers the plane block exactly), CFL source the leaf's whole 8x8 luma + block, mode-derived default `tx_type` unless `INTRABC_CHROMA_TX` is armed, + prediction override (intrabc DV over palette) set inside, skip predicts with + `ZERO_RESIDUAL`. +- UV palette map extent (decode.rs:15808, leaf8's mode-info reader): the map + is decoded over `(side >> ss_x, side >> ss_y)` = 4x8 via + `decode_color_index_map_wh`, not the square call's `(side >> ss_x)`-squared + 4x4 (class: plane-block extent squared a rect). At 4:2:0/4:4:4 the arguments + evaluate identically; only ss (1,0) changes. Found live: the 16-entry map + fed a 16-sample prediction override into the first 32-sample rect unit and + panicked `reconstruct_rect` (`index out of bounds: the len is 16 but the + index is 16`). + +## Measurement + +Fixture `/tmp/t422.obu`, sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` (reused +from av1422b/c by hash). Oracle `$HOME/.cache/aom-oracle/build/aomdec` +`EC_TRACE=1 EC_TRACE_MODE_STEP=1 EC_TRACE_COEFF=1`; ours `decode_probe` (debug, +private target dir) same env plus `EC_AV1_ALLOW_422_PROBE=1` (LOCAL bypass, +reverted). + +Coefficient-unit pairing (all_zero entry rng -> post rng), first HORZ_A 16x16 +of frame 0: + +- leaf (0,0): 4x luma TX_4X4 ✓, U `tx_size=5` entry 46416 -> 35360 ✓, V + entry 34824 -> 41920 ✓ (both my rect reads). +- leaf (0,2): luma TX_8X8 ✓ (post 45770 = oracle), U entry 37668 -> 33728 ✓, + V entry 60936 -> 58556 ✓. +- 16x8 strip: luma `tx_size=8` entry 59680 -> 58977 ✓. + +All four leaf8 chroma rect reads match the oracle rng-for-rng through their +full coefficient bodies (each next unit's entry rng proves the previous +body's bit consumption). + +## First remaining divergence (named next site) + +`decode_leaf_rect`'s chroma arm, decode.rs:13060-13067. For a 16x8/8x16 rect +leaf at ss (1,0) the chroma plane block is 8x8 — SQUARE +(`TxbSet::Chroma8` + `default_scan(8)` through `read_plane`, the +`chroma_tiled` (8,8) shape) — but the code picks `TxbSet::ChromaRect8x4` + +`SCAN_8X4`/`SCAN_4X8` keyed on `ss_x == 0`. Measured: the HORZ_A's 16x8 strip +(mi_row=2, mi_col=0) — oracle U/V units are `tx_size=1` (TX_8X8 class, 64- +position eob alphabet, ctx=8); ours enters the U unit's txb_skip at the same +rng 38672 and coincidentally matches that one symbol (the offset-7 row shares +`txb_skip_chroma_8`), then reads eob off the 32-position chroma-rect alphabet +(eob=27 vs oracle eob=32) and desyncs. Everything after shifts. + +## Second site behind it + +`decode_rect_split`'s chroma shape table (decode.rs:10114-10133) has no 4:2:2 +rows: a 16x64 luma strip's `(8, 64)` plane block fires +`EC_RECTCHROMA_GAP luma=16x64 tx=16x32 chroma=8x64` (decode stops at mi_row=16 +once the leaf_rect site is passed). Same class likely holds for other +unhalved-height plane blocks in that table. + +## State + +- Refusal `a chroma format of 4:2:2 (subsampling_x != subsampling_y)...` + byte-identical (bypass reverted; `git diff` shows only decode.rs). +- `decode_leaf_split4`, `sub8_leaf_chroma444`, `reconstruct_mc_rect`, the + resize header reader, decode.rs 34390-34440: untouched. +- 420 gate green: + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_pixel_exact` + + its 10-bit twin — 6/6 pixel-exact matches each, 0 refusals (the gate + exercises the skip and TX4 arms this lane restructured). +- `cargo check -p ec-av1`: 0 warnings. +- No push. diff --git a/lanes/av1422e.report.md b/lanes/av1422e.report.md new file mode 100644 index 00000000..b1565ac7 --- /dev/null +++ b/lanes/av1422e.report.md @@ -0,0 +1,84 @@ +# lane-av1-422e — leaf_rect chroma is an 8x8 square unit at ss (1,0); refusal stays + +## Outcome + +STOP with the 4:2:2 header refusal in place, byte-identical. `decode_leaf_rect`'s +chroma arm now keys on ss: at ss (1,0) a 16x8/8x16 luma leaf's chroma plane +block is an 8x8 SQUARE (`TxbSet::Chroma8` + `default_scan(8)`), and every +leaf_rect chroma read on the measured fixture is rng-for-rng EXACT against the +oracle — the av1422d desync at the HORZ_A 16x8 strip (mi(2,0)) is gone, along +with everything up to the first 16x16 square block. The stream now desyncs at +that square block's chroma (next section), so the refusal is retained and the +probe bypass was reverted before commit (`git diff` touches only decode.rs). + +## Change (decode.rs only) + +- `decode_leaf_rect` chroma arm (was decode.rs:13060-13067): the + `ss_x == 0`-keyed selection replaced by a three-way arm — `chroma_422` + (`ss_x == 1 && ss_y == 0`) picks `TxbSet::Chroma8` + `default_scan(8)` for + the 8x8 square plane block (luma scan unchanged: SCAN_16X8/SCAN_8X16); + 4:2:0 keeps `TxbSet::ChromaRect8x4` + SCAN_8X4/SCAN_4X8; 4:4:4 keeps + `TxbSet::ChromaRect16x8` + the full SCAN_16X8/SCAN_8X16. Doc comment above + `decode_leaf_rect` updated to name all three subsamplings. +- Untouched: `decode_leaf8`, `leaf8_chroma422_unit`, `sub8_leaf_chroma444`, + `decode_leaf_split4`, `reconstruct_mc_rect`, the resize header reader, + `decode.rs` 34390-34440. + +## Measurement + +Fixture `/tmp/t422.obu`, sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` (reused by +hash). Oracle `$HOME/.cache/aom-oracle/build/aomdec` +`EC_TRACE=1 EC_TRACE_MODE_STEP=1 EC_TRACE_COEFF=1`; ours `decode_probe` (debug, +private target dir) same env plus a LOCAL `EC_AV1_ALLOW_422_PROBE` bypass +env-gated at the stream.rs refusal — reverted before commit, and the refusal +was re-proven to fire without the env. + +The first leaf_rect 16x8 strips that desynced in av1422d now pair rng-for-rng +through their full luma + U + V coefficient bodies (all EC_COEFF_STEP rngs +match: all_zero, tx_type, eob, base_eob, br, sign, post_golomb), and the ISTEP +stream stays identical well past them. With that site passed, decode now +reaches the first 16x16 square intra block, mi(4,4). + +## First remaining divergence (named next site, with oracle evidence) + +The SQUARE-block path's 4:2:2 chroma model, decode.rs:16704-16721 +(lane-av1-422b's arm inside the `(luma_set, chroma_set, luma_tx, chroma_tx, +scans)` selection): it models `av1_get_max_uv_txsize` of the (side/2, side) +plane block as "the SQUARE transform of the smaller dimension" and walks a grid +of square units (side 16 -> two 8x8 units). The oracle disagrees — aom reads +`max_txsize_rect_lookup` of the PLANE block, a RECT that fills it exactly: + +- ours, mi(4,4) side=16: all_zero `side=8 ctx=5` at rng 44044 -> eob read on + the 8x8-class alphabet (eob=48) — the first of two square units. +- oracle, same block: `all_zero plane=1 bc=0 br=0 ctx=9 txs=2` at rng 36040 — + ONE unit, TX_8X16 class (16x16 entropy class), whole 8x16 plane block. + +Correct model per aom (`av1_get_max_uv_txsize` = `max_txsize_rect_lookup` +[plane_bsize], then `av1_get_adjusted_tx_size`): side 8 -> TX_4X8 +(ChromaRect8x4 + SCAN_4X8, one unit — the shape av1422d proved at leaf8); +side 16 -> TX_8X16 (ChromaRect16x8 + SCAN_8X16, one unit); side 32 -> TX_16X32 +(ChromaRect32x16 + SCAN_16X32, one unit); side 64 -> TX_32X64 adjusts to +TX_32X32, i.e. two stacked 32x32 units, which the current square walk already +produces. The fix spans the square path's three chroma walks (skip 17019-17067, +single-unit 17120-17260, chunked 17273-17553) since they thread `chroma_tx` as +both unit dims; it needs per-axis unit dims keyed to ss (1,0). That is its own +lane round — not started, no rows invented, no BLOCK_INVALID portrait shape. + +The av1422d second site (decode_rect_split's chroma table missing (8,64)) did +NOT fire this round: the square-path site above blocks first. The +decode_rect_split 16x8-strip reads (chroma 8x8 via the chroma_tiled arm) pass +the oracle rng-for-rng; the repeated `EC_RECTCHROMA_GAP luma=16x8 tx=8x8 +chroma=8x8` prints are the pre-existing diagnostic (chroma.is_none() before the +chroma_tiled fallback), not refusals. + +## State + +- Refusal `a chroma format of 4:2:2 (subsampling_x != subsampling_y)...` + byte-identical (bypass reverted; probe refuses without the env). +- `cargo check -p ec-av1` (private target dir): 0 warnings. +- 420 gates green: `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_ + tx_split_decodes_pixel_exact` + its 10-bit twin — 2/2 pass (exercises the + skip and TX4 arms restructured in av1422d; the new 422 arm is unreachable at + 420 by its ss condition). +- No push. Traces left at /tmp/ours422.txt and /tmp/oracle422.txt. diff --git a/lanes/av1422f.report.md b/lanes/av1422f.report.md new file mode 100644 index 00000000..8653cc48 --- /dev/null +++ b/lanes/av1422f.report.md @@ -0,0 +1,115 @@ +# lane-av1-422f — square-block chroma is the plane block's own rect unit; refusal stays + +## Outcome + +STOP with the 4:2:2 header refusal in place, byte-identical (probe refuses +without the env; the local bypass was reverted before commit). The +square-block path (decode.rs's `(luma_set, chroma_set, luma_tx, chroma_tx, +scans)` selection, formerly 16704-16721) now models `av1_get_max_uv_txsize` +as `av1_get_adjusted_tx_size(max_txsize_rect_lookup[plane_bsize])` — the RECT +that fills the (side/2, side) plane block — and all three chroma walks read +one `(chroma_tx, chroma_tx_h)` unit per grid cell, keyed on ss (1,0). The +av1422e first miss (mi(4,4) side 16: ours two 8x8 units, oracle one TX_8X16) +is gone, and the decode now aligns with the oracle unit-for-unit through 117 +coefficient units — every 16x16 block's U/V TX_8X16 pair, every 8x8 leaf's +U/V TX_4X8 pair, every 16x8 strip's 8x8-square chroma — with equal entry rngs +wherever ours prints them. The stream is not pixel-exact: the next divergence +is the sub-8x8 4x4-leaf chroma at 4:2:2 (TX_4X4 units, one per even-column +leaf), which lives in `decode_leaf_split4`/`decode_leaf8` — other lanes — so +the refusal is retained. + +## Change (decode.rs + decode_probe.rs only) + +- Selection arm at ss (1,0): per-axis unit dims `chroma_tx` (width) x + `chroma_tx_h` (height) — 4 -> (4,4), 8 -> (4,8), 16 -> (8,16), 32 -> + (16,32), 64/128 -> (32,32) — with the unit's TxbSet/scan: + `ChromaRect8x4`+`SCAN_4X8`, `ChromaRect16x8`+`SCAN_8X16`, + `ChromaRect32x16`+`SCAN_16X32`, `Chroma32`+scan32. The destructure gains + `chroma_tx_h`; 4:2:0/4:4:4/lossless arms carry `chroma_tx` twice, so their + walks are untouched. +- New `read_rect_chroma_unit`: one rect chroma unit via the + `read_coeffs_rect` route (the `chroma_tiled` arm's and + `leaf8_chroma422_unit`'s proven shape): `txb_skip_ctx` = above+left in the + offset-7 rows (the unit covers the plane block exactly, so no +3), the + mode-derived default `tx_type` unless `INTRABC_CHROMA_TX` is armed, the + `side >= 32` DCT_DCT clamp, `dequant_and_inverse_typed_wh` + + `push_intra_rect`. Bumps the new `CHROMA422_RECT_HITS` witness counter + (keyed ss (1,0), unit w != h). +- New `push_intra_unit`: `push_intra` when square, `push_intra_rect` when + rect — used by the skip walk. +- All three chroma walks (skip, single-TU, chunked) key on the per-axis + unit dims: `cn_rows = chroma_height / chroma_tx_h`, `luma_span_y = + chroma_tx_h << ss_y`, per-axis cu positions and palette windows. Below + side 64 a 4:2:2 frame's grid is 1x1 and the one unit is the whole plane + block. The chunked walk's edge clip computes `max_units_h` per axis at + ss (1,0) (the shared halved formula assumes a subsampled height and would + clip units libaom codes); the shared rows stay for 4:2:0/4:4:4. +- New `Neighbours::around_mi_422_chroma` for the square path's chroma context + reads: libaom `get_txb_ctx_general` sums its dc-sign votes over + `txb_w_unit` CHROMA 4-px cells, and at ss_x 1 one chroma cell spans TWO + luma mi columns — the per-luma-mi sum double-counts the above votes and + flips `dc_sign_ctx` when the above and left votes have opposite signs + (measured at mi(4,4) plane 1: ours read `dc_sign_cdf[1]`, the oracle row + 0). Sampling every second above cell counts each chroma column once, which + is exactly libaom's sum; the level booleans are ORs over duplicated cells + and cannot change. Used by the single-TU walk's rect branch and both + multi-unit loops at ss (1,0) only; 4:2:0/4:4:4 keep `around_mi_rect`. +- `examples/decode_probe.rs`: prints `chroma422_rect`. + +Untouched: `decode_leaf8`, `decode_leaf_split4`, `decode_rect4_16_strip`, +`decode_block_128rect`, `decode_rect_split`, the resize header reader, the +frame-9 filter path, and refusal_inventory.rs (the refusal string is +byte-identical; the gate stays green). + +## Measurement + +Fixture `/tmp/t422.obu`, sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` (reused by +hash, 256x144, 22 frames). Oracle `$HOME/.cache/aom-oracle/build/aomdec` +`EC_TRACE=1 EC_TRACE_MODE_STEP=1 EC_TRACE_COEFF=1`; ours `decode_probe` +(debug, `gate-counters`, private target dir) with a LOCAL +`EC_AV1_ALLOW_422_PROBE` env-gated bypass at the stream.rs refusal — +reverted before commit, and the refusal re-proven to fire without the env. + +- Unit-level: 117 consecutive units with equal ENTRY rngs (rect reads print + `entry=`; the first entry mismatch is unit #117), identical unit order and + shapes: 16x16 blocks read ONE TX_8X16 per plane (mi(4,4): U entry 44042, + all_zero ctx row 2 = libaom ctx 9, post-rng 36040, eob 3 — the av1422e + first miss, now exact), 8x8 leaves ONE TX_4X8 per plane, 16x8 strips the + 8x8 square, 8x16 strips 4x16. +- Symbol-level: the deduplicated rng trajectories match value-for-value + through the mi(8,0) leaf's V (ours state 1100), modulo four + oracle-instrumentation print gaps (sub-reads libaom's patched print does + not emit; the trajectories re-align around each). +- Counters: `chroma422_rect: 28`, `chroma422_square: 23` — 28 rect chroma + units ran on the 4:2:2 frame (a 4:2:0/4:4:4 frame cannot increment it; the + counter reads 0 under the old square model). + +## First remaining divergence (named next site, with oracle evidence) + +At the 8x8 sub8 group whose leaves sit at mi(8,10)/(8,11)/(9,10)/(9,11): the +oracle's 4x4 LEAVES at even mi columns are chroma references at 4:2:2 and +each codes a TX_4X4 chroma unit (mi(9,10) plane 1, 38 steps, after only its +own luma) — `ss_size_lookup[BLOCK_4X4][1][0]` is BLOCK_4X4, so the 2x4 plane +rounds up and reads as TX_4X4. Ours reads the leaf's second luma TX_4X4 as +all-zero where the oracle codes coefficients (oracle 16 steps, ours 1), the +first value-level divergence, and everything after is desynced; the run then +ends at `decode_rect4_16_strip`'s closed-shape panic (shape-driven, reached +by the same partition walk). Both sites live in `decode_leaf_split4` / +`decode_leaf8` / `decode_rect4_16_strip` — other lanes. The sub-8x8 4:2:2 +model needs the is_chroma_ref rule `!(mi_col & ss_x)` (every even-column +leaf, not 4:2:0's single bottom-right leaf) plus the TX_4X4 chroma shape. + +## State + +- Refusal `a chroma format of 4:2:2 (subsampling_x != subsampling_y)...` + byte-identical (bypass reverted; `git diff` touches only decode.rs and + decode_probe.rs; probe refuses without the env). +- `cargo check -p ec-av1` (private target dir + `$HOME/.cache/cargo-target-av1422f`): 0 warnings. +- 420 gates green: `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` + its 10-bit twin — 2/2 pass (the new + arms are unreachable at 420 by their ss condition; `chroma_tx == chroma_tx_h` + on every 4:2:0/4:4:4 path). Refusal gate + `a_non_420_subsampled_sequence_header_is_refused_by_name` green. +- No push. Traces left at /tmp/ours422f.txt and /tmp/oracle422.txt. diff --git a/lanes/av1422filter.report.md b/lanes/av1422filter.report.md new file mode 100644 index 00000000..65a26b68 --- /dev/null +++ b/lanes/av1422filter.report.md @@ -0,0 +1,128 @@ +# lane-av1-422filter — the 4:2:2 loop-filter chroma class: NAMED and FIXED + +## Outcome + +1. REMEASURED first (pinned fixture `/tmp/t422.obu` sha256 + `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, + single-frame cut `/tmp/t422f0.obu` sha256 + `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af`, + 256x144 / chroma 128x144, local `EC_AV1_ALLOW_422_PROBE` bypass applied + and reverted byte-identical after): with `EC_AV1_PREFILT_DUMP` / + `EC_AV1_POSTDEBLOCK_DUMP` / `EC_AV1_POSTCDEF_DUMP` / `EC_AV1_FINAL_DUMP` + on both sides, the frame-0 pre-filter AND post-deblock planes are + byte-exact (deblock did identical work both sides: 797/637/727 samples + changed, same set) — the 1236/1263 final chroma diffs are introduced + AFTER deblock. Attribution ladder, ours vs the instrumented aomdec: + + | stage | Y | U | V | + |----------------------|------------|-----------------|-----------------| + | pre-filter | 0 | 0 | 0 | + | post-deblock | 0 | 0 | 0 | + | post-CDEF | 0 | **251** (50,0) | **259** (48,0) | + | final | 0 | **1236→253** | **1263→266** | + + (the pre-fix row shows the parent's numbers; the ticket's first final + sample V (48,0) is literally the first post-CDEF defect sample.) +2. The oracle had NO 8-bit post-CDEF rung (its `EC_AV1_POSTCDEF_DUMP` was + 16-bit only; the earlier `aom/pcd.f0` measurement was actually its + post-deblock output — the rung had to be re-derived to isolate CDEF from + LR). Added an 8-bit `EC_AV1_POSTCDEF_DUMP` twin to the oracle's + `decodeframe.c` (right after the `do_cdef` block, full aligned buffer, + same shape as the POSTDEBLOCK rung) and rebuilt + `$HOME/.cache/aom-oracle/build` aomdec with ninja. The CDEF verdict was + then direct: 251/259 samples, first exactly U (50,0) / V (48,0). +3. DEFECT 1 (the big one) — **the 4:2:2 LR boundary-band snapshot is taken + on a 4:2:0 stripe grid**. `plane_snapshot` copies only the 4-row bands + LR's stripe substitution reads (`stripe_h - offset` per 64 rows); the + chroma calls hardcoded `ss_y = 1`, so for 4:2:2 (chroma stripes on the + luma 64-row grid, offset 8) the bands landed at rows 26/60/92/124 while + LR read rows 54..57/118..121 — every boundary substitution read + uninitialised scratch (zeros): 999 U / 963 V samples filtered where aom + filters nothing, |delta| up to 24 at the top rows. Fixed at all three + sites of the class: the keyframe and inter non-pipelined + `plane_snapshot(&u/&v, ss_y(fctx))`, the pipeline's `snap_band` band rows + `(j*64) >> ss_y`, and `pipe_run_lr`'s chroma `dims` (plane extents + `round_ss`, ss carried, not `div_ceil(2)`+1). 4:2:0 is bit-identical + (ss_y=1 reproduces the old bands/rows/dims exactly). +4. DEFECT 2 — **the CDEF chroma direction remap was missing**. libaom + `av1_cdef_filter_fb` (cdef_block.c) remaps the luma direction through + `conv422 = [7,0,2,4,5,6,6,6]` (in place; V then inherits U's remapped + grid) whenever `xdec != ydec` — the direction grid lives on the + subsampled chroma grid. The port filtered chroma with the raw luma + direction: after the LR fix the residual was exactly the CDEF stage, + 251/259 samples all ±1/±2 (168 we-filtered-aom-doesn't, 71 + aom-filters-we-don't, 12 value diffs on shared samples; scalar and AVX2 + kernels byte-identical, so shared logic, not the SIMD path). Fixed with + `CDEF_DIR_CONV422`/`CDEF_DIR_CONV440` applied for `(ss_x, ss_y)` = + (1,0)/(0,1); 4:2:0 and 4:4:4 take `_ => dir` unchanged. +5. MEASURED after both fixes: **frame 0 of the pinned 4:2:2 fixture is + byte-exact vs the oracle at PREFILT, POSTDEBLOCK, POSTCDEF and FINAL on + Y, U and V** (0 diffs everywhere). Non-vacuity on this frame: + `chroma422_square` = 24, `chroma422_rect` = 96, `chroma422_sub8` = 26 — + the touched 422 arms provably ran. Instrument for the LR half: a python + re-computation of the stripe walk + `lr_src_row` substitution + the + port's own wiener rounding reproduced the oracle's post-LR chroma plane + EXACTLY from the oracle's post-CDEF input (0 mismatches), which pinned + the residual defect to the snapshot input, not the filter math. +6. REMAINING: none for this class. The `read_coeffs_rect` frame-9 scratch + panic (inter frames of the 22-frame stream) is untouched, as chartered. + +## Decision + +- **444 LR follow-up (review finding 2): RED, stopped and reported.** A + 3-frame 192x160 `aomenc --profile=1 --enable-restoration=1` stream + (lr types per frame: `[Sgrproj,None,Switchable]` / `[None,None,Sgrproj]` + / `[Sgrproj,None,Switchable]`) diverges from both the instrumented aomdec + and ffmpeg on frames 0/1 (~26k samples/plane, maxabs 255) and matches + exactly on frame 2. The divergence is already fully present at + EC_AV1_PREFILT_DUMP (frame 0 pre: Y 6124 @ (0,128), U 9176 @ (160,64), + V 10196 @ (128,64)) — a pre-existing 444 RECONSTRUCTION defect, not a + loop-filter one and not this lane's regression: the parent commit + (cc3783f4, scratch worktree) measures 26673/26310/158 against the same + stream, so this lane's ss_y fix strictly improves 444 (frame 2 went to + exact, frames 0/1 shrank) but cannot pin a pixel-exact gate over a + stream whose reconstruction is still wrong. Named for the owning lane: + 444 intra reconstruction around the row-64/row-128 SB boundaries (class: + pre-existing 444 recon; loop filters exonerated — the damage exists + pre-deblock and the filter stages track it 1:1). +- The header refusal STAYS unconditional in `stream.rs` — the probe bypass + was local-only, applied and reverted byte-identical before the commit + (`git diff` after the revert carries only the decode.rs fix); the + refusal-by-name gate re-verified firing. +- `read_coeffs_rect` untouched. The 4:2:0 group-tail SKIP arm untouched. + `sub8_leaf_chroma422` (parent lane's three fixes) untouched. +- The 8-bit `EC_AV1_POSTCDEF_DUMP` rung was added to the ORACLE's source + tree (`$HOME/.cache/aom-oracle/src/av1/decoder/decodeframe.c`, rebuilt + with ninja) and transcribed into + `scripts/instrument-aom-oracle.sh` as rung 15 — its generator block + reproduces the hand patch byte-for-byte (verified by strip-and-replay on + the live tree; the marker `EC_INSTRUMENTED_POSTCDEF` keeps re-runs + no-op), so `build-aom-oracle.sh` + the script rebuild the full ladder + from scratch again. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422filter`): + 0 warnings, 0 errors. +- Frame-0 stage dumps, ours vs the instrumented aomdec (cropped + comparisons; our stage dumps are 256x160/128x160 padded, the oracle's + cropped 256x144/128x144 — the comparator crops): all four stages, all + three planes, 0 diffs. +- 420 gates green (all with the fix in place): + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1` + (1 passed), `stream::tests::a_real_aomenc_stream_with_restoration_reads_ + lr_symbols_correctly` (1 passed — the LR-snapshot regression gate), + `a_superres_key_frame_with_cdef_and_loop_restoration_decodes_pixel_exact` + (1 passed), `a_non_420_subsampled_sequence_header_is_refused_by_name` + (1 passed). +- Scalar-vs-AVX2 CDEF chroma A/B on this frame: 0 diffs between kernels + (the 4x8 chroma shape was already SIMD-faithful; the defect was the + direction input). + +## State + +- Commit on lane-av1-422filter (no push): the LR snapshot ss_y fix (three + sites) + the CDEF conv422 direction remap + this report. +- The instrumented oracle build at `$HOME/.cache/aom-oracle/build` now + carries the 8-bit `EC_AV1_POSTCDEF_DUMP` rung for future lanes. diff --git a/lanes/av1422g.report.md b/lanes/av1422g.report.md new file mode 100644 index 00000000..d2ad7e67 --- /dev/null +++ b/lanes/av1422g.report.md @@ -0,0 +1,102 @@ +# lane-av1-422g — sub-8 even-column chroma-ref arm; STOP: split4 is never reached on t422 + +## Outcome + +STOP with the 4:2:2 header refusal in place, byte-identical (the local +`EC_AV1_ALLOW_422_PROBE` bypass was reverted before commit; the probe refuses +without the env — `frames_dispatched: 0`). The even-column chroma-reference +arm for ss (1,0) is in `decode_leaf_split4` per the parent's rule +(`is_chroma_ref = !(mi_col & ss_x)`, one TX_4X4 chroma unit per plane per +even-column leaf, 4:2:0 keeps its single bottom-right leaf), but it is +UNPROVEN and — the round's real finding — UNREACHABLE on this fixture: + +the frame-0 partition walk never takes an 8x8 `PARTITION_SPLIT`. An +`EC_AV1_TRACE` probe printed **zero** split8 group entries before the run +dies at `decode_rect4_16_strip`'s closed-shape panic. Our trace is +byte-identical to 422f's (modulo pid), so the divergence 422f attributed to +the mi(9,10) sub-8 chroma begins EARLIER: by the time the walk reaches the +8x8 at mi(8,10), ours reads a partition value that is not SPLIT, while the +oracle's own trace decodes four 4x4 leaves at mi(8,10)/(8,11)/(9,10)/(9,11). +Per instruction 2 the named stop line is: + + crates/ec-av1/src/decode.rs:14888 — unreachable!("decode_rect4_16_strip chroma shape set is closed") + +reached with chroma shape `(16, 64)` off a `luma=32x64 tx=16x16` strip (the +`EC_RECTCHROMA_GAP luma=32x64 tx=16x16 chroma=16x64` diagnostic prints right +before the panic; the 16 prints of `luma=16x8 → chroma=8x8` earlier are the +4:2:2 square rows downstream and are harmless). decode_rect4_16_strip was not +edited; that panic is the next lane's gate, not this one's fix. + +## Change (decode.rs + decode_probe.rs only) + +- `decode_leaf_split4`: `has_chroma` now branches per subsampling — 4:4:4 + every leaf, 4:2:2 `(lmi.1 & 1) == 0` (every even-mi-column leaf), 4:2:0 + `i == 3` unchanged. A `chroma_422` flag (ss_x 1, ss_y 0) and a + `last_uv422` coarse-slot value were added; the group tail gained a 4:2:2 + branch that only fills `above_uv_mode`/`left_uv_mode` from the group's + last chroma-reference leaf (bottom-left), and the tail's chroma state + stamp is skipped at 4:2:2 (the per-leaf units already stamped). +- New `sub8_leaf_chroma422` (beside `sub8_leaf_chroma444`): one square + TX_4X4 chroma unit per plane at the chroma position + (`px >> ss_x`, `py >> ss_y`) — `ss_size_lookup[BLOCK_4X4][1][0]` is + BLOCK_4X4, so the (2,4) plane area rounds up to the square 4x4 read — via + `read_plane`'s proven `TxbSet::Chroma4` + `TX4` route, with + `Neighbours::around_mi_422_chroma(lmi, 8, 4)` context reads (the unit's 4 + chroma-px width spans TWO luma mi columns; sampling every second above + cell counts each chroma column once), `cfl_src_rect(px, py, 8, 4)` CfL + source, skip arm (predict-only, intrabc-slot disarm counted), intrabc arm + (frame copy at the DV with the ss shifts), and per-leaf entropy stamping + (1 mi row tall, both luma mi columns of the one chroma column). +- New `CHROMA422_SUB8_HITS` witness counter, bumped only on the two + coefficient-reading arms (skip does not count); printed as + `chroma422_sub8` by `examples/decode_probe.rs`. +- Untouched: `decode_leaf8`, `decode_rect4_16_strip`, `decode_block_128rect`, + `decode_rect_split`, the 4:2:0 group tail (including its SKIP arm at + decode.rs:19169-19170 — the sibling-owned flat-DC miss), the square-block + selection arm, `stream.rs` (bypass reverted; refusal string + byte-identical), `refusal_inventory.rs`. + +## Measurement + +Fixture `/tmp/t422.obu`, sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` (reused +by hash, 256x144, 22 frames). Ours `decode_probe` (debug, gate-counters, +private target dir) with the LOCAL env bypass; oracle traces from 422f left +at /tmp/oracle422.txt. + +- **Reach probe**: with `EC_AV1_TRACE=1`, a temporary per-group print in + `decode_leaf_split4` (since removed) fired ZERO times before the panic — + split4 never runs on this stream; the arm cannot fire, and the + `chroma422_sub8` counter reads 0 for the trivial reason. +- **Trace identity**: our full run (stderr trace, 13029 lines) is + byte-identical to 422f's /tmp/ours422f.txt except the panic line's thread + id — the 422g changes do not alter the trajectory, confirming the + pre-split8 divergence. +- `cargo check -p ec-av1` (private target dir): 0 warnings. +- 420 gate green: `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` 1/1 passed (`cargo test -p ec-av1 + --lib`); all new arms are keyed on ss (1,0), unreachable at 4:2:0/4:4:4. + +## Next divergence (restated, for the lane that owns the walk) + +The first live defect is UPSTREAM of sub-8: between the last symbol-level +match (mi(8,0) 8x8 leaf's V) and the mi(8,10) 8x8, ours mis-reads the 8x8 +partition symbol (oracle SPLITs, we do not), and the desynced walk later +lands on the 32x64 strip whose 16x64 chroma has no table row (panic above). +Two candidate sites for whoever picks this up: the partition-symbol context +feeding `partition_w8` after an 8x8 leaf run (422f's tail bookkeeping +changed side_mi/partition ctx for the following sibling), or an 8x8-leaf +chroma/context read that consumes the wrong rng count and shifts every later +partition read. Note the rect split4 sibling (the 8x16/16x8 group walker +with `bw`/`bh` args, ~decode.rs:20500) has the same 4:2:0-style chroma and +will need the same even-column treatment once the walk reaches any rect sub-8 +group at 4:2:2. + +## State + +- Refusal `a chroma format of 4:2:2 (subsampling_x != subsampling_y)...` + byte-identical; `git diff` touches only decode.rs and decode_probe.rs; + probe refuses without the env (frames_dispatched: 0). +- Committed on lane-av1-422g (5e163e94). No push. +- Traces left at /tmp/ours422g_trace.txt (EC_TRACE_COEFF run) and + /tmp/ours422g_t2.txt (EC_AV1_TRACE reach run). diff --git a/lanes/av1422h.report.md b/lanes/av1422h.report.md new file mode 100644 index 00000000..bdb39b70 --- /dev/null +++ b/lanes/av1422h.report.md @@ -0,0 +1,96 @@ +# lane-av1-422h — 4:2:2 sub-8/rect chroma model proven rng-exact to the bottom-edge SBs; refusal stays + +## Outcome + +The assignment's premise — "ours reads a non-SPLIT partition at mi(8,10)" — was +FALSE, and this round proves it with partition-level oracle traces: at mi(8,10) +both decoders read `bsize=3 ctx=0 rng=37068 → value=1` (PARTITION_HORZ). +`read_partition` in the oracle source already carried an `EC_PART` probe +(patch never enabled by the 422f/g generation recipe), so this round's traces +are the first with the walk checkpointed per partition read; pairing them +(`EC_PART` rng values, tell offset constant +14) shows the true first +divergences and lets every fix below be verified rng-for-rng. + +Four 4:2:2 chroma-model defects found and fixed (all in `decode_leaf_rect8`, +`decode_leaf8`, `decode_leaf_split4`/`sub8_leaf_chroma422`, `decode_block`): + +1. **`decode_leaf_rect8` (BLOCK_8X4/BLOCK_4X8 strips) used the 4:2:0 + `i == 1`-only chroma rule.** `is_chroma_reference` + (av1_common_int.h:1459) at ss (1,0): a HORZ pair's BLOCK_8X4 strips are + BOTH chroma references (`!(bw & 1)`), a VERT pair's BLOCK_4X8 strips keep + the odd-column leaf. Oracle evidence at the mi(8,10) HORZ pair: uv_mode + read at BOTH (8,10) and (9,10), each strip followed by its own one-TX_4X4 + chroma unit per plane. Fixed `has_chroma` to `!vert || i == 1` at 4:2:2 + and decoded each reference strip's chroma right after its luma via + `sub8_leaf_chroma422` (split path, whole-leaf path, intrabc path), with + the 4:2:0 group tail gated off at 4:2:2 and the coarse uv slots filled + from the last reference strip. The mi(8,10) pair now decodes + rng-for-rng (strip mode reads end at oracle's exact rngs 63250/33264). +2. **`decode_leaf_split4`'s 4:2:2 column parity was inverted** (422g's + `(mi_col & 1) == 0` "even-column" rule — derived by 422f from a + pre-partition-trace misreading of the (8,10) HORZ pair as a split + group). Oracle, mi(30,42) split group: uv_mode read at mi(30,43) and + mi(31,43) ONLY — the ODD columns, per the formula's column clause + `(mi_col & 1)`. Fixed to `(lmi.1 & 1) == 1`. +3. **`sub8_leaf_chroma422` anchored the odd-column leaf's ctx read/write at + the leaf's own column.** libaom anchors at the FLOOR chroma cell + (`pd->above_entropy_context + blk_col` with `blk_col = mi_col >> ss_x`): + an odd-column 4x4 leaf's unit starts at chroma px 86, whose containing + cell is luma mi col 42, so the ctx read AND the per-TU state write land + on luma mi 42,43, not 43,44. Added `ctx_mi = (lmi.0, lmi.1 & !1)`. +4. **`decode_leaf8`'s 4:2:2 chroma rect unit read its txb ctx through the + plain `around_mi`** — the 422f-class dc-vote double-count (one chroma + ctx cell spans TWO luma mi columns at ss_x 1) in the leaf8 path. + Oracle evidence at mi(2,24) plane 2: ours dc_sign row 0, oracle row 2. + Both 422 arms now read `around_mi_422_chroma(leaf_mi, 8, 8)`. + +## Measurement + +Fixture `/tmp/t422.obu` reused by hash +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` +(256x144, 22 frames). Oracle +`$HOME/.cache/aom-oracle/build/aomdec EC_TRACE=1 EC_TRACE_MODE_STEP=1 +EC_TRACE_COEFF=1 EC_PALSYN=1` (the `EC_PART` probes ship in the patched +tree's `read_partition`); ours `decode_probe` with a LOCAL +`EC_AV1_ALLOW_422_PROBE` bypass at the stream.rs refusal — REVERTED before +commit, refusal re-proven to fire by name without the env. + +- After fixes 1–3, the frame-0 partition streams pair 1:1 rng-for-rng from + the tile start through oracle #327 — tell offset constant +14 — covering + every HORZ/VERT 8x8 pair, every split4 group, the (28,44) 16x16 square + (one TX_8X16 chroma per plane, ctx row 9 = our 7-base row 2 after fix 1's + stamp anchor) and the (30,42)/(24,56) bodies. +- Fix 4 (leaf8 dc-sign sampling) was located by the same pairing: the + mi(2,24) 8x8 NONE leaf consumed the oracle's exact 13 bits but landed at + rng 53768 vs 61448; the sign phase of its V plane diverged (dcctx 0 vs 2). + +## Next divergence (named stop, for the lane that owns the partial-SB walk) + +Frame 0 now desyncs where the bottom superblock row begins: the 64x64 at +mi(32,0) hangs over the bottom edge (`has_rows=false`), and libaom READS a +gathered two-symbol partition there (`EC_PART mi_row=32 mi_col=0 bsize=12 +ctx=13 tell=19221 rng=54818` → `EC_PART_VAL value=1`, i.e. HORZ from the +`partition_gather_horz_alike` cdf, splitting the SB into two 64x32 +strips). Our walk reads NO partition symbol for that SB and dispatches +straight into a 64x32 strip walk (`EC_RECTCHROMA_GAP luma=64x32 +tx=32x32 chroma=32x32`), one symbol behind from there. Note the strip +reader's 4:2:2 chroma for a 64x32 strip (32x32 square, `ss (1,0)`) rides +the existing square arm. The `decode.rs:14888` closed-shape panic and the +`decode.rs:19169` skip arm were not touched. + +## State + +- Refusal `a chroma format of 4:2:2 (subsampling_x != subsampling_y)...` + byte-identical; `git diff` touches only `decode.rs`; the probe refuses + without `EC_AV1_ALLOW_422_PROBE` (measured this round). +- `cargo check -p ec-av1` (private target dir + `$HOME/.cache/cargo-target-av1422h`): 0 warnings. +- 420 gates green: `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` 2/2 (both variants) and + `a_non_420_subsampled_sequence_header_is_refused_by_name` 1/1. Every + changed arm is keyed on ss (1,0); the 4:2:0/4:4:4 paths keep their + proven rows and stamps. +- Temporary EC_RECTDBG/LEAFDBG/CHROMAWALK instrumentation removed before + commit. +- No push. Traces left at /tmp/o_pal.txt (full-probe oracle), + /tmp/o_part.txt, /tmp/u_cur.txt. diff --git a/lanes/av1422i.report.md b/lanes/av1422i.report.md new file mode 100644 index 00000000..e996d364 --- /dev/null +++ b/lanes/av1422i.report.md @@ -0,0 +1,76 @@ +# lane-av1-422i — bottom-SB-row partition gather re-measured: already rng-exact at HEAD; refusal stays + +## Outcome + +The assignment's premise — "ours reads no partition symbol at the bottom 64x64 +mi(32,0)" — is FALSE at HEAD 6cdd3dae, and this round proves it with live +traces instead of the previous round's EC_PART-only dumps. The gathered +two-symbol read the assignment asks for has existed since lane-hgkf r1 +(`decode.rs:27096`, the `(true, false)` arm of the 64-level dispatch): it reads +`gather(&cdfs.partition_w64[ctx], VERT_ALIKE)` with +`VERT_ALIKE = [2, SPLIT, 4, 6, 7, 9]`, maps 0 → PARTITION_HORZ / 1 → SPLIT — +line-for-line libaom `ec_read_partition_impl` + `partition_gather_vert_alike` +(av1_common_int.h:1485, `out[0] = TOP − {VERT, SPLIT, HORZ_A, VERT_A, VERT_B, +VERT_4}`). + +Why the previous round could not see it: the `(true, false)` arm emits +`OUR_PART` under `EC_AV1_TRACE` (trace_edge, decode.rs:6068), not the oracle's +`EC_PART` format — the 422h dumps were filtered on `EC_PART`, so the read was +invisible and looked like "no symbol". + +## Measurement + +Fixture `/tmp/t422.obu` reused by hash +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` +(256x144, 22 frames, 64x64 superblocks). Probe: `decode_probe` with a LOCAL +`EC_AV1_ALLOW_422_PROBE` bypass at the stream.rs:1709 refusal — REVERTED +before commit. Ours run with `EC_TRACE=1 EC_AV1_TRACE=1` (fresh trace +/tmp/u_f0.txt); oracle o_pal.txt. + +- Context numbering: ours `partition_ctx` indexes `partition_w64` 0..15 with + the `bsl*4` term folded out — a constant −12 rename of libaom's ctx for the + 64 level (ours 0/2/2/2, 1/3/3 vs oracle 12/14/14/14, 13/15/15 at every + paired SB). Same slot, same CDF, same state; pairing confirms it. +- Bottom superblock row, frame 0 — all four gathered reads pair rng-for-rng, + pre-read rng identical: + - mi(32,0) ours 54818 / oracle 54818 (oracle ctx 13, value 1 = HORZ) + - mi(32,16) ours 41610 / oracle 41610 + - mi(32,32) ours 61472 / oracle 61472 + - mi(32,48) ours 45794 / oracle 45794 +- Interior pairing of the mi(32,0) strip continues past the gather: post + uv_mode rng 43856 on both sides (mode=12, uv_mode=12), first luma all_zero + ends at 53566 on both sides. The 64x32 strip's 4:2:2 chroma (32x32 square, + ss (1,0)) rides the square arm as documented. has_rows=false correctly + skips the second strip on both sides. +- Frame 0 therefore decodes through the bottom superblock row. The + `EC_RECTCHROMA_GAP luma=64x32 tx=32x32 chroma=32x32` lines are the + non-fatal diagnostic at decode.rs:10225, not a desync. + +## Next divergence (named stop — inter rect lane, not this lane) + +Frame 1 (first inter frame) panics at `decode.rs:29094:39` — `range end index +68 out of range for slice of length 64` — in the all-zero-residual prediction +copy: a rect inter block's `prediction[src..src + w]` reads past a 64-sample +buffer. Trigger context: mi(4,0) 64x64 inter, `partition_w16 value=7` +(VERT_B) at the 16-level, tell=542. The earlier round's decode.rs:14888 +`decode_rect4_16_strip` closed-shape stop was not reached this run (frame 0 +completes; the panic fires first). Both sites are downstream of the bottom-row +partition gather and outside this lane's ownership; decode.rs:14888 and the +decode.rs:19169 skip arm remain untouched, as do the four chroma-ref fixes. + +## State + +- No source change this round: the gather the assignment requested is already + in HEAD, so there is nothing to write without inventing a duplicate arm. + `git diff` vs 6cdd3dae touches only this report; the stream.rs probe bypass + is reverted (refusal `a chroma format of 4:2:2 (subsampling_x != + subsampling_y)...` byte-identical, unconditional). +- Refusal STAYS: the 16-frame stream is not pixel-exact (frame 1 panics), so + the delete condition (pixel-exact + 422 chroma counter) is unmet. +- 420 gates green (private target dir `$HOME/.cache/cargo-target-av1422i`): + `a_non_420_subsampled_sequence_header_is_refused_by_name` 1/1 (proves the + reverted refusal fires by name), `a_real_aomenc_stream_with_a_skipped_8x8_ + intra_leaf_whose_tx_split_decodes_pixel_exact` 2/2 (both bit depths) under + `EC_AV1_REQUIRE_AOMENC=1`. +- No push. Traces left at /tmp/u_f0.txt (ours, frame 0 bottom row + frame 1 + panic) and /tmp/o_pal.txt (oracle). diff --git a/lanes/av1422inter.report.md b/lanes/av1422inter.report.md new file mode 100644 index 00000000..9afc3ad7 --- /dev/null +++ b/lanes/av1422inter.report.md @@ -0,0 +1,134 @@ +# lane-av1-422inter — the frame-9 `read_coeffs_rect` scratch panic fixed at the +# source (the 4:2:2 intra-in-inter side-64 chroma is TWO square TX_32X32 units, +# not one 32x64 rect unit); the inter-frame divergence remeasured with the +# stage ladder and STOPPED at the sub-8x8 inter chroma class (`decode_inter_block8`) + +## Outcome + +1. REMEASURED first (pinned fixture `/tmp/t422.obu` sha256 + `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, + 256x144 / chroma 128x144, 16 coded frames, local `EC_AV1_ALLOW_422_PROBE` + bypass applied and reverted byte-identical after — `git diff` after the + revert carries only the decode.rs fix): reproduced the frame-9 panic + exactly as the r lane named it — `rect coeff scratch w=32 h=64 n=2448` + at [`read_coeffs_rect`]'s guard (decode.rs:7195), backtrace + `decode_inter_block` -> `read_rect_chroma_unit`; 9 frames decoded before + the abort. +2. ROOT CAUSE, and why the scratch itself stays untouched: the panic site is + `decode_inter_block`'s intra-in-inter 4:2:2 chroma arm (lane-av1-422k's + `chroma_w != chroma_h` dispatch), whose `_` side-match handed the WHOLE + uv plane block (32x64) to [`read_rect_chroma_unit`] as ONE rect unit. But + `av1_get_max_uv_txsize(BLOCK_64X64)` at ss (1,0) is + `av1_get_adjusted_tx_size(max_txsize_rect_lookup[BLOCK_32X64])` = + `av1_get_adjusted_tx_size(TX_32X64)` = **TX_32X32** — libaom codes TWO + stacked SQUARE 32x32 units per plane, plane-major (U r0, U r1, then V + r0, V r1), never a TX_32X64 coefficient read (no such scan exists in + this decoder and libaom writes none: a 64-axis codes its low-32 corner). + Lifting the scratch bound to 36x68 (the r lane's tentative "heap + fallback" sketch) would have read a full 32x64 scan and desynced on the + very first such unit. The KEY-FRAME path has carried the correct model + since lane-av1-422f (`decode_block`'s 4:2:2 chroma_tx table: "64 and + 128: TX_32X64 / TX_64X64 adjust down to TX_32X32, square units, a 1x2 / + 2x4 grid") — proven byte-exact on this fixture's frame 0. +3. FIX (the sibling 444 per-unit-walk pattern): the `side == 64` arm at + `decode_inter_block`'s intra-in-inter chroma now walks the two stacked + 32x32 square units per plane through [`read_plane`] (`TxbSet::Chroma32`, + `SCAN_32`, txb_skip ctx = above+left+3 — the offset-10 rows, the plane + block being bigger than the unit), each with its own per-chroma-cell + context read (`around_mi_422_chroma` at the unit's luma span), its own + `tu_reach_rect`, immediate `record_mi_chroma`, assembled into the + chroma_side-strided block grid, with `mu_chroma = true` so the tail's + existing `mu_chroma_units` enumeration replays the per-unit entropy + state after the whole-block record (the lane-dpm1 mechanism; its + (rows, cols, ur, uc) walk already derives exactly these two units per + plane at ss (1,0)). The 4/8/16/32 rect arms and the square + `chroma_w == chroma_h` arm are untouched — 4:2:0 and 4:4:4 are + byte-identical by construction (ss-keyed). `read_coeffs_rect` itself is + untouched: with the adjusted-tx model no caller can deliver a unit + bigger than 32x32's 36x36 levels frame, which is the invariant the + scratch sizing always stated. +4. MEASURED after the fix (16 frames decode, no panic; the probe's + `chroma422_square` counter rose 24 -> 87 across the stream, the touched + class provably firing on inter frames): frame 0 is **byte-exact vs the + instrumented aomdec at PREFILT, POSTDEBLOCK, POSTCDEF and FINAL on Y, U + and V** (0 diffs everywhere — the parent lanes' frame-0 exactness + survives). The inter frames stay divergent: per-frame stage-ladder + counts (ours padded-cropped vs oracle, both vs the same instrumented + `$HOME/.cache/aom-oracle/build` aomdec): + - frame 1: PREFILT Y 30825 / U 12624 / V 12796, first Y (0,8) 76 vs 80, + first U (0,0) 231 vs 90, first V (0,0) 164 vs 241; + - frames 1..16 all diverge from (0,0) with ~28-35k Y / ~12-17k U / + ~11-17k V per frame at PREFILT, and POSTDEBLOCK / POSTCDEF / FINAL + track the same first samples 1:1 (the loop filters introduce no new + first-diff site) — a pre-filter reconstruction class, filters + exonerated. +5. ATTRIBUTION (2-frame cut, `EC_TRACE_MODE_STEP` + `EC_TRACE_COEFF` + pairing against the oracle's own rungs): every commonly-traced mode / + skip / angle / uv_mode read of frames 0+1 agrees rng-for-rng (1326 + paired lines, 0 mismatches), and the first 873 coefficient reads + (frame 0 in full) agree — the entropy walk is in sync up to frame 1's + first coded block. The FIRST divergence is that block's own tail: at + mi (0,0) (8x8 inter leaf, NEARESTMV (0,0), coded), after the leaf's + luma TX_8X8 txb_skip bit (agreed, rng 55168) the oracle reads the + leaf's **U TX_4X8 rect chroma unit** (ctx 7 row, coded) then V — while + OURS reads a TX_4X4-SQUARE-shaped unit (`TxbSet::Chroma4`, + ctx = above+left, no offset-7 row). `decode_inter_block8`'s chroma half + models the 4:2:2 leaf chroma plane block — `ss_size_lookup + [BLOCK_8X8][1][0]` = BLOCK_4X8, one TX_4X8 rect unit per plane + (`av1_get_max_uv_txsize`) — as a `chroma_side = SIDE >> ss_x` = 4 + square: wrong coefficient set/scan/ctx rows, and the same 4x4 square + shape flows into the leaf's MC prediction, skip push and interintra + blends. Pixel witness: frame-1 U (0,0) ours=231 ~= frame-0's 225 (the + zero-mv prediction with only a square-read residue applied) vs the + oracle's 90 (the coded TX_4X8 residual applied). +6. That defect class is not a one-site edit: the leaf's whole chroma half + must move to (4,8) shapes — prediction build, skip/interintra/OBMC + pushes, the rect coefficient read (`TxbSet::ChromaRect8x4` / + `SCAN_4X8`, offset-7 ctx rows, inherited luma tx type via + [`read_inter_plane_rect`]) — and the sub8 split-group's own chroma read + (`decode_inter_sub8_split4`'s `TxbSet::Chroma4` group unit) repeats the + same square model. Per charter step 3: STOPPED and named. + +## Decision + +- The header refusal STAYS unconditional in `stream.rs` — delete condition + unmet (not pixel-exact from frame 1 on). The bypass was local-only, one + `&& std::env::var(...).is_err()` clause, reverted byte-identical before + the commit; the refusal gate re-verified firing (see Verification). +- `read_coeffs_rect` untouched (no scratch growth, no new panic path); + 4:2:0/4:4:4 arms of the touched dispatch untouched; `sub8_leaf_chroma422` + (parent lane) untouched; the 4:2:0 group-tail SKIP arm untouched. +- Next stop named for the owning lane: **`decode_inter_block8`'s 4:2:2 + chroma half** (leaf chroma plane block (4,8): one rect TX_4X8 unit per + plane through the inter rect reader, (4,8)-shaped MC prediction and skip + pushes) plus `decode_inter_sub8_split4`'s group chroma read; after that + round the stage ladder of Outcome 4 should simply be re-run — frame 0 + and the side-64 class are now proven clean, so the residual measurement + is directly attributable. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422inter`): + 0 warnings, 0 errors on a fresh `Checking` of the edited tree. +- Pre-fix panic reproduced on the pinned fixture (backtrace named above); + post-fix the same stream decodes 16/16 frames, frame 9 included. +- Frame-0 stage dumps vs the instrumented aomdec: PREFILT / POSTDEBLOCK / + POSTCDEF / FINAL all Y=0 U=0 V=0 (comparator: ours padded 256x160/128x160 + u8 cropped, probe FINAL u16 planes vs oracle u8 — values equal). +- `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`: + 1 passed, 0 failed (refusal fires again after the bypass revert). +- `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1` + (with `EC_AV1_AOMENC` pointed at the oracle build): 1 passed, 0 failed — + the 4:2:0 inter path is unchanged. +- `git status` clean except the decode.rs fix; the report is the only other + file in the commit. + +## State + +- Commit on lane-av1-422inter (no push): the side-64 per-unit chroma fix in + `decode_inter_block` + this report. +- The stage-ladder instruments live in `/tmp/i422/` (our/oracle per-stage + dumps for all 17 oracle frames, comparator + EC_ISTEP pairing scripts) — + scratch, not committed; the oracle build's rungs already carry everything + needed to regenerate them. diff --git a/lanes/av1422j.report.md b/lanes/av1422j.report.md new file mode 100644 index 00000000..0332f8d5 --- /dev/null +++ b/lanes/av1422j.report.md @@ -0,0 +1,99 @@ +# lane-av1-422j — inter chroma skip residual sized from the write rect; frame 1 decodes past the VERT_B skip strip; refusal stays + +## Outcome + +The frame-1 panic at `decode.rs:29094:39` (`range end index 68 out of range +for slice of length 64`) is fixed by sizing `decode_inter_block`'s chroma +square from the write rect instead of the block side, and the same-shape sweep +found exactly one more instance of the class, sharing the same fix. The +16-frame stream is NOT pixel-exact — the frontier moved to the intra-in-inter +chroma read, a different machinery — so the 4:2:2 header refusal STAYS +(byte-identical, unconditional; the local `EC_AV1_ALLOW_422_PROBE` bypass was +reverted before commit). + +## Root cause and fix + +`decode_inter_block` computed `chroma_side = side >> ss_x(fctx)` (old +decode.rs:31227). Every consumer indexes the chroma prediction/residual +buffers `row * chroma_side + col` over the WRITE rect +(`write_chroma_w x write_chroma_h`), and at ss (1,0) that rect is +`side/2 x side`: frame 1's skipped 16-level VERT_B strip at mi(4,0) +(8x16 luma, tell 542) has a 4x16 chroma rect, so a `side >> ss_x` = 8 square +is shorter than `row * 8 + 4` on rows >= 8 — the all-zero-residual copy read +`prediction[64..68]` out of the 64-sample buffer (reconstruct_mc_rect's +`residual.is_empty()` branch, decode.rs:29094). Fixture +`/tmp/t422.obu` sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` +reproduced it before the change and passes the block after it. + +Fix: `let chroma_side = (side >> ss_x(fctx)).max(side >> ss_y(fctx));` +(decode.rs:31237) — the enclosing square of the chroma rect. Bit-identical at +4:2:0 (`side/2`) and 4:4:4 (`side`); only 4:2:2 changes shape. + +## Same-shape sweep (ZERO_RESIDUAL slices vs forwarded w/h) + +- `decode_inter_block` skip arms, single-ref (33803..) and compound (32325..): + both chroma pushes forward `(write_chroma_w, write_chroma_h)` at stride + `chroma_side` with `ZERO_RESIDUAL[..chroma_side * chroma_side]` — healed by + the one-line fix (chroma_side >= both write dims now). The paired + `Grid::Zero(chroma_side * chroma_side)` bookkeeping matches the slices. +- Luma skip arms (`ZERO_RESIDUAL[..side * side]`, stride `side`, rect + `(write_w, write_h)` with w,h <= side): max index + `(write_h-1)*side + write_w <= side*side` — provably safe, untouched. +- Other inter-path slices audited against their forwarded dims: + `decode_block_rect4` skip arm (`side * bh` / `cside * ch` — stride*rows + sizing, safe), `decode_intrabc_rect` (11682/12024, square >= rect, safe), + 14205 (`side * bh`, safe), 37037/37187 (4:4:4-only, SIDE^2 >= rect, safe), + 37338 sub8 tail (square push, safe). `decode_inter_block8`'s chroma + `push_mc` (square) always fits its own square slice — no panic class there; + its 4:2:2 8x8-leaf chroma is a latent half-write shape, NOT this class, and + was left for its owning lane. + +## Frontier re-measure (EC_AV1_ALLOW_422_PROBE=1, local only) + +1. After the sizing fix the skip strip passes and the next stop was + `transform.rs:1150` (`one coefficient per position`, 256 vs 1024): the + square non-skip chroma arm read a `chroma_side`-SQUARE unit (32x32 after + the fix) with the caller's 4:2:0 `scan_chroma` (TX_16X16) on the 32x32 + inter block at px=0 py=0. Fix: both chroma arms route non-square chroma + rects through `read_inter_rect_chroma` + (`rect_tu || (write_chroma_w, write_chroma_h) != (chroma_side, + chroma_side)`, decode.rs:32712/34222) — a 32x32 block codes ONE TX_16X32 + chroma unit (`av1_get_max_uv_txsize` of BLOCK_16X32), exactly + `rect_inter_chroma_set`'s (16,32) row. 4:2:0/4:4:4 squares keep the square + arm (their chroma rect IS `chroma_side`-square). +2. Next stop: `rect_inter_chroma_set` refused (8,8) — a 4:2:2 HORZ_B 16x8 + strip's chroma plane block is 8x8 SQUARE and the rect reader now takes it. + Added the square rows (16,16)->Chroma16, (8,8)->Chroma8, (4,4)->Chroma4 + (decode.rs:22420) — the exact `get_txsize_entropy_ctx` tables the square + arms use; unreachable before this lane. +3. Next stop: `rect_scan` refused squares for the same units; added + `(w, h) if w == h => default_scan(w)` (decode.rs:22485). +4. Current named stop: an INTRA 16x16 block inside frame 1 (px=192 py=96) + panics in the intra-in-inter branch's chroma `read_plane` + (`exec_intra` -> `reconstruct`, index len 128 idx 128, decode.rs:3845) — + the intra chroma reader still predicts/reconstructs at square + `chroma_side` shapes. That is intra prediction machinery, not the + ZERO_RESIDUAL slice class, and reworking it means inventing chroma + shapes beyond this lane's mandate; left as the named stop for the + owning lane. + +4:2:2 chroma counters PROVE chroma units ran on the probe path: +`chroma422_square: 24`, `chroma422_rect: 96`, `chroma422_sub8: 26` — but the +stream is not pixel-exact, so the delete condition (pixel-exact + counter) is +unmet and the refusal stays. + +## State + +- Source change: `crates/ec-av1/src/decode.rs` only (chroma_side sizing, two + rect-routing conditions, square set/scan rows). `git diff` = 42 insertions, + 3 deletions. The stream.rs probe bypass is REVERTED; default refusal + re-verified firing: `REFUSED: unsupported: AV1 decode_stream (a chroma + format of 4:2:2 ...)`. +- 420 gates green (target dir `$HOME/.cache/cargo-target-av1422j`): + `a_non_420_subsampled_sequence_header_is_refused_by_name` 1/1; + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ + pixel_exact` 2/2 (both bit depths) under `EC_AV1_REQUIRE_AOMENC=1` — a real + 420 decode gate over the shared `decode_inter_block` path, confirming the + changes are bit-neutral at 4:2:0. `cargo check -p ec-av1`: 0 warnings. +- No push. Probe traces left at /tmp/t422_probe.txt/.err. diff --git a/lanes/av1422k.report.md b/lanes/av1422k.report.md new file mode 100644 index 00000000..7dd5701c --- /dev/null +++ b/lanes/av1422k.report.md @@ -0,0 +1,79 @@ +# lane-av1-422k — intra-in-inter chroma prediction sized from the plane block; frame 1's INTRA 16x16 passes; refusal stays + +## Outcome + +The frame-1 panic at `decode.rs:3845` (`index out of bounds: the len is 128 +but the index is 128`) is fixed by sizing `decode_inter_block`'s INTRA arm's +chroma prediction/reconstruction from the 4:2:2 plane block +(`side >> ss_x`, `side >> ss_y`) instead of the enclosing square. The panic +was NOT the residual-slice class: the len-128 slice was the CfL AC SIGNAL. +The 16-frame stream is NOT pixel-exact — the frontier moved to the INTER +chroma rect-set table (a clean named refusal, different machinery) — so the +4:2:2 header refusal STAYS (re-verified firing by default; the local +`EC_AV1_ALLOW_422_PROBE` bypass was reverted before commit). + +## Root cause and fix + +Frame 1's block at px=192 py=96 is a SKIPPED 16x16 INTRA block inside the +inter frame (DC_PRED + CFL, zero residual), decoded by `decode_inter_block`'s +intra arm. That arm pushed/read chroma at the 422j enclosing square +`chroma_side = max(side >> ss_x, side >> ss_y)` = 16 for a 16x16 luma block, +but the 4:2:2 chroma plane block is 8x16: + +- The skip arm (`push_intra(1/2, cpx, cpy, chroma_side, ...)`) pushed a + SQUARE 16x16 op with `ZERO_RESIDUAL` and CFL armed. `ac = cfl_src(px, py, + side)` builds the AC signal over the LUMA 16x16, which `cfl_ac_ss` + downsamples to the true plane shape 8x16 = 128 samples. The square + `reconstruct` walked `row * 16 + col` and read `ac_q3[128]` — the panic. + (Instrumented `exec_intra`: `plane=1 x=96 y=96 bw=16 bh=16 rect=false + res_len=0 cfl=true`.) Even without the panic the square predict would have + written 8 columns of wrong chroma past the plane block. + +Fix (decode.rs, intra arm only): + +1. `let chroma_w = side >> ss_x(fctx); let chroma_h = side >> ss_y(fctx);` +2. Skip arm: `push_intra_unit(1/2, cpx, cpy, chroma_w, chroma_h, ...)` with + `ZERO_RESIDUAL[..chroma_w * chroma_h]` (routes rect to + `push_intra_rect`/`reconstruct_rect`); the neighbour write-back grids are + `Grid::Zero(chroma_w * chroma_h)`. +3. Non-skip arm: `chroma_w == chroma_h` keeps the square `read_plane` + verbatim; at 4:2:2 both planes go through `read_rect_chroma_unit` with the + key-frame path's proven set/scan rows keyed on the LUMA side (16 -> + `ChromaRect16x8` + `SCAN_8X16`, 8 -> `ChromaRect8x4`, 32 -> + `ChromaRect32x16`) and the per-chroma-cell context read + (`around_mi_422_chroma`), exactly the decode_block 422f idiom. + +Byte-identical at 4:2:0 and 4:4:4: `chroma_w == chroma_h == chroma_side` +there, so every replaced call keeps its exact arguments and +`push_intra_unit` routes to the same square `push_intra`. + +Fixture `/tmp/t422.obu` sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` +panicked before the change and passes the block after it. + +## Frontier (EC_AV1_ALLOW_422_PROBE=1, local only, bypass since reverted) + +Next stop is a clean refusal, not a panic: +`rect_inter_chroma_set` (decode.rs:22401, refusal string at decode.rs:22429) +— "a rectangular inter chroma transform unit whose shape has no coefficient +table set here". A later inter block in frame 1 codes a chroma rect unit +whose (w, h) has no row in that table (the 422j square rows (16,16)/(8,8)/(4,4) +and the rect rows listed there are present; the new shape is none of them). +That is the inter chroma entropy-set table, not the intra prediction class +this lane owns — left as the named stop; an `EC_*` print of the refusing +(w, h) at that site is the first step for the owning lane. + +## State + +- Source change: `crates/ec-av1/src/decode.rs` only (intra-arm chroma_w/h, + skip-arm unit pushes + grid sizes, non-skip rect routing). Temporary + exec_intra/push_intra traces and the stream.rs probe bypass are REVERTED; + default refusal re-verified firing: `REFUSED: unsupported: AV1 decode_stream + (a chroma format of 4:2:2 ...)`. +- 420 gates green (target dir `$HOME/.cache/cargo-target-av1422k`): + `a_non_420_subsampled_sequence_header_is_refused_by_name` + + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ + pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1`: 3 passed, 0 failed. Real + 420 decode over the shared intra arm, confirming the change is bit-neutral + at 4:2:0. `cargo check -p ec-av1`: 0 warnings. +- No push. diff --git a/lanes/av1422kf.report.md b/lanes/av1422kf.report.md new file mode 100644 index 00000000..e6929aac --- /dev/null +++ b/lanes/av1422kf.report.md @@ -0,0 +1,82 @@ +# lane-av1-422kf — the frame-0 U (0, 23) first diff: NAMED and FIXED (one +# missing arm in [`decode_rect_split`]'s chroma_tiled walk: the uv-palette +# prediction was never set, so the square 4:2:2 chroma rows decoded a +# uv-palette strip's chroma as plain DC) + +## Outcome + +1. NAMED the sample: frame 0, plane U, row 0, col 23, ours 50 vs oracle 49. + The parent attributed the class to [`decode_rect_split`]'s own-chroma + keyframe gap; this lane localized it to the exact unit and mechanism. +2. The owning unit: chroma 8x8 at chroma px (24, 0) — the square chroma of a + 16x8 luma strip at luma px (48..63, rows 0..7) — pushed by + [`decode_rect_split`]'s chroma_tiled `(8, 8)` arm through `read_plane` + (backtrace: inline_intra ← read_plane ← decode_rect_split ← + decode_leaf_rect). +3. Entropy PROVEN in sync: pre-loop-filter frame-0 LUMA is byte-exact against + the oracle's `EC_AV1_PREFILT_DUMP`, and the U/V coefficient read of the + unit pairs with the oracle by rng at BOTH ends (ours rng0=48179 / rng1= + 64520 == the oracle's `EC_COEFF plane=1 tx_size=1 mi_row=0 mi_col=12 + rng=48179` and the following V unit's rng=64520). Same symbols, same + levels (±1 at scan c=9/10/21, libaom dequant ±63 == ac_q(8-bit, 56)=63 — + note the oracle's `pos=` fields are column-major; 3/4/6 there == raster + 24/32/48 here), so the divergence was prediction-side only. +4. The paired oracle EC_ISTEP ladder for the strip (skip/cdef/dq/mode/ + angle_y/uv_mode/angle_uv — every value and rng identical to ours) plus the + oracle's EC_PALSYN line (`y=2`) identified the mechanism: the strip is a + **uv-PALETTE block**. Our `chroma_tiled` arm — uniquely among the chroma + arms — never called `set_palette_pred`, so `read_plane` consumed no palette + prediction and reconstructed plain DC (ours flat 97 where the oracle has + the palette colour map). Class: same-symbols-silent-prediction. +5. FIX (14 lines, one arm): the chroma_tiled unit loop now sets the palette + prediction per unit per plane (`palette_window` of `m.palette_uv` to the + unit's rect), mirroring the skip/lossless/unsplit arms. 4:2:0 and 4:4:4 + untouched unless `m.palette_uv` is Some (previously broken output anyway). +6. MEASURED (pinned fixture, frame 0, single-frame cut sha256 + `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af` — first + OBU prefix of the pinned 22-frame t422.obu; local `EC_AV1_ALLOW_422_PROBE` + bypass, reverted byte-identical after): + - U (0, 23) now decodes **49 == oracle final 49** — the named sample is + EXACT. + - U final diffs 4491 → **1774**; V final diffs 4888 → **2165**; U + pre-filter recon diffs 3148 → **533**. + - `chroma422_square` counter = 24 on this frame (the fixed arm provably + ran; non-vacuity). +7. REMAINING class for the next lane: U pre-filter diffs now start at + (108, 72) (rows 72..79, then 104+; V first diff (48, 0)) — chroma of the + 16x8 strip at chroma (96, 72) and the 16x32 strip at (112, 64): NOT the + palette arm fixed here (both decoded with their own modes); needs its own + localization. Frame 0 is still not pixel-exact, so the + "delete the header refusal" condition stays unmet. + +## Decision + +- The named col-23 sample WAS one arm in [`decode_rect_split`] — fixed, not + punted. The frame-9 [`read_coeffs_rect`] scratch panic is untouched + (another lane's, and the single-frame cut sidesteps it). The four TX_4X8 + chunk and the Some(3) offset are untouched. `read_coeffs_rect` untouched. +- Header refusal STAYS in `stream.rs`, unconditional (no env gate in the + commit; verified firing by name without the env after revert). + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422kf`): 0 + warnings, 0 errors. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed. +- `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`: + 1 passed, 0 failed (and the example probe refuses the fixture by name + without the env). +- `git diff` after the bypass revert carries ONLY the decode.rs fix; all + temporary EC_KF422DBG/TEMPQM probes and the local bypass are out. + +## State + +- Commit on lane-av1-422kf (no push): the chroma_tiled palette fix + this + report. +- Next stop named for the owning lane: U (108, 72) / V (48, 0) pre-filter + recon class at the (96, 72) 16x8 and (112, 64) 16x32 strips' own chroma — + same localization recipe applies (single-frame fixture + rng pairing + against `$HOME/.cache/aom-oracle/build` aomdec, `EC_AV1_ALLOW_422_PROBE` + local-only). diff --git a/lanes/av1422kf2.report.md b/lanes/av1422kf2.report.md new file mode 100644 index 00000000..2d29ba5b --- /dev/null +++ b/lanes/av1422kf2.report.md @@ -0,0 +1,97 @@ +# lane-av1-422kf2 — the remaining frame-0 class at U (108, 72) / V (48, 0): +# NAMED and FIXED — the sub-8x8 4:2:2 chroma unit decoded at the wrong +# position, wrong reach table and half-visible neighbour mode (three related +# one-index defects, all in [`sub8_leaf_chroma422`]); frame-0 PRE-FILTER +# reconstruction is now pixel-exact (Y, U and V) against the oracle's +# `EC_AV1_PREFILT_DUMP` + +## Outcome + +1. REMEASURED first (pinned fixture, single-frame cut + `/tmp/t422f0.obu` sha256 `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af` + — first OBU prefix of the pinned 22-frame t422.obu; the frame is + **256x144**, chroma planes 128x144; local `EC_AV1_ALLOW_422_PROBE` + bypass applied, reverted byte-identical after): at the parent's baseline + the pre-filter chroma diffs were U 533 / V 869, first U (108, 72) — + confirming the parent's sample. +2. NAMED the class at U (108, 72): the 8x8 luma block at luma (216, 72) + splits into four 4x4 leaves; 4:2:2's `is_chroma_reference` + (`av1_common_int.h:1454`) puts the chroma syntax on the ODD-column leaves + (`(mi_col & 1) || !(bw & 1) || !ss_x` — the port already read uv_mode + there, entropy in sync, luma byte-exact), but libaom ANCHORS the leaf's + TX_4X4 chroma unit at the floored chroma cell + (`(mi_col & !1) * MI >> ss_x` = chroma px 108), not at the odd leaf's own + chroma x (110). Ours reconstructed at 110: px 108..109 were never written + (zeros at exactly the parent's sample), px 112..113 got the unit's right + columns. Oracle ground truth: the mi(18,55) unit's reconstruction is a + pure V-copy of the row above AT 108..111. Fix 1: anchor `cpx` at + `(lmi.1 & !1) * MI >> ss_x`. U/V prefilt 533/869 → 477/813, first diff + moved to (96, 104). +3. The (96, 104) cluster named the next layer: an 8x4 strip's chroma unit + (mi(27,44), uv D45) read undecoded pixels to its upper right. The oracle's + own `EC_PRED` trace prints `n_tr=0` there: libaom answers + `has_top_right`/`has_bottom_left` from the LEAF's OWN rect shape + (`has_tr_8x4`/`has_tr_4x8` at the leaf's mi — bit 6 of byte 22 is 0), + while the port used the standalone square-4x4 `Reach::of(4, ..)` lookup + (same bit = 1). Fix 2: `sub8_leaf_chroma422` takes the leaf's shape and + uses `Reach::of(4, ..)` only for a BLOCK_4X4 leaf, `Reach::of_rect(8, 4)` + / `(4, 8)` for a rect pair's strip. Prefilt chroma 477/813 → 8/15. +4. The last 8/15 samples (chroma (100..103, 120..123), the H-mode unit at + mi(30,50)) named the third defect: the unit's left neighbour mi(30,48) is + an 8x4 strip with uv SMOOTH_V, but its `record_uv_mode_mi(…, 1, 1, …)` + stamped only ONE of the strip's two mi columns, so mi(30,50)'s + `chroma_left_mbmi` lookup hit an empty cell, lost the smooth neighbour and + skipped libaom's always-on strength-1 intra edge filter + (`get_intra_edge_filter_type` 1 vs our 0; prediction sums 6139/6307 vs + 6142/6312). Fix 3: record the uv mode over the leaf's whole mi footprint + (`(w_mi, h_mi)` from the leaf shape). All three fixes are inside + [`sub8_leaf_chroma422`] and its five call sites. +5. MEASURED after the three fixes: **PREFILT Y EXACT, U EXACT, V EXACT** + (byte-identical frame-0 pre-loop-filter reconstruction against the oracle + dump). FINAL dumps: U 1774 → 1236, V 2165 → 1263 — every remaining final + diff is introduced by the LOOP FILTER (pre-filter row 0 is exact; the + filter propagates damage to the top rows). Non-vacuity: + `chroma422_square` = 24, `chroma422_rect` = 96, `chroma422_sub8` = 26 on + this frame — all three touched arms provably ran. +6. REMAINING class for the next lane: the 4:2:2 LOOP FILTER. With pre-filter + recon byte-exact, the 1236/1263 final-diff samples are deblock/CDEF/LR + chroma work (the parent's V (48, 0) is this class's first final sample — + pre-filter V at row 0 is exact). Frame 0 is still not final-pixel-exact, + so the "delete the header refusal" condition stays unmet. + +## Decision + +- The palette set in 93c4dff5 is untouched (chroma422_square still 24; the + chroma_tiled arm's `set_palette_pred` intact). +- `read_coeffs_rect` untouched. The frame-9 rect scratch panic is untouched. + The 4:2:0 group-tail SKIP arm untouched. Header refusal STAYS + unconditional in `stream.rs` — verified firing by name on this very + fixture after the bypass revert, plus the named gate test. +- The bypass was local-only (`EC_AV1_ALLOW_422_PROBE` on the env, one + `&& std::env::var(…).is_err()` clause), reverted byte-identical before the + commit; `git diff` after the revert carries ONLY the decode.rs fix. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422kf2`): + 0 warnings, 0 errors. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed. +- `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`: + 1 passed, 0 failed. +- Stage dumps compared sample-for-sample (cropped `PREFILT_WIDE_DUMP` vs the + oracle `EC_AV1_PREFILT_DUMP`, same 73728-byte layout, 256x144 / 128x144): + post-fix Y/U/V all exact; symbol-level pairing via the oracle's + `EC_ISTEP`/`EC_PALSYN`/`EC_PRED`/`EC_PREDOUT8` rungs against our + `EC_TRACE_MODE_STEP`/`EC_PRED` traces (rng and values matched at every + step of every unit named above). + +## State + +- Commit on lane-av1-422kf2 (no push): the three sub8-422 chroma fixes + + this report. +- Next stop named for the owning lane: the 4:2:2 loop filter — deblock/CDEF + chroma extents against `$HOME/.cache/aom-oracle/build` aomdec dumps + (`EC_AV1_POSTDEBLOCK_DUMP` rungs exist on both sides); the decode-side + frame-0 recon it consumes is now proven exact. diff --git a/lanes/av1422l.report.md b/lanes/av1422l.report.md new file mode 100644 index 00000000..cc12551f --- /dev/null +++ b/lanes/av1422l.report.md @@ -0,0 +1,99 @@ +# lane-av1-422l — inter-strip pairing underflow fixed; the rect-set refusal is real and names (4, 32), which libaom marks invalid — no row added, refusal stays + +## Outcome + +Two results. + +1. The k report's frontier attribution was measured under a release build: +`at_mi.0 - 1` subtract-overflow WRAPPED silently there, so decode continued +to `rect_inter_chroma_set`. A debug build panics first — the true first stop +at 8e7238b2 was a hard underflow panic in the inter-strip chroma pairing +(`decode.rs` ~41531:42 horz `at_mi.0 - 1`, then ~41544:55 vert +`at_mi.1 - 1`), hit because `strip_has_chroma`'s `|| ss_y(fctx) == 0` +clause makes every strip chroma-bearing at 4:2:2 including strip i = 0 at +mi row/col 0. Fixed in its own commit (below); 4:2:0 and 4:4:4 are +byte-identical by construction. +2. After the fix the frontier is exactly the refusal the k report named: +`rect_inter_chroma_set` fires with (w, h) = **(4, 32)** — the 4:2:2 plane +residual of an 8x32 luma block. libaom itself marks that size invalid, so +per the lane charter NO table row is invented and the refusal stays. + +## Fix 1 (own commit): strip pairing keys on the strip's own subsampled axis + +`decode_inter_frame_tile_with_cdfs`'s 1:4 strip walk +(`PARTITION_HORZ_4`/`VERT_4`, 16x4 / 4x16 strips): + +- `strip_has_chroma`: horz keeps `i % 2 == 1 || ss_y == 0` (no chroma row + parity at ss_y == 0 — every 16x4 strip is its own reference, mirroring the + intra strip arm's `else if ss_y(fctx) == 0` at the 14700s key-frame path); + vert becomes `i % 2 == 1 || ss_x == 0` (column parity governs, 4:4:4 keeps + self-paired strips, 4:2:2 keeps the proven 4:2:0 column pairing, and an odd + strip's left neighbour always exists so `at_mi.1 - 1` cannot underflow). +- `pair_mi`: self when the strip's pair axis is not subsampled (horz && + ss_y == 0, or vert && ss_x == 0), otherwise the existing pair merge. +- `prev`: pair motion only when the strip actually pairs (horz && ss_y == 1, + vert && ss_x == 1); self-coded chroma predicts from its own motion. + +Format-by-format equivalence to the pre-lane code: 4:2:0 horz/vert and +4:4:4 horz/vert produce identical `has_chroma`/`pair_mi`/`prev` in every +branch; only 4:2:2 changes (horz self-pairs, vert pairs as at 4:2:0). + +Fail-before witness: HEAD 8e7238b2 + env-gated header bypass panics +`attempt to subtract with overflow` at the two lines above under +`EC_AV1_ALLOW_422_PROBE=1`; after the fix the same run reaches the named +refusal. Fail-after does not apply (this is a panic, not a test). + +## Fix 2: the refusing shape, named — and why no row is added + +`EC_AV1_TRACE_422` at the `_ =>` arm of `rect_inter_chroma_set` prints +`(w,h)=(4,32)` on `/tmp/t422.obu` (sha256 +`d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, the k +report's fixture). 4x32 is the 4:2:2 plane residual of an 8x32 luma block +(write rect 8x32 -> `>> ss_x` = 4x32). Against the pinned oracle source +(`~/.cache/aom-oracle/src`): + +- `av1_ss_size_lookup[BLOCK_8X32][1][0] = BLOCK_INVALID` + (`av1/common/common_data.c:38`) — an 8x32 luma block HAS NO 4:2:2 plane + residual block. +- `TX_4X32`/`TX_32X4` do not exist: zero occurrences in + `av1/common/enums.h`; the largest 4-px-axis transform is `TX_4X16`. +- `max_txsize_rect_lookup[BLOCK_8X32] = TX_8X32` — libaom reaches that + chroma through luma-granular chunking, never as a standalone 4-px unit. + +So the ticket's escape hatch ("if libaom marks it invalid, stop and name +it") applies: adding a (4, 32) row would invent a size libaom never codes. +The owning lane's next step is modelling the 8x32-at-(1,0) chroma merge +(`get_vartx_max_txsize` / `decode_token_recon_block` chunking), not an +entropy set. The trace print stays (env-gated, `env_flag!`, zero-cost). + +## Verification + +- Counters on the probe run prove real 4:2:2 chroma units read before the + stop: `chroma422_square: 25`, `chroma422_rect: 100`, + `chroma422_sub8: 26`. +- Default refusal fires (bypass reverted): + `REFUSED: unsupported: AV1 decode_stream (a chroma format of 4:2:2 ...)`. +- 420 gates green under `EC_AV1_REQUIRE_AOMENC=1` + (target dir `~/.cache/cargo-target-av1422l`): + `a_non_420_subsampled_sequence_header_is_refused_by_name` + + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ + pixel_exact`: 2 passed, 0 failed. +- `cargo check -p ec-av1`: 0 warnings. +- Header refusal NOT deleted (16-frame stream is not pixel-exact; it is + refused at the named (4, 32) stop). +- The k lane's intra-arm chroma prediction sizing is untouched. + +## Latent site named (not fixed, out of reach) + +`decode.rs` ~14107 (INTRABC 16x4/4x16 dense path) subtracts +`lmi.0 - 1` / `lmi.1 - 1` under `has_chroma` with no subsampled-axis key. +Unreachable at 4:2:2 today (the header refusal precedes any INTRABC +decode), so no test can exercise it; flagged for the INTRABC lane so the +pairing class lands there too when 4:2:2 INTRABC is chartered. + +## State + +- Commits on lane-av1-422l (no push): (1) strip-pairing fix, (2) the + (4, 32) trace print + this report. +- No table row added to `rect_inter_chroma_set`. The 4:2:0 group-tail + chroma SKIP arm was not touched. diff --git a/lanes/av1422m.report.md b/lanes/av1422m.report.md new file mode 100644 index 00000000..3124c007 --- /dev/null +++ b/lanes/av1422m.report.md @@ -0,0 +1,101 @@ +# lane-av1-422m — the (4, 32) refusal is replaced by libaom's TX_4X4 chunking for +# that one shape; the header refusal STAYS (the stream's next stop is a +# different class, the intra-in-inter 64x64 chroma (32, 64) panic) + +## Outcome + +1. `read_inter_rect_chroma` no longer refuses (4, 32): an 8x32 luma block's + 4:2:2 chroma plane now codes as EIGHT TX_4X4 chunks per plane, exactly the + chunking libaom's decoder performs for a plane whose `ss_size_lookup` entry + is BLOCK_INVALID. 4:2:0 and 4:4:4 are bit-identical by construction (the + arm gates on ss (1,0) AND write rect exactly (4, 32) — impossible at any + other format). +2. The header refusal is NOT deleted: with the chunking in, the 16-frame + stream decodes PAST the previously refusing block and stops at a NEW hole + owned by another lane — the intra-in-inter 64x64 chroma arm reads its whole + (32, 64) plane as ONE unit and trips the rect-coeff scratch bound. The + delete condition (16-frame pixel-exact vs aomdec) is unmet, so the refusal + stays. + +## The chunking mechanism (measured against the pinned oracle, `~/.cache/aom-oracle/src`) + +- `av1_ss_size_lookup[BLOCK_8X32][1][0] = BLOCK_INVALID` + (`av1/common/common_data.c:38`): an 8x32 luma block HAS no 4:2:2 plane + residual block; no TX_4X32 exists either. +- `decode_token_recon_block`'s inter residual loop + (`av1/decoder/decodeframe.c:1022`) still walks the plane in + `get_vartx_max_txsize` units. `get_vartx_max_txsize` + (`av1/common/blockd.h:1447`) does `max_txsize_rect_lookup[plane_bsize]` + with `plane_bsize == BLOCK_INVALID` — one element PAST the 22-entry table. + The oracle build is Release (`CMakeCache.txt`: `CMAKE_BUILD_TYPE=Release`, + asserts compiled out), and the table's adjacent neighbour in declaration + order is `vtx_tab`, whose first entry `DCT_1D = 0 = TX_4X4`. So the + chroma max tx size resolves to TX_4X4. +- `decode_reconstruct_tx` (`decodeframe.c:303`) NEVER recurses for chroma + (`if (tx_size == plane_tx_size || plane)`), so every chroma unit reads at + TX_4X4: the 4x32 plane codes as 8 stacked 4x4 coefficient units. +- Empirical proof the chunking matches the bitstream: the same fixture bytes + (sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`) + stopped at the (4, 32) refusal before the change; after it, decode consumes + that block's chroma and reaches the LATER intra-arm panic below — entropy + stayed consistent across the chunked units. + +## The fix (scoped to the one shape) + +`read_inter_rect_chroma` (`decode.rs`): when ss is (1, 0) and the write rect +is exactly (4, 32), chunk into (4, 4) units — the existing multi-unit loop +then stamps per-unit chroma neighbour contexts, embeds into the square-stride +grid, and returns the per-unit list for the tail's re-stamp, unchanged. Each +unit reads `TxbSet::Chroma4` / `default_scan(4)` (the lane-av1-422j rows) and +inherits NO tx_type (`av1_get_tx_type` returns DCT_DCT for +`tx_size == TX_4X4`, blockd.h), so `inherit_tx_type` is `None` for these +units. + +Counter `CHROMA422_CHUNK_HITS` (+ `chroma422_chunk_hits()`, printed by +`decode_probe` as `chroma422_chunk:`): one hit per TX_4X4 chunk unit read; a +4:2:0/4:4:4 frame cannot increment it. On the current fixture the probe +panics at the later stop before `report()` prints, so the number is not yet +exercised on a full decode; the units demonstrably ran (frontier evidence +above). + +## Next stop named (NOT fixed — another shape, another lane's arm) + +`decode_inter_block`'s INTRA arm (lane-av1-422k's +`read_rect_chroma_unit` call, `decode.rs`:35166/35208) codes a 64x64 intra +block's 4:2:2 chroma plane as ONE (32, 64) unit with `TxbSet::Chroma32`: + +``` +thread 'main' panicked at crates/ec-av1/src/decode.rs:7195:9: +rect coeff scratch w=32 h=64 n=2448 +``` + +libaom chunks that plane too: the intra residual walk +(`read_coeffs_and_intra`, decodeframe.c) steps `av1_get_tx_size` units, and +`av1_get_max_uv_txsize(BLOCK_64X64, 1, 0)` = +`av1_get_adjusted_tx_size(TX_32X64)` = **TX_32X32** (`blockd.h:1361`), i.e. +two 32x32 units per plane. Lifting it means re-plumbing the k lane's +whole-plane arm into a per-unit walk (set rows, per-unit `around_mi_422_chroma` +contexts, restamp) — that is the intra 4:2:2 chroma lane's territory, and the +(4, 32) inter shape this ticket owns is done. + +## Verification + +- `cargo check -p ec-av1 --all-targets` (target dir + `~/.cache/cargo-target-av1422m`): **0 warnings**. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ + pixel_exact`: 1 passed, 0 failed. +- Header refusal restored byte-identical after the probe bypass + (`stream.rs` refusal block untouched); default 4:2:2 refusal fires as + before. +- Oracle decode reference for the fixture: `$HOME/.cache/aom-oracle/build/ + aomdec` → 16 shown frames (I422 y4m). +- Untouched: the 4:2:0 group-tail chroma SKIP arm, the k lane's + `read_rect_chroma_unit` arms, `rect_inter_chroma_set`'s tables (no new row; + the (4, 32) refusal arm stays for any FUTURE unchunked arrival). + +## State + +- Commit on lane-av1-422m (no push): the chunking + counter + probe print + + this report. +- No table row added. The header refusal stands. diff --git a/lanes/av1422mi24.report.md b/lanes/av1422mi24.report.md new file mode 100644 index 00000000..c050af98 --- /dev/null +++ b/lanes/av1422mi24.report.md @@ -0,0 +1,106 @@ +# lane-av1422mi24 — the t422 inter ladder continued from mi(24,60): the +# square/rect block chroma context gathers routed through the 4:2:2 +# every-second-above-cell sampling; frame-1 entropy now in FULL rng lockstep +# and ALL frames' LUMA decodes exact; the residual is a chroma pixel-level +# class (entropy-identical), first site named below + +## Outcome + +1. **Reproduction at HEAD 95408ed3.** The ctxgather lane's named residual + reproduced exactly: frame 0 exact at prefilt/postdeb/postcdef; frame 1 + prefilt first diffs Y (96,240) = mi(24,60), U chroma (2,44), V (0,44). +2. **The mi(24,60) divergence localized (rng-anchored lockstep, + EC_TRACE_PART + EC_AV1_TRACE pairing vs the oracle's EC_PART).** 293 + partition reads matched rng-for-rng; the walk first misaligned at the + NEXT 16x16 read (mi(24,60) pre-read rng 52112 vs oracle 64776). Window + diff (EC_ISTEP / EC_COEFF / EC_COEFF_STEP) pinned the first divergent + symbol: the **U dc_sign read of the mi(24,56) 16x16 inter block** — ours + `dc_sign_cdf[0]`, oracle row 1. Every level read around it matched + rng-for-rng: the coefficient scan placement is CORRECT (the codebase's + row-major SCAN_8X16/SCAN_16X8 pair and libaom's column-major + default_scan_8x16/default_scan_16x8 enumerate identical (row, col) + orders; verified cell by cell against the oracle source). +3. **Root cause, class `per-mi chroma context gather` (the ctxgather + lane's own rule, three more sites).** At ss (1,0) one chroma 4-px + column spans TWO luma mi columns; the plain + [`Neighbours::around_mi_rect`]/[`around_mi`] walk samples the above + span per luma mi and counts every chroma column's whole-unit dc sign + twice, so `dc_sign_ctx`'s vote sum lands one sign row off. Three block + classes still gathered per-mi at ss (1,0): + * `decode_inter_block`'s block `around` — single-TU arm AND the + var-tx/mu arm (square blocks: the mi(24,56) 16x16; rect_tu strips: + 16x8 pieces), previously only the strip-pair `around_c` was routed; + * `decode_rect_split`'s `chroma_tiled` arm — the else branch kept the + plain walk for every non-(4,32) unit, so a 16x8 intra-in-inter + strip's (8, 8) chroma unit (mi(26,60), the frame-1 HORZ pair's second + piece) read its U dc_sign one row high; + * `decode_rect_split`'s unsplit single-TU chroma arm (line ~10863) + and `decode_intrabc_rect`'s two chroma gathers — same class, fixed + under the same ss (1,0) gate. The intrabc arms are UNREACHABLE on the + pinned fixture (`intrabc_hits: 0`): verified by gating only, not by a + 4:2:2-intrabc witness (per the intrabc inventory discipline the + owning lane should witness them). + Every edit is gated `ss_x == 1 && ss_y == 0` with the non-4:2:2 arm the + original expression verbatim. +4. **Diagnostic parity (Main's request): [`around_mi_422_chroma`] now + prints the same env-gated `EC_DCDUMP422` block `around_mi_rect` prints** + (sampled above cells), so a rerouted 4:2:2 chroma gather stays visible + under `EC_DCDUMP=1`. +5. **Oracle ground truth used:** the instrumented aomdec's `EC_DBGCTX` + chroma context dump (cells + the built binary's `dc_sign_contexts` + table, extracted from the binary: signum semantics {neg:1, 0:0, + pos:2}, matching our `dc_sign_ctx`). The src tree's table literal + differs from the built one; the binary is authoritative. + +## Verification + +- **Partition lockstep, frame 1, post-fix (decode_probe + + EC_TRACE_PART vs oracle EC_PART, 2-frame fixture):** 300/300 oracle + partition reads match rng-for-rng in walk order (ours consumes 4 extra + gathered `EC_PARTG` prints the oracle does not emit) — **no rng + mismatch anywhere in the frame**. +- **t422 inter ladder re-measured** (decode_probe + + EC_AV1_{PREFILT,POSTDEBLOCK,POSTCDEF}_DUMP vs the oracle stage dumps, + our dumps /tmp/i422/av1422mi24/*{prefilt,postdeb,postcdef}*8): + * frame 0: exact at all three stages; + * **LUMA: 0 diffs on EVERY frame 1–15 at prefilt AND postdeb** (frame 1 + was 2146 diffs pre-lane; frame 3 was 25163). Frame 15 postcdef shows + Y=5059 — a CDEF knock-on: CDEF decisions read the (still wrong) + chroma, not a luma defect (postdeb f15 Y=0); + * chroma: frame 1 U 4346 → 4175, V 4974 → 4636; frames 3–14 chroma + improved on every plane (e.g. f3 U 12610 → 4363); first U diff moved + to chroma (4,44). +- **Frame exactness claimed ONLY where measured 0:** frame 0 all stages; + frames 1–15 LUMA at prefilt/postdeb. Frames 1+ chroma are NOT claimed. +- **The residual, site named (next lane's first diff).** With entropy in + full lockstep (luma exact everywhere proves it), the remaining chroma + diffs are a PIXEL-level class, entropy-identical: first frame-1 diffs + U chroma (4,44) → luma (88,8) — the 8x8 inter leaf mi(0,22)'s chroma: + U rows 0..3 exact, rows 4..7 wrong; V col 44,45 rows 0..15. The oracle + reads NO U residual there (no `EC_COEFF plane=1` at chroma cell + (11,0)), so this is a chroma prediction/reconstruction defect for sub-8 + 4:2:2 leaves (`chroma422_sub8` / `sub8_inter_split` territory), not a + context-gather defect. CDEF-stage luma diffs on f15 are downstream of + it. +- **4:2:0/4:4:4 identity:** every edit is ss (1,0)-gated with the other + arm verbatim; the lossless gate battery stays green — 8 passed 0 failed + including `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`, + `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact`. +- `cargo check -p ec-av1` (target dir `~/.cache/cargo-target-av1422mi24`): + **0 warnings, 0 errors**. +- The `EC_AV1_ALLOW_422_PROBE` bypass was applied to stream.rs for the + probe runs and REVERTED; `git status` names only decode.rs. +- Charter note: the s2.obu mandelbrot re-run was DONE by Agent104 (still + panics at decode.rs:3709, empty pred slice — bigblock lane's defect); + dropped from this lane per Main. + +## State + +- Commit on lane-av1-422mi24 (no push): the ss (1,0) chroma-gather fixes + in `crates/ec-av1/src/decode.rs` + this report. +- Next stop named for the owning lane: the chroma pixel-level class — + first site the frame-1 8x8 inter leaf mi(0,22)'s chroma (U rows 4..7, + V rows 0..7, chroma cols 44..47), prediction/reconstruction for sub-8 + 4:2:2 leaves with entropy in lockstep; and the f15 postcdef CDEF + knock-on disappears with it. diff --git a/lanes/av1422n.report.md b/lanes/av1422n.report.md new file mode 100644 index 00000000..ad968aed --- /dev/null +++ b/lanes/av1422n.report.md @@ -0,0 +1,74 @@ +# lane-av1-422n — e24dc84b's (4, 32) chunk is corrected from eight TX_4X4 to +# FOUR TX_4X8 units; the header refusal STAYS (the stream is not pixel-exact +# and stops at the (2, 16) rect-pair chroma shape) + +## Outcome + +1. `read_inter_rect_chroma`'s invalid-ss-size arm now chunks the (4, 32) + 4:2:2 chroma plane of an 8x32 luma block into FOUR TX_4X8 units per plane + (a 1x4 grid: 4 wide, 8 tall each). The committed eight-TX_4X4 chunking + was wrong: reviewer FAIL on e24dc84b. `BLOCK_INVALID` is 255, and the + out-of-bounds byte `get_vartx_max_txsize` reads from + `max_txsize_rect_lookup` in the pinned Release oracle build is TX_4X8 — + not the "adjacent `vtx_tab[0]` = TX_4X4" the m report claimed. +2. The units KEEP a tx type: `av1_get_tx_type` (blockd.h) has no TX_4X4 + early-out, so the m lane's `inherit_tx_type = None` special case is gone. + The units derive the type from the block's luma type through + `reduce_inherited_chroma_tx_type` into the TX_4X8 ext-tx set, exactly + like every other rect unit on this path. `(4, 8)` resolves through the + existing `rect_inter_chroma_set` row `(8, 4) | (4, 8) => ChromaRect8x4`; + no table row was added, and the (4, 32) refusal arm below it stays. +3. The (32, 64) intra chroma edit made earlier this session was REVERTED + per instruction before the chunk fix; the intra arm is byte-identical to + e24dc84b. 4:2:0 paths untouched. + +## Counter (first real exercise of `CHROMA422_CHUNK_HITS`) + +With the header refusal temporarily bypassed (probe only, restored +byte-identical — see below), the fixture walks 32 TX_4X8 chunk units +(`CHROMA422_CHUNK_HITS`, instrumented per unit) before the next stop. The +m report's count never printed because the probe panicked first; with the +corrected chunking the units demonstrably run. + +## Frontier (NOT fixed — another shape, another lane's arm) + +`decode_rect4_16_strip`'s closed chroma-shape set (`decode.rs:14902`) has no +`(2, 16)` row: a 4x16 luma pair's 4:2:2 chroma plane arrives there and hits +the `unreachable!`. The probe decodes frame 1 and stops early in frame 2, +after the 32 TX_4X8 units. The (32, 64) intra scratch panic did NOT +reproduce on this walk — this stop precedes it. + +## Pixels — delete condition unmet, refusal STAYS + +- Frame 1 (keyframe): luma byte-exact vs `aomdec` (oracle: 16 shown I422 + frames); U/V diverge from chroma (23, 0) on — a pre-existing keyframe + 4:2:2 chroma gap present at e24dc84b too (frame 1 decodes through + `decode_block`, which neither `read_inter_rect_chroma` nor the intra arm + touches). +- Frames 2+ are not comparable (the frame-2 stop above). +- The 16-frame pixel-exact + counter delete condition is unmet, so the + header refusal stands untouched. + +## Verification + +- `cargo check -p ec-av1 --all-targets` (target dir + `~/.cache/cargo-target-av1422n`): **0 warnings**. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ + pixel_exact`: 1 passed, 0 failed. +- Probe bypass reverted: `git diff` after the run shows ONLY + `crates/ec-av1/src/decode.rs` (the chunk fix + comment rewrite); the + default 4:2:2 refusal fires as before (`REFUSED: unsupported: ... 4:2:2 + ...`). +- Oracle reference: `$HOME/.cache/aom-oracle/build/aomdec` on the fixture + (sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`) + → 16 shown frames. +- Untouched: the (4, 32) refusal arm in `rect_inter_chroma_set`, the 4:2:0 + group-tail chroma SKIP arm, the k lane's `read_rect_chroma_unit` arms, + `decode_probe.rs` (byte-identical to e24dc84b). + +## State + +- Commit on lane-av1-422n (no push): the corrected chunking + this report. +- Next stop named for the owning lane: `decode_rect4_16_strip` chroma shape + `(2, 16)`. diff --git a/lanes/av1422o.report.md b/lanes/av1422o.report.md new file mode 100644 index 00000000..a27898ae --- /dev/null +++ b/lanes/av1422o.report.md @@ -0,0 +1,110 @@ +# lane-av1-422o — the (2, 16) stop is NAMED and dispositioned: libaom has no +# such transform; the odd strip is the chroma reference and codes the PAIR's +# (4, 16) as TWO TX_4X8 units per plane; the header refusal STAYS (the walk +# now stops in `decode_block_rect4`'s chroma shape set at 4x32) + +## Outcome + +1. Step 1 of the charter (print before adding): with the header refusal + temporarily bypassed (probe-only, restored byte-identical — see below), + the refusing shape printed as `(cw,ch)=(2,16) ss=(1,0)`. The walk's own + `(2, 16)` is the EVEN strip's own chroma — a shape libaom never codes. + The port does not chunk it; it is UNREACHABLE after the fix. +2. `decode_rect4_16`'s `has_chroma` is per axis now: a VERT 4x16 strip (1 mi + wide) keeps libaom `is_chroma_reference`'s column clause + `(mi_col & 1) || !(bw & 1) || !ss_x`, which with bw == 1 mi reduces to + `mi_col odd` at every ss_x == 1 format. The old `i % 2 == 1 || ss_y == 0` + marked even strips as chroma references at 4:2:2 — the source of the + phantom (2, 16). HORZ strips keep `i % 2 == 1 || ss_y == 0` (all four + strips are references at ss_y 0); 4:2:0 and 4:4:4 resolve to the exact + same flags as before in all four strip/format combinations. +3. `decode_rect4_16_strip`'s own-chroma arm is HORZ-only now; a VERT strip + falls through to the pair merge `((lmi.0, lmi.1 - 1), 8, 16)` — the + closing strip codes the pair's chroma at the pair's origin + (`setup_pred_plane`'s `mi_col -= 1` snap), giving (cw, ch) = (4, 16) at + ss(1,0). The old comment claiming "a conformant stream carries no such + leaf" is disproven by the fixture itself and is gone. +4. The (4, 16) at ss_x == 1 is CHUNKED the way the pinned oracle walks it + (`chroma422_pair16` arm): `ss_size_lookup[BLOCK_4X16][1][0]` is + BLOCK_INVALID (common_data.c row `{ { BLOCK_4X16, BLOCK_4X8 }, + { BLOCK_INVALID, BLOCK_4X8 } }`), so `av1_get_tx_size` reads + `max_txsize_rect_lookup[255]` — the out-of-bounds byte is TX_4X8 + (skill-measured, 0x05) and `av1_get_adjusted_tx_size` has no TX_4X8 + case. `decode_token_recon_block` then walks unit_width = + ROUND_POWER_OF_TWO(1, 1) = 1, unit_height = 4, stepr = + tx_size_high_unit[TX_4X8] = 2, stepc = 1: TWO TX_4X8 units per plane, + plane-major, the lower one predicted off the upper one's samples. The + skip arm walks the same two units (prediction runs per unit regardless + of `skip_txfm`). No coefficient-table row was added: the units ride the + existing `(4, 8) => ChromaRect8x4` entropy class via + `read_rect_chroma_unit`. +5. The chunk's `txb_skip_ctx` rides the same INVALID lookup: libaom + `get_txb_ctx_general`'s chroma branch picks the offset (7 vs 10) through + `num_pels_log2_lookup[plane_bsize] > num_pels_log2_lookup[BLOCK_4X8]` + with plane_bsize = 255. Measured, not guessed: the pinned Release + oracle's decodetxb.c code indexes the `num_pels_log2_lookup` copy at + vaddr `0xc0db70` (objdump: `cmpb $0xb,0xc0db70(%r15)` et al.), and the + byte at that offset + 255 is 255 → offset 10 → the port's + offset-7-first tables take `+3` (above + left + 3), the same shape the + square multi-unit walks already use. +6. No tx_type symbol: only y plane's is transmitted (decodetxb.c "only y + plane's tx_type is transmitted"); the intra chroma unit's type is + `intra_mode_to_tx_type(UV mode)` kept by the all-16 ext-tx set — exactly + `read_rect_chroma_unit`'s own default. CfL parameters are computed once + per block over the pair's luma (`are_parameters_computed`) and shared by + both units; the DC-pred cache is dead in this build (`use_dc_pred_cache` + never set true), so each unit predicts its own DC. + +## Counter (CHROMA422_RECT_HITS, instrumented per unit, temp print removed) + +The walk reads EIGHT chunk units — two pairs (mi (28, 44) and (32, 52)), +each plane-major: U unit row 0, U unit row 1, then V units — mi rows 2 +apart (8 px) — and the counter ticks 100 → 101 → … → 107 across them +(`chroma422_rect=107` on the last line). Delta 8 = 2 planes x 2 units x 2 +pairs. The pre-fix walk stops with the counter parked at 100. + +## Frontier (NOT fixed — another shape, another function) + +`decode_block_rect4`'s closed chroma-shape set has no `4x32` row: +`decode.rs:13550` panics `decode_block_rect4 chroma shape set is closed: +4x32` on the same probe walk after the (2, 16) fix. That function is the +VERT_4 pair reader one level up; it is NOT edited here — named for its +owning lane. + +## Pixels — delete condition unmet, refusal STAYS + +- Frame 1: no VERT_4 4:2:2 strip occurs before the old stop point, so + frame 1's decode is untouched by this diff; its luma stays byte-exact vs + `aomdec` and its U/V keep the pre-existing keyframe chroma gap from + chroma (23, 0) on (`decode_block`'s own gap, present at e24dc84b, not + this lane's function). +- The walk stops inside frame 2 at `decode_block_rect4`'s 4x32, so the + 16-frame pixel-exact + counter delete condition is unmet: the header + refusal stands untouched (verified below). + +## Verification + +- `cargo check -p ec-av1 --all-targets` (target dir + `~/.cache/cargo-target-av1422o`): **0 warnings**. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_ + decodes_pixel_exact`: 1 passed, 0 failed. +- Probe bypass reverted: `git diff` shows ONLY `crates/ec-av1/src/decode.rs` + (+144/−12); `stream.rs` is byte-identical and the probe without the + bypass prints `REFUSED: unsupported: AV1 decode_stream (a chroma format + of 4:2:2 ...)` as before. +- Oracle reference: `$HOME/.cache/aom-oracle/build/aomdec` on the fixture + (sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`) + → 16 shown frames. +- Untouched: `read_inter_rect_chroma` (the four TX_4X8 (4, 32) chunk + stays), the 4:2:0 group-tail chroma SKIP arm, the k lane's + `read_rect_chroma_unit` (called, not edited), `decode_block_rect4` (the + new frontier), `decode_probe.rs`, the lossless arm (shape-generic + per-TX_4X4 walk already handles a (4, 16) pair). + +## State + +- Commit on lane-av1-422o (no push): the has_chroma parity fix, the horz + own-chroma arm, the chroma422_pair16 chunk arms, and this report. +- Next stop named for the owning lane: `decode_block_rect4` chroma shape + `4x32` (decode.rs:13550). diff --git a/lanes/av1422p.report.md b/lanes/av1422p.report.md new file mode 100644 index 00000000..eb09aca4 --- /dev/null +++ b/lanes/av1422p.report.md @@ -0,0 +1,119 @@ +# lane-av1-422p — the 4x32 chroma stop is NAMED and CHUNKED: libaom HAS the +# transform (the BLOCK_INVALID plane block reads max_txsize_rect_lookup[255] +# = TX_4X8 out of bounds), so `decode_block_rect4` walks FOUR TX_4X8 units per +# plane on the offset-10 skip rows; the whole 16-frame stream now decodes, the +# pixels are NOT exact, so the header refusal STAYS byte-identical + +## Outcome + +1. Step 1 of the charter (print before adding): with the header refusal + temporarily bypassed (probe-only, restored byte-identical), the stop + printed `EC_422P_STOP decode_block_rect4 chroma shape (4,32) luma=(8,32) + ss=(1,0)` — the portrait 1:4 leaf the av1422o report named as its + frontier, on the pinned fixture (sha256 `d3fa4beeb1309033e4a03f5ae5c4 + 31c8fa8386ba1ada088684710423c7938129`). +2. Measured, not guessed: `av1_get_tx_size` reads + `max_txsize_rect_lookup[plane_bsize]` with plane_bsize = + `ss_size_lookup[BLOCK_8X32][1][0]` = BLOCK_INVALID (255, `enums.h`). The + byte at +255 of the copy `decode_token_recon_block` actually reads + (objdump: every `movzbl 0xc0d030(%r*)` in that function) is `0x05` = + TX_4X8; `av1_get_adjusted_tx_size` has no TX_4X8 case. The decodetxb copy + of `num_pels_log2_lookup` (the `cmpb` against `0xc0db70(%r15)`, symbol at + 0xc0de70) reads `0xff` at +255, so `get_txb_ctx_general`'s chroma branch + (`txb_common.h`: `num_pels_log2_lookup[255] > num_pels_log2_lookup + [BLOCK_4X8]`) takes the offset-10 arm. Both bytes re-measured on the + pinned Release oracle this session. +3. The chunk (libaom `decode_token_recon_block` semantics: stepr = + `tx_size_high_unit[TX_4X8]` = 2 4-px rows, stepc = 1, unit_width/height + ROUND_POWER_OF_TWO down to (1, 4)): FOUR stacked TX_4X8 units per plane + (chroma rows 0, 8, 16, 24), plane-major, riding the existing + `(4, 8) => ChromaRect8x4` entropy class via [`read_rect_chroma_unit`] — + no coefficient-table row added (BLOCK_4X32 is not a table libaom has). + Each unit is read and recorded immediately: unit row 0's txb_skip_ctx + sees the real neighbour states, lower units see the block's own upper + unit's, and each unit predicts off the upper one's samples. The skip arm + walks the same units (`predict_and_reconstruct_intra_block` predicts + every unit regardless of `skip_txfm`). CfL parameters are computed once + per block over the strip's 8x32 luma and shared by all units. Luma is + the same single TX_8X32 rect the general arm reads. +4. The chunk units' `txb_skip_ctx` is `above + left + 10` + (`get_txb_ctx_general`): the port's offset-7-first `txb_skip_chroma_8` + stores the offset-10 rows at rows 3..6 (lane-av1-422b), so + [`read_rect_chroma_unit`] gained a `chroma_skip_offset: Option` + parameter (mirroring [`read_plane`]'s `chroma_ctx_offset`) and this arm + passes `Some(3)`. Every existing caller passes `None` = + behavior-identical (their rect unit IS the whole plane block, offset-7 + rows); the whole-rect read never sees the new `(4, 32)` match row. +5. 4:2:0 and 4:4:4 are on their existing paths: the chunk is gated on + `(chroma_w, chroma_h) == (4, 32)` at ss(1,0), which only an 8x32 luma + strip at 4:2:2 produces (4:2:0 reads (4, 16), 4:4:4 reads (8, 32)); the + stale "portrait leaves are unreachable / a conformant stream cannot + carry that leaf size" comment is disproven by the fixture and replaced. + +## Counter (probe, bypass env; temp print removed) + +- `rect4_32: vert=1 coded=1` — exactly one 8x32 rect4 strip in the stream, + the block that used to stop. +- Eight unit reads at mi=(24,52), plane-major (U rows 0..3, V rows 0..3), + the temp trace printing skip_ctx 3/4/5 — i.e. the offset-10 rows + (base 0..2 + 3) — and varying unit-to-unit as the block's own upper + units enter the context. +- `chroma422_rect: 172` total rect 422 chroma units across the 16 decoded + frames (CHROMA422_RECT_HITS, ticked inside [`read_rect_chroma_unit`]). +- Pre-fix walk: panics at the stop before any report; post-fix probe prints + `OK: 16 frames decoded, 256x144`. + +## Pixels — delete condition UNMET, refusal STAYS + +- Frame 0 (keyframe): luma byte-EXACT vs `aomdec --rawvideo`; U/V carry + 4491/4888 sample diffs from offset ~23 — the PRE-EXISTING keyframe chroma + gap in [`decode_rect_split`] (the live `EC_RECTCHROMA_GAP luma=16x8 + tx=8x8 chroma=8x8` diagnostics, ×21 plus one 64x32; present at e24dc84b + per the av1422o report, not this lane's function). +- Frames 1..15 diverge widely (luma included), consistent with an entropy + divergence somewhere in the inter walk — this is the first time the + stream decodes past the old stop, so there is no earlier full-stream + baseline to diff against. +- Frontier (NOT fixed — larger than this one shape; named per charter): + 1. **`decode_rect4_16_strip`'s `chroma422_pair16` chunk passes no chroma + skip offset** — it reads the offset-7 rows (txb_skip rows 0..3) where + the same measured rule (plane_bsize BLOCK_INVALID for the pair's + BLOCK_4X16 too) demands offset 10, i.e. `Some(3)`. That function is + the protected av1422o lane fix, so this lane only plumbed `None` + through the new parameter (behavior-identical) and names the defect + for its owning lane. It runs in frame 2 before the 4x32, making it + the prime suspect for the inter-frame divergence. + 2. [`decode_rect_split`]'s own-chroma gap (the EC_RECTCHROMA_GAP class + above). + 3. Our dump carries out-of-range u16 samples on frames 1 (2 samples) and + 14 (6 samples) — an unclipped-output class, unattributed. +- The header refusal stands untouched: `git diff` shows ONLY + `crates/ec-av1/src/decode.rs` (+255/−40); `stream.rs` is byte-identical + and the probe without the bypass prints `REFUSED: unsupported: AV1 + decode_stream (a chroma format of 4:2:2 ...)` as before. + +## Verification + +- `cargo check -p ec-av1 --all-targets` (target dir + `~/.cache/cargo-target-av1422p`): **0 warnings, 0 errors**. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed ("6 pixel-exact + matches, 0 named refusals"). +- Oracle reference: `$HOME/.cache/aom-oracle/build/aomdec` on the fixture → + 16 frames raw 4:2:2, per-frame per-plane diffed against `dump_yuv`. +- Untouched: `decode_rect4_16_strip` (mechanical `None` arg only, no + behavioral edit), `read_inter_rect_chroma` (the four TX_4X8 (4, 32) inter + chunk stays), the 4:2:0 group-tail chroma SKIP arm, `decode_probe.rs`, + the lossless arm (depth != 0 || lossless returns before the chroma + table), the landscape (16,8)/(8,4) arms, and every existing + [`read_rect_chroma_unit`] caller's decode behavior. + +## State + +- Commit on lane-av1-422p (no push): the chroma_skip_offset parameter, the + 4x32 chunk arms (skip and non-skip), the corrected portrait-leaf comment, + and this report. +- Next stop named for the owning lane: the `chroma422_pair16` offset-10 + skip rows in `decode_rect4_16_strip`, then the inter-frame walk's first + divergence against the oracle. diff --git a/lanes/av1422q.report.md b/lanes/av1422q.report.md new file mode 100644 index 00000000..dca998f1 --- /dev/null +++ b/lanes/av1422q.report.md @@ -0,0 +1,42 @@ +# lane-av1-422q — the av1422p frontier's prime suspect APPLIED: the +# `chroma422_pair16` chunk passes `Some(3)` (the offset-10 skip rows), the +# 4x32 arm and every other caller untouched, the header refusal STAYS + +## Outcome + +1. The one-argument change, nothing else: `decode_rect4_16_strip`'s + `chroma422_pair16` arm now passes `Some(3)` to [`read_rect_chroma_unit`]'s + `chroma_skip_offset` (was `None`). Same measured rule as the 4x32 arm: + the pair's plane_bsize is `ss_size_lookup[BLOCK_4X16][1][0]` = + BLOCK_INVALID too, and the decodetxb copy of `num_pels_log2_lookup` reads + `0xff` at +255 (0xc0de70), so libaom's `get_txb_ctx_general` takes the + offset-10 arm; the port's offset-7-first `txb_skip_chroma_8` holds those + rows at 3..6. The stale lane-av1-422p `None` comment (which claimed the + offset-10 question was still open) is replaced by the measured rule. +2. Untouched, byte-identical: the 4x32 arm's existing `Some(3)`, every other + [`read_rect_chroma_unit`] caller (`None`), the 4:2:0 group-tail chroma + SKIP arm, `decode_probe.rs`, `stream.rs`, and the 4:2:2 header refusal + (the charter's delete condition — 16-frame pixel-exact + a 422-unit + counter — was not claimed this session, so nothing was deleted). + +## Verification + +- `git diff`: ONLY `crates/ec-av1/src/decode.rs` — one argument + (`None` -> `Some(3)`) plus its comment (+7/−5 lines). +- `cargo check -p ec-av1` (target dir `~/.cache/cargo-target-av1422q`): + **0 warnings, 0 errors**. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed. +- Not exercised this session (honest gaps): the 16-frame 4:2:2 stream was + NOT re-decoded and no pixel comparison was run — this lane's scope was the + single argument; whether the offset-10 rows fix the inter-frame + divergence is the next lane's diff. + +## State + +- Commit on lane-av1-422q (no push): the `Some(3)` argument, the corrected + comment, and this report. +- Next stop named for the owning lane: re-run the 16-frame probe/bypass with + counters and diff frames 1..15 against the aomdec oracle — the av1422p + report named this arm the prime suspect for the inter-frame divergence. diff --git a/lanes/av1422r.report.md b/lanes/av1422r.report.md new file mode 100644 index 00000000..60566a39 --- /dev/null +++ b/lanes/av1422r.report.md @@ -0,0 +1,76 @@ +# lane-av1-422r — REMEASURE after the q `Some(3)`: the first remaining diff is +# STILL frame 0 plane U (0, 23) ours=50 vs oracle=49 — first of the 4491-sample +# `decode_rect_split` own-chroma keyframe gap, NOT one wrong index — the +# inter-frame divergence PERSISTS (frames 1..8 differ from (0,0)), and the walk +# now PANICS at frame 9 in [`read_coeffs_rect`] (rect coeff scratch 36×36 < +# the 4:2:2 TX_32X64 chroma unit's 36×68). Stopped and named per charter. + +## Outcome + +1. Remeasured the pinned fixture (sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa + 8386ba1ada088684710423c7938129`) at 03be6bad against + `$HOME/.cache/aom-oracle/build/aomdec --rawvideo` (16 frames, i422), probe + dump `EC_PROBE_OUT16`, local `EC_AV1_ALLOW_422_PROBE` bypass, reverted + byte-identical after (`git status` clean before the report commit). Do not + trust the p-report diff numbers blindly: re-derived per-frame per-plane + first diffs from the raw dumps this session. +2. **The first remaining diff: frame 0, plane U, row 0, col 23, ours=50, + oracle=49.** Frame 0 luma is byte-exact; frame 0 carries 4491 U + 4888 V + diffs — the counts are byte-IDENTICAL to the pre-fix p-report measurement, + as expected: frame 0 is the keyframe and the pair16/4x32 arms never run + there. The class is [`decode_rect_split`]'s own-chroma gap (the live + `EC_RECTCHROMA_GAP luma=16x8 tx=8x8 chroma=8x8` diagnostics). 4491 samples + is not one wrong index → charter step 3: STOP and name the function: + **`decode_rect_split`** (own-chroma reconstruction at ss(1,0)). +3. **The offset suspect is refuted for the inter-frame divergence**: frames + 1..8 diverge from sample (0,0) in all three planes (frame 1: Y (0,0) + ours=78 oracle=80, U (0,0) 230 vs 87, V (0,0) 165 vs 245; plane totals + over 9 frames Y=258976, U=125891, V=124050). The q lane's `Some(3)` did + not sync the inter walk. Note the U/V frame-1 offsets are consistent with + MC inheritance of the already-wrong frame-0 chroma; the Y divergence + (frame 0 Y exact) is a separate inter-path question that cannot be + localized while chroma inherits the frame-0 gap. +4. **New hard stop, frame 9**: `read_coeffs_rect` panics + `rect coeff scratch w=32 h=64 n=2448` (decode.rs:7129, panic at :7195). + The scratch bound `n <= 36*36` covers ≤32×32 units; a 64×64 luma block at + ss(1,0) has plane_bsize `ss_size_lookup[BLOCK_64X64][1][0]` = BLOCK_32X64 + (NOT invalid — unlike the p/q chunks), `max_txsize_rect_lookup` reads + TX_32X64, and (32+4)×(64+4) = 2448 exceeds the bound. Frames 9..15 are + unmeasurable until this is lifted. This shape never fired pre-fix because + the unsynced walk never reached it. +5. 4 u16 samples out of 8-bit range across frames 0..8 (the p report's + unclipped-output class, still unattributed; was 2+6 over 16 frames). + +## Decision + +- First diff is a 4491-sample class → no one-index fix exists; stopped per + charter. Functions named: [`decode_rect_split`] (owns the first diff) and + [`read_coeffs_rect`] (scratch capacity, blocks frames 9+). +- Header refusal STAYS: delete condition unmet (not pixel-exact — frame 0 + alone carries 9379 chroma diffs; no full-stream proof possible with the + frame-9 panic). `stream.rs` untouched; the bypass was local-only and is + not in the commit. + +## Verification + +- Ours: 9 complete frames dumped before the panic (147456 B/frame u16); + oracle: 16 frames i422. Stride-checked comparison (u16 elements vs bytes — + the first compare script had a byte/element stride bug; frame 0's numbers + were unaffected and frames 1..8 were re-derived at the correct stride). +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422r`): 0 + warnings, 0 errors. +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: + `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed. +- `git status` clean after bypass revert; this commit carries ONLY this + report. + +## State + +- Commit on lane-av1-422r (no push): this report, nothing else. +- Next stop named for the owning lane: lift [`read_coeffs_rect`]'s scratch + bound for TX_32X64 (36×68 levels — likely a heap fallback like + [`read_coeffs`]'s, or a 68-row stack tier), re-run the 16-frame remeasure, + THEN take the frame 1 luma (0,0) inter divergence with frame-0 chroma + inheritance accounted for; [`decode_rect_split`]'s own-chroma gap remains + the owner of the literal first diff. diff --git a/lanes/av1422sqedge.report.md b/lanes/av1422sqedge.report.md new file mode 100644 index 00000000..7b307359 --- /dev/null +++ b/lanes/av1422sqedge.report.md @@ -0,0 +1,92 @@ +# lane-av1422sqedge — the 4:2:2 square inter chroma MC row-MV axis fixed at +# source: every chroma MC site scaled the ROW motion component with the X +# subsampling (`mv_to_q4(cpy, mv.0, ss_x)`), so at ss (1,0) the vertical +# fetch position used half the row MV; the named frame-1 U (32,87) / V +# (32,80) residual is exact and chroma improved on every frame + +## Outcome + +1. **Reproduction at HEAD ce97ea17.** The residual_next_lane site reproduced + exactly on the pinned t422 fixture (`/tmp/i422/t422_2f.obu`, + sha256 d166ebf3...): frame 0 exact; frame 1 Y exact, U first diff + (32,87) / V (32,80) with 3837 / 3879 diffs — byte-identical counts to the + parent lane's report. +2. **Site correction (the parent lane's reading was wrong).** The named + blocks are NOT "16x16→8x8→NONE leaves". The oracle's own partition trace + (EC_PART, frame 1, tell=7910) reads `bsize=6 value=0` at mi(8,40): ONE + 16x16 PARTITION_NONE inter block spanning mi(8,40..43), whose 4:2:2 + chroma is ONE 8x16 MC call per plane at chroma (32,80) (oracle rung + AOMIN48: `row=32 col=80 bw=8 bh=16 sx=0 sy=0`). Our decoder decoded the + same block (partition value 5=HORZ_B-style check elsewhere; here both + sides in sync, luma byte-exact) and made the same 8x16 chroma calls — + with `y_q4=496` where the oracle fetches row 30 (`y_q4=480`). +3. **Root cause, class `chroma-mc-row-axis-ss`** (13 sites): the chroma + MC's ROW component took `mv_to_q4(cpy, mv.0, ss_x(fctx))`. libaom scales + each axis with its OWN subsampling (reconinter.h:139-141: + `orig_pos_y += src_mv->row * (1 << (1 - ssy))`), so at 4:2:2 (ss_x=1, + ss_y=0) the row shift was halved: mv=(-16,0) fetched chroma rows 31..46 + instead of 30..45 — ±1-class diffs hugging every reference value + boundary (the "rightmost chroma column" pattern). 4:2:0/4:4:4 are + value-identical (ss_x==ss_y) and provably untouched. +4. **Fix:** row axis now passes `ss_y(fctx)` at all 4:2:2-reachable chroma + MC sites — `decode_inter_block`: single-ref U/V (unscaled 34398/34413, + scaled 34445/34461), compound U/V mv0/mv1 (32920/32998, 32948/33026), + the 1:4-strip sub8 piece's prev_mv call (34556); `decode_inter_block8`: + compound U/V mv0/mv1 (39586/39633, 39601/39648). Sites left verbatim + (already correct or unreachable at 4:2:2): the 422 sub8 piece arm + (37085/37126 already `ss_y`), the 420-only group arm (37285, ss_x==ss_y + there), the chroma_444 piece arms (36975/38484, ss 0/0), the OBMC + neighbour predictor and both warp call families (per-axis args). + +## Verification + +- **Localization evidence** (oracle build `$HOME/.cache/aom-oracle/build`, + env-gated rungs added to reconinter.c / reconinter_template.inc: + `AOMIN48` inputs, `AOMOUT48` post-prediction dst, `AOMMV48` mv+anchor; + all inert without `AOMIN48=1`): oracle `AOMMV48 row=32 col=80 bw=8 bh=16 + mv=(-16,0) sx=0 sy=0` vs our `OUR_SQEDGE`-rung capture cpx=80 cpy=32 + mv=(-16,0) — identical inputs; only our y_q4 differed (496 vs 480), + pinning the defect to the axis argument, not the MV or position. The + temp `EC_DBG_SQEDGE` rung in decode_inter_block was REMOVED before this + commit (no trace remains). +- **t422 16-frame ladder** (`/tmp/i422/t422_16f.obu`, sha256 dda96300..., + decode_probe + prefilt/postdeb/postcdef stage dumps vs the oracle's): + * frame 0: EXACT at prefilt, postdeb AND postcdef (Y, U, V all 0); + * LUMA: 0 diffs on frames 1–14 at prefilt, postdeb AND postcdef + (f15 postcdef Y=5059 is the mi24 lane's pre-existing luma CDEF knock-on + class: luma prefilt/postdeb f15 are 0 and this lane's edit only moves + chroma fetch positions, which cannot alter luma filter decisions); + * chroma improved on BOTH planes at EVERY frame vs the parent lane's + tree (e.g. f1 U 3837→2231, V 3879→2197; f14 U 7381→5177, + V 7545→5188); the named sites (rows 32..47, cols 80..87) are exact. +- **Frame exactness claimed ONLY where measured 0:** frame 0 all stages; + frames 1–14 luma at prefilt/postdeb/postcdef. Frames 1–15 chroma are NOT + claimed (reduced, not exact). +- **4:2:0/4:4:4 identity:** the lossless gates stay green — + `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`, + `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact` + (8 lossless gates green in total). +- `cargo check -p ec-av1` (target dir `~/.cache/cargo-target-av1422sqedge`): + **0 warnings, 0 errors**. `git status` names only decode.rs + this + report; the `EC_AV1_ALLOW_422_PROBE` stream.rs bypass was applied for the + probe runs and REVERTED. + +## State + +- Commit on lane-av1-422sqedge (no push): the 13 `ss_x`→`ss_y` row-axis + fixes in `crates/ec-av1/src/decode.rs` + this report. +- **The residual, site narrowed (next lane's first diff).** Frame-1 prefilt + chroma now first diffs at U/V (row 88, col 104): the 8x8→HORZ pair of + 8x4 strips at mi(22,52) (luma rows 88..95, cols 208..215; chroma cols + 104..111). Oracle MC: one 4x4 chroma call per plane at chroma (88,104) + for the FIRST strip (subpel 0, mv 0 — the prediction is a pure reference + copy: 202,204,204,167) and NO strip-2 chroma MC call at (92,104). Ours + makes the same (104,88) 4x4 call with the same inputs, but our written + rows 88..91 (206,204,202,200) are NOT that call's output — the strip + chroma write/anchor path (rect-strip chroma units at ss (1,0), + `read_inter_rect_chroma` / pair-write territory) is the suspect, NOT MC + input selection. `is_chroma_reference` (av1_common_int.h:1454) says BOTH + 8x4 strips are chroma references at ss (1,0); how the oracle fills rows + 92..95 needs pinning first (oracle rung window currently rows 84..100, + cols 96..120). diff --git a/lanes/av1422stripanchor.report.md b/lanes/av1422stripanchor.report.md new file mode 100644 index 00000000..82433162 --- /dev/null +++ b/lanes/av1422stripanchor.report.md @@ -0,0 +1,103 @@ +# lane-av1-422stripanchor — `decode_rect_split`'s 4-wide-strip chroma ported to +# the split4 floored-pair anchor (`chroma422_pair_plane`), the ported pair +# plane tiled in the (4, 8) OOB units, and the (2, 16)/(2, 8) refusal shapes +# handled — frame 0 of the pinned t422 fixture stays byte-exact at +# PREFILT/POSTDEBLOCK/POSTCDEF/FINAL (first round with the FINAL rung +# measured), all 16 frames decode, and the port is measured inert on the +# fixture (`chroma422_pair_wide: 0`): NO stream reaches it today, so the lift +# is by construction and stays unwitnessed + +## Outcome + +1. `chroma422_pair_plane` (decode.rs, beside `depth_to_tx_wh`): the split4 + floored-pair anchor ported to `decode_rect_split`'s 1-mi-wide strips. A + strip whose own chroma block would be 2 px wide at ss (1, 0) — luma + `(4, 16)`/`(4, 8)`, the footprints `av1_ss_size_lookup[BLOCK_4X16]`/ + `[BLOCK_4X8][1][0]` mark BLOCK_INVALID (verified in the pinned oracle's + `common_data.c`, not from prose) — codes the PAIR's `(4, bh)` plane: + WRITE/PREDICTION anchor `((mi_col & !1) * MI) >> ss_x` + (`av1_setup_dst_planes`' mi-exact floor, the lane-av1-422kf2/ + `sub8_leaf_chroma422` rule), entropy cell at the floored mi column, and + the odd-column strip is the chroma reference (`is_chroma_reference`'s + `mi_col & 1` clause, the rule `decode_rect4_16_strip`'s pair16 arm + implements one partition level up). `None` on every other cell: 4:2:0 and + 4:4:4 can never produce a 2-px-wide chroma block, so their routing is + unchanged per format cell. +2. The skip and tiled chroma arms take the pair geometry: per-(4, 8) unit + walks over `(chroma_block_w, chroma_block_h)` at the floored anchor + `chroma_x` (the blockhalf lane's per-unit skip-push lesson kept), + `around_mi_422_chroma` per chroma cell, `bigger` forced (the invalid + plane's `num_pels_log2_lookup[255]` byte reads 0xff — the av1422q +3 rows) + , CfL source over the PAIR's 8-px luma band, and the chroma `reach` is the + pair block's (`Reach::of_rect(8, bh, pair_px, py, ..)`), not the odd + strip's own. Every pre-existing expression reduces to its old value when + `chroma_422_pair_wide` is false; the lossless raster arm is untouched (its + domain cannot present a 4-wide strip). +3. The `(2, 16)` refusal (the inventory string "a coded HORZ/VERT strip whose + chroma transform has no rect coefficient tables here") therefore no longer + fires for the 4-wide shapes — they are handled. The string STAYS: it + remains the shape guard for genuinely-untabled shapes, and the + lane-t900-r33 enumeration test still pins the five callers. +4. GATE: `chroma422_pair_plane_matches_the_ss_size_lookup_cells` — a + format-cell census over all 22 `BLOCK_SIZES_ALL` footprints: the pair arm + fires exactly on the 2-px-wide slice of the real `ss_size_lookup[..][1][0]` + BLOCK_INVALID column ((4, 8), (4, 16); BLOCK_4X4 excluded as the square + path's own sub-8 rounding rule), the tall/wide BLOCK_INVALID shapes stay + on `chroma_422_oob` (the two arms partition the column), and 4:2:0/4:4:4 + return `None` at every footprint. Floored-anchor math asserted for odd and + even mi columns. +5. WITNESS COUNTER: `CHROMA422_PAIR_WIDE_HITS` (+ accessor, + + `decode_probe` line). Reads 0 on the pinned fixture — the arm is provably + inert there. +6. MEASURED (fixture `/tmp/t422.obu`, sha256 + `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, + reused by hash; frame-0 cut `/tmp/t422f0.obu` sha256 + `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af`; + ours = `decode_probe --release` under + `$HOME/.cache/cargo-target-av1422stripanchor`, oracle = + `$HOME/.cache/aom-oracle/build/aomdec`, padded-u8-vs-cropped-u8 compare): + - frame 0: **0 diffs on Y, U and V at PREFILT, POSTDEBLOCK, POSTCDEF and + FINAL** — the FINAL rung is measured this round (the parent lane's + round bracketed it by POSTCDEF). + - all 16 frames decode; counters unchanged from the parent lane + (chroma422_rect 682, chroma422_sub8 122, chroma422_chunk 344) and + `chroma422_pair_wide: 0`. +7. WHY NO WITNESS STREAM (the acceptance's fallback): the (2, 16) lift is + by construction and UNWITNESSABLE today — no current stream can route a + 4-wide strip into `decode_rect_split`. The five callers pass only the ten + rect footprints with `8 <= min` (the enumeration test pins both the caller + set and the domain); the real 4-wide readers — `decode_rect4_16_strip` + (16-level 1:4, whose depth walk is inlined precisely because the chroma is + pair-owned: the pair16 arm already carries the floored anchor + (4, 8) + tiling), `decode_leaf_rect8` + `decode_inter_sub8_rect2` (8-level + HORZ/VERT, both per-piece floored arms from lane-av1-422h/blockhalf) and + the inter `PARTITION_*_4` walk — never call it. Three fresh + `aomenc --profile=2` probes (testsrc2 cpu-used=1 + tx-size-search, + mandelbrot cpu-used=0, smptebars screen tune) all decode or diverge + without touching the arm. A witness requires a future caller that routes + 4-wide strips here (a capability change the enumeration test will force a + re-derivation for); the counter is wired so that stream proves itself the + moment it exists. + +## Observed, not chased + +- The mandelbrot probe (`s2.obu`, frames 1+) crashes in + `push_mc_rect_tx` ("range end index 32 out of range for slice of length + 0") — frame 0 alone decodes clean. Read as a downstream symptom of the + known frames-1+ partition-dispatch desync (mi(8,10), Agent204's lane) on + heavy-motion content: a desynced shape walk reaches the MC push with an + empty pred buffer. Not attributed to this port; named for the desync lane's + ledger. + +## Decision + +- The header refusal STAYS unconditional in `stream.rs`; the + `EC_AV1_ALLOW_422_PROBE` bypass was re-applied for the measurement runs and + reverted byte-identical afterwards (0 occurrences; + `a_non_420_subsampled_sequence_header_is_refused_by_name` green post-revert). +- 4:2:0/4:4:4 byte-identical by ss-keying, checked per format cell by the + census gate and by measurement on the fixture. +- `read_coeffs_rect`, the chroma table rows and the 4:2:0 group-tail SKIP arm + untouched. +- cargo check 0 warnings; targeted gates green (enumeration, 422 refusal, + lossless sample-exact, rect-strip filter-intra, the new census). diff --git a/lanes/av1422stripwrite.report.md b/lanes/av1422stripwrite.report.md new file mode 100644 index 00000000..5f587b61 --- /dev/null +++ b/lanes/av1422stripwrite.report.md @@ -0,0 +1,240 @@ +# lane-av1-422stripwrite — the 4:2:2 residual was NOT the rect-strip +# chroma write/anchor: a reference picture's chroma plane claimed +# `h / 2` rows, so every chroma MC sourced at or past the frame's +# midpoint was clamped; the pinned 16-frame t422 stream now decodes +# byte-exact (first cut FAILed on review for a floor half-width where +# the producer ceils — corrected, ladder re-run, still 48/48 + 16/16) + +## Outcome + +The parent lane's named site is **fixed, and it was not where the parent +pointed**. Frame-1 prefilt chroma no longer first-diffs at U/V (88, 104): +after the fix **all 16 frames of the pinned t422 stream are byte-exact on +every plane at prefilt, post-deblock AND post-CDEF, and the final +(post-loop-restoration) output is byte-identical to the oracle for all 16 +frames** — 0 diffs, measured. The 4:2:2 header refusal stays. + +## Localization: the write and the anchor were both already right + +The parent read the site as "our written rows 88..91 are not the oracle's +MC output" and suspected the strip write/anchor. Measured, in order: + +1. **The block is not what the parent said.** The oracle's own dispatch + trace (`SUB48D`, added to `build_inter_predictors` in + `reconinter_template.inc`) puts the site on **two `BLOCK_8X4` blocks at + luma (88, 208) and (88, 216)** — `bsize=2`, `mi=(208,88)` / `mi=(216,88)`, + one per mi column, i.e. the top strips of the 8x8 groups at mi (11,26) + and (11,27), each coded its own chroma `TX_4x4` at chroma (88,104) and + (88,108) (`is_chroma_reference` at ss (1,0): `mi_size_wide[BLOCK_8X4] == 2` + in libaom's 4x4-mi units, so the column clause `!(bw & 1)` is true and + BOTH are chroma references — `av1_common_int.h:1454`). The parent's + "mi(22,52)" is this decoder's own 4x4-mi coordinate for the same block + (`const MI: usize = 4`, `decode.rs:6052`), not libaom's 8x8 mi, and its + "chroma cols 104..111, rows 88..95" spans TWO mi columns and two 8x8 + groups. There is no strip-2 chroma MC because the strips below + (luma rows 92..95) are INTRA, not because the pair merged. +2. **The oracle's prediction is a pure reference copy** (`AOMIN48`/ + `AOMOUT48`, both inert without the env var): `row=88 col=104 bw=4 bh=4 + sx=0 sy=0 srcoff=17000 stride=192` → source = frame 0's final U at + (88, 104) exactly, output `r0 = 202 204 204 167` = the source bytes. + The oracle's final chroma there is the same value, so the strip is a + zero-residual copy. +3. **Our MC inputs were identical and correct.** A temporary rung in + `decode_inter_sub8_rect2`'s 4:2:2 per-piece arm dumped the raw + reference samples at the unit before the MC: + `unit=(104,88) stride=128 tw=128 th=72 xq4=1664 yq4=1408 + raw=[202, 204, 204, 167, 185, 190, 190, 165, 158, 164, 163, 148, + 145, 150, 148, 138]` — byte-identical to the oracle's `src0`. So the + reference *contents*, the position, the mv, the filters and the scale + were all right, and the 4x4 write rect `(unit_x, unit_y, 4, 4)` was + right. What was wrong was that the MC turned those correct inputs into + `206 204 202 200` x4 rows. +4. **The MC output was the tell.** `th=72` on a 144-tall frame. The + reference plane the MC read declared **72 chroma rows** while holding + 144. Rows at/past 72 are out of the plane's valid area, so + `predict_with_filters` clamped them — the four output rows came from a + clamped row, which is why they were identical to each other and why + they matched nothing in the reference. + +## Root cause, class `ref-chroma-shape-420-folds-422` + +`RefPix::planes` (`decode.rs:30311`) builds each reference's chroma +`PlaneBuf` from a **two-way** shape test: + +```rust +let full = g.u.len() == g.width * g.height; +let (cw, ch) = if full { (g.width, g.height) } else { (g.width / 2, g.height / 2) }; +``` + +A stored reference carries no subsampling field, so the code inferred it +from the sample count — but the inference only knew 4:4:4 (luma-sized) and +4:2:0 (a quarter). A 4:2:2 reference is **half-width, full-height**: +`round_ss(w, 1) * h`, which matches neither, so it fell into the 4:2:0 +branch and claimed `h / 2` rows. The stored data was never wrong (the frame +is stored through `round_ss(fw, ss_x) x round_ss(fh, ss_y)`, +`decode.rs:25806`, which is 4:2:2-correct) — only the *declared* shape was, +and `whole_plane` copies it into `width`/`height`/`true_*`, which is what +every chroma MC and every edge clamp reads. + +Consequence: at 4:2:2, **every** inter chroma prediction whose source row +was at or past the frame's vertical midpoint read clamped garbage, on every +subsampling-independent path (square blocks, rect strips, sub-8 pieces, +compound, OBMC). On the pinned fixture the same rung sweep found four +`mv = 0` per-piece units wrong, all with `unit_y >= 72`: (104,88), +(108,88) [the named site] and (80,120), (80,124) — the parent's residual +count was one symptom, not the site. + +## Fix + +One helper, both call sites (`decode.rs`): + +```rust +fn ref_chroma_shape(len: usize, width: usize, height: usize) -> (usize, usize) { + let half_w = round_ss(width, 1); + if len == width * height { (width, height) } // 4:4:4 + else if len == half_w * height { (half_w, height) } // 4:2:2 + else { (width / 2, height / 2) } // 4:2:0 +} +``` + +The half width comes from `round_ss`, **not** a bare `width / 2`, because +that is what the producer used: a frame is stored through +`round_ss(fw, ss_x) x round_ss(fh, ss_y)` (`decode.rs:25806`) and +`round_ss(dim, 1) == (dim + 1) >> 1` is a **ceil**. A floor test here +(this lane's first cut, corrected on review) silently misses every +odd-width 4:2:2 reference and drops it into the 4:2:0 arm — the same +defect one dimension over. The 4:2:0 arm is left at the old +`(width / 2, height / 2)` on purpose, so 4:2:0 keeps the exact shape it +always had. + +`Picture`'s `u`/`v` doc comment (`encode.rs`) was corrected to state the +real contract (half width, the frame's own chroma height) — the inference +above depends on it. + +**Untouched:** the current frame's chroma planes were already +`(width >> ss_x) x (height >> ss_y)` (`decode.rs:27313`, `41692`); the +`4:2:0` group-tail chroma SKIP arm (its owning lane); `stream.rs`'s 4:2:2 +header refusal (byte-identical, unconditional — the local +`EC_AV1_ALLOW_422_PROBE` bypass was applied for the probe runs and +REVERTED). + +## Verification + +- **Before/after on the named fixture** (`/tmp/i422/t422_2f.obu`, sha256 + `d166ebf3c1bde8c32152cd9d077a317b4c7205b6538f0a7481e09fb6333ffdf4`; + decode_probe + `EC_AV1_{PREFILT,POSTDEBLOCK,POSTCDEF}_DUMP` vs the + oracle's): frame 0 exact before and after; frame 1 before: Y 0, U 2231 + (first (88,104) ours 206 / oracle 202), V 2197 (first (88,104) ours 212 / + oracle 231) — byte-identical to the parent lane's reported counts, so + the reproduction is sound; frame 1 after: **0 / 0 / 0**. +- **16-frame ladder** (`/tmp/i422/t422_16f.obu`, sha256 + `dda96300d2d36ba9dc958febb033e2334a2caee137bcb286c0276f259e57d5b6`): + **0 diffs on every plane of every frame 0..15 at prefilt, post-deblock + and post-CDEF** (48 stage-frame-plane groups), and the final + post-loop-restoration dump is **byte-identical (73728 B) for all 16 + frames**. Re-measured after the probe-bypass revert/re-apply round trip: + 48 groups, 0 diffs, 16/16 final. The oracle ladder was regenerated with + the current build and is byte-identical to the parent lane's on every + frame where both exist. +- **4:2:0/4:4:4 identity, measured three ways.** + *By construction:* the inference's 4:4:4 arm is the old first test + unchanged, and the 4:2:0 arm is the old fallback `(w / 2, h / 2)` + verbatim — the only thing between them is the inserted 4:2:2 test, which + can only fire on a count a 4:2:0 or 4:4:4 plane does not have. + *Brute-forced:* against the producer's own `round_ss` crops + (`decode.rs:25806`) over every `w, h` in `1..=128`, the 4:4:4 and 4:2:2 + counts are distinct from each other and from the 4:2:0 count and both + route correctly for **every `w >= 2 && h >= 2`**; nothing a decodable + frame produces falls outside that (the pinned fixture's chroma is + 128x144). + *4:2:0 at odd dimensions — an open, pre-existing gap, not a clean bill.* + The floor arm is what the parent produced, but it is the wrong shape for + an odd-dimension 4:2:0 reference: the producer stored + `round_ss(w, 1) x round_ss(h, 1)`, so the floor under-declares. Running + every 4:2:0 count over the `1..=128` square through the shipping helper: + **12160 of the 16384 pairs** come back smaller than the plane holds — + **12033** of them with `w >= 2` and **127** in the `w == 1` column (at + `1x1` the 4:4:4 arm catches the count and `(1, 1)` is exact). + Under-declaration at `h == 1` is **zero**: there the 4:2:0 count equals + the 4:2:2 count, routes into the 4:2:2 arm and lands on the correct + `(round_ss(w, 1), 1)`, which is also the one place the new arm departs + from the parent's floor — for the 127 pairs with `w >= 2`, and there + only by *correcting* the parent, which claimed zero rows. The `w == 1, + h >= 2` residue is a shape error, not a misroute: the floor fallback + simply cannot express `(1, round_ss(h, 1))`. A ceil fallback would close + the whole gap, at the cost of departing from the parent on every + odd-dimension 4:2:0 shape with no in-tree coverage to justify it. + Recorded, not taken. + *Gated:* `cargo test -p ec-av1 --lib -- lossless decodes_sample_exact + 444 reference_chroma` in its own target dir + `~/.cache/cargo-target-av1422stripwrite-gate` — see below for what that + run is and is not evidence of. +- **Oracle instrumentation (measurement, not decode).** The oracle's + `EC_AV1_POSTCDEF_DUMP` rung sat inside `if (!optimized_loop_restoration)`, + so a frame with no CDEF and no superres produced **no** post-CDEF dump — + frame 15 got none, which is why the parent lane's "f15 postcdef Y=5059" + had no oracle counterpart to compare against (the file it names, + `/tmp/i422/av1422mi24/postcdef.f15`, is 81920 B — this decoder's own + padded dump, not an oracle dump). The rung is now a shared + `ec_dump_postcdef()` called from both branches; the oracle confirms + frame 15's post-CDEF equals its post-deblock (no CDEF on that frame), + and our frame 15 post-CDEF is byte-identical to it. +- **A gate run that was thrown away, and why.** An earlier identity-gate + run on this branch was launched against the ceil form and then + **invalidated by my own concurrent edits**: while it was in flight I added + the two routing tests below and deliberately mutated `half_w` back to the + floor form to prove the test non-vacuous. Its result was never delivered, + and whatever it compiled was not the shipping source (`decode.rs` + md5 `999348d786ca0a8e930010ee46184d87` is the tree the accepted run + covers). It is recorded here as **no evidence** rather than quietly + dropped, and the accepted run is a clean re-run in a dedicated target + dir with nothing else of mine touching cargo. Not a target-dir lock: the + other suites on the host each use their own + `$HOME/.cache/av1-local-suite/target-*` dir. +- `cargo check -p ec-av1 --all-targets` (target dir + `~/.cache/cargo-target-av1422stripwrite`): **0 warnings, 0 errors**. +- **Regression tests, and proof they are not vacuous.** Two unit tests in + `decode.rs`'s test module, the only 4:2:2-reachable gate while the header + refusal stands (no stream can reach the code path otherwise): + `a_reference_chroma_sample_count_routes_back_to_its_own_format` drives + all three formats off the producer's own `round_ss` crops over odd AND + even widths (2,3,4,5,8,9,16,17,64,65,128,129) and heights + (2,3,4,5,8,9,64,65,144,145), and + `a_422_reference_claims_the_full_chroma_height` pins the t422 shape + (256x144 -> chroma 128x144, explicitly not the 72 rows the bug claimed). + **Mutation proof:** with `half_w` reverted to `width / 2` — the exact + floor form this lane's first cut shipped and the review caught — the first + test FAILS with `4:2:2 reference of 3x2 (chroma 4 samples) must route + back to its own shape`, and passes again on the restored ceil form. So + the test pins the defect, not the implementation. +- `git status` names `decode.rs`, `encode.rs` (doc comment) and this + report. Every temporary rung (`EC_SW422` in the 4:2:2 per-piece arm and + in `build_c`; `SUB48`/`SUB48D`/`SUB48P` in the oracle's + `reconinter_template.inc`) was removed before the commit. + +## State + +- Commit on `lane-av1-422stripwrite` (no push): the `ref_chroma_shape` + helper + its two call sites in `crates/ec-av1/src/decode.rs`, its two + routing regression tests, the `Picture` chroma-shape doc correction in + `crates/ec-av1/src/encode.rs`, and this report. The first cut was FAILed + on review for using a floor half-width where the producer ceils; the + corrected helper, the ladder re-run (48/48 + 16/16 again) and the + identity re-proof are all in this commit. +- **Merge note.** The sibling lane's `RefPix` three-way inference + (`39f45c31`, lane-av1-422bigblock) edits the same two call sites. Both + now agree on the arithmetic — the half width is `round_ss(w, 1)`, i.e. + ceil, because that is what `decode.rs:25806` stores — so the union is a + union, not a floor-vs-ceil fight. If that lane threads an explicit + subsampling instead of inferring one from the length, prefer it and drop + this helper; the 48/48 result is a property of the *shape* being right, + not of how it is derived, so it survives either way. Re-run the 16-frame + ladder after resolving. +- **No residual to hand on.** The 4:2:2 stream is pixel-exact end to end + on this fixture, so the 16-frame ladder is no longer a frontier. What + remains for 4:2:2 is coverage, not correctness: the 4:2:2 header + refusal is still unconditional, and every claim here rests on one + 256x144 fixture (`aomenc` 4:2:2, `--limit` cut) whose inter content is + skip-heavy. A second 4:2:2 fixture with real residuals, compound and + warped motion above the vertical midpoint is what would justify lifting + the refusal — not more work on this stream. diff --git a/lanes/av1422sub8pix.report.md b/lanes/av1422sub8pix.report.md new file mode 100644 index 00000000..d74106fc --- /dev/null +++ b/lanes/av1422sub8pix.report.md @@ -0,0 +1,83 @@ +# lane-av1422sub8pix — the sub-8 4:2:2 chroma pixel defect fixed at source: the +# odd leaf's CfL source stepped into the right neighbour group and the inter +# piece's left half read the reference's U plane for BOTH chroma planes; frame-1 +# U/V at the named mi(0,22) site are now exact and the f15 postcdef luma +# knock-on is gone + +## Outcome + +1. **Reproduction at HEAD c5d88f0b.** The mi24 lane's named residual reproduced + exactly on the pinned t422 fixture (`/tmp/i422/t422_2f.obu`): frame 0 exact + at prefilt; frame 1 Y exact, U first diff chroma (4,44) with rows 0..3 + exact / rows 4..7 wrong across cols 44..47, V first diff (0,44). +2. **Localization (EC_PRED/EC_PREDOUT8 + EC_DQCOEFF pairing vs the oracle).** + For the frame-1 8x8 SPLIT group at mi(0,22) — leaves (0,22)/(0,23) inter, + (1,22) inter with luma residual, (1,23) INTRA (filter-intra, uv_mode + UV_CFL_PRED) — the oracle writes chroma rows 0..3 from leaf (0,23)'s + `build_inter_predictors_sub8x8` (row-0 steps only; `ss_size_lookup + [BLOCK_4X4][1][0]` is BLOCK_4X4, so the loop covers b8_h=4) and rows 4..7 + from intra leaf (1,23)'s floored-anchor TX_4X4 unit. Both sides' unit + prediction (DC base 97, `EC_PREDOUT8`/`OUR_PRED` sum 1552) and dequantized + coefficient grid (`EC_DQCOEFF` vs `OUR_DQ`: −152/+90/−180/+270/−90/+90, + raster) are IDENTICAL — the defect is neither entropy nor placement. +3. **Root cause 1, class `sub8-cfl-source-anchor`** (`sub8_leaf_chroma422`): + the CFL AC signal was sourced at the LEAF's own luma x (`px` = 92 for leaf + (1,23)) instead of the FLOORED unit anchor (88) the same function already + uses for the write/prediction anchor — the source averaged luma 92..99, + i.e. half the span from the RIGHT neighbour group. Fixed: the CFL source + anchors at `(lmi.1 & !1) * MI`, the same floor as the chroma write anchor + (libaom `cfl_store_tx`/`sub8x8_adjust_offset` store the group's luma; the + unit's AC span is the group's own 8-wide band at the leaf's own rows). +4. **Root cause 2, class `sub8-left-piece-wrong-plane`** + (`decode_inter_sub8_split4`'s 4:2:2 inter piece arm): the left 2x4 half of + each piece's chroma prediction (`is_sub8x8_inter`'s `mi[-1]` step) grabbed + `(_, l_ref_u, _)` from the left piece's reference planes and fed that ONE + plane to both U and V iterations — the V plane's left half predicted from + the reference's U samples (U exact, V wrong, matching the residual's V-only + left-half pattern). Fixed: the loop enumerates U/V and picks the left + piece's matching plane. +5. **Both edits are ss (1,0)-only code** — `sub8_leaf_chroma422` is reachable + only from the 4:2:2 sub-8 arms, and the inter piece fix sits inside the + `chroma_422 && (cmi & 1) == 1` arm — 4:2:0/4:4:4 never execute it. + +## Verification + +- **t422 16-frame ladder** (decode_probe + all three stage dumps vs the + oracle's, our dumps /tmp/i422/sub8pix16/*): + * **frame 0: EXACT at prefilt, postdeb AND postcdef** (Y, U, V all 0); + * **LUMA: 0 diffs on EVERY frame 1–15 at prefilt, postdeb AND postcdef** — + the mi24 lane's f15 postcdef Y=5059 CDEF knock-on no longer reproduces + (f15 postcdef Y=0; oracle-side f15 postcdef dump absent from the ladder + dir, so f15 postcdef is claimed at prefilt/postdeb only); + * chroma frame 1: U 4175 → 3837, V 4636 → 3879; the named sites are pixel + exact: U rows 4..7 cols 44..47 and V rows 0..3 cols 44..45 verified + sample-exact vs the oracle; chroma improved on both planes at every frame. +- **Frame exactness claimed ONLY where measured 0:** frame 0 all stages; + frames 1–15 LUMA at prefilt/postdeb (postcdef too, minus f15 where the + oracle dump is missing). Frames 1+ chroma are NOT claimed. +- **The residual, site narrowed (next lane's first diff).** Frame-1 prefilt + chroma now first diffs at U (32,87) / V (32,80) — the 8x8 inter SQUARE + blocks mi(8,40)/(mi(8,42) for U) (PART 16x16→8x8→NONE, one TX_4X8 chroma + unit per plane, flat prediction per the oracle's EC_PREDOUT8): ±1-class + diffs concentrated in each block's rightmost chroma column — the 4:2:2 + square-8x8 chroma MC class (`chroma422_square` territory), NOT sub-8. +- **4:2:0/4:4:4 identity:** the lossless gates stay green — + `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`, + `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact`. +- `cargo check -p ec-av1` (target dir `~/.cache/cargo-target-av1422sub8pix`): + **0 warnings, 0 errors**. +- The `EC_AV1_ALLOW_422_PROBE` bypass was applied to stream.rs for the probe + runs and REVERTED; `git status` names only decode.rs (+ this report). +- The intra-leaf evidence used local-only `EC_DBG_RES` write watches in + decode.rs; all three were removed before this commit (no trace remains). + +## State + +- Commit on lane-av1-422sub8pix (no push): the two 4:2:2 sub-8 chroma + prediction fixes in `crates/ec-av1/src/decode.rs` + this report. +- Next stop named for the owning lane: the 4:2:2 square-8x8 inter chroma + class — first sites frame-1 U (32,87) (block mi(8,42)) and V (32,80) (block + mi(8,40)), ±1 diffs hugging each block's right chroma column with the + oracle's own prediction flat and matched at the EC_PREDOUT8 rung — MC + reference-edge territory for the 4-wide chroma unit, not sub-8. diff --git a/lanes/av1422sub8rect.report.md b/lanes/av1422sub8rect.report.md new file mode 100644 index 00000000..0db02444 --- /dev/null +++ b/lanes/av1422sub8rect.report.md @@ -0,0 +1,185 @@ +# lane-av1-422sub8rect — the sub-8x8 inter 4:2:2 chroma ported to its real +# shapes (`decode_inter_block8`'s whole chroma half to the BLOCK_4X8 rect; +# `decode_inter_sub8_split4`'s group unit replaced by the per-piece +# odd-column chroma-reference model the oracle traces actually code); frame +# 0 stays byte-exact at all four stages, the 4:2:0/4:4:4 identity holds by +# ss-keying, and the inter-frame divergence is REMEASURED (reduced ~15% on +# frames 1..10, exactness NOT claimed -- other 4:2:2 classes remain) + +## Outcome + +1. ROOT-CAUSE CONFIRMATION FIRST (pinned fixture `/tmp/t422.obu` sha256 + `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`, + parent-lane instruments in `/tmp/i422/`, local `EC_AV1_ALLOW_422_PROBE` + bypass applied and reverted byte-identical after — `git diff` carries + only decode.rs/mc.rs/encode.rs changes): the oracle's frame-1 first + block (`AOMMB mi=(0,0) ... skip=0`) reads luma TX_8X8 then + `plane=1 tx_size=5 mi_row=0 mi_col=0 rng=55168` — tx_size 5 IS TX_4X8, + confirming the charter: the 8x8 inter leaf's chroma plane block is + BLOCK_4X8, one TX_4X8 rect unit per plane (`ss_size_lookup[BLOCK_8X8][1][0]`), + while ours read a TX_4X4 square. +2. SPLIT4 MODEL CORRECTED AGAINST THE ORACLE, NOT THE CHARTER'S GUESS: the + parent report assumed the split4 group codes ONE rect group unit; the + traces prove otherwise. At ss (1,0) `is_chroma_reference` for a BLOCK_4X4 + piece is `(mi_col & 0x01)` — ODD columns only (av1_common_int.h:1459) — + and every non-skipped odd-column piece codes its OWN U then V TX_4X4 + square unit right after its luma, anchored at the FLOORED chroma cell + (`(mi_col & !1) * MI >> ss_x`, the lane-av1-422kf2 rule) with + `around_mi_422_chroma`-style per-chroma-cell ctx (measured ctx 8 = + above+left+7 at frame 1's mi(12,3)): + - frame 0 key-frame groups (18,54) and (30,42): U+V read on BOTH + odd-column leaves ((18,55)+(19,55), (30,43)+(31,43)); + - frame 1 inter group at mi(12,2): U+V on leaf (12,3) ALONE — its + bottom-right twin was skipped, so it codes nothing. + The 4:2:0 shared group unit simply never exists at 4:2:2. +3. PORT (all keyed on ss, 4:2:0/4:4:4 byte-identical by construction): + - `decode_inter_block8` chroma half to per-axis shapes: `chroma_w/chroma_h`, + `(TxbSet::ChromaRect8x4, SCAN_4X8)` at 4:2:2; inter coefficient reads + through `read_inter_plane_rect` (offset-7 ctx — the unit IS the plane + block — inherited luma tx type) with `around_mi_422_chroma`; MC + prediction (single-ref, scaled, warp, compound-intermediate), the + wedge-masked blend, interintra blend, OBMC pushes and skip pushes all + (4, 8)-shaped; the intra-in-inter arm reads the key-frame arm's own + rect reader (`read_rect_chroma_unit`, ctx offset None, CfL carried); + palette UV map dims per axis. + - `decode_inter_sub8_split4`: per-piece arm added after each inter + piece's luma (odd column, ss 1,0): prediction as + `build_inter_predictors_sub8x8` — left 2x4 half from the LEFT piece's + own ref/mv/filters, right 2x4 half from this piece's; a mixed group + (left piece intra/off-frame, `is_sub8x8_inter` false) predicts the + whole 4x4 from this piece; skip pieces still predict but record zeros. + Coefficients via square `TxbSet::Chroma4` reads at the floored anchor, + per-unit `record_mi_chroma` (8x4 luma span). Intra pieces gate + `has_chroma` on the piece's own column parity and route through + [`sub8_leaf_chroma422`]; even-column intra pieces publish DC to the + uv-mode map. The 4:2:0 group tail (build, read, band stamps, DC map + stamp) is gated OFF at 4:2:2. + - Shared helpers made ss-exact (4:2:0/4:4:4 reduce to the old behaviour): + `blend_masked_compound`'s `subsampled: bool` → per-axis `(subw, subh)` + mirroring aom_dsp/blend-a64-mask.c's four branches; `interintra_blend`'s + wedge mask read likewise; `obmc_plan`/`obmc_run` take the plane ss — + chroma extents are the luma rules `>> ss` (`av1_skip_u4x4_pred_in_obmc` + keyed on the plane block, above-pass skip and left-pass blend extents), + `TxParams::strided` sized `stride * h` (identical when h == stride, as + every pre-existing caller has). The encoder's `obmc_plan` call passes + the fctx ss. + - STOP-NOTE (owning parent-lane surface, named not fixed): + `decode_inter_block`'s 4:2:2 chroma is still the square-cut model; its + chroma masked-blend keeps the pre-port direct mask read there (guarded + by `ss_x == ss_y`), because its `chroma_side`-square buffers cannot be + indexed by the subsampled-axis walks. Known-divergent, unchanged + behaviour, named for the owning lane. +4. MEASURED after the port (17-frame probe run under the reverted bypass; + comparator: ours padded 256x160/128x160 u8 cropped vs the instrumented + `$HOME/.cache/aom-oracle/build` aomdec; NOTE the probe prints REFUSED and + still exits 0 -- the committed tree stops at frame 11 with the + pre-existing "HORZ/VERT strip ... no rect coefficient tables" frontier + refusal, exactly like the reworked tree): + - frame 0: **byte-exact at PREFILT, POSTCDEF (and FINAL by the u16 + comparator) on Y, U and V — 0 diffs everywhere**, so the rect read, + the split4 per-piece model and every shared-helper change are exact on + everything frame 0 exercises (including the split groups (18,54), + (30,42) that motivated the per-piece model). + - inter frames 1..10 decode and were measured: PREFILT diffs dropped + ~15% vs the parent lane's ladder (e.g. frame 1: 30825/12624/12796 → + 22248/11733/11974; frame 8: 35014/11020/12043 → 32855/11020/12043; + per-frame values in `/tmp/i422/sub8rect/`). **Frame exactness is NOT + claimed** — frames 1..10 remain divergent: the named sub-8 sites are + fixed, but the stream carries further 4:2:2 classes the decoder still + square-cuts or gaps (probe trace: `EC_RECTCHROMA_GAP luma=16x8 + tx=16x8 chroma=8x8`, `luma=8x32 ... chroma=4x32`, i.e. `decode_inter_block`'s + own 4:2:2 chroma half), so the entropy walk desyncs again after the + first uncoded-for block. + - frames 11..16 were not reached by the probe's frame accounting this + round (11 dumped frames, decode exits 0 — the dump-index vs + show-existing accounting needs the parent-lane harness's + 1-frame-per-OBU walk); the ladder for 1..16 is the owning lane's + re-measurement once the next class lands. +5. Deferred items: (a) frames 11..16 ladder entries — unblock: rerun the + parent-lane per-OBU cut harness (`/tmp/i422/cut_frames.py`) after the + next class; (b) `decode_inter_sub8_rect2`'s 4:2:2 has_chroma gating (its + inter strips pass `i == 1` where BLOCK_4X8 needs odd-column parity) — + not one of this charter's named sites, unmeasured on the fixture so far. + +## Decision + +- The header refusal STAYS unconditional in `stream.rs`; the bypass was + local-only, applied and reverted byte-identical (0 occurrences left; + `stream::tests` green after the revert). +- 4:2:0/4:4:4 untouched by construction (ss-keyed arms); the 4:2:0 + group-tail SKIP arm untouched; `read_coeffs_rect` untouched. + +## Review rework (r2, post-review findings 1-3) + +The review correctly rejected two byte-identity claims and one +justification: + +1. **444 OBMC behaviour now UNCHANGED from the parent.** The first commit + made `obmc_plan`/`obmc_run` ss-exact (`av1_skip_u4x4_pred_in_obmc` + keyed on the plane block; chroma extents `>> ss`), which is what + reconinter.c does -- but it CHANGES 4:4:4 behaviour (the above-pass + chroma skip flips to run on square plane blocks, the blend extents + double) and is NOT byte-identical, with no 444 OBMC gate covering it. + Measured before reworking: fixture `/tmp/obmc444/obmc444.obu` sha256 + `4b5c0a473c7ca5bd460e76bb5d7fde541dc996bec45f60bfcc393eb2f11731ef` + (10-frame 128x96 4:4:4 aomenc `--enable-obmc=1 --profile=1`, 2 rect + OBMC leaves firing per the probe census), decoded parent (4e8c6073) + vs tip vs instrumented aomdec: parent and tip read IDENTICAL symbols + and differ in exactly ONE V sample (f1, (82,80)): oracle 110 == + parent, tip 111. Attribution by single-change revert builds: reverting + `TxParams::strided` alone (varB) reproduces tip exactly; reverting the + OBMC ss semantics alone (varA) reproduces the parent exactly -- so the + whole parent<->tip delta is the OBMC change, and on this fixture the + conformant variant is one sample FARTHER from aomdec, never closer. + Per the review protocol ("if worse, rework") the OBMC ss semantics are + REVERTED to the parent's 4:2:0-shaped corner-cut (luma-keyed + `skip_chroma_above`, half chroma blend extents); the 444-conformant + port stays deferred to the owning 444 lane, which can measure it on + OBMC-heavy 444 content once that lane's reconstruction class is exact + enough to gate on. `encode.rs` carries no change any more (the ss + argument is gone with the parameter). +2. **`TxParams::strided` justification corrected.** The commit text + claimed "every pre-existing caller has h == stride" -- wrong: + `read_inter_plane_rect` callers pass rect units with `h < stride` + (e.g. an 8x4 unit in an 8x8-strided plane buffer), and for those the + scratch shrinks from `stride*stride` to `stride*h`. Output identity + holds because the copy loop only ever writes `h` rows of `w <= stride` + and every consumer reads the residual through the same dense bounds -- + verified empirically (the 4:2:0 pixel-exact witness, 4:4:4 frame + equality with the parent on the obmc444 fixture, and the varB + revert experiment), not by the removed claim. The `stride * h` sizing + itself STAYS: the 4:2:2 leaf's TX_4X8 unit (stride 4, h 8) panics on + the old square sizing. +3. The t422 measurement note above also corrects the probe's exit-status + reading (REFUSED still exits 0; both the committed and reworked trees + stop at frame 11 on the pre-existing strip-chroma frontier refusal). + +Everything else in Outcome 3 (the leaf8 rect port, the split4 per-piece +model, the ss-keyed masked/interintra blends) is untouched by the rework; +frame 0 re-verified byte-exact at PREFILT/POSTCDEF after it, and both +gates re-run green post-revert. + +## Verification + +- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422sub8rect`): + 0 warnings, 0 errors. +- `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`: + 1 passed — the refusal fires after the bypass revert. +- `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ + whose_tx_split_decodes_pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1` + (oracle aomenc): 1 passed — the 4:2:0 inter path, including the + shared-helper ss-ifications, stays pixel-exact. +- Frame-0 stage dumps vs the instrumented aomdec: PREFILT/POSTCDEF + Y=U=V=0 (POSTDEB comparator run this round used the wrong dump-env name; + the post-deblock state is bracketed by the two exact stages). +- Hit counter added: `CHROMA422_INTER_SUB8_HITS` (per-piece inter 4:2:2 + chroma units) — reads non-zero on the fixture's frames 1+, so the new arm + provably fires. + +## State + +- Commit on lane-av1-422sub8rect (no push): the sub-8 rect port + + `TxParams::strided` sizing fix + shared ss-exact helpers + this report. +- Probe instruments regenerated under `/tmp/i422/sub8rect/` (scratch, not + committed); the oracle build's rungs already cover everything needed to + re-measure after the next class. diff --git a/lanes/av1444interband.report.md b/lanes/av1444interband.report.md new file mode 100644 index 00000000..f57b9a7b --- /dev/null +++ b/lanes/av1444interband.report.md @@ -0,0 +1,132 @@ +# lane-av1-444interband: the inter 1:4 strip's 4:4:4 chroma band stamping + +## Ticket + +Fix the 4:4:4 lossless 16x4 inter strip band stamping (t6 next-site from +av1sub8rect444's measurement: post-fix desync at the 16x4 INTER strip +mi(2,8), U unit (2,8) — ours `txb_skip` ctx 3 vs oracle ctx 11 with raw +cells `above=[0,] left=[23,]`), or stop with the site narrowed further. +Worktree at f41d649b, branch lane-av1-444interband. + +## Named site, re-measured (the report's attribution needed one correction) + +Fixture `/tmp/llkf/t6.obu`, sha256 +`1e6dd4e05038c8d51e2c8d29f8c337130c4fea0aed629415535e6e53af9a2c72`, +32487 bytes (scratch, regenerable per av1llkf.report.md's recipe; +testsrc2 128x96, 1 key + 5 inter frames, `--profile=1 --lossless=1 +--enable-palette=0 --enable-intrabc=0`, default partition, sb128). +Oracle: the shared patched `$HOME/.cache/aom-oracle/build`, fresh +`aomdec --rawvideo` on the same bytes. + +- Pre-change at f41d649b, our decoder refuses mid-frame-1 + (`a Golomb tail longer than this decoder reads`) — fail-before, + measured before the edit on this tree. +- The oracle's cell dump (`EC_ECDUMP`) walks `left[2][1]` (U plane, mi + row 2) across frame 1: the last writer before the failing read is the + 16x16-INTRA block (0,4)'s U unit bc=3/br=2 (event #2379), which + stamps cul_level 23 (mag 7, dc set); nothing else touches the cell + until the (2,8) strip's U bc=0 reads it as 23. The skipped inter + strips (0,8)/(1,8) log no coefficients and their + `av1_reset_entropy_context` (decodeframe.c:1180) zero only their OWN + cells — row 2's chroma left cell is not theirs to clear. +- Correction to the inherited attribution: our ctx 3 on the failing + read is a `TxbSet::Chroma4` TABLE ROW (base 0 in the +3 offset-10 + layout), not a luma `skip_contexts` value — the read is the strip's + U bc=0 (`side=4` = the 4x4 chroma tables), so the report's "U unit + (2,8), ctx 3 vs 11" stands; the detour through "luma bc=3" was a + rung-semantics misread (our `EC_ECDUMP_IN` logs the raw `skip_ctx` + argument, which for chroma callers is the pre-offset base/row). + +## Root cause + +`decode_inter_block`'s strip tail ran lane-inter16ab r2's `pair_chroma` +rewrite unconditionally. The rewrite stamps the PAIR-form chroma span — +16x8 (HORZ) / 8x16 (VERT) at `pair_mi`, planes 1/2 — which is libaom's +single `av1_set_entropy_contexts` call for the 4:2:0 pair's 8x4 (4x8) +chroma unit. At ss 0/0 there is no pair: `pair_mi` == the strip's own +mi, every strip is its own chroma reference, and the strip's own +`record_rect_mi` (zero grids on the skip arm) already stamps exactly +its own 16x4 (4x16) chroma span — the `av1_set_entropy_contexts` / +`av1_reset_entropy_context` behaviour. The rewrite therefore smeared +the strip's state one extra row (col) too far: skipped strip (1,8) +wrote zero over `left[2][1..2]`, erasing the (0,4) intra block's U/V +stamps, and (2,8)'s U walk then read base 0 where aom reads base 1. +Counter evidence: `INTER16_CHROMA_PAIR_HITS` fired 31x on this +pairless 4:4:4 stream (its documented meaning is "odd strips that +close a 4:2:0 chroma pair"). + +## Change (decode.rs, one filter + one trace rung) + +1. `pair_chroma` now carries `.filter(|_| ss_x(fctx) == 1 && + ss_y(fctx) == 1)`: the pair-span rewrite exists only at 4:2:0, where + it is byte-preserved (the added condition is false-only-at-ss-0). +2. `record_mi_chroma` gained the chroma twin of the existing + `EC_ECPUB` rung: `EC_CHROMA_PUB plane= mi=() wh=() lvl= dc=`, + env-gated eprintln (the instrument that localized this site; kept + for the next band hunt). + +Sibling ownership clean: the edit is in `decode_inter_block`'s tail +(lane-inter16ab's rewrite region), not `sub8_leaf_chroma444` nor +`decode_intra_sub8_leaf`. + +## Verification (measured, this tree @ d5325172) + +- Entropy/pixel witness, t6.obu vs fresh `aomdec --rawvideo` + ($HOME/.cache/aom-oracle/build): all 6 frames decode (pre-change the + decode refused mid-frame-1) and frames 0..5 are **byte-exact, 0 + differing bytes** per frame (36864 B/frame compared). Frame exactness + is claimed on exactly that basis. +- Non-vacuity: `inter16_1to4` counters on the full t6 decode: + `horz4=20 vert4=28 chroma_pairs=0` (was `chroma_pairs=31` while the + strips decoded); the strips themselves still decode and the frames + above prove it. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 7 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 and + min-partition-8 inter gates, the sb128 pair, the 16x4 pair). The + 4:2:0 inter 16x4 aomenc sweep + (`a_real_aomenc_inter_sequence_with_intra_16x4_strips_...`) is + yuv420p-only and the change is no-op at 4:2:0 by construction (the + filter's condition is satisfied there); not re-run this round. +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1444interband`, ec-av1 cleaned first): + 0 warnings, 0 errors. `rustfmt --check` reports no hunks inside the + edited ranges (the crate's pre-existing let-chains drift is + untouched). +- Commit d5325172 on lane-av1-444interband. Not pushed. + +### Addendum (review P2): the t6 pin is now an in-tree gate + +Main's review follow-up: commit +`ll444_defaultp_inter_strip.obu` (force-added fixture, 32487 bytes, +sha256 `1e6dd4e05038c8d51e2c8d29f8c337130c4fea0aed629415535e6e53af9a2c72`, +FNV1a64 `52789f0fce2d1e52` per the crate's pin convention) and gate +`a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact` +(stream.rs, av1llpredgate2's pinned-fixture pattern): len + FNV pin, +the 1:4 counter delta pinned to `horz4=20 vert4=28 chroma_pairs=0`, +and the env-conditional aomdec arm requiring all 6 frames sample-exact. +Mutation-proven load-bearing: with the ss-0 filter reverted the gate +fails at the pre-fix refusal; restored, it is green (8 passed in the +a_lossless battery). + +## Named, not chased (spoken) + +1. `Neighbour::level` clamps `cul_level` to 7 while aom stores up to 15 + (`COEFF_CONTEXT_MASK` = 15, dc sign in bit 4). Invisible to every + context derived from the cells (the `txb_skip` categories only + distinguish {0} / {1..3} / {>=4}, and dc sign rides its own field), + so it is representation drift, not a defect — noted so nobody + "fixes" the stored value into a desync. +2. Oracle-side f2 cross-reference: lane-av1lrflush's 444sb witness f2 + diverges at PREFILT entering at column 128 (inter 64x128 at + (128,0)), plausibly this same skipped-inter-strip class one size up + (their filter-pipeline/LR exoneration is consistent with our + entropy-domain finding). Main owns the 444sb gate extension + (take(2) -> take(3)) once this lands. deferred(that check, unblock: + their f2 witness bytes against this tree). +3. Whole-stream read-pairing via `EC_ECDUMP_IN`/`EC_ECDUMP` (dif,rng) + triples is NOT a reliable event alignment across the two + implementations: the internal daala-EC representations legitimately + diverge while decoding identically (frame 0 is pixel-exact yet its + pre-read triples fail 1:1 pairing). The robust comparators are + pixels, refusal points, and ctx/cell values. Recorded so the next + band lane doesn't burn a round on the same lesson. diff --git a/lanes/av1444sb.report.md b/lanes/av1444sb.report.md new file mode 100644 index 00000000..05cedb88 --- /dev/null +++ b/lanes/av1444sb.report.md @@ -0,0 +1,115 @@ +# lane-av1-444sb — the 128-rect 4:4:4 chroma-span desync: NAMED and FIXED (r2) + +## Outcome + +1. REMEASURED first (pinned fixture + `crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, sha256 + `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`, + generated per the report recipe: `ffmpeg -i bands444.y4m -frames:v 3 -vf + scale=192:160 -pix_fmt yuv444p -f yuv4mpegpipe` piped to + `aomenc --codec=av1 --profile=1 --passes=1 --end-usage=q --cq-level=32 + --cpu-used=0 --threads=1 --row-mt=0 --sb-size=128 --lag-in-frames=0 + --auto-alt-ref=0 --kf-max-dist=1000 --i444 --enable-restoration=1 --obu + --limit=3`): at 76f8c3fe frame 0 diverges at EC_AV1_PREFILT_DUMP with + Y 9700 @ (128,64), U 12272 @ (160,0), V 13175 @ (128,0) — the ticket's + class (first diffs on the 64/128 grid, chroma columns 160/128 matching + the finding). The synthetic-content variants tried first (testsrc2, + testsrc, smptebars, mandelbrot, gradients × cpu-used × cq) all decode + frame 0 exact — the damage needs an edge-forced 128-root rect, which + real content provides. +2. DEFECT 1 (this lane's, FIXED) — **`decode_block_128rect`'s chroma unit + walk is hardcoded to the 4:2:0 mu-chunk span**. One 32x32 chroma unit per + 64x64 mu chunk per plane (`cn = 32 / chroma_tx` = 1), chunk offsets + `ch_col * 32` / `ch_row * 32`, and a per-chunk clip step of `ch_col * 8`: + all three are the 4:2:0 numbers. At 4:4:4 a 64x64 luma chunk covers 64 + chroma pixels and needs TWO 32x32 units per axis. The units never pushed + (measured by env-gated per-unit exec tracing): (160,0),(160,32) of the + 64x128 PART_VERT block at (128,0), all four units of its second chunk, + (64,128),(96,128) of the bottom-row 128x64 — exactly the PREFILT damage + cells. Because the missing units' coefficients are still in the + bitstream, the entropy decoder desyncs from the first 128-rect intra + block on: SB(0,0) decodes byte-exact and every later superblock of + frames 0/1 carries damage. +3. FIX (one site, decode.rs `decode_block_128rect`): per-chunk unit count + `(64 >> ss) / chroma_tx`, chunk chroma offsets `64 >> ss`, clip step + `16 >> ss` — every expression reduces to the old constant at ss=1, so + 4:2:0 is bit-identical by construction; the stale `debug_assert!` (which + stated the 4:2:0 invariant and would fire on 444 in debug builds) now + states the ss-aware one. +4. DEFECT 2 (fixed by CHERRY-PICK, not this lane's code) — after DEFECT 1's + fix the review still failed frames 1-2: frame 1 U/V full rows 54 and 118 + +-1 — the LR boundary-band signature. `lane-av1-422filter`'s e3798a34 + (LR boundary-band snapshot ss_y + CDEF conv422 remap) was NOT in this + branch's ancestry; cherry-picked as 168442bd. Frame 1 went byte-exact. + An r1 experiment had concluded the cherry-pick "changed nothing on 444" — + that conclusion was an artifact of a broken comparison (see 6) and is + retracted. +5. DEFECT 3 (NAMED, NOT FIXED — stop-with-site) — frame 2 still diverges at + FINAL: Y 7308 / U 9685 / V 14012 vs aomdec, deterministic. Stage ladder: + PREFILT, POSTDEBLOCK and POSTCDEF are byte-exact vs the oracle; the + damage is introduced by the LOOP RESTORATION stage, and its shape is + **LR stripe 0 (RU row 0, rows 0..63, full width, all three planes) is + never restored** — our final equals the post-CDEF plane above row 63 + (our LR-changed rows start at 63; the oracle's start at 0), while stripes + 1-2 are restored (imperfectly vs the oracle only through the reference + shift this induces in rows above? no: rows 64..159 also still differ — + the stripe-0 skip is the dominant, first-introduced defect; stripe + delta details in the r2 measurement notes). Site: the pipelined LR band + accounting — `pipe_run_lr`'s `rrows: Some` branch (restoration.rs) + refills only the RU rows its caller passes, and the band release + (`ls.note(k - 2)` / `ls.close(nb, false)`, decode.rs filter pipeline + ~25000-25032) never flushes RU row 0 on this frame — the frame whose top + superblock row carries a 128-root rect block (f2's inter 64x128 at + (128,0); f0's 128-rects sit on the keyframe path and f1 codes no + 128-root rect, which is why only f2 shows it). Fixing the flush is its + own scoped change; asserting f2's current samples in a gate would pin + the bug. +6. MEASUREMENT-METHOD CORRECTION (r1's false "all frames exact"): the r1 + final comparisons sliced the raw YUV with a plane-stride instead of a + frame-stride, so every "fN vs aomdec" row actually compared row 0 of + plane N — frame 2 was never truly compared and the 0-diff results were + an illusion. All r2 numbers above come from per-frame strided slices + (92160 bytes/frame), cross-checked against BOTH aomdec and ffmpeg, with + the binary's provenance pinned by a fresh-target-dir sha256 match + (incremental `Finished` in <2s does NOT imply a rebuild; `cargo clean + -p` without error checking can silently no-op — twice caught this wave). + +## Verification + +- `cargo check -p ec-av1`: 0 warnings, 0 errors + (target `$HOME/.cache/cargo-target-av1444sb`). +- New pinned gate (this commit): + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` — + pins the fixture by length + FNV1a64, proves non-vacuity via the + `decode::intra_sb128_hits` delta, and asserts frames 0/1 byte-exact + against BOTH the oracle aomdec and ffmpeg (frame 2 = DEFECT 3, named in + the test body; pinning its current samples would freeze the bug). +- Gates green with fix + cherry-pick (EC_AV1_REQUIRE_AOMENC=1): + `a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly`, + `a_superres_key_frame_with_cdef_and_loop_restoration_decodes_pixel_exact`, + `a_non_420_subsampled_sequence_header_is_refused_by_name`, + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_ + decodes_pixel_exact` — 4 passed. + +## Decision + +- DEFECT 1: one site, fixed. `decode_block_128rect` serves the kf PART128 + HORZ/VERT and AB arms plus the intra-in-inter 128 path (`in_inter` flag) + — one walk, all callers covered. +- DEFECT 2: fixed upstream-of-merge by cherry-pick (168442bd), kept. +- DEFECT 3: STOP-WITH-SITE per charter — the LR stripe-0 flush on inter + frames whose top SB row carries a 128-root rect. Named function/lines + above; the stage-dump evidence (PC exact, FINAL wrong, delta rows 63+) + is in the r2 notes. +- NOT touched: `sub8_leaf_chroma444`'s rect arm (sibling lane, distinct + open defect), `decode_leaf8` OOB (leaf8oob's), the 4:2:0 group-tail + chroma SKIP arm (reserved), `read_coeffs_rect`. +- Temp EC_TRACE_444SB / EREAD_RECT / TEMP-444SB instrumentation removed + before commit; the commits carry only the fix, the assert, the gate and + the reports. + +## State + +- Commits on lane-av1-444sb (no push): 349b3918 (DEFECT 1 fix + fixture + + r1 report), 168442bd (cherry-pick of e3798a34), this commit (DEFECT 3 + named, gate added/scoped, r2 report). diff --git a/lanes/av1444sbf2.report.md b/lanes/av1444sbf2.report.md new file mode 100644 index 00000000..0aa13754 --- /dev/null +++ b/lanes/av1444sbf2.report.md @@ -0,0 +1,74 @@ +# lane-av1-444sbf2 — the 444sb witness f2 after d5325172: NOT exact; residual re-measured sample-identical to DEFECT A; gate NOT extended (r1) + +## Outcome + +1. Gate-extension precondition FAILED — frame 2 is not byte-exact, so + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` stays at + `take(2)`. Measured at HEAD 85ce04de (48411287 + the d5325172 cherry-pick) + with the pinned fixture (`crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu`, + sha256 re-verified `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80`), + a FRESH target dir (`cargo-target-av1444sbf2` did not exist before this lane; + probe binary sha256 + `9f50af10a11fb77a3461e35427e75e616e29c3ff0403978db4a503e4ccecde3f`), and + per-frame strided slices (92160 bytes/frame, W*H*3, planes Y/U/V at + 0/30720/61440). Frame 2 vs BOTH oracles: **Y 7308 / U 9685 / V 13854**, and + the two oracles agree with each other sample-for-sample on all three frames + (ours is the diverging side; no measurement-method ambiguity this time). + Frames 0/1: byte-exact vs both. +2. Stage ladder (instrumented oracle + ours, decode-order `.fN` dumps, 92160-byte + crop-shaped files on both sides, default serial filter path): f0/f1 EXACT at + PREFILT, POSTDEBLOCK, POSTCDEF and FINAL. f2 diverges already at **PREFILT** — + Y 6952 / U 9568 / V 13496, first diffs Y (col 128, row 98), U (col 128, + row 64), V (col 128, row 0) — i.e. in reconstruction, BEFORE any loop filter. + The filters only carry the damage downstream: POSTDEBLOCK 6956/9568/13614, + POSTCDEF 7307/9685/13722, FINAL 7308/9685/13854. +3. The residual is UNCHANGED by d5325172. av1lrflush r3 measured the identical + ladder at base 48411287 (without the cherry-pick): PREFILT 6952/9568/13496 + with the same three first-diff samples, POSTCDEF 7307/9685/13722 — every rung + I can cross-check matches my with-fix numbers exactly. The inter 1:4 strip + chroma pair-rewrite fix (its t6 class) is inert on this fixture: f2's damage + is a different (or wider) instance of the same inter rect-strip class, not + the one d5325172 fixed. (The old r2 "FINAL V 14012" was r3's identified + one-rung-off comparison artifact, not a fix effect.) +4. Site (STOP-WITH-SITE, unchanged from av1lrflush r3's DEFECT A): the inter + rect-strip entropy/recon path on f2's inter 64x128 block at (128,0) — all + three planes' first diffs enter at column 128 inside that block and + everything downstream carries it. There is no entropy desync: both decoders + consume the full stream and complete the frame with bounded diffs, so the + symbol reads are identical and the divergence is in the strip's + reconstruction / band-stamping reads — Agent044's `decode_rect4_16_strip` + territory (their t6-adjacent class). r2's LR-stripe-0 attribution stays + refuted (av1lrflush r3); the gate's scoping comment naming it is now stale + but is deliberately left untouched here: per av1lrflush r3 §6 the comment + fix and the `take(3)` extension land together in the SAME deferred edit + once the entropy fix actually clears f2 — a comment-only commit on another + lane's gate would split that pairing. +5. No decoder edit on this lane: 4:2:0 identity untouched by construction; no + cargo check owed. + +## Verification + +- `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` + (unmodified): PASS at this HEAD — f0/f1 pins intact, non-vacuity + `intra_sb128_hits` delta fires (target `cargo-target-av1444sbf2`). +- Ladder + slice numbers above produced from that same fresh target dir; the + throwaway decode example and all `/tmp` dumps were deleted before commit. +- Both oracle references regenerated this session (aomdec + `~/.cache/aom-oracle/build` binary, 2026-09-25 17:46; ffmpeg 8.1.2) and + cross-agreed before any diff was trusted. + +## Decision + +- Gate NOT extended (assignment branch 2: "do not extend … do not pin wrong + samples"). Asserting f2's current samples would freeze DEFECT A into the + gate. +- Next owner: the entropy lane (inter rect-strip band stamping, + `decode_rect4_16_strip`). Re-run THIS measurement (stage ladder + per-frame + strided slices + fresh target dir, both oracles) after that fix lands; extend + `take(2)`→`take(3)` and fix the stale scoping comment in the same edit only + when f2 goes byte-exact. + +## State + +- Commit on lane-av1-444sbf2 (no push): this report only; production tree + untouched since 85ce04de. diff --git a/lanes/av1ecmcb.report.md b/lanes/av1ecmcb.report.md new file mode 100644 index 00000000..3519b5fd --- /dev/null +++ b/lanes/av1ecmcb.report.md @@ -0,0 +1,62 @@ +# lane-av1ecmcb report -- the EC_MCB rung's halved window + +Branch `lane-av1-ecmcb`, base `fe3e8418`. Single item: close the deferred +`EC_MCB`-rung coordinate defect named in `lanes/av1llpred.report.md` ("still +windows its own dump with `write_w / 2` -- fix-now(deferred to whoever next +touches that rung)"). + +## Verdict: defect REAL, fixed (instrumentation only) + +`decode.rs::obmc_run`'s rung filtered the `EC_MCB="::[:]"` +window and dumped the pre/post-blend chroma rows with `write_w / 2` / +`write_h / 2`. `write_w`/`write_h` are the block's LUMA write dims +(`decode_inter_block` ~30346: `cpx = px >> ss_x`), so the `/2` is correct only +at 4:2:0; at 4:4:4 (`ss 0/0`, decoded by this tree -- refusal inventory names +only 4:2:2) the chroma block is full-size and the old rung quartered both its +window and its row dumps. + +Oracle semantics (r13/r14 ground truth): aomdec's private `EC_MCB` printed +every `dec_build_inter_predictors` call whose PLANE-pixel span covers the +pixel. The saved pairing dumps still pin this: +`~/.cache/t900-tmp/aom_mcb41b.txt` prints `bw=16 bh=16` + 16x16 rows for the +32x32-luma block at mi(176,192) -- plane pixels -- and `our_mcb41.txt` matched +1:1 at 4:2:0. Plane pixels at `ss 0/0` are luma-sized, so the fix is +`write_w >> ss_x(fctx)` / `write_h >> ss_y(fctx)` in the window check and both +row dumps (bit-identical at 4:2:0: dims are even, `>>1 == /2`). + +Note: the oracle's private `EC_MCB` patch is no longer in +`~/.cache/aom-oracle/src` (t900-era tree reverted to pristine); the saved r13 +dumps are the surviving oracle ground truth and are what this closure pairs +against. + +## Verification + +* 4:2:0 pairing unchanged: `EC_MCB=1:353:395:41` on the pinned + `~/.cache/t900-tmp/c900_62.obu` (release `decode_probe`), block + `cpx=352 cpy=384 cw=16 ch=16` -- all 16 prerows byte-equal to the saved + oracle rows AND to the pre-fix `our_mcb41.txt` rows. +* 4:4:4 fail-before / pass-after: `aomenc --profile=1 --enable-obmc=1` gate + recipe (obmc gate's exact flags, `gradients` seed 43, 64x64, 25 frames, + `/tmp/ecmcb/s43.obu`, 444). `EC_MCB=1:48:48`: pre-fix binary fires 0 blocks + (48 is outside `cpy..cpy+16` for the `cpx=32 cpy=32` block); post-fix fires + `OUR_MCB pre f=5 cpx=32 cpy=32 cw=32 ch=32` with full 32-wide rows. +* Decode behavior unchanged: the diff touches only `env_flag!("EC_MCB")`-gated + lines (the closure is `.then`-gated, so with the env unset nothing new + runs). Gate `a_real_aomenc_stream_with_obmc_decodes_pixel_exact`: + `ok. 1 passed` (pixel-exact vs ffmpeg), genuinely ran (no SKIP). +* `cargo check -p ec-av1` (`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1ecmcb`): + 0 warnings. + +## EVIDENCE + +EVIDENCE: ~/.cache/t900-tmp/aom_mcb41b.txt + /tmp/ecmcb/our_now_block.txt | EC_MCB=1:353:395:41 both decoders on c900_62.obu, block cpx=352 cpy=384 | 16/16 prerow values equal to the oracle's saved plane-pixel rows (post-fix) +EVIDENCE: /tmp/ecmcb/s43.obu + /tmp/ecmcb/post48.txt | aomenc --profile=1 --enable-obmc=1 (obmc-gate recipe, seed 43) + EC_MCB=1:48:48 | pre-fix 0 fires, post-fix `cw=32 ch=32` full-block dump at 4:4:4 +EVIDENCE: cargo test -p ec-av1 --lib a_real_aomenc_stream_with_obmc_decodes_pixel_exact | ok. 1 passed; 0 failed (decode path untouched) + +## Disposition + +fix-now (the deferred item): the rung is ss-aware and pairs at both chroma +shapes. No decode-behavior change shipped. The left-pass `OUR_MCB left` tmp +dump still prints the BLEND's own `cbw/cbh` (which reflect the blend's +per-axis halves) -- that is the rung instrumenting real decode geometry, not a +rung-side assumption, and stays as-is. diff --git a/lanes/av1gwarp12.report.md b/lanes/av1gwarp12.report.md new file mode 100644 index 00000000..1d543af6 --- /dev/null +++ b/lanes/av1gwarp12.report.md @@ -0,0 +1,94 @@ +# lane-av1-gwarp12 — the single-ref GLOBAL-warp witness at 12 bits + +Base fe3e8418, worktree `edith_codecs-av1gwarp12`, branch `lane-av1-gwarp12`. +The charter: close lane-av112bitw's open half — "single-ref GLOBAL-warp at 12 +bits has no stream of its own" — with a real `aomenc --bit-depth=12` stream +whose single-reference inter blocks are predicted through +`warp::global_warp_params` under a ROTZOOM model, decoded against BOTH pixel +oracles, or an honest miss table. + +## Result: FOUND, first recipe, pixel-exact against both oracles + +Encode attempts aimed at the target: **2** (budget 8). Attempt 1 (the gate +itself) fired and was already byte-exact vs ffmpeg; attempt 2 re-encoded the +same recipe standalone for the aomdec oracle. + +1. `aomdec == ffmpeg` on the probe stream + (`/tmp/gwarp12probe/probe.obu`, sha256 + `3c6102cd0dd9bbccb5d15b2f3605a7dcea9e3189c1efc7d0317b16fc481af5fe`, + 37194 bytes; 16x 128x128 frames, 786432 raw bytes each decoder, + `cmp`-equal payloads). Since the gate proves our decode == ffmpeg on the + live re-encode, all three decoders agree on the firing stream. +2. Engagement: `rotzoom_gm_warp_hits = 152` (16x16+ single-ref blocks + predicted through `global_warp_params` with a ROTZOOM model), affine 0 + (vanilla aomenc cannot emit it, see below), local-warp symbol 0 + (`--enable-warped-motion=0` isolates the global arm), + `compound_warp_hits` delta 0 (hard-asserted; single-ref premise held). + +## Why the recipe works when the prior ones didn't + +Every prior 12-bit content fit TRANSLATION global models (excluded by +`is_global_mv_block`) or reached >TRANSLATION models only on compound blocks. +The lever is composition, not the encoder: + +- **Content**: rotation + UNIFORM zoom — a similarity transform, exactly the + family the 4-parameter ROTZOOM model expresses (`mandelbrot` + + `rotate=a=0.12*t` + symmetric `scale` over `n`, cropped 128x128). +- **Compound tools OFF** (`--enable-masked-comp=0 --enable-interintra-comp=0 + --enable-onesided-comp=0`, plus lag 0 / alt-ref 0 so all refs are + forward): a global model can then only ride a single-reference GLOBALMV + block. +- **`--enable-warped-motion=0`**: no local WARPED_CAUSAL can take + `warp_params` first; the `warp_params.is_none()` guard at the single-ref + arm makes every hit unambiguously a global-warp hit. +- **`--min/--max-partition-size=32`**: every inter leaf is 16x16+, so the + 8x8-leaf arm (`decode_inter_block8`, leaf8 lane's file region) is + structurally out of the stream and my counter proves MY site, not a twin. +- **Model bound is encoder-side**: `global_motion_facade.c:24` pins the gm + search to ROTZOOM, so every >TRANSLATION single-ref model a real aomenc + can emit IS ROTZOOM. (AFFINE needs the widened side build and has its own + gate + `affine_gm_hits` at 8/10 bits.) + +Exact flags: the `encode_12bit` witness base (cq 20, cpu-used 0, sb 64, +profile 2, cdef/restoration ON) plus the extras above and +`--enable-global-motion=1 --enable-obmc=0 --enable-ref-frame-mvs=0`. +Fixture: `y4m_12bit_rotzoom_gm_source` (ffmpeg lavfi, C420p12 y4m, 16 +frames). The gate re-encodes live; engagement reproduced identically across +three runs (152/152/152). + +## What changed + +- **decode.rs** — one new counter pair at the single-ref global-warp arm + (`decode_inter_block`, the lane's own site): `ROTZOOM_GM_WARP_HITS` + + `rotzoom_gm_warp_hits()`, bumped when `global_warp_params` resolves AND + `gm_ref.model == Rotzoom`, mirroring the `AFFINE_GM_HITS` twin. The 8x8 + leaf arm's copy was deliberately NOT touched (leaf8 lane). +- **stream.rs** — `y4m_12bit_rotzoom_gm_source` fixture helper + the gate + `a_real_rotzoom_global_warp_12bit_stream_decodes_pixel_exact`: + `assert_12bit_sequence_header` preflight, hard `delta_rotzoom > 0` (a + warpless stream cannot pass), hard `compound_warp_hits` delta == 0, and + every plane of every frame byte-equal vs ffmpeg + (`ffmpeg_decode_sequence_12bit`). + +No decoder arithmetic changed: the single-ref path was lifted by +lane-av112bitw (parameterised `warp_round_0`) and the composition argument +held — the stream proves it instead of arguing it. Non-vacuity is by +construction (counter assert), and the gate FAILED-category risk (silent +skip) is closed: encode/ffmpeg presence is hard-asserted inside the gate. + +## Verification + +- New gate green (encode attempt 1): 16 frames pixel-exact vs ffmpeg, + 152 rotzoom hits. +- aomdec oracle probe (encode attempt 2): aomdec == ffmpeg, sha256 above. +- Scoped sweep of the 12-bit family the counter addition touches: 9/9 green + (`12bit` filter) including `a_12bit_warped_motion_stream_decodes_pixel_exact` + (engagement still 7/1/0), both compound global-warp 12-bit gates (16x16+ + and 8x8 leaf), grain refusal, screen refusal. +- `cargo check -p ec-av1 --all-targets`: clean, no warnings. + +## Create-list audit + +One new file: this report. Touched: `decode.rs` (counter), `stream.rs` +(helper + gate). No fixture committed (gate encodes live), no junk files; +probe artifacts under /tmp are throwaway. diff --git a/lanes/av1ibc444rect.report.md b/lanes/av1ibc444rect.report.md new file mode 100644 index 00000000..557304f3 --- /dev/null +++ b/lanes/av1ibc444rect.report.md @@ -0,0 +1,147 @@ +# lane-av1-ibc444rect: intrabc rect-leaf chroma walk at lossless 4:4:4 (r1) + +## Charter + +Fix the deferred `av1llsub8` gap: intrabc rect leaves at lossless 444 routed +the rect arm's `read_coeffs_rect` path with the wrong unit structure. +Unblocked by the green inter side (av1llinter2). Work in +`edith_codecs-av1ibc444rect` @ 9e77c16b. 4:2:0 stays identical; existing +lossless gates stay green. At most 8 encodes for the fixture. + +## Defect (both planes of the intrabc route) + +`decode_leaf_rect8`'s intrabc arm at lossless pushed ONE rect unit: + +- luma: `read_coeffs_rect(LumaRect8x4Inter, 8x4)` — one TX_8X4-shaped read, +- chroma: `sub8_leaf_chroma444`'s non-square arm, one `ChromaRect8x4` read. + +The oracle codes per-4x4 INTER TX_4X4 units, plane-major: `read_tx_size`'s +lossless first line (`decodeframe.c:1203`) forces TX_4X4 before any tree, the +frame's `TxMode` is `ONLY_4X4` (spec 6.8.20) so no var-tx tree either, and +`av1_read_tx_type`'s `qindex == 0` early return (`decodemv.c:681`) drops the +tx_type symbol the LOSSY 4x4 inter sets DO carry. Fail-before, measured: the +single-rect read desynced the tile and tripped the lossless WHT assert +`(4, 8) != (4, 4)` at `TxParams::run` — the same panic class av1llinter2 +attributed on the inter side. + +## Fix (same shape as the non-intrabc arm) + +1. `decode_leaf_rect8` intrabc arm, `lossless && !skip`: the leaf's luma + coefficients become `(bw/4)*(bh/4)` 4x4 units in the EXISTING per-unit + loop (var-tx `(tw,th)==(4,4)` mechanics: `inter_txbset_for(4)`, + `scan4`, per-unit `around_mi`, `luma_skip_ctx`, DV copy prediction via + the palette slot, `push_intra`). The TXFM band publish moved AFTER the + unit loop (`set_txfm_ctxs` runs at `parse_decode_block`'s tail, so the + units' own `txb_skip_ctx` reads must see the pre-block bands). The units' + `coding.tx_type` is nulled at lossless — WITHOUT this the ladder diverges + immediately (ours +4096 rng on a symbol the oracle never codes; found by + the `EC_TRACE_COEFF` ladder, oracle O#1353 vs ours G#1359-1361 on the + fixture's first leaf). +2. The units' residual goes through `TxParams { lossless: lossless(fctx) }` + (read_plane's own route), NOT `dequant_and_inverse_typed_wh` — the latter + has no lossless flag and ran a DCT inverse over the WHT-ordered levels + (±1..30 sample errors on every walked leaf; gone after the fix). +3. `sub8_leaf_chroma444`'s intrabc non-square arm, `lossless`: per-4x4 + `TxbSet::Chroma4` walk mirroring the lane-av1-llsub8 fix (per-unit + `around_mi_rect`, `Reach::of`, per-unit entropy stamps, `Some(3)` big-row + fold), with the intra predictor swapped for the CURRENT frame at the DV. +4. Skip arms untouched. 4:2:0: the luma walk also applies at 420 lossless + (luma is subsampling-independent) — that route was equally broken before + and no committed gate reaches it; every currently-green stream is + bit-identical (all 16 battery gates below). + +Counters `INTRABC_RECT8_LOSSLESS_LUMA_HITS`/`_CHROMA_HITS` + accessors +(`stream::intrabc_rect8_lossless_{luma,chroma}_hits`, +`reset_ibc444rect_hits`) pin the walk for the gate. + +## Fixture (bounded grid: 8 encodes, budget used 8/8) + +`fixtures/ll444_ibc_rect.obu`, 99614 bytes, sha256 +`482dedca0201beea9b0a05720b5da7fe93c350c9fea7699cdb010c3fbc227ec0`. +Source: `lanes/av1ibc444rect_fixture_gen.py` (sha256 +`3420a1f80603efc16a66a37be72d04dcd66836df0dc79d28710511c165ef92f1`, +y4m sha256 `5d3b8a2cbce29766852806787811f28a0b7b7df75409915666bad087e0cc9768`): +320x240 C444, dithered chaotic base + single-half 8x4/4x8 near-match stamps +(per-copy bias + random flips — never an exact match). Encoder: +`$HOME/.cache/aom-oracle/build/aomenc --codec=av1 --bit-depth=8 +--input-bit-depth=8 --passes=1 --cpu-used=0 --lag-in-frames=0 --kf-max-dist=1 +--limit=1 --threads=1 --tile-columns=0 --lossless=1 --sb-size=128 +--enable-1to4-partitions=1 --profile=1 --i444 --enable-intrabc=1 +--tune-content=screen --min-partition-size=4 --max-partition-size=8 --obu`. +The stream codes hundreds of unskipped intrabc rect leaves (oracle inspect +census: 8x4 + 4x8 + 4x4 intrabc, most non-skip). + +Grid summary (all probed with env-gated shape prints + the counters): +testsrc2-based and five crafted variants; every stream that codes intrabc +rect leaves ALSO codes an intrabc `BLOCK_8X8` leaf (aomenc's dominant +intrabc shape — 284 of them in the E7 census) and/or skipped intrabc leaves. +`--max-partition-size` cannot forbid 8x8 `PARTITION_NONE` while keeping +8x4/4x8 leaves; content shaping reduced but never eliminated 8x8 intrabc. + +## Verification (measured) + +- Entropy: `EC_TRACE_COEFF` ladders aligned ours-vs-instrumented-aomdec + (`~/.cache/aom-oracle/build`, `EC_TRACE_COEFF=1`); post-fix the tile runs + through all walked leaves with no desync (pre-fix: desync at the first + leaf's eob read, then the WHT assert). +- Pixel exactness of the walk vs the oracle `aomdec --rawvideo`, measured + with a THROWAWAY two-line patch of the sibling 8x8 defect (16->block-size + chroma prediction buffers in `decode_leaf8`) — applied ONLY to measure, + reverted before commit, never part of this lane's diff: + - E4 fixture: luma 0 differing samples; chroma diffs ONLY on skipped + intrabc cells (36727 bytes, 100% `(intrabc=1, skip=1)` cells + their + poisoned neighbours; zero on walked leaves). + - E8 (= the committed fixture): 339 walked rect leaves; luma 0 differing + samples; chroma 5624 bytes, again exclusively on `(intrabc=1, skip=1)` + cells + neighbours. +- Gate `a_lossless_444_intrabc_rect_leaf_walks_per_4x4_units` (green): + pins fixture len/FNV, asserts the walk fires exactly (3, 3) before the + known leaf8 death and that the death signature is the leaf8 + `palette_window` slice — i.e. the entropy ladder survived the walked + leaves. Fail-before: pre-fix the death was the `(4, 8) != (4, 4)` WHT + assert. Mutation check: flipping the chroma `Some(3)` ctx to `None` + fails the gate (desync moves the death). +- Battery, all green: `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`, + `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact`, + `a_skipped_lossless_intrabc_rect_strip_zeroes_its_entropy_bands`, + `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`, the new + gate, plus the ten lossy intrabc gates (screen-kf intrabc reads, 16x4 + pair strip, both-orientation rect intrabc, sb128 screen + rect strip, + tx4 leaf chroma, sub8 census, var-tx census, mixed var-tx tree, tx-select + census). `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## Not claimed + +The committed tree does NOT decode either candidate fixture to a full frame: +every reaching stream panics at its first intrabc `BLOCK_8X8` leaf on the +llintra-deferred defect. Whole-fixture 0-diff is therefore NOT claimed and +cannot be measured on this tree; the walk's own samples are measured 0-diff +as above. + +## Blocked-by / deferred (spoken, not hidden) + +1. `decode_leaf8`'s intrabc chroma prediction buffers, hardcoded 4x4 + (16 samples for a 64-sample 4:4:4 reconstruct) — panics at + `palette_window` (decode.rs ~2460). OWNER: the `av1llintra` deferral; this + lane did NOT touch `decode_leaf8` (different function, sibling + ownership). Fix is its own two lines (buffer + predict size follow + `chroma_444`); after it lands, decode completes and this lane's gate + flips to the full-frame exact comparison. +2. Skipped-intrabc sub-8x8 chroma predictor: `sub8_leaf_chroma444`'s skip + arm (and the 4:2:0 group-tail skip arm) predict INTRA-DC where libaom + predicts the frame copy at the DV (`av1_build_inter_predictors_sb` runs + regardless of skip for an intrabc block). All remaining E4/E8 chroma + diffs sit exactly on those cells. UNNAMED in any prior report (loss64 + fixed the STRIP path only); class-adjacent to the RESERVED 4:2:0 + group-tail skip arm, so per the standing reservation this lane stops and + escalates instead of editing. Needs: consult the DV in the skip arms + (armed palette slot), plus a fixture gate. +3. `av1llintra2`'s rect64 lossless chroma gap (`EC_RECTCHROMA_GAP`) remains + deferred in its own lane; not touched here. + +## Function-collision statement + +This lane's diff lands only in `decode_leaf_rect8` and `sub8_leaf_chroma444` +(+ counters in decode.rs, accessors/gate in stream.rs). `decode_leaf8` — +where the blocking sibling defect lives — is untouched, byte-for-byte. diff --git a/lanes/av1ibc444rect_fixture_gen.py b/lanes/av1ibc444rect_fixture_gen.py new file mode 100644 index 00000000..a2a801b1 --- /dev/null +++ b/lanes/av1ibc444rect_fixture_gen.py @@ -0,0 +1,40 @@ +import sys, random +W, H = 320, 240 +rng = random.Random(60606) +y = bytearray(W*H); u = bytearray(W*H); v = bytearray(W*H) +def base(x, y): + return ((x*3 + y*5) ^ (x*11 + y*13)) & 63 +def wm(wx, wy): # per-window watermark: unique per window + return ((wx*73) ^ (wy*151) ^ ((wx*wy) & 255)) & 63 +for j in range(H): + for i in range(W): + b = (base(i, j) ^ wm(i >> 3, j >> 3)) + 32 + y[j*W+i] = b + u[j*W+i] = 128 + ((base(i+37, j+91) ^ wm((i+37) >> 3, (j+91) >> 3)) & 15) - 7 + v[j*W+i] = 128 - ((base(i+13, j+57) ^ wm((i+13) >> 3, (j+57) >> 3)) & 15) - 7 +patch = [[96 + rng.randrange(64) for _ in range(8)] for _ in range(8)] +def put(X, Y, luma, cuv): + y[Y*W+X] = min(255, max(0, luma)) + u[Y*W+X] = min(255, max(0, cuv)) + v[Y*W+X] = min(255, max(0, 255 - cuv)) +for by in range(0, H, 8): + for bx in range(0, W, 8): + r = rng.random() + if r < 0.55: + shape = (8, 4, 0 if rng.random() < 0.5 else 4) + elif r < 0.85: + shape = (4, 8, 0) + if bx + 4 >= W: shape = (8, 4, rng.randrange(2)*4) + else: + continue + w, h, oy = shape + bias = rng.randrange(-3, 4) + flips = {(rng.randrange(w), rng.randrange(h)) for _ in range(5)} + for j in range(h): + for i in range(w): + s = patch[(by+oy+j) % 8][(bx+i) % 8] + if (i, j) in flips: s ^= 1 + put(bx+i, by+oy+j, s + bias, 100 + (s & 31) + bias) +with open(sys.argv[1], 'wb') as f: + f.write(b'YUV4MPEG2 W320 H240 F25:1 Ip A1:1 C444 XYSCSS=444\nFRAME\n') + f.write(bytes(y)); f.write(bytes(u)); f.write(bytes(v)) diff --git a/lanes/av1ibcskip2.report.md b/lanes/av1ibcskip2.report.md new file mode 100644 index 00000000..da3f16b7 --- /dev/null +++ b/lanes/av1ibcskip2.report.md @@ -0,0 +1,94 @@ +# lane-av1-ibcskip2: skipped-intrabc sub8 chroma predicts the DV frame copy (r1) + +## Charter + +Close `av1ibc444rect` blocked_by item 2: `sub8_leaf_chroma444`'s skip arm +predicted the intra mode (DC for an intrabc leaf) where libaom predicts the +frame copy at the DV — `av1_build_inter_predictors_sb` runs for an intrabc +block regardless of `skip`; only the residual read is dropped. Work in +`edith_codecs-av1ibcskip2` @ b6d4b528 (`f23115aa` + cherry-picked +`9dbeafab`, the leaf8 chroma-extent fix that unblocked this fixture). The +RESERVED 4:2:0 group-tail chroma SKIP arm is untouched (see collision +statement). + +## Defect (measured on this tree, fail-before) + +The fixture decodes to completion at this HEAD (the parent lane needed a +throwaway leaf8 patch to measure; b6d4b528 landed it). Native reproduction, +oracle `aomdec --rawvideo` vs our decode: + +- luma: 0 differing samples, +- U: 2794 differing samples, V: 2830, across 180 distinct 4x4 cells — + 175 of them EXACTLY the frame's skipped intrabc leaves (150 leaves + covering 175 4x4 cells), the other 5 their immediate neighbours + (poisoned edge state), +- a throwaway cell trace confirmed every diff cell sits on a + `(intrabc=1, skip=1)` leaf or touches one. + +Class: `skipped-intrabc-predicts-intra`. The 4:2:0 group-tail twin (flat DC +at the tails) is the RESERVED arm — not touched, not fixed here. + +## Fix + +New first arm in `sub8_leaf_chroma444` (`if let Some(dv) = +intrabc_dv.filter(|_| skip)`): bilinear MC of the CURRENT frame's U/V at the +DV (the unskipped arm's own `mv_to_q4` route), armed through +`set_palette_pred` and pushed with `ZERO_RESIDUAL` via +`push_intra`/`push_intra_rect` — the same armed-palette-slot route the two +luma skip arms (`decode_leaf_split4`, `decode_leaf_rect8`) already use; the +callers flushed the recon queue before their luma DV copy, so the source +samples are current. The inherited chroma `tx_type` slot is disarmed +(consumed by nothing — a skipped leaf reads no coefficient), keeping +`SKIPPED_INTRABC_CHROMA_ARM_HITS` semantics. Engagement counter +`SKIPPED_INTRABC_DV_COPY_HITS` + accessors pin the route for the gate. + +## Stale gate flip (forced by the cherry-pick) + +`a_lossless_444_intrabc_rect_leaf_walks_per_4x4_units` was RED at HEAD as +committed: it pinned the leaf8 `palette_window` panic ((3, 3) walk hits) +which b6d4b528 removed — the walk now fires its full census (339, 339). +Flipped per its own r1 doc to the full-frame exact `aomdec` comparison: +fixture len/FNV pins kept, (339, 339) census assert, `SKIPPED_INTRABC_ +DV_COPY_HITS == 150` route assert, `aomdec --rawvideo` 0-diff on all three +planes (arm skipped with a notice only when the oracle binary is absent). + +## Verification (measured) + +- Mutation check: the arm mutated to count-but-predict-flat (grey 128 + prediction, flow intact, counter armed) → gate RED at "aomdec plane U: + 2503 samples differ". The pixel comparison is load-bearing; the ==150 + counter assert catches an unreachable arm. +- Gate green (post-fix, mutation reverted): "frame sample-exact vs oracle + aomdec; 339+339 rect walks, 150 skipped-intrabc DV copies". Whole-fixture + 0 differing samples on Y, U and V — also re-measured out-of-gate via a + throwaway plane dump + byte diff before the gate existed (0/0/0). +- Battery (superset of the parent's 16): every `intrabc`-named gate 17 + passed, every `lossless`-named gate 12 passed, every `sb128`-named gate 9 + passed (1 ignored diagnostic each where present), including the parent's + full list, the leaf8oob gate from HEAD's cherry-pick, and this flipped + gate. `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## 4:2:0 / reserved-arm collision statement + +The diff lands only in `sub8_leaf_chroma444` (444-only: all six call sites +sit inside `if chroma_444` blocks; 4:2:0 chroma rides the group tails), +the `SKIPPED_INTRABC_DV_COPY_HITS` counter block in decode.rs, and the +flipped gate in stream.rs. The 4:2:0 group-tail chroma SKIP arm and the +`last_intrabc` tails in `decode_leaf_split4`/`decode_leaf_rect8` — the +RESERVED territory — are byte-for-byte untouched, and none of their call +sites pass `intrabc_dv = Some`, so 4:2:0 control flow through the edited +function is identical; the 420-heavy intrabc/lossless/sb128 battery above +confirms bit-identical behaviour. + +## Not claimed + +Exactness is claimed for the pinned fixture (whole frame, all planes) and +whatever the battery gates already pinned — not a general "every 4:4:4 +intrabc stream decodes exact" statement. The `444_leaf8_oob.obu` +divergence noted in `lanes/av1leaf8oob.report.md` is that lane's deferral, +not re-measured here. + +## Deferred + +Nothing. The charter's deliverable (skip arm consults the DV, fixture gate, +4:2:0 identical, gates green) is complete on this branch. diff --git a/lanes/av1leaf8oob.report.md b/lanes/av1leaf8oob.report.md new file mode 100644 index 00000000..b4149218 --- /dev/null +++ b/lanes/av1leaf8oob.report.md @@ -0,0 +1,134 @@ +# lane-av1leaf8oob: fix the 4:4:4 intrabc 8x8-leaf chroma OOB panic + +Tree: lane-av1-leaf8oob @ 9e77c16b (base = lane-av1llpredgate2's pin). +Reproducer pinned at `crates/ec-av1/fixtures/444_leaf8_oob.obu`. + +## Defect + +`cargo run -p ec-av1 --example decode_probe` on the fixture died with + +``` +thread 'main' panicked at crates/ec-av1/src/decode.rs:3774:16: +index out of bounds: the len is 16 but the index is 16 +``` + +(`PlaneBuf::reconstruct` via `exec_intra` via `decode_leaf8`, reached through +the `#[track_caller]` reconstruct calls at 4:4:4, 8x8 leaf.) + +Root cause, ONE plane-math site as the ticket guessed: `decode_leaf8`'s +intrabc frame-copy closure sized the leaf's chroma prediction buffers with +the literal 4:2:0 halving of an 8x8 luma leaf — `vec![0u16; 4 * 4]` and +`predict_with_filter(.., 4, 4, ..)` for BOTH U and V — while the leaf's own +chroma reconstruct at 4:4:4 runs `csz == 8`. The 16-sample override rode the +`PALETTE_PRED` slot into `reconstruct` as an 8x8 prediction, which indexed +`prediction[row * 8 + col]` = 16 at row 2, col 0: `len 16, index 16`. + +## Fix (source, not a clamp) + +`crates/ec-av1/src/decode.rs`, `decode_leaf8` intrabc closure: the chroma +extent is now derived from the frame's subsampling, +`(cw, ch) = (8 >> ss_x(fctx), 8 >> ss_y(fctx))` for both the buffer size and +the `predict_with_filter` geometry, and the row subpel arg uses `ss_y` like +every sibling intrabc site (rect intrabc at 11570/11910/11920, the +`luma: bool` helper at 13899; bit-identical at every reachable ss since +4:2:2 refuses at the sequence header, so ss_x == ss_y in all decodable +streams). 4:2:0 still computes 4x4 — byte-identical there. + +The one sizing heals all three consumers of the buffers: the TX8 and skip +arms consume them whole at `csz`, and the TX4 4:4:4-lossless arm windows +them at stride 8 inside `read_intra_chroma_lossless` +(`palette_window(buf, stride, ox, oy, 4, 4)` reads up to index 63), which +had the same OOB latent. + +## Class sweep (hardcoded 4:2:0 chroma extent, decode.rs) + +Swept every intrabc chroma prediction site in decode.rs: + +| site | extent | verdict | +|---|---|---| +| `decode_leaf8` intrabc closure (18128/18134 pre-fix) | literal `4*4` | **THE BUG** — fixed | +| `decode_block` square intrabc (16735+) | `chroma_side = side >> ss_x` | ss-derived, clean | +| rect intrabc owned/rect4 (11557+, 11897+) | `cw * ch`, `cside` | ss-derived, clean | +| `predict_intrabc` helper (13899) | `w * h` params, `ss_x`/`ss_y` split | clean | +| `sub8_leaf_chroma444` (18927+) | `bw * bh` (already chroma units) | clean by construction | +| `decode_leaf_split4` 4x4 arm (19423+) | literal `4*4`/`4,4` | 4:2:0-only arm (chroma_444 returns earlier) — literal correct there | +| `decode_leaf_rect8` clamp arm (20106+) | literal `4*4`/`4,4` | same 4:2:0-only arm — literal correct there | + +No second 4:4:4-reachable instance exists in decode.rs. Signature-class +note: lane-lossless128 hit the identical panic text (`len 16, index 16`) +from a 128-axis lossless extent — recurring class, both now pinned by +gates. + +## Gate + +`stream::tests::an_intrabc_8x8_leaf_chroma_frame_copy_at_444_decodes_without_the_oob` +(crates/ec-av1/src/stream.rs), modelled on the av1llpredgate2 pattern: + +- Fixture provenance: the lane ticket's witness-hunt reproducer (s1a/s2e); + 3577 bytes, sha256 + `72bed2791d1ceba8be7926a052c7838c5d96d4f9d56d28fb69789a753d3593af`, + FNV-1a64 `0x86b93a51fe16353c`; 320x256, 3 frames, 8-bit 4:4:4 + screen-content keyframes (the oracle's MB dump opens on unbroken + inter-classified intra = intrabc blocks). The aomenc recipe is not + independently recoverable in this lane — bytes pinned by length + FNV + + oracle raw fingerprint. Force-added past the `fixtures` gitignore like + every sibling fixture; missing file panics, no skip path. +- Assertions: fixture bytes (len + FNV), `decode_stream` succeeds (3 + frames, 320x256 — the pre-fix run died here), `leaf8_intrabc_hits` + 0 -> 4 non-vacuity, and the oracle aomdec still decodes the pinned bytes + (raw 737280 bytes, FNV `0x38210bcbf572973c`). + +### Red-before (mutation verification) + +`git checkout --` of the fix (patch snapshotted to /tmp, restored +byte-identical, `diff`-verified): gate RED at +`decode.rs:3774:16 index out of bounds: the len is 16 but the index is 16` +— the exact ticketed panic. With the fix: green, standalone AND in the +full `intrabc lossless` filter batch (26 passed, 3 consecutive runs). + +### Why the gate pins NO pixel baseline (measured, then scoped out) + +Against the oracle aomdec (`--rawvideo`; comparison method ground-truthed: +`a_lossless_sb128_rect_intra_block_decodes_sample_exact` and +`a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` are green +on this same tree), this stream DIVERGES, and not deterministically: + +- per-frame differing (y, u, v) of 81920 samples/plane: + (20811, 35467, 32320), (20308, 39177, 35994), (20131, 39588, 36601); + frame 0's first differing LUMA sample at (275,128); +- under `EC_AV1_PLANE_SENTINEL=1` chroma counts move (u f0 35467 -> 35630) + while luma stays put; sentinel-vs-uninit output diffing localises the + dependence to 458 WHOLE 8x8 chroma blocks (frame 0: chroma x >= 96, + y >= 64) reading samples this decode never wrote — ambient memory, so + any pixel-exact assert drifts run to run (observed: u f1 39177 vs + 39126 vs 39138 across batch runs). + +Attribution to this lane's diff: none. The fix touches only leaf8's chroma +prediction buffers; intra/intrabc luma reads only luma edges and the luma +plane, so a luma-first divergence cannot come from it, and the pre-fix run +never produced output (panic at the first intrabc 8x8 leaf). + +Unified reading: ONE pre-existing decode desync on this stream around +frame-0 SB (3..4, 2) — after it, samples diverge from the oracle AND the +misread layout leaves whole chroma blocks unreconstructed (which is where +the never-written reads live). An initial-bounds witness would not have +seen this: the stream never decoded before this lane lifted the panic. + +Disposition: `deferred(unblock: divergence lane — EC trace pairing against +the oracle on this fixture; the oracle's AOMMB dump covers only frame 0's +first MB rows, so pairing needs the env-gated rungs)`. + +## Non-regression + +- `cargo test -p ec-av1 --lib -- intrabc lossless`: 26 passed, 0 failed + (3 consecutive runs, including the 4:2:0 intrabc gates + `an_intrabc_tx4_leaf_chroma_inherits_the_luma_type_and_predicts_from_the_frame_copy`, + the sb128 intrabc pixel-exact gates, and the 4:4:4 lossless + minp64/minp8/sb128 sample-exact gates). +- `cargo check -p ec-av1`: 0 warnings. + +## Hygiene + +- Target dir `$HOME/.cache/cargo-target-av1leaf8oob` throughout. +- Throwaway instruments (`examples/oob_diff.rs`, `examples/oob_dump.rs`) + deleted before commit; no other tree touched; nothing pushed. diff --git a/lanes/av1ll64.report.md b/lanes/av1ll64.report.md new file mode 100644 index 00000000..fdc920ca --- /dev/null +++ b/lanes/av1ll64.report.md @@ -0,0 +1,108 @@ +# lane-av1-ll64: the rect64-route 64x32 chroma row — named, not invented (r1) + +## Ticket + +Default-partition lossless 4:4:4 stops at a missing 64x32 chroma lossless +coefficient row on the rect64 route (the `EC_RECTCHROMA_GAP luma=64x32 +tx=4x4 chroma=64x32` diagnostic `lane-av1-llinter2` deferred here). Name +the row; add it only if libaom has that transform; do not invent one. +`decode_rect4_16_strip` is off-limits (owned by the lossless-444 strip +lane). + +## The named row + +The `chroma` match in `decode_rect_split` (decode.rs:10086) has no +`(64, 32)`/`(32, 64)` arm: a 4:4:4 64-axis strip's chroma plane block +cannot be coded as ONE rect unit here. That missing arm is the row the +gap print names. + +## libaom verdict (oracle source, measured): no such transform — row NOT added + +- Lossless: `av1_get_tx_size` returns TX_4X4 for EVERY plane + (`av1/common/blockd.h:1383`), so a 64x32 chroma plane block codes as a + plane-major raster of TX_4X4 units (16x8 = 128 per plane at 4:4:4). + There is no 64x32 lossless transform at all. +- Non-lossless: `av1_get_max_uv_txsize` routes chroma through + `av1_get_adjusted_tx_size` (`blockd.h:1361-1367`), which collapses + TX_64X32 and TX_32X64 to TX_32X32. A chroma transform wider/taller + than 32 is never one coded unit. + +Per ticket step 3: libaom marks the single-unit 64x32 chroma transform +not-codeable ⇒ STOP; no row invented. + +## The route truth: nothing stops at HEAD — the print was a false gap + +`decode_rect_split`'s arms already cover every shape that reaches it: + +- LOSSLESS: the 4x4 walk (decode.rs `else if lossless(fctx)`) is + shape-agnostic — for a (64,32) chroma block it walks 128 plane-major + `TxbSet::Chroma4` units with `4 << ss` spans, which IS the libaom + behavior above. The same code the key-frame gate proves on 16x8 + strips. +- Non-lossless: `chroma_tiled` tiles those four shapes as 32x32 / + 32x16 units (the 10-bit film gates' verified path). + +The old diagnostic fired whenever `chroma` was None and `!m.skip` — +INCLUDING on those two working routes, printing a "GAP" for shapes the +function decodes correctly. That false print is what `lane-av1-llinter2`'s +report cited as a "named non-panic stop" of default-partition `ll444.obu`. + +## Change (one diagnostic, no decode-path edit) + +decode.rs only: the `EC_RECTCHROMA_GAP` print's condition is now the +refusal's exact precondition (`chroma.is_none() && !chroma_tiled` inside +the existing `!m.skip`, so print↔refusal can never diverge), and its +message states the libaom verdict (`libaom_lossless_tx=none`). The +inventory-pinned refusal wording is byte-identical; every coefficient +read, CDF, span and neighbour stamp untouched. `chroma_tiled`'s `let` +moved above its new first use; its explanatory comments stay with it. +4:2:0: zero-change (a 64x32 luma strip is 32x16 chroma there — a row +that always existed; the print never fired at 4:2:0). + +## Verification (measured, this tree @ HEAD + this change) + +- Encoder sweep (aomenc `--lossless=1 --profile=1`, palette/intrabc off, + contents from testsrc2 to forced HORZ-biased noise, `--cpu-used` 0..8, + partition caps, bottom-edge smooth bands): NO lossless fixture presents + a 64x32 intra strip — at lossless RD the encoder picks NONE/SPLIT, so + the print never fired on any stream, old or new. +- Probes post-change (decode_probe): `ll444.obu` (default partition, 6 + frames) OK 6/6; `force_kf.obu`, `h2.obu` OK; committed + `lossless_sb128_rect_kf.obu` OK 4/4; pinned `ll444_minp64_inter.obu` + OK 6/6; `EC_RECTCHROMA` count 0 on every stream. +- Gates (7 passed, 0 failed): `a_lossless_444_min_partition64_inter_ + stream_decodes_pixel_exact` (6-frame inter gate: pixel-exact through + BOTH oracle aomdec --rawvideo and ffmpeg, counter non-vacuity), + `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` (run for + real, not SKIP: pinned bytes `fixtures/ll444-lossless-key.obu` copied + from the av1llband2 worktree, sha256 `9fc9ce1f5f6475a1d483f404b44acb9 + 0f72a80be2e5c51dedf0aeb1da9a3f5dc`; fixtures/ is gitignored, nothing + committed from it), both 4:2:0 lossless gates + (`a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact`), both + `a_lossless_sb128_*` gates, `a_lossless_16x4_chroma_pair_*`. +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1ll64`): 0 warnings, 0 errors. + +## Same-class suspects, measured on scratch streams, deferred (spoken) + +Repro recipe (scratch, regenerable): `testsrc2 128x96 yuv444p`, aomenc +`--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0`, +`--max-partition-size=64`, 6 frames. Both defects verified PRE-EXISTING +at 2ac149e3 via `git stash` probe, so neither is caused by this change; +both are the inter sub8 lossless class (a lossless inter route coding a +rect TX unit where `av1_get_tx_size` forces TX_4X4 per plane — the +`decode_inter_block8`/84acbd09 defect class one route over): + +- `decode_inter_sub8_rect2` → `read_inter_plane_rect` → + `push_mc_rect_tx` → `TxParams::run` lossless WHT assert + `(8, 4) != (4, 4)` at decode.rs:2566. deferred(fix-now in the lane + owning the inter sub8 lossless rect route; the fix shape is the + established per-plane TX_4X4 unit walk). +- The 12-frame sibling stream refuses mid-tile: `REFUSED: unsupported: + AV1 tile (a Golomb tail longer than this decoder reads)` — same + route class, downstream desync form. deferred(with the same lane; + likely disappears when the (8,4) read is fixed). + +`decode_rect4_16_strip`'s 4:2:0-hardcoded lossless chroma walk remains +with its owning lane (untouched here, per lane ownership). diff --git a/lanes/av1llband2.report.md b/lanes/av1llband2.report.md new file mode 100644 index 00000000..e0c2a8bc --- /dev/null +++ b/lanes/av1llband2.report.md @@ -0,0 +1,90 @@ +# lane-av1-llband2: 4:4:4 lossless above-band cell — sibling fix ported (r1) + +## Charter + +Resolve the `av1llsub8` stop (aligned step 19228: 16x8 leaf, U unit bc=2 +br=0, `txb_skip` base 1 vs oracle base 0 — an above-band cell). Port the +already-reviewed sibling fix if it is the same writer; never author a +second fix for the same defect. 4:2:0 lossless stays exact. Work in +`edith_codecs-av1llband2` @ 6cf92769. + +## Writer identification (done before any edit) + +Read `edith_codecs-av1llband` r1 (`lanes/av1llband.report.md`) and commit +`01a34bc8` before writing anything. That sibling took the exact same stop +(178-byte key-frame miss, first divergence at the 16x8 leaf mi (16,24)'s +U bc=2 unit) to **0 differing bytes**, and was reviewed. + +Same-writer proof: + +- This branch HEAD is the sibling's parent commit `6cf92769` byte-for-byte + (both continue `av1llsub8`). +- The defect site in THIS tree is the identical code the sibling named: + `decode_rect_split`'s lossless chroma arm hardcoding the 4:2:0 unit span + — `let luma_span = 8;` at `decode.rs:10458` here, feeding the `cu_mi` + step, `around_mi`, `tu_reach` and both `record_mi_chroma` stamps. +- The stop signature matches the sibling's reproduced defect exactly + (step 19228, 16x8 leaf, U bc=2 br=0, base 1 / row `[0][11]` vs oracle + base 0 / row `[0][10]`). + +⇒ `01a34bc8` IS that writer's fix. Ported it; no second fix invented. + +## Port (faithful, byte-identical) + +`git cherry-pick -n 01a34bc8`, dropping the sibling's lane report file +(`lanes/av1llband.report.md` — this lane writes its own). Post-images of +all three source files `cmp`-verified IDENTICAL against the sibling +worktree at `01a34bc8`: + +- `crates/ec-av1/src/decode.rs` (+45/−10): `span_x = 4 << ss_x(fctx)`, + `span_y = 4 << ss_y(fctx)` replaces the hardcoded 8 for the `cu_mi` + step, `around_mi_rect`, `tu_reach`, the immediate and replayed + `record_mi_chroma` stamps (`ll_chroma_units` carries per-unit spans); + non-vacuity counter `RECT_SPLIT_LOSSLESS_CHROMA444_HITS` + + `rect_split_lossless_chroma444_hits()`. +- `crates/ec-av1/src/stream.rs` (+77): gate + `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` over the + pinned fixture, with the lossless-frame blindness guard and the + counter-moved non-vacuity assert. +- `crates/ec-av1/examples/decode_probe.rs` (+4): `llband:` counter line. + +Off-limits files untouched: `decode_rect4_16_strip`, +`read_inter_rect_chroma`, `restoration.rs`, intra write-back. No 422 +model, no luma path, no `sub8_leaf_chroma444` (innocent: the 16x8 leaf +never reaches it). 4:2:0 arithmetic is unchanged (`4 << 1 = 8`). + +Fixture provenance: `fixtures/ll444-lossless-key.obu` (untracked, as in +the sibling), copied from the sibling worktree, sha256 +`9fc9ce1f5f6475a1d483f404b44acb90f72a80be2e5c51dedf0aeb1da9a3f5dc` +(4927 B; cut of the `ll444` recipe's key-frame OBUs: `testsrc2 128x96` +yuv444p, `aomenc --profile=1 --lossless=1 --enable-palette=0 +--enable-intrabc=0`, oracle build `~/.cache/aom-oracle`). + +## Verification (measured, this tree) + +- New gate `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact`: + **green** — key frame decodes **0 differing bytes** (sample-exact, + all 3 planes vs ffmpeg `yuv444p` rawvideo, 36864 samples compared) and + the counter moved (non-vacuity). +- `decode_probe` on the pinned fixture: `llband: + rect_split_lossless_chroma444=160` (matches the sibling's 160 units), + no panic. +- 4:2:0 lossless stays green: + `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact` — both ok + (3 passed, 0 failed in the gate run). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## Deferred (spoken, not hidden) + +- **1:4 strips at lossless 4:4:4** (`decode_rect4_16_strip`): same span + defect class (per the sibling's r1), but the file is owned by a live + lane and off-limits to this branch — the fix is the same span + derivation measured here. deferred(fix-now in the owning lane). +- Lossless INTER frames panic at `reconstruct_mc_rect` (decode.rs:2589): + `read_inter_rect_chroma`'s branch, untouched, as chartered. + deferred(fix-now in the owning lane). +- Intrabc rect leaves at lossless 444 still route the rect arm's + `read_coeffs_rect` path: unreachable with `--enable-intrabc=0` + fixtures. deferred(fix-now after the inter side is green, with an + intrabc 4:4:4 fixture), matching `av1llsub8`/`av1llband`. diff --git a/lanes/av1llinter2.report.md b/lanes/av1llinter2.report.md new file mode 100644 index 00000000..6776f2b1 --- /dev/null +++ b/lanes/av1llinter2.report.md @@ -0,0 +1,101 @@ +# lane-av1-llinter2: 4:4:4 lossless inter side — sibling panic ported (r1) + +## Charter + +The lossless INTER panic named by `av1llband2` (`reconstruct_mc_rect`, +decode.rs:2589, `read_inter_rect_chroma`'s branch) is the same panic +sibling lane `av1llinter` fixed in 84acbd09 + 13a262a6. Port that fix; +never author a second fix for the same defect. 4:2:0 lossless stays +identical; the key-frame gate stays green. Work in +`edith_codecs-av1llinter2` @ 6da581a8. + +## Same-panic proof (measured, before any edit) + +Repro on the sibling's pinned bytes `dodge2.obu` (37658 B, sha256 +`5a070fa351a3f2109de855234f2b3d0a872970f3e7f658db21f65c12eeb135b4` — +byte-identical to the sibling's committed +`crates/ec-av1/fixtures/ll444_minp64_inter.obu`): + +- RELEASE build: `panicked at crates/ec-av1/src/decode.rs:28454:32: + range end index 24 out of range for slice of length 16` in `exec_mc` — + line 28454 is `reconstruct_mc_rect`'s coded-arm `dst..dst + w` index + (fn at 28413), inlined into `exec_mc`. The sibling's parent-tree panic + was the identical message and numbers at their decode.rs:28336, same + fn, same inline frame. +- DEBUG build: the underlying unit defect surfaces first — the lossless + WHT assert `(8, 8) != (4, 4)` at `TxParams::run` (decode.rs:2566), via + `decode_inter_block8 -> read_inter_plane -> push_mc_rect_tx` — the + sibling report's exact chain. The band2 report's "decode.rs:2589" + citation is this same worker (`strided[row * self.stride..][..self.w]`, + the release-form panic of the same 8-wide lossless unit); the + "reconstruct_mc_rect" name is the release-build site proven above. + +⇒ same defect, same root cause the sibling named: the 8x8 inter leaf's +chroma plane block read as ONE TX_8X8 unit where lossless codes TX_4X4 +on every plane (`av1_get_tx_size`). 84acbd09 IS the writer's fix. +Ported it; no second fix invented. + +## Port (faithful cherry-pick of 84acbd09, three deliberate deltas) + +`git cherry-pick -n 84acbd09`: + +1. `decode_rect_split` conflicts (fix 4) resolved to THIS tree's version: + lane-av1-llband2 already ported that exact fix (01a34bc8) with the + `RECT_SPLIT_LOSSLESS_CHROMA444_HITS` non-vacuity counter; semantics + identical (`4 << ss` spans, span-carrying `ll_chroma_units`). +2. **fix 5 EXCLUDED**: its three hunks are inside + `decode_rect4_16_strip` (the `cu_mi` divisor and both + `record_mi_chroma` spans), a function owned by a live lane — reverted + to HEAD byte-for-byte. The strip fn still carries the 4:2:0-hardcoded + walk at 4:4:4 lossless: deferred(fix-now in the owning lane, same + span derivation as fixes 2-4). +3. The sibling's lane report file dropped; this lane writes its own. + +Applied verbatim: fix 1 (`decode_inter_block8`'s single-ref AND compound +chroma arms route `chroma_side == 8 && lossless && !mono` through the +new `leaf8_inter_chroma_lossless` helper wrapping the per-unit +`read_inter_chroma_lossless` walk, with the tail `record_mi`'s chroma +half saved/restored — `saved_chroma_ctx`, the `saved_luma_ctx` pattern; +both `record_mi` tails patched), fix 2 (`read_inter_chroma_lossless`: +`cu_mi` divisor `4 >> ss`, record spans `4 << ss`), fix 3 +(`decode_inter_block`'s `mu_chroma_units` lossless replay: extents +`>> ss`, mi-steps and spans `cu << ss`). All byte-identical at 4:2:0 +(`4 << 1 = 8`). Off-limits files untouched: `decode_rect4_16_strip`, +`restoration.rs`, intra write-back. Net diff vs HEAD: 9 hunks, earliest +at decode.rs:28734 — nothing before `read_inter_chroma_lossless`. + +Gate port: `git cherry-pick -n 13a262a6` (fixture +`fixtures/ll444_minp64_inter.obu` 37658 B, the `ffmpeg_decode_sequence_444` +helper, gate `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact` +with the `chroma_split_tx_hits` non-vacuity assert and FNV/len pins). +stream.rs conflict = both lanes appended tests at the same spot; resolved +by keeping BOTH (band2's key-frame gate first, then the helper + inter +gate). + +## Verification (measured, this tree @ HEAD+2) + +- `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`: + **PASS** — all 6 dodge2 frames pixel-exact through BOTH the oracle + `aomdec --rawvideo` (oracle at `~/.cache/aom-oracle/build`, arm + executed, not skipped) and ffmpeg `yuv444p`; counter moved (non-vacuity). +- Key-frame gate stays green: `a_real_aomenc_lossless_444_key_frame_ + decodes_sample_exact` PASS. +- 4:2:0 unchanged: `a_lossless_libaom_key_frame_decodes_sample_exact`, + `a_lossless_libaom_inter_frame_decodes_sample_exact` — both PASS + (4 passed, 0 failed in the battery run). +- `decode_probe dodge2.obu`: `OK: 6 frames decoded`, no panic, debug AND + release. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## Same-class suspects, deferred (spoken, not hidden) + +- `decode_rect4_16_strip`'s lossless chroma walk still hardcodes the + 4:2:0 span (`oy / 2`, `record_mi_chroma(.., 8, 8, ..)` at decode.rs + ~14631/14653/14675): excluded per lane ownership. + deferred(fix-now in the owning lane; shape = fixes 2-4's `4 << ss`). +- Default-partition `ll444.obu` no longer panics but stops at a NAMED + non-panic gap: `EC_RECTCHROMA_GAP luma=64x32 tx=4x4 chroma=64x32` + (decode.rs:10126 — the `(64, 32)` chroma plane block has no TxbSet row + at the rect64 lossless route). The sibling's gate deliberately does not + claim this stream either. deferred(fix-now in a lane chartering the + rect64 chroma lossless route; distinct defect, not this panic). diff --git a/lanes/av1llintercdf.report.md b/lanes/av1llintercdf.report.md new file mode 100644 index 00000000..019e7dfe --- /dev/null +++ b/lanes/av1llintercdf.report.md @@ -0,0 +1,100 @@ +# lane-av1llintercdf: the t6 frame-1 INTER all_zero divergence named (and the one-site fix) + +## Ticket + +Deferred item 1 of `lanes/av1llkf.report.md`: the 6-frame default-partition +lossless 4:4:4 testsrc2 stream (t6) reads frame 0 fully exact, then diverges at +frame 1 (INTER), luma `all_zero` read #2317 — "same ctx row (1) and same decoded +value as the oracle but different CDF contents (ours `cdf0=5892` vs aom +`27244`)", suspected adaptation-history/row-selection desync. Name the divergent +symbol and its reader, decide missed-update vs applied-twice, fix only if one +site. + +## The llkf reading is refuted — the CDF rows were EQUAL + +Both trace printers were misread as the same quantity: + +- ours (`decode.rs:6811-6823`): `cdf=[a, 32768, n]` is the row snapshot taken + BEFORE `dec.symbol` — the PRE-update row, in OUR storage, where + `ours_v = 32768 - aom_v` (complement). +- oracle (`decodetxb.c:161`): `cdf0=` is printed AFTER `aom_read_symbol` — the + POST-update value in aom storage. + +Replaying frame 0 read-by-read (rate-4 adaptation, val=0 up / val=1 down in our +convention) matches every printed pair: at the divergent read aom's pre-state +was `26876` (aom storage) = `5892` (ours) — the rows were IDENTICAL, and both +sides adapted that read symmetrically. So the answer to "missed update or +applied twice" is **neither**: there was no adaptation desync at all; the rng +mismatch at read #2316 (0-indexed; the report's #2317) came from symbols read +EARLIER in the same block's mode info, which the all_zero-only ladder cannot +see. + +## The divergent symbol and reader (measured, t6, EC_ECDUMP_IN + EC_TRACE_COEFF ++ EC_TRACE_MODE_STEP on both sides) + +Between the last coefficient read of frame 1's first superblock row and read +#2316, both sides decode the INTRA 8x4 leaf at mi=(0,2) — an intra leaf inside +an INTER frame, through `read_intra_block_mode_info` (decodemv.c:1065). The +states part inside its `uv_mode` read: + +- ours pre-`use_filter_intra` rng 60904, oracle 58668; ours consumed 100 bits + across the block's mode info, the oracle 98 (+2). +- ours read `uv_mode` off the **14-symbol `uv_mode_cfl`** row + (`decode.rs:35703`, then unconditional); the oracle reads it off the + **13-symbol `uv_mode_no_cfl`** row, because `av1_is_cfl_allowed` (blockd.h) + returns 0 for a lossless block whose chroma plane block is not a single + TX_4X4 — an 8x4 leaf at 4:4:4 has an 8x4 chroma plane block. + +Reader: `decode_intra_sub8_leaf`'s uv read (`decode.rs:35703`), the one +`uv_mode` site that bypassed the canonical `cfl_allowed_px` predicate every +other uv read site uses (`decode.rs:9791, 11206, 15610, 18853, 34062, 38675`). +The block comment there stated only the non-lossless term. + +The neighbouring 4x4 leaf (mi=(0,1)) kept matching by construction: at 4:4:4 +lossless a 4x4 leaf's chroma block IS a single TX_4X4, so CFL stays allowed and +the 14-symbol row is correct there — which is why frame 1 synced for 2316 reads +and 5 blocks before diverging on the first 8x4. + +## Change (decode.rs, one site) + +`decode_intra_sub8_leaf`'s uv read now goes through +`cfl_allowed_px(bw, bh, fctx)` — the canonical predicate, which already +implements the lossless term (chroma plane block must be a single TX_4X4). +4:2:0 is arithmetically identical: every sub-8 shape's chroma block is +4x4-or-smaller under 4:2:0, so the predicate stays true and the row choice is +unchanged; the 4:2:0 lossless gates (below) are green. + +## Verification (measured, this tree @ HEAD + this change) + +- Entropy: pairs #2316 and #2317 (the whole 8x4 leaf's luma) now match the + oracle's (value, rng) exactly, and the ECIN bits delta returns to the + constant +15 header offset through the block. +- Byte witness: t6 frame 0 is byte-exact vs fresh `aomdec --rawvideo` (36864 + bytes; sha256 of the full 6-frame decode differs — see the deferred item). +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 7 passed, 0 failed (both + 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, the sb128 + pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1llintercdf`): 0 warnings, 0 errors. + +## Named, not chased (spoken) + +1. t6 frames 1..5 still differ (first diff frame-1 byte 65): a SECOND site in + the same leaf, independent of the alphabet fix. At the still-shared state + rng=51429 after the 8x4 leaf's luma, the oracle reads the leaf's chroma as + FOUR TX_4X4 units (plane 1 bc=0,1 ctx=11 then plane 2 bc=0,1 — lossless + forces per-unit TX_4X4), while `decode_intra_sub8_leaf`'s + `chroma_444 && bw != bh` arm (`decode.rs:36104-36139`) reads the chroma + plane as ONE `TX_8X4`/`TX_4X8` rect unit per plane (`read_coeffs_rect`, + skip ctx fixed at above+left=1 where the oracle derives 11≡4). The fix is + the b3f815c8-style per-unit lossless 444 chroma walk (unit decomposition + + per-unit `get_txb_ctx` + dropped tx_type), i.e. a shape port of its own — + not a one-site fix, so per the ticket it is stopped-with-site, deferred( + the sub-8 4:4:4 lossless chroma walk; unblock: port the + `decode_leaf_rect8`/8x8-leaf per-unit walk into the `chroma_444 && bw != bh` + arm). +2. Instrument gap, no decode impact: the rect coefficient reader + (`read_coeffs_rect`, `decode.rs:7056`) prints `EC_COEFF_STEP` with a + hardcoded `plane=0` and no `EC_ECDUMP_IN` line, so rect-path reads are + invisible to the (value, rng, bitpos) pairing used here. Worth one rung of + parity next time that path is debugged. diff --git a/lanes/av1llintra.report.md b/lanes/av1llintra.report.md new file mode 100644 index 00000000..c2b73837 --- /dev/null +++ b/lanes/av1llintra.report.md @@ -0,0 +1,93 @@ +# lane-av1-llintra: 4:4:4 lossless intra side (class 444-lossless-intra-side) + +## Charter + +Fix the 4:4:4 lossless intra-side panic (decode.rs:3766, `index 16 len 16`, via +`decode_leaf8 -> read_plane -> exec_intra`) and the same-class 64x64 lossless +intra luma mis-decode, or stop at the first site that cannot be finished. + +## Repro (fail-before) + +`aomenc profile 1 --lossless=1`, testsrc2 128x96 yuv444p, 6 frames, palette and +intrabc off, cdef/restoration off (`ll444.obu` = default partitions, +`dodge2.obu` = `--sb-size=64 --max/min-partition-size=64`): + +- `ll444.obu`: PANIC decode.rs:3766 (`reconstruct`, index 16 len 16) on the KEY + frame, `decode_leaf8 -> read_plane -> exec_intra` (measured, RUST_BACKTRACE). +- `dodge2.obu`: key frame decoded but luma pixel-diffed the oracle from byte 65 + (31729 of 36864). + +## Root causes and fixes (all in decode.rs) + +1. **Leaf8 chroma is one TX_8X8 unit at 4:4:4 lossless** (the panic). Oracle + `av1_get_tx_size`: `if (xd->lossless[..]) return TX_4X4;` for EVERY plane, so + the leaf's 8x8 chroma plane block is a plane-major 2x2 raster of TX_4X4 + units. Our `TxbSet::Chroma8` single unit hit `TxParams::run`'s lossless WHT, + which is 4x4-only (`debug_assert_eq!((w, h), (4, 4))`), silently producing a + 16-coeff residual for a side-8 reconstruct. Fixed: in `decode_leaf8`'s TX4 + arm, `chroma_444 && lossless` routes through `read_intra_chroma_lossless` + (per-unit reads + per-unit `record_mi_chroma`); the tail's whole-leaf chroma + band stamp is skipped for that shape (raster-order last writer per band cell + is exactly libaom's per-entry last update). In the skip arm, the 4:4:4 + lossless leaf predicts four TX_4X4 chroma units (per-unit edges), like the + luma `SKIP_SPLIT_TX` loop; intrabc/palette keep the whole-plane-block + prediction. +2. **`read_intra_chroma_lossless` carried 4:2:0 math**: `cu_mi = at_mi + oy/2`, + `tu_reach(.., ox * 2, oy * 2, 8, ..)`, `record_mi_chroma(.., 8, 8, ..)`. + Made subsampling-aware (`MI >> ss` divisors, `<< ss` scaling, `4 << ss` + spans) -- byte-identical at 4:2:0, correct at 4:4:4 (one mi cell per unit). +3. **Whole-block chroma unit clip was a 4:2:0-sized raster** (`plane_px = + span_mi * 2`, overhang `2 * over_mi`): at 4:4:4 it clipped three quarters of + each 64x64 block's coded units and desynced the tile -- this was the dodge2 + key frame's luma diff from byte 65 (the desynced chroma garbage-fed the + following superblocks' luma). Fixed to `span_mi * MI >> ss` and `over_mi * + (MI >> ss)`, libaom `max_block_wide/high`. +4. **Lossless CFL alphabet gate**: oracle `is_cfl_allowed` at lossless requires + `plane_bsize == BLOCK_4X4` (TRUE for an 8x8 partition at 4:2:0, FALSE at + 4:4:4). Our `cfl_allowed_px` lossless arm accepted any <=8x8, so a 4:4:4 + lossless leaf read the 14-symbol `uv_mode_cfl` CDF where the stream carries + the 13-symbol one (class `wrong-alphabet-same-value`). Fixed to + `(bw >> ss_x).max(4) == 4 && (bh >> ss_y).max(4) == 4`; 4:2:0 identities + unchanged. + +## Verification (measured) + +- `ll444.obu` no longer panics on the key frame; the key frame decodes. +- `dodge2.obu` KEY FRAME: byte-exact vs `aomdec --rawvideo` (first diff at byte + 37493, i.e. inside inter frame 1). +- 4:2:0 regression gate `a_lossless_libaom_inter_frame_decodes_sample_exact`: + green. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. + +## STOP -- named, with the measured site + +`ll444.obu`'s key frame is NOT yet pixel-exact: 36254 of 36864 bytes differ +from byte 19. Localized with the trace pair (ours `EC_AV1_TRACE`, oracle +`EC_TRACE_MODE_STEP` + `EC_DQCOEFF`): the structural read order matches the +oracle exactly (per-4x4-leaf plane-interleaved luma,U,V; luma unit 0 of the +first sub8 group is byte-exact), but the FIRST chroma unit (`plane 1 @(0,0)`, +`TxbSet::Chroma4`, TX_4X4) decodes near-miss coefficients from scan position 4 +(e.g. ours `2:-8` vs oracle `2:-4`, ours `6:4` vs oracle `9:4`) with every +classical context input equal (bands all zero at frame start, `txb_skip_ctx` +base 7 both sides, DCT_DCT forced, same scan). Site: `sub8_leaf_chroma444`'s +square branch (decode.rs read_plane calls around 18935) -- the divergence is a +symbol-level CDF-row input unique to lossless chroma at 4x4 that the current +ctx arguments do not capture. Next step: oracle-paired token trace +(`EC_TRACE_MODE_STEP`'s `EC_COEFF` rng stream vs an rng/tell dump inside +`read_coeffs`) to name the first divergent symbol, then diff its CDF row +selection. + +Per charter, stopped there. Frames 1+ of BOTH streams panic in +`reconstruct_mc_rect` (decode.rs:28328 post-insert, was 28233) via the +`decode_inter_block8` inter path -- a different function from anything this +lane changed; that is the charter's named stop for the inter side, and +`read_inter_chroma_lossless` remains untouched (another report owns its /2 +design). + +## Deferred (spoken, not hidden) + +- `decode_leaf8`'s intrabc chroma prediction buffers are hardcoded 4x4 + (18074-18085), so an intrabc 8x8 leaf at 4:4:4 predicts 16 samples for a + 64-sample reconstruct. Unreachable with `--enable-intrabc=0` fixtures; + deferred(fix-now after the inter side is green, with an intrabc 4:4:4 + fixture). diff --git a/lanes/av1llintra8.report.md b/lanes/av1llintra8.report.md new file mode 100644 index 00000000..a5dc3e47 --- /dev/null +++ b/lanes/av1llintra8.report.md @@ -0,0 +1,105 @@ +# lane-av1-llintra8: the inter frame's 8x8 INTRA leaf lossless 4:4:4 chroma walk + +## Ticket + +`decode_inter_block8`'s intra leaf read 4:4:4 lossless chroma as ONE TX_8X8 +unit (`u_grid`/`v_grid = read_plane(..)` at `chroma_side == 8`, +decode.rs:38958/:38985 pre-change) and hit `TxParams::run`'s lossless WHT +assert `(8, 8) != (4, 4)` at decode.rs:2566 — the one arm sibling +`84acbd09`/fb4e4b0e did not cover (it routed the INTER arms only, named in +llsub8b's report item 1). `decode_inter_sub8_rect2` and +`sub8_leaf_chroma444` untouched (owned elsewhere). + +## Change (decode.rs, one branch + one alphabet gate + counter) + +1. `chroma_side == 8 && lossless(fctx) && !mono(fctx)` routes the leaf's + chroma through `read_intra_chroma_lossless` — the intra twin the >=16x16 + intra-in-inter block already runs (plane-major 2x2 raster of TX_4X4 + units per plane, `av1_get_tx_size` blockd.h:1383) — with region and + block `(8, 8)` at stride 8, the leaf's own `reach`, and the leaf's + `palette_uv_bufs` windowed per unit by the helper. The walk stamps each + unit's own coefficient context, so `chroma_stamped_per_unit = true` and + the tail's whole-block `record_mi` gets its chroma half saved/restored + around — the same rule the INTER arms' `leaf8_inter_chroma_lossless` + obeys (the mechanism was already in place). `Grid::Zero(64)` when every + unit hung off the frame edge, matching the inter helper. 4:2:0: zero + change — the branch lives inside `chroma_side == 8`, and the reserved + 4:2:0 group-tail chroma arm was not touched. +2. SAME LEAF, one read earlier, second defect of the same class: the leaf + read `uv_mode` off `uv_mode_cfl[mode]` unconditionally, but libaom picks + the uv CDF row by `is_cfl_allowed` (decodemv.c:145, cfl.h:23) and at + LOSSLESS that is "the chroma plane block is BLOCK_4X4" (cfl.h:29) — + for this BLOCK_8X8 leaf only at 4:2:0. A 4:4:4 lossless leaf must read + the 13-symbol `uv_mode_no_cfl` alphabet; the tables differ (cdf.rs + `UV_MODE_CFL` vs `UV_MODE_NO_CFL`, row 0: 10407.. vs 22631..), so the + unconditional CFL row consumed a different partition at the leaf's own + uv_mode symbol and desynced every stream that reached the leaf. + Now gated on `cfl_allowed_px(SIDE, SIDE, fctx)` — the same gate five + other readers use; 4:2:0 lossless and every non-lossless partition + still take the CFL row (value-identical reads). +3. Non-vacuity counter `LLINTRA8_CHROMA_WALK_HITS` + + `llintra8_chroma_walk_hits()` + a `decode_probe` line, per the lane + convention: CHROMA_SPLIT_TX_HITS cannot attribute its bumps to this + leaf. + +## Verification (measured, this tree @ HEAD + this change) + +- Fail-before (assert): `testsrc2 128x96 yuv444p`, aomenc + `--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0 + --max-partition-size=64`, 6 frames (`/tmp/llintra8/t6.obu`) → panic + `(8, 8) != (4, 4)` at decode.rs:2566, debug backtrace + `read_plane (decode.rs:38958) → push_intra_tx → TxParams::run`. The + release build's assert folds into an index panic at `exec_intra`; the + debug line numbers are the evidence. +- Fail-before (alphabet): with only the uv hunk reverted, the regenerated + `--min-partition-size=8` stream's EC_COEFF trace diverges from aomdec's + at all_zero #2400 — `plane=0 mi(4,0)`, the reads right after that leaf's + uv_mode symbol. With the fix: divergence gone (below). +- Entropy witness: `testsrc2 128x96 yuv444p` with + `--min-partition-size=8 --max-partition-size=64` (min 8 excludes the + sub-8 shapes so the leaf actually fires; key frame becomes exact too): + our EC_COEFF `all_zero` rng sequence matches fresh + `aomdec --rawvideo` **11292/11292 reads across all 6 frames** with the + walk firing 34 times; frame 0 is byte-exact and ALL luma planes are + byte-exact stream-wide. The pre-fix stream panicked at the leaf; this + stream decodes all 6 frames. +- Non-regression: sibling's own witness bytes + `/tmp/ll444/dodge2.obu` decode byte-exact vs fresh `aomdec`, 6 frames, + in this tree with this change. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors (target dir + `$HOME/.cache/cargo-target-av1llintra8`). Release decode_probe output + identical to debug on both streams. +- Fixtures are scratch in /tmp/llintra8 (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. Chroma PREDICTION pixel diffs, entropy-exact: on the min-8 stream, + 2772 bytes differ from aomdec — all chroma, luma exact, and the EC_COEFF + trace is bit-aligned everywhere (so symbols, uv modes and angle deltas + all match; only reconstructed pixels differ). Frame 1's diffs cover + three readers at once with clean upstream edges: the inter 8x16 strip's + chroma at mi(0,16) (2x4 units, MC-side), an INTRA 8x8 leaf at mi(2,24) + (uv V_PRED, via this lane's new walk), and the >=16x16 intra block's + chroma at mi(8,28) (the pre-existing `read_intra_chroma_lossless` + caller, untouched by this change). One shared per-unit chroma + prediction-input class across readers, present before this change + (the >=16 arm predates it) — larger than this arm. + deferred(the lane owning per-unit 4:4:4 chroma prediction: + `read_plane`/`PlaneBuf::reconstruct` intra chroma edges + the inter + strip chroma MC), with the min-8 stream as a ready-made fixture. +2. The default-partition (min 4) testsrc2 key frame still entropy-diverges + at frame-0 coefficient read #452 (pre-existing, key-frame intra lane; + llsub8b's item 3). The min-8 key frame is exact, so this lane's witness + does not depend on it. + +## Note on the shared oracle + +aomenc/aomdec are the shared `$HOME/.cache/aom-oracle/build`; the +EC_COEFF/EC_COEFF_STEP rungs of that patched tree are what the entropy +pairing above used. Today's aomenc produces different RD picks than this +morning's (llsub8b's note), so every comparison is against fresh aomdec +output of THE SAME bytes. diff --git a/lanes/av1llkf.report.md b/lanes/av1llkf.report.md new file mode 100644 index 00000000..5159a98f --- /dev/null +++ b/lanes/av1llkf.report.md @@ -0,0 +1,97 @@ +# lane-av1-llkf: the default-partition lossless 4:4:4 key frame's read #452 + +## Ticket + +Default-partition lossless 4:4:4 key frames entropy-diverge at frame-0 +coefficient read #452 (mandelbrot/testsrc2, `llsub8b` item 3 / `llintra8` +item 2). Min-partition-64 and min-8 keys stay exact, so the defect lives in +the shapes only a min-4 stream produces: 4x4 leaves and their 4x16/16x4 +neighbours. + +## Named symbol and reader (measured, t1 = testsrc2 128x96, 1 key frame, +`--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0`, default +partition) + +- Reads 1..452 of the frame's `all_zero` (TXB_SKIP) rng sequence match the + oracle exactly; read #452 (0-indexed) diverges: + - aom: `EC_COEFF plane=2 row=0 col=0 mi=(8,5)` — the V plane's FIRST + TX_4X4 unit of the 4x16 intra block at mi=(8,5), read off + `txb_skip_cdf[0][12]` (`ctx=12` = base 2 + offset 10; above=`23`, + left=`21`, both nonzero). + - ours: `side=4 ctx=4` — our offset-10 row for base 1 (one band cell + reads zero), a different CDF row, so the rng diverges on the same + symbol. Reader: `read_plane`'s `all_zero` symbol read + (decode.rs:6819, `dec.symbol(&mut coding.txb_skip[skip_ctx])`), fed by + `decode_rect4_16_strip`'s lossless chroma walk. +- Whose band cell: block (8,4) (the 4x16 strip to the LEFT) recorded each + of its TX_4X4 units with `record_mi_chroma(cu_mi, 8, 8, plane, ...)` + anchored at `oy / 2, ox / 2` — the 4:2:0 subsampled form. At 4:4:4 a unit + is ONE mi cell, so the `(8, 8)` span smeared every unit's state over a + 2x2 mi block: the strip's later V units overwrote `above[5]` — a column + a 4-px-wide block never touches in aom — with their own (zero) state, + where aom keeps the 4x4 leaf (7,5)'s nonzero write + (`av1_set_entropy_contexts`, blockd.c:29, stamps exactly + `tx_size_wide_unit` x `tx_size_high_unit` cells = one above + one left + for TX_4X4). The skipped-unit twin arm has the same defect (aom's skip + path zeroes the plane block's own cells, `av1_reset_entropy_context`, + blockd.c:58 — the 8x8 smear also stamped past the block). + +## Change (decode.rs, two record sites, one branch) + +`decode_rect4_16_strip`'s `lossless_pair` chroma walk (skip and non-skip +arms): the per-unit record is now ss-aware — + +- anchor `cu_mi = (pair_mi.0 + (oy << ss_y) / MI, pair_mi.1 + (ox << ss_x) / MI)` +- span `record_mi_chroma(cu_mi, 4 << ss_x, 4 << ss_y, plane, ...)` + +4:2:0 is arithmetically identical (`(oy << 1) / 4 == oy / 2` for the +multiple-of-4 unit origins, `4 << 1 == 8`); non-lossless arms untouched; +the intrabc arms untouched. `RECT4_16_LOSSLESS_CHROMA_HITS` remains the +route's non-vacuity counter. + +## Verification (measured, this tree @ HEAD + this change) + +- Entropy: the `all_zero` rng ladders now match the oracle on ALL reads of + the whole frame — t1 (testsrc2) 2304/2304, m1 (mandelbrot) 2304/2304. + Fail-before on the same bytes: t1 diverges at read #452, m1 at read #208 + (base-tree control, `$HOME/.cache/cargo-target-av1llkf-base`). +- Pixel witness: t1 decodes byte-exact vs fresh `aomdec --rawvideo` + (36864 bytes). The 6-frame default-partition testsrc2 stream (`t6.obu`) + reads frame 0 fully in sync (reads 1..2304 of 12582 consumed before the + next, DIFFERENT divergence — see deferred (1)) and completes all 6 + frames with no refusal. +- Sibling non-regression: `/tmp/ll444/dodge2.obu` (llsub8b/llintra8's + witness bytes) decodes byte-exact vs fresh aomdec in this tree. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 7 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1llkf`): 0 warnings, 0 errors. +- Fixtures are scratch in /tmp/llkf (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. t6's NEXT divergence is a different site: frame 1 (INTER), luma + `all_zero` at our read #2317 — same ctx row (1) and same decoded value + as the oracle but different CDF contents (ours `cdf0=5892` vs aom + `27244`), i.e. an adaptation-history/row-selection desync on the inter + frame, not a band smear. deferred(the inter-frame lossless-444 lane), + with t6.obu's recipe as a ready-made fixture. +2. m1 (mandelbrot) pixels: entropy exact frame-wide, chroma-only pixel + diffs (U 4436 / V 9070 samples, luma 0) — the pre-existing per-unit + 4:4:4 chroma PREDICTION class `llintra8` named. One concrete suspect + site of that class observed while here: + `decode_rect4_16_strip`'s lossless walk calls + `tu_reach(pw, ph, ox * 2, oy * 2, 8, ...)` — the 4:2:0 luma-space + offsets — where `read_intra_chroma_lossless` uses `ox << ss_x, oy << + ss_y` with unit size `4 << ss_x`; at 4:4:4 the doubled origin moves the + unit's prediction edge window. Prediction-domain, entropy unaffected + (proven by the exact coefficient reads above); owned by the same + chroma-prediction lane. deferred(that lane). + +## Note on the shared oracle + +aomenc/aomdec are the shared `$HOME/.cache/aom-oracle/build`; the +EC_TRACE_COEFF / EC_ECDUMP rungs of the patched tree carried the pairing. +Every comparison is against fresh aomdec output of THE SAME bytes. diff --git a/lanes/av1llpred.report.md b/lanes/av1llpred.report.md new file mode 100644 index 00000000..644d468d --- /dev/null +++ b/lanes/av1llpred.report.md @@ -0,0 +1,80 @@ +# lane-av1-llpred: the min-partition-8 lossless 4:4:4 chroma OBMC blend is ss-blind + +## Ticket + +Remeasure the 2772 chroma pixel diffs the llintra8 lane named (entropy-exact, +luma-exact), name the FIRST differing sample, and fix it only if one index +explains it. `decode_leaf8`'s palette set untouched (another branch), the +reserved 4:2:0 group-tail chroma arm untouched. + +## Remeasure (this tree @ b3f815c8, BEFORE the change) + +Same pinned fixture `/tmp/llintra8/testsrc2_min8.obu` (testsrc2 128x96 +yuv444p, aomenc `--profile=1 --lossless=1 --enable-palette=0 +--enable-intrabc=0 --min-partition-size=8 --max-partition-size=64`, 6 +frames), fresh `aomdec --rawvideo` of the same bytes: **2772 chroma diffs +reproduced exactly** (frame 0 and all luma planes clean). But the parent's +three named sites did NOT hold: the first differing sample is + +> frame 1, plane 1 (U), x=88 y=4 (mi row 1, col 22), ours=149 ref=150 + +— an inter 8x8 leaf at mi(0,22) with mv=(0,11), not any of mi(0,16), +mi(2,24) or mi(8,28) as named. Error maps (residuals are equal by +entropy-exactness, so final diff = prediction diff) showed narrow +column/row fragments inside blend regions — OBMC shape, not whole-block MC +or intra-edge shape. + +## Root cause: one class, two sites, both "the 4:2:0 half hardcoded" + +1. `obmc_run` (decode.rs ~30085/30101/30113) sized the CHROMA neighbour + prediction and blend windows with literal `/ 2` (cbw/cbh/cox/cw and + cbh/coy/ch). libaom sizes them per plane with the PLANE's own + subsampling shift (`dec_build_prediction_by_above_pred`: + `(op_mi_size * MI_SIZE) >> pd->subsampling_x`, blend bounds likewise), + which is `>> 0` at 4:4:4 — the chroma blend covered half the columns at + half the offsets. Luma was never affected (luma exact everywhere). +2. `obmc_plan`'s `skip_chroma_above` hardcoded the luma shape list + `(8,8)|(16,8)|(8,16)`. libaom's `av1_skip_u4x4_pred_in_obmc` + (reconinter.c:829) switches on the PLANE block + (`get_plane_block_size`): only 4x4/8x4/4x8 skip the ABOVE pass's chroma + (`return dir == 0`). At 4:4:4 the plane block is the luma block itself, + so every 8x8/16x8/8x16 OBMC block was silently missing its above-pass + chroma blend — the (96..101, y8..10) family on leaf mi(2,24). + +Both fixed to derive ss (from `chroma_side` in `obmc_plan`, `ss_x/ss_y(fctx)` +in `obmc_run`); value-identical at 4:2:0 (`/2 == >>ss`). `obmc_run` is shared +by the 16x16+ square path and the 8x8 leaf path, so one fix covers both. +The `obmc_mask` table was already complete (M1..M32). + +## Verification (this tree @ HEAD + the change) + +- Fail-before → fix-after measured in steps: 2772 chroma diffs → 1126 + (geometry fix alone) → **0** (skip fix): decode output is byte-exact + against fresh `aomdec --rawvideo` for ALL 6 frames, all planes + (`cmp`-equal 221184 bytes). The stream-exactness claim is now TOTAL for + this fixture. +- 4:2:0 non-regression: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, + 0 failed (both 4:2:0 lossless libaom gates, the 444 min-partition-64 + inter gate, the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors (target dir + `$HOME/.cache/cargo-target-av1llpred`). + +## Named, not chased (spoken) + +1. `EC_MCB` rung (decode.rs obmc_run) still windows its own dump with + `write_w / 2` — a lane-t900 4:2:0-era INSTRUMENTATION assumption only; + output-inert, decode unaffected. fix-now(deferred to whoever next + touches that rung). +2. The llintra8 report's three named sites (mi(0,16)/mi(2,24)/mi(8,28)) + did not match a fresh run of the same bytes; mi(2,24) and mi(8,28) do + appear in the diff set but the FIRST miss was mi(0,22). Lesson recorded: + reremeasure before owning. + +## Note on the shared oracle + +All comparisons against fresh `$HOME/.cache/aom-oracle/build/aomdec +--rawvideo` output of THE SAME pinned bytes. The oracle tree has no +`EC_OBMC` rung (the decoder-side comment claiming a byte-matching oracle +format is aspirational); EC_PREDND covers intra only. Fixtures stay in +/tmp/llpred + /tmp/llintra8 (regenerable recipes above); nothing committed +from fixtures/. diff --git a/lanes/av1llpred2.report.md b/lanes/av1llpred2.report.md new file mode 100644 index 00000000..8aa2e48e --- /dev/null +++ b/lanes/av1llpred2.report.md @@ -0,0 +1,62 @@ +# lane-av1-llpred2: `skip_chroma_above` must read the frame's own ss pair, not a rect-over-square ratio + +## Ticket + +Reviewer FAIL on 71f07edd's `obmc_plan`: both ss axes were derived from ONE +square chroma side, `ss = trailing_zeros(write_w|write_h / chroma_side)`. +Two defects, one root: + +1. 4:2:0, a 16x8 strip: `write_h/chroma_side = 8/8 = 1`, `trailing_zeros(1)` + = 0, so ss=(1,0) and the plane block read (8,8) — `skip_chroma_above` + went FALSE. The old pre-llpred code skipped, and libaom's + `av1_skip_u4x4_pred_in_obmc` (reconinter.c 829) skips on the PLANE block + `(8,4)` (frame ss (1,1)). Every 4:2:0 16x8/8x16 OBMC strip blended a + chroma above pass the reference never blends (and would desync a + stream that carries one). +2. 4:4:4, a 16x8 strip: `write_h/chroma_side = 8/16 = 0`, + `trailing_zeros(0)` = 64, `write_h >> 64` panics in a debug build. + The parent lane's byte-exact claim was measured in a release build, + where the out-of-range shift wraps instead of panicking. + +## Change (this tree @ 71f07edd + the fix) + +`obmc_plan` takes `ss_x`/`ss_y` — the FRAME's own pair, exactly what the +chroma window half in `obmc_run` shifts by (`ss_x(fctx)`/`ss_y(fctx)`) — +and the decision moved to a pure helper: + +```rust +pub(crate) fn obmc_skip_chroma_above(write_w, write_h, ss_x, ss_y) -> bool { + matches!((write_w >> ss_x, write_h >> ss_y), (4, 4) | (8, 4) | (4, 8)) +} +``` + +All three callsites pass the frame pair: `decode_inter_block`, +`decode_inter_block8` (`ss_x(fctx), ss_y(fctx)`), and the encoder's +`obmc_prediction` (`crate::decode::ss_x(fctx)`, 4:2:0-only encoder). No +ratio over `chroma_side` survives; `trailing_zeros` of anything is gone. +The window-size half that reduces to `/2` at 4:2:0 is untouched, and the +reserved 4:2:0 group-tail chroma arm is untouched. + +## Proof (debug build, `dev` profile throughout) + +- Decision check (new `obmc_skip_chroma_tests`): + `rect_strips_skip_above_chroma_at_420_and_shift_never_overflows` pins + 4:2:0 (16,8,1,1) and (8,16,1,1) → SKIP (with (8,8,1,1), and + (16,16)/(32,16)/(16,32) → blend), and 4:4:4 → only true 4-wide/high + shapes skip, (16,8,0,0)/(8,16,0,0)/(8,8,0,0) → blend with no shift + out of `usize` range. No hit-counter gate was added: the skip + decision itself is what is proven. +- 6-frame 4:4:4 stream, DEBUG decode probe: fixture + `/tmp/llintra8/testsrc2_min8.obu` + sha256 `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc`, + `$HOME/.cache/cargo-target-av1llpred2/debug/examples/decode_probe` + → 6 frames, 221184 bytes, `cmp`-equal to fresh + `$HOME/.cache/aom-oracle/build/aomdec --rawvideo`. Byte-exact, now in + a build that would have panicked on the old code. +- 4:2:0 non-regression: `cargo test -p ec-av1 --lib -- obmc_skip_chroma + a_lossless` → 7 passed, 0 failed (the new check + the 4:2:0 lossless + libaom gates, the 444 min-partition-64 inter gate, the sb128 pair, the + 16x4 pair). +- `cargo check -p ec-av1 --all-targets` + (`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1llpred2`): 0 warnings, + 0 errors. diff --git a/lanes/av1llpredgate2.report.md b/lanes/av1llpredgate2.report.md new file mode 100644 index 00000000..3148ec5d --- /dev/null +++ b/lanes/av1llpredgate2.report.md @@ -0,0 +1,87 @@ +# lane-av1llpredgate2: pin the debug-exact 6-frame stream for the ss-aware `obmc_skip_chroma_above` fix + +Tree: lane-av1-llpredgate2 @ 041e3eae (the lane-av1-llpred2 fix, under +review — no code change landed here). This lane adds ONLY the regression +gate. + +## Regression gate + +`stream::tests::a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` +(crates/ec-av1/src/stream.rs), modelled on +`a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`. + +### Fixture provenance + +- Origin: lanes/av1llpred.report.md / lanes/av1llpred2.report.md stream — + `testsrc2=size=128x96:rate=?` ffmpeg source, yuv444p, encoded by the + shared aomenc (`$HOME/.cache/aom-oracle/build`, pre-2026 build) with + `--profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0 + --min-partition-size=8 --max-partition-size=64`, 6 frames. +- Committed at `crates/ec-av1/fixtures/ll444_minp8_inter.obu` + (gitignored pattern `fixtures`, force-added like every sibling fixture; + on-disk == `git ls-tree` blob verified at commit time). +- 34037 bytes, sha256 + `04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc` + (= the /tmp/llintra8 original, byte-identical copy), + FNV-1a64 `0x2c8f4a2cc02552da`. Both pinned as test consts; missing + file panics — no skip path. + +### Debug build path, not release-only + +The defect this gate pins is a DEBUG-only panic: the pre-llpred2 ratio +(`(write_h / chroma_side).trailing_zeros()` = 64 at 4:4:4) shifted by 64, +which panics under debug_assertions and silently wraps in release +(release was already byte-exact). The test runs under `cargo test`'s +default dev profile — the profile where the parent measured byte-exact +and where the old code dies — so a red run names the class instead of +silently passing. + +### Counter disposition: cited unit check, not a skip-arm counter + +A skip-arm counter was added and measured, then removed: + +- With the counter bumped at the ONE site the ss-aware decision returns + true (after the `obmc_skip_chroma_above` call in `obmc_plan`), the + pinned stream measured `OBMC_SS_SKIP_CHROMA_ABOVE_HITS 0 -> 0` while + OBMC itself fired (`OBMC_HITS 0 -> 77`, `OBMC_RECT_LEAF_HITS 0 -> 20`). + At 4:4:4 the skip needs a 4x4/8x4/4x8 PLANE block; min-partition-8 + never codes one, so the skip arm cannot fire on this stream and any + `delta > 0` assert would be permanently red — vacuity in reverse. +- Per the ticket's fallback: the decision TABLE is pinned by the existing + unit check + `decode::obmc_skip_chroma_tests::rect_strips_skip_above_chroma_at_420_and_shift_never_overflows` + (4:2:0 16x8/8x16 strips still skip; 4:4:4 shifts never leave `usize`), + and the stream gate pins the END-TO-END behaviour sample-for-sample. + +### Assertions (all before/without any skip path) + +1. Fixture bytes: exact length + FNV-1a64. +2. `decode_stream` of the pinned bytes succeeds (a returning `>> 64` + panic fails here) — 6 frames, 128x96. +3. Oracle aomdec (`--codec=av1 --rawvideo`): raw size 221184, then + per-frame per-plane `assert_eq!(bad, 0)` — 0 differing samples, + message carries class `obmc-ss-blind-chroma-above`. +4. ffmpeg arm (`ffmpeg_decode_sequence_444`): same sample-exact compare. + Neither arm skipped in the green run (aomdec + ffmpeg both present). + +## Red probes (mutation verification) + +1. Old-ratio probe: callsite swapped to the exact 71f07edd derivation + (`(write_w|write_h per chroma_side).trailing_zeros()` pair) → test + RED: `attempt to shift right with overflow` at decode.rs + `obmc_skip_chroma_above` — the debug-panic class reproduced. +2. Chroma-diff probe: `skip_chroma_above = true` forced at the callsite + (re-blend class) → test RED at the named assert: `aomdec frame 1 + plane u: 46 samples differ (class obmc-ss-blind-chroma-above)`. +3. decode.rs restored byte-identical after both probes + (`git diff --stat`: only stream.rs + the fixture). + +## Non-regression / hygiene + +- `cargo test -p ec-av1 --lib + a_lossless_444_min_partition8_inter_stream_decodes_sample_exact` + (CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1llpredgate2, dev + profile): 1 passed, 0 failed, no SKIP lines. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. +- The skip expression itself is untouched (no diff in decode.rs); the + reserved 4:2:0 group-tail chroma arm untouched; no server, no full suite. diff --git a/lanes/av1llsub8.report.md b/lanes/av1llsub8.report.md new file mode 100644 index 00000000..abf6af9b --- /dev/null +++ b/lanes/av1llsub8.report.md @@ -0,0 +1,84 @@ +# lane-av1-llsub8: 4:4:4 lossless sub8 chroma coefficient miss (r1) + +## Charter + +Localize the 4:4:4 lossless sub8 chroma coefficient miss. Work in +`edith_codecs-av1llsub8` @ 38393554; own `sub8_leaf_chroma444` and the +coefficient read it calls. 4:2:0 lossless stays exact. + +## Repro + +Fixture regenerated per the llintra report's recipe (raw `--i444` input, same +encoder): `testsrc2 128x96` yuv444p, 6 frames, `aomenc --profile=1 +--lossless=1 --enable-palette=0 --enable-intrabc=0` (`~/ll444.obu`, 26511 B; +key-frame cut `~/ll444kf.obu`). Pre-fix key frame: 15001/36864 bytes differ +from `aomdec --rawvideo` (first diff byte 4181). Probe exits 101 at frame 1 +(`reconstruct_mc_rect`, decode.rs:2589 path) — the charter's named inter side, +untouched. + +## Ladder (EC_TRACE_COEFF, symbol-anchored, key frame only) + +12136 aligned `(tag,rng)` steps, then: + +1. **uv_mode alphabet (FIXED).** First divergence is *not* a coefficient: at + the first 8x8 `PARTITION_HORZ` leaf (mi (8,16)) the leaf's own `uv_mode` + symbol desyncs. `read_intra_mode_sub8` read `cdfs.uv_mode_cfl[mode]` + (14-symbol) unconditionally; a 4:4:4 lossless `BLOCK_8X4`/`BLOCK_4X8` + leaf's plane block is the rect itself, so `is_cfl_allowed` is FALSE and the + stream carries the 13-symbol `uv_mode_no_cfl` row (class + `wrong-alphabet-same-value`; oracle post-read rng 33082 vs ours 38358 off + the same entry 56906). Fix: gate on `cfl_allowed_px(seg_w_mi*MI, + seg_h_mi*MI)` — true for the 4:2:0 group tail (plane block 4x4) and 4:4:4 + split leaves, false for 4:4:4 rect leaves; 4:2:0 unchanged. +2. **Rect-leaf lossless chroma unit structure (FIXED).** Next divergence + (step 12138): the rect leaf's chroma. `read_tx_size` answers TX_4X4 for + EVERY plane of a lossless block, so the oracle codes the 8x4 leaf's chroma + as TWO plane-major TX_4X4 units (U bc 0, U bc 1, then V) with + `get_txb_ctx`'s **+10** rows (`plane pels 32 > tx pels 16`, + `txb_skip_cdf[0][10..12]`), while ours read ONE TX_8X4 rect unit off + `ChromaRect8x4` (rows `[1][0..2]`, only reached correctly non-losslessly). + Fix: lossless rect arm reads per-4x4 units via `read_plane(TxbSet::Chroma4, + luma_skip_ctx=Some(3))` (Chroma4's `big` rows = `[0][10..12]`), plane-major + per `decode_token_recon_block`, per-unit ctx from the unit's own + `around_mi_rect`, immediate per-unit `av1_set_entropy_contexts` stamps. + The non-lossless arm (single rect transform, rows `[1][7..9]`) is kept. + Tail now stamps per-unit (`grid_unit_state`) instead of one whole-leaf + smear; 4x4 leaves and the single-unit rect arm are bit-identical to before. + +After both fixes: divergence moves to step 19228, key frame 178/36864 bytes +off (first diff byte 8320). + +## STOP — named, not fixed (budget) + +Step 19228: inside a **16x8 leaf** (`PARTITION_HORZ` of a 16x16; U units +bc 0..3, br 0..1) the U unit at **bc=2, br=0** reads `txb_skip` base **1** +(ours, row `[0][11]` — the same `+3` fold, cdf `[8570,...]`) where the oracle +reads base **0** (row `[0][10]`, cdf0=32705): one of ours' above/left entropy +cells for that unit is stamped nonzero where the oracle's is clean. bc=0/1 of +the same leaf aligned (rng 40879/40628), and ours' `dcctx=2` on the diverging +read (vs 0 on bc=1) says the polluted cell carries a DC-sign vote — i.e. an +above-band cell written by the block above with a state the oracle doesn't +hold. Next step: dump the above-band cell contents (both sides, +`EC_DCDUMP`/oracle equivalent) for the units directly above this leaf's +bc 2/3 columns and diff the writer — suspect the 16x8-path's per-unit stamp +map (which unit owns which above/left cell when a leaf spans >1 mi row) in +`decode_leaf_rect`'s chroma loop, NOT `sub8_leaf_chroma444` (16x8 leaves are +read by `decode_leaf_rect`, which already had per-unit +3 reads before this +lane). + +## Verification (measured) + +- `a_lossless_libaom_key_frame_decodes_sample_exact` + `a_lossless_libaom_ + inter_frame_decodes_sample_exact` (4:2:0): green. +- `cargo check -p ec-av1 --all-targets`: 0 warnings, 0 errors. +- Key frame: 15001 → 178 differing bytes; first diff byte 4181 → 8320. +- Consumed-count ladder: 12136 → 12138 → 19228 aligned steps. + +## Deferred (spoken, not hidden) + +- 16x8 above-band stamp diff above (fix-now; named cell + writer). +- Intrabc rect leaves at lossless 444 still route the rect arm's + `read_coeffs_rect` path with the wrong unit structure — unreachable with + `--enable-intrabc=0` fixtures; same fix shape as the non-intrabc arm + (deferred(fix-now after the inter side is green, with an intrabc 4:4:4 + fixture), matching the llintra report's deferral). diff --git a/lanes/av1llsub8b.report.md b/lanes/av1llsub8b.report.md new file mode 100644 index 00000000..3afe38e0 --- /dev/null +++ b/lanes/av1llsub8b.report.md @@ -0,0 +1,92 @@ +# lane-av1-llsub8b: the inter sub8 rect route's 4:4:4 lossless chroma raster + +## Ticket + +`decode_inter_sub8_rect2` hit `TxParams::run`'s lossless WHT assert +`(8, 4) != (4, 4)` at decode.rs:2566 (pre-existing at the parent, named by +`lane-av1-ll64`'s same-class sweep). Port sibling `84acbd09` if it covers +this route; else fix only the unit size that trips the assert. +`decode_rect4_16_strip` untouched (sibling-owned). The 12-frame stream's +Golomb-tail refusal was expected to disappear once the (8,4) read was +fixed. + +## Sibling verdict: not covered — own fix, same shape + +`84acbd09` (already ported here as fb4e4b0e) routed `decode_inter_block8`'s +INTER arms' 8x8 chroma through `leaf8_inter_chroma_lossless`. The rect2 +route was one arm over: `decode_inter_sub8_rect2`'s `chroma_444` coded arm +read each piece's (8,4)/(4,8) U/V plane block as ONE `TxbSet::ChromaRect8x4` +rect unit — at lossless that unit hits the WHT assert, exactly the ll64 +report's prediction. + +## Change (decode.rs, one branch) + +New arm in `decode_inter_sub8_rect2`'s `chroma_444` coded path: +`lossless(fctx) && !mono(fctx)` routes the piece's chroma through the +sibling's `read_inter_chroma_lossless` walk with region and block +`(bw, bh)` at stride `SIDE` — lossless codes TX_4X4 on EVERY plane +(`av1_get_tx_size`, blockd.h:1383), so the plane block is a 2x1/1x2 raster +of `TxbSet::Chroma4` units. The walk stamps each unit's own coefficient +context, so — unlike the lossy arm — no whole-block `record_mi_chroma` +runs after it (the leaf8 rule). `piece_tx_type` inheritance stays lossy- +only (lossless is DCT_DCT on every plane). 4:2:0: zero change — the branch +lives inside `chroma_444`, and the reserved 4:2:0 group-tail chroma arm was +not touched. Luma was already correct (`lane-lossless2`'s TX_4X4 leaf walk). + +## Verification (measured, this tree @ HEAD + this change) + +- Fail-before: `testsrc2 128x96 yuv444p`, aomenc `--profile=1 --lossless=1 + --enable-palette=0 --enable-intrabc=0 --max-partition-size=64`, 6 frames + → panic `(8, 4) != (4, 4)` at decode.rs:2566, backtrace + `read_inter_plane_rect → push_mc_rect_tx`. Fail-after: gone; the decoder + reads through the rect2 pieces and arrives coherently at the next + (pre-existing) defect site — see deferred (1). +- Witness with the route actually firing: mandelbrot 128x96 6 frames, same + recipe, `--cpu-used` 0 and 3 both decode ALL 6 frames; + `sub8_inter_rect: horz8x4=22 vert4x8=15` (cpu0) / `10/12` (cpu3) — 37 + and 22 lossless 444 rect2 chroma pieces through the new walk, stream + completes. +- Sibling non-regression: the ORIGINAL `/tmp/ll444/dodge2.obu` (sibling's + own witness bytes) decodes byte-exact vs fresh `aomdec --rawvideo`, all 6 + frames, in this tree with this change. +- Entropy alignment on the repro stream: frames 0-2 of the 6-frame + testsrc2 stream byte-exact vs aomdec; `sub8_inter_rect` counters 0 there + (its first rect2 piece sits behind deferred (1)'s site), and its frame 3 + reads through the new arm up to the (8,8) site without a desync-form + failure. +- Gates: `cargo test -p ec-av1 --lib a_lossless` → 6 passed, 0 failed + (both 4:2:0 lossless libaom gates, the 444 min-partition-64 inter gate, + the sb128 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1llsub8b`): 0 warnings, 0 errors. +- Fixtures are scratch in /tmp/llsub8b (regenerable recipes above); + fixtures/ is gitignored, nothing committed from it. + +## Named, not chased (spoken) + +1. `decode_inter_block8`'s INTRA-leaf chroma arm (decode.rs:38958/:38985, + `u_grid`/`v_grid = read_plane(..)` at `chroma_side == 8`) reads 4:4:4 + lossless chroma as ONE TX_8X8 unit → the same WHT assert, `(8, 8) != + (4, 4)`. Same class, the one arm the sibling's fix did not cover (it + routed the INTER arms only). decode_inter_block8 is the llinter lane's + function — deferred(fix-now by the lane owning block8's intra arm; the + fix shape is the same per-unit lossless walk with intra-plane read + semantics, not a port of the inter helper). +2. The 12-frame stream's `REFUSED: AV1 tile (a Golomb tail …)` from the + ll64 report: GONE after this fix — that stream now stops at deferred + (1)'s (8,8) site instead, exactly as ll64 predicted. +3. Fresh observation on today's regenerated fixtures: a mandelbrot + default-partition lossless 444 KEY frame pixel-differs from aomdec + (key-frame-only stream, zero sub8 counters, no refusal, first diff at + sample 40). Key frames never enter `decode_inter_sub8_rect2`, so this + is pre-existing and intra-side — the earlier lanes' key-frame proofs + ran min-partition-64 keys, which stay exact. deferred(the intra lane). + +## Note on the shared oracle + +aomenc/aomdec binaries are the shared `$HOME/.cache/aom-oracle/build`. +Today's aomenc produces different RD picks than this morning's (the +regenerated min-partition-64 testsrc2 stream's inter frames differ from +the sibling's original bytes) — streams were therefore compared only +against aomdec output of THE SAME bytes, and the sibling's original +dodge2.obu was used verbatim for the non-regression check. diff --git a/lanes/av1lrflush.report.md b/lanes/av1lrflush.report.md new file mode 100644 index 00000000..f5e58f0e --- /dev/null +++ b/lanes/av1lrflush.report.md @@ -0,0 +1,110 @@ +# lane-av1lrflush — the r2 "RU-row-0 flush" defect REFUTED; f2 residual re-attributed to inter-rect entropy recon; one new threading defect named (r3) + +## Outcome + +1. THE NAMED DEFECT DOES NOT EXIST. r2's DEFECT 3 (stop-with-site: "`pipe_run_lr`'s + `rrows: Some` branch refills only caller-passed RU rows, and the + `ls.note(k-2)`/`ls.close(nb, false)` band release never flushes RU row 0 when the + top SB row carries a 128-root rect") is refuted by direct measurement at this HEAD + (48411287, fixture sha256 `27825e14…61e80` verified): with the filter pipeline + engaged (`EC_AV1_FILTER_THREADS=4`, recon serial — `pipe_on=true` on both inter + frames, witnessed by the new unconditional `PIPELINE_TAKEN` counter), the decoded + output is **byte-identical to the whole-frame path on all three frames**, including + frame 2 — the inter frame whose top SB row carries the 128-root rect. The band + release provably flushes RU row 0 (f2 luma is a single RU row `(0,160)`, + unit_size 128, 2 SGR units `ep=11 xqd=[0,73]/[0,72]`; f1's SGR-heavy restoration — + 11754 changed samples — also reproduces exactly through the pipeline). +2. r2's stage ladder was misaligned by one stage. Measured at this HEAD with the + pinned fixture and the current oracle (all dumps cross-checked frame-aligned; f0/f1 + byte-exact at every stage): frame 2 already diverges at **PREFILT** — + Y 6952 / U 9568 / V 13496 samples — so POSTDEBLOCK/POSTCDEF are NOT byte-exact and + the damage is introduced BEFORE loop restoration. r2's reported "FINAL" diff + (Y 7308 / U 9685 / V 14012) matches today's POSTCDEF diff (Y 7307 / U 9685 / + V 13722) almost sample-for-sample: the r2 comparisons paired our post-CDEF bytes + against the oracle's FINAL and so on, one rung off. The "our final equals + post-CDEF above row 63" reading is likewise stale — our LR actually changed rows + from row 2 (Y) and covers all rows on V; U is `RestorationType::None` on f2 in + BOTH decoders (oracle's U final == oracle's U post-CDEF, 0 rows differ), so the + r2 parser reading (`lr_params` per-plane `f(2)`) is confirmed correct. +3. DEFECT A (real f2 residual — NOT this lane's): serial recon diverges at PREFILT + with first diffs **Y (98,128), U (64,128), V (0,128)** — all three planes enter at + column 128, i.e. inside the inter 64x128 block at (128,0), everything downstream + carrying it. Site: the inter rect-strip entropy/recon path — the entropy lane's + assigned territory (Agent044's `decode_rect4_16_strip` inter band stamping; their + independent t6 finding — skipped inter 1:4 strips leaving stale band cells that + flip coefficient contexts — is plausibly this class one size up). STOP per + charter; nothing in the entropy path was touched here. +4. DEFECT B (NEW, needs its own lane): the wavefront reconstruction + (`EC_AV1_RECON_THREADS>1`) diverges from the serial decoder at PREFILT on this + fixture's inter frames — **chroma-only write-replay loss**: f1 U 17504 samples + (first (1,0)), V 3 (29,67); f2 U 25472 (first (0,0)), V 1472 (first (128,2)); Y + byte-exact on both frames, and f0 (keyframe) exact everywhere. Serial filters are + unaffected (recon=2/filter=1 still diverges; recon=1/filter=4 is exact), so this + is the wavefront write recording/replay machinery (lane-wave1 class), not the + filter pipeline, not LR, not entropy. Never covered by any gate — every pixel gate + decodes with default threads. +5. FIX: nothing to fix in the LR pipeline. What landed instead is the refutation + pinned as a regression gate: `a_444_sb128_witness_lr_pipeline_flushes_ru_row_ + 0_pixel_exact` — serial decode vs `override_filter_threads(4)` decode of the same + pinned fixture, asserting (a) `PIPELINE_TAKEN` delta == 2 (the arm really + pipelined both inter frames; robust against the once-per-process + `filter_threads()` env cache that would otherwise silently serialise the arm), + (b) `LR_PIPELINE_ROW0` delta == 5 (f1 restores all three planes, f2 all but U: + the pipeline's band release flushed RU row 0 that many times), (c) pipelined == + serial byte-exact on every frame, and (d) frames 0/1 byte-exact vs oracle + aomdec AND ffmpeg THROUGH the pipeline. r4 review hole, fixed: the original (b) + used the thread-local `LR_STRIPE0_HITS`, which the gate's own thread can + satisfy from frame 0's whole-frame LR alone — vacuous as a pipeline witness; + the replacement is a process-global counter bumped by `pipe_run_lr`'s + filter-pool worker itself, so only a real pipeline row-0 flush can move it. + Mutation-verified: hard-disabling the RU-row-0 release in `pipe_run_lr`'s + band walk turns the gate red (row-0 delta 0 and "pipelined frame 1 plane 0 + differs", class lr-band-release); reverted, green. +6. Gate-extension status for the original acceptance item: extending + `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` to assert f2 + byte-exact vs aomdec/ffmpeg is **deferred** — f2 is not green and its fix belongs + to the entropy lane (DEFECT A). Unblocks as soon as that fix lands in this + branch's ancestry: change the two `take(2)` arms to `take(3)` in that gate. Its + current scoping comment (naming the LR band release as the residual site) is now + known-stale; left untouched here to keep the lane diff free of another lane's + gate, to be corrected in the same deferred edit. + +## Verification + +- `cargo check -p ec-av1`: 0 warnings, 0 errors (target + `$HOME/.cache/cargo-target-av1lrflush`; scoped `rustfmt --check` drift is + repo-wide pre-existing, untouched files fail it identically). +- `stream::tests::a_444_sb128_witness_lr_pipeline_flushes_ru_row_0_pixel_exact`: PASS. +- `stream::tests::a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact`: + PASS (f0/f1 pins intact). +- Restoration battery (`EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib + restoration`): 10 passed, 0 failed — includes the 4 real-aomenc gates r2 ran + (`…reads_lr_symbols_correctly`, `…superres_key_frame_with_cdef_and_loop_ + restoration…`, `…non_420_subsampled…`, `…skipped_8x8_intra_leaf…`) plus the + 10-bit-stripe and sibling LR gates. +- Mutation proof: `pipe_run_lr` band-walk mutated to never release RU row 0 → new + gate FAILED at the pipeline==serial assert; reverted → PASS (red/green cycle in + this lane, target dir reused, rebuild verified by the failure itself). +- Stage evidence produced with env-gated dumps on both decoders + (`EC_AV1_PREFILT_DUMP`/`EC_AV1_POSTDEBLOCK_DUMP`/`EC_AV1_POSTCDEF_DUMP`/ + `EC_AV1_FINAL_DUMP`, per-frame strided slices, 192x160x3 per frame); all temp + probes and the throwaway example removed before commit. + +## Decision + +- LR pipeline: EXONERATED, gate-pinned. No production code changed in + restoration.rs; decode.rs gained only the unconditional `PIPELINE_TAKEN` counter + + accessor (the non-vacuity witness; the wave-stats-gated `PIPE_FRAMES` is not + readable by gates). +- DEFECT A: handed to the entropy lane with first-diff coordinates (see Outcome 3); + cross-referenced with Agent044's t6 context-zeroing finding. +- DEFECT B: named for a wavefront lane — reproducible 100% (deterministic), chroma + write replay under `EC_AV1_RECON_THREADS>1`; fix owner not this lane. +- NOT touched: entropy band stamping / `read_coeffs_rect` / `decode_rect4_16_strip` + (sibling's), the 4:2:0 group-tail chroma SKIP arm (reserved), sub8 rect arm, + leaf8 OOB, wavefront write-replay code. + +## State + +- Branch lane-av1-lrflush, commit on top of 48411287 (no push): the gate + the + `PIPELINE_TAKEN` counter + this report. diff --git a/lanes/av1rect128recon.report.md b/lanes/av1rect128recon.report.md new file mode 100644 index 00000000..2f9152d2 --- /dev/null +++ b/lanes/av1rect128recon.report.md @@ -0,0 +1,88 @@ +# lane-av1-rect128recon — the 444_sb128rect witness f2 is byte-exact vs aomdec AND ffmpeg; root cause: the inter-frame intra tail's chroma walk coded ONE whole-plane unit where 4:4:4 codes four TX_32X32 units; gate extended take(2)→take(3) (r1) + +## Outcome + +1. REPRODUCED at HEAD 99232190 (fresh target dir `cargo-target-av1rect128recon`, + fixture sha256 `27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80` + re-verified, oracle aomdec `~/.cache/aom-oracle/build` regenerated this + session): frame 2 diverges at PREFILT Y 6952 / U 9568 / V 13496, first diffs + Y (col 128, row 98), U (col 128, row 64), V (col 128, row 0); f0/f1 exact. + Numbers match av1444sbf2 r1 / av1lrflush r3 sample-for-sample. +2. BLOCK-SHAPE CORRECTION (ladder evidence, not inference): the oracle's f2 + top-right superblock root is a gathered-bit SPLIT, and its right column is + INTRA blocks — 64x64 at (128,0), 64x32 at (128,64), 64x32 at (128,96), + 64x64 at (128,128) — not "the inter 64x128 at (128,0)" the earlier lane + reports name. Evidence: oracle `EC_PART`/`EC_PART_VAL` (ctx 14, values + NONE/HORZ at mi (0,32)/(16,32)), `EC_PREDOUT8` per-unit sums, and + `EC_DQCOEFF`. The earlier reports' pixel numbers are all reproduced here; + only the block-shape naming was wrong. +3. FIRST DIVERGENT SYMBOL, pinned by consecutive-TU rng alignment on both + ladders (`EC_COEFF_STEP`, TU-boundary values 60168/55581/51541 matching + line-for-line): the 64x64 intra block's FIRST chroma TX_32X32 unit at + mi (0,32). Ours decoded `txb_skip` off the offset-7 context row (printed + ctx 0); aom reads the offset-10 row (true ctx 10 — the uv plane block + 64x64 is larger than the TX_32X32 unit). Same decoded value (skip), but + the CDF rows differ, so the arithmetic coders consumed different bits and + the rest of frame 2 decodes off a drifting state — bounded, mostly-skip + garbage that still corrupted the block's own V plane (uniform −1: the + missing V residual) and the bottom superblock row. +4. ROOT CAUSE (one site): `decode_inter_block`'s intra tail read the block's + chroma as ONE whole-plane unit (`read_plane` with `chroma_side`/`chroma_tx`, + block-level `around`, no +10 offset) — a 4:2:0-era remnant. At 4:4:4 a + 64x64 plane block is FOUR plane-major TX_32X32 units, each with its own + `around_mi` context and the offset-10 rows. The keyframe path + (`decode_block`'s `cn > 1` loop, lane-av1-444) and the inter tail's own + ss-0/0 arm already did this correctly; the intra-in-inter tail was the one + remaining copy of the old shape. The misnaming in (2) hid this: the + "inter 64x128" framing pointed at Agent044's strip/inter territory, while + the real site is the intra tail. +5. FIX (decode.rs, intra tail chroma chain): new `ss_x==0 && ss_y==0 && + chroma_side > chroma_tx` arm — four plane-major TX_32X32 units, per-unit + `around_mi(cu_mi, 32)`, `Some(3)` skip-ctx offset (+10 convention on our + chroma-32 table), immediate per-unit `record_mi_chroma`, per-unit + `tu_reach`, assembled 64x64 plane grids, `mu_chroma = true` so the + block-tail unit replay re-stamps after the whole-block record (class + `override-slot-on-one-arm`). 4:2:0 is identical by construction: the arm + is ss-gated and `chroma_side == chroma_tx` there still takes the old + single-read path. Class sweep: the only other intra-in-inter chroma arms + are the side>64 mu-chunk walk (already per-unit, correct) and the + rect-strip readers (separate paths, sibling-owned, untouched). +6. RESULT: f2 PREFILT byte-exact; FINAL (full deblock/CDEF/LR pipeline) + byte-exact on ALL THREE frames against BOTH oracles — ours == + `ffmpeg -f rawvideo -pix_fmt yuv444p` byte-for-byte (276480 bytes), and + frame-equal to aomdec's Y4M output (its 12 interleaved `FRAME` markers + stripped). + +## Verification + +- `a_444_sb128_root_rect_stream_with_restoration_decodes_pixel_exact` + (extended to `.take(3)` in both oracle arms + rewritten scoping comment, + same commit): PASS. +- `cargo check -p ec-av1`: 0 warnings (target `$HOME/.cache/cargo-target-av1rect128recon`). +- sb128 family (`cargo test -p ec-av1 --lib sb128`): 10 passed, 1 ignored. +- 444 family (`--lib 444`): 4 passed (includes the lossless 444 + min-partition-64 inter stream). +- Restoration battery (`EC_AV1_REQUIRE_AOMENC=1 --lib restoration`): + 10 passed, 0 failed. +- chroma family (`--lib chroma`): 28 passed, 0 failed. +- Stage evidence from env-gated rungs on both decoders (EC_PART/EC_PART_VAL, + EC_COEFF_STEP, EC_ECDUMP_IN, EC_PREDOUT8, EC_IMODE, AOMMB, EC_DQCOEFF); + throwaway /tmp scratch only, nothing left in the tree. + +## Decision + +- Gate extended and the stale "LR never restores RU row 0" scoping comment + replaced (that attribution was refuted in lane-av1lrflush r3 as a + stage-ladder mixup) — the deferred same-commit pairing is now discharged. +- Sibling ownership respected: `decode_rect4_16_strip`'s 16x4/strip-tail + territory and the sub-8 leaf paths untouched; the fix lands in + `decode_inter_block`'s intra tail only. +- Named for the record: any future block-shape work must sweep BOTH copies + of the chroma unit walk — `decode_block` (keyframe) and + `decode_inter_block`'s intra tail — plus the inter tail; this defect was + the third copy drifting from the first two. + +## State + +- Commit on lane-av1-rect128recon (no push): decode.rs fix + stream.rs gate + extension/comment + this report. diff --git a/lanes/av1refusalaudit.report.md b/lanes/av1refusalaudit.report.md new file mode 100644 index 00000000..4331bc9e --- /dev/null +++ b/lanes/av1refusalaudit.report.md @@ -0,0 +1,107 @@ +# lane-av1-refusalaudit — the four witness2-proven-unreachable refusals, dispositioned + +Base: `main` **fe3e8418** (2026-09-26). Worktree `edith_codecs-av1refusalaudit`, +branch `lane-av1-refusalaudit`, +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1refusalaudit` (private). No push. +Region: `crates/ec-av1/src/refusal_inventory.rs` ONLY — no decoder behaviour +change, no refusal string added or removed. + +## TL;DR + +The four Wave-2 census refusals that the lane-av1-witness2 hunt +(`../edith_codecs-av1witness2/lanes/av1witness2.report.md`, committed on +`lane-av1-witness2`; verdict **0 / 4 guards reached** in 31 valid encodes) are +now dispositioned PROVEN/unreachable in the inventory, each citing the hunt: + +| # | Refusal | Disposition | +|---|---|---| +| 1 | `a 64-axis strip whose chroma unit has no coefficient table` | **NEW PROVEN pair** + new ENUMERATION test (§1) | +| 2 | `a rectangular inter luma transform unit whose shape has no coefficient table set here` | already PROVEN (`every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan`); annotation extended with the hunt (§2) | +| 3 | `a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding` | already PROVEN (`a_block_shape_census_over_three_real_streams_leaves_the_rect_residual_refusal_unreachable`); annotation extended with the hunt (§3) | +| 4 | `a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV (…)` | already PROVEN (`a_frame_whose_segmentation_overrides_a_block_mode_is_refused_by_name`); annotation extended with the hunt (§4) | + +Untouched, per charter: every refusal with a live witness, and the reserved +4:2:0 group-tail chroma SKIP arm. + +## §1 — the 64-axis strip chroma table guard (new PROVEN entry) + +`decode.rs:15233`, the `_` arm of the chroma-unit `match` in +`decode_block_rect64` (reached only for depth-0, non-skip, non-lossless +superblock-level HORZ/VERT/1:4 strips). The witness2 hunt's static reduction: +the handled arms `(32,32) (32,16) (16,32) (32,8) (8,32)` cover every conformant +strip unit in both supported chroma formats — at 4:4:4 the strip set +64x32/32x64/64x16/16x64 tiles to (32,32)/(32,16)/(16,32); at 4:2:0 the halved +footprints land on (32,16)/(16,32)/(32,8)/(8,32). A 128-root half is +`decode_block_128rect`'s and the 128 root has no 1:4 arm. Dynamically: 8 real +aomenc key-frame encodes (screen+intrabc, rect+1:4, sb 64 and 128, cq 10..63, +cpu-used 0..2) never reached the arm; the three streams that decode to +completion never enter `decode_block_rect64` at all. + +Encoded as the repo's shape-3 convention (keep the guard, add an ENUMERATION +test that derives the gate's own table): new test +`every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table` in +`refusal_inventory.rs`, which + +1. derives the caller set from decode.rs itself + (`read_sb128_root`, `decode_intra_rect_in_inter` — a 128-sided or sub-8 + caller would invalidate the domain), +2. pins the unit derivation spellings (`bw >> ss_x`, the `.min(32)` cap — + asserted unique), +3. parses the five arms out of the `match` between the cap and the refusal + string (class `table-and-reader-move-together`) and asserts they equal + exactly the five handled units, +4. walks the strip domain (four 64-axis 2:1/1:4 strips × {4:4:4, 4:2:0} — the + mixed formats are refused at the sequence header) through the mirrored + derivation and asserts every combo lands on a handled arm, with + non-vacuity asserted both ways (8 combos checked; every arm hit). + +PROVEN pairing added: +`("a 64-axis strip whose chroma unit has no coefficient table", +"every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table")`. + +## §2 — rect inter luma TU table guard + +Hunt: 8 encodes (`s2a`..`s2h`), `--enable-tx-size-search=1`, rect+1:4 on, +`--min-partition-size=4`, 4:2:0 and 4:4:4, sb 64/128, cq 10..45, cpu-used +0..2 — **no refusal**, while the domain was genuinely exercised (whole-block +32x8 inter TUs decoded, sub-8 rect pieces decoded). The census enumeration's +fourteen rect shapes are the whole alphabet, so the `_` arm has no conformant +input. Annotation extended on the existing PROVEN entry. + +## §3 — the rect residual (HORZ_B) guard + +Hunt: 8 encodes (`s3a`..`s3h`), banded + busy content, inter, +`--max-partition-size=32`, single-ref variant, cq 20..45 — **no refusal**; +every rect strip the encoder produced sat inside `rect_inter_residual_supported`. +Static half (same hunt, source-read): the supported list plus the partition +walker's piece set (SB pieces 64x32/32x64/64x16/16x64, the 32- and 16-level +rect/1:4/AB twins, 128 halves tiled as two TX_64X64) enumerate every rect +footprint AV1 partitioning can present — 1:4 stops at 64 (the 128 root has no +1:4 symbol). Annotation extended on the existing PROVEN entry. + +## §4 — the segmentation feature guard + +Hunt: 8 encodes (`s4a`..`s4h`, 7 valid — aq-mode 4 is out of range for this +aomenc build): aq-mode 1/2/3, aq-mode 3 + `--delta-lf-mode=1`, 4:4:4, banded — +**no refusal**. This aomenc build has **no `--enable-segmentation` flag at +all**; aq-mode is the only segmentation driver. Segmentation genuinely enabled +in s4a/s4b (`seg=true` on 3/3 frames) and those streams decode clean — the +hunt re-confirms the PROVEN annotation's claim ("What aomenc codes is +SEG_LVL_ALT_Q tables and segment_id symbols, and nothing else"). Annotation +extended on the existing PROVEN entry. + +## Verification + +- `cargo check -p ec-av1 --all-targets` — **0 warnings**. +- Inventory self-checks green: + `the_decode_path_refuses_exactly_the_listed_cases`, + `every_proven_refusal_names_a_test_that_exists`, + `capability_claims_are_declared_not_scattered`, + `gates_that_swallow_a_decode_error_are_declared`, and the new + `every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table` — + 5 passed, 0 failed. +- Inventory numerator: **33 refusals + 1 capability claims, 32 proven** + (before this lane: 31 proven — the 64-axis strip chroma entry was the one + unmeasured refusal of the four; nothing else moved). + +No fixtures committed; no `/tmp` artefacts referenced by any gate added. diff --git a/lanes/av1sub8rect444.report.md b/lanes/av1sub8rect444.report.md new file mode 100644 index 00000000..771643df --- /dev/null +++ b/lanes/av1sub8rect444.report.md @@ -0,0 +1,95 @@ +# lane-av1sub8rect444: the lossless sub-8 rect leaf's 4:4:4 chroma per-unit walk + +## Ticket + +`lanes/av1llintercdf.report.md` "Named, not chased" item 1: at the shared state +rng=51429 after the 8x4 leaf's luma, the oracle reads the leaf's chroma as +FOUR TX_4X4 units (plane 1 bc=0,1 ctx=11 then plane 2 bc=0,1) while +`decode_intra_sub8_leaf`'s `chroma_444 && bw != bh` arm read the chroma plane +as ONE `TX_8X4`/`TX_4X8` rect unit per plane (`read_coeffs_rect`, skip ctx +fixed at above+left where the oracle derives 11≡4). Wrong unit count AND wrong +skip ctx. Template: b3f815c8's per-unit 8x8-leaf walk. + +## Change (decode.rs, one arm + one tail guard + counter) + +1. `decode_intra_sub8_leaf`'s rect arm now branches on `lossless(fctx)`: the + walk reads the leaf's 8x4/4x8 chroma plane block as a 1x2/2x1 raster of + `TX_4X4` units per plane, PLANE-MAJOR (`av1_get_tx_size`, blockd.h:1383), + via `read_plane` with `TxbSet::Chroma4`, per-unit `around_mi` (per-unit + `get_txb_ctx`), the plane-block-bigger-than-transform `+3` (libaom's +10 + rows, so above+left=1 reads row 4 ↔ libaom ctx 11 — the named 11≡4), and + the lossless tx_type drop (`read_plane`'s own `coding.tx_type = None` for + lossless + DCT_DCT force). Units anchor at the leaf's own (px, py) at + 4:4:4, clip past the frame edge like `read_intra_chroma_lossless`, stamp + each unit's own coefficient context with per-unit `record_mi_chroma` + (`av1_set_contexts` per unit), and assemble the leaf grid at stride bw. + CFL is impossible here (the uv read upstream already takes the + 13-symbol `uv_mode_no_cfl` row for this shape at lossless), so no alpha + rides along — the same `None` the template walks pass. +2. Tail guard: the whole-leaf `record_mi_chroma(lmi, bw, bh, ...)` is skipped + when the walk stamped per unit — NESTED inside the `chroma_444` branch. + The first cut wrote `if chroma_444 && !stamped { record } else { <4:2:0 + group tail> }`, which let a walked leaf fall into the 4:2:0 group tail: + it spans the GROUP's two mi rows/cols with one composed state and + clobbered the walk's own stamps (measured: `above[3][1]` flipped pos→neg + between the walk's stamp and the next leaf's read — the oracle wants the + per-unit value). The nested form skips BOTH branches for the walk. +3. Non-vacuity counter `LLSUB8RECT444_CHROMA_WALK_HITS` + + `llsub8rect444_chroma_walk_hits()` + a `decode_probe` line, per the lane + convention (`CHROMA_SPLIT_TX_HITS` cannot attribute its bumps to this + leaf). 4:2:0 is arithmetically identical: the branch lives inside + `chroma_444`, and the non-lossless rect path and the 4:2:0 group tail are + byte-preserved. + +## Verification (measured, this tree @ HEAD + this change) + +- Entropy witness, `/tmp/llkf/t6.obu` vs fresh `aomdec` + (`$HOME/.cache/aom-oracle/build`), `EC_ECDUMP_IN` (value,rng) pairing: + pre-change the first mismatching read is #2326 — inside the named leaf's + chroma at mi(0,2). Post-change #2316–#2488 pair 1:1: the named leaf's FOUR + chroma units read exactly the oracle's symbols + ((30281,51429)/(20612,34312)/(33129,58376)/(30377,36104) against oracle + ctx 11≡4), the sibling INTER leaf mi(1,2) and everything after pairs, and + the walk counter fires (15 walks stream-wide, `decode_probe`). + Fail-before: with the rect read in place the leaf desynced at its own + chroma (t6 frame-1 first differing pixel byte 65, 16032 differing bytes). +- The stream still diverges — later and at a DIFFERENT block: first + mismatching read #2489, the U unit (2,8) of the 16x4 INTER strip at + mi(2,8): ours reads `txb_skip` ctx 3 (above[8][1]=0, left[2][1]=0) where + the oracle reads ctx 11 with raw cells `above=[0,] left=[23,]` + (`EC_ECDUMP`, the patched oracle's cell dump) — libaom's left[2][1] holds + level 7 / dc 0 from an earlier row-2 writer, ours holds 0. That cell is + written by the 16x16 intra block (0,4)'s chroma band stamping and the + (1,8) 16x4 strip's own tail — `decode_rect4_16_strip` is llcpred's lane. + With the desync now downstream, our decoder refuses honestly at the strip + (`a Golomb tail longer than this decoder reads`) instead of decoding + garbage, so per-frame byte counts are not claimable this round: **t6 + frames 1..5 are NOT exact — no exactness claimed.** Frame 0 is untouched + by construction (both callers, `decode_inter_sub8_split4` and + `decode_inter_sub8_rect2`, are inter-frame paths; the key frame never + reaches this arm) and was byte-exact before. +- Non-regression: `cargo test -p ec-av1 --lib a_lossless` → 7 passed, 0 + failed (both 4:2:0 lossless libaom gates, the 444 min-partition-64 and + min-partition-8 inter gates, the sb128 pair, the 16x4 pair). +- `cargo check -p ec-av1 --all-targets` (target dir + `$HOME/.cache/cargo-target-av1sub8rect444`): 0 warnings, 0 errors. + `rustfmt --check` reports no hunks inside the edited ranges (the crate's + pre-existing drift is untouched). +- Fixtures are scratch in /tmp/llkf (t6.obu, regenerable per + av1llkf.report.md's recipe) and /tmp/llsub8rect444; nothing committed + from them. + +## Named, not chased (spoken) + +1. The t6 next-site: the 16x4 INTER strip's chroma coefficient-context + stamping at 4:4:4 lossless. Measured above (ctx 3 vs 11 on U (2,8); + oracle cells `above=[0] left=[23]`). The row-2 U band state our tree + drops is written by the 16x16-intra/(0,4) stamping and consumed one + superblock later; `decode_rect4_16_strip` is llcpred's lane — per the + ticket this lane stops at the boundary. + deferred(the 16x4 strip's per-unit chroma context stamping at 4:4:4 + lossless; unblock: llcpred's decode_rect4_16_strip lane, t6.obu as the + ready-made fixture, first divergent read #2489 = U unit (2,8)). +2. Instrument parity: `read_coeffs_rect` still has no `EC_ECDUMP_IN` rung + (av1llintercdf item 2) — this lane's walk bypasses the rect reader + entirely, so the rung was not needed here. diff --git a/lanes/av1wavefront.report.md b/lanes/av1wavefront.report.md new file mode 100644 index 00000000..451c7622 --- /dev/null +++ b/lanes/av1wavefront.report.md @@ -0,0 +1,66 @@ +# lane-av1wavefront — defect B fixed: the wavefront replay read frame state off a default-seeded `FrameCtx`; 4:4:4 chroma lost, 4:2:0 accidentally exact + +## Outcome + +1. DEFECT B (lanes/av1lrflush.report.md) reproduced and fixed at the source. + `EC_AV1_RECON_THREADS>1` diverged from serial at PREFILT, chroma-only, on + `444_sb128rect_lr_witness.obu` (sha256 `27825e14…61e80`, verified): f1 U + 17504 samples (first (0,1)) / V 3 (first (67,29)), f2 U 25472 (first (0,0)) + / V 1472 (first (2,128)), Y byte-exact, f0 exact — the report's own numbers, + re-measured off `EC_AV1_PREFILT_DUMP` runs at recon=2/filter=1 vs + recon=1/filter=1. +2. ROOT CAUSE — not a stride/plane-index bug in the write records, and not a + lost op: [`wave_worker`] seeds each recon worker with a FRESH + [`FrameCtx`] (`FrameCtx::new()`), carrying only `bit_depth` and + `enable_edge_filter`. Every replay-side read of the frame's chroma + subsampling therefore saw the CONSTRUCTOR DEFAULT `subsampling = (1, 1)` + (4:2:0) regardless of the sequence. On a 4:4:4 stream the deferred chroma + prediction builds read `ss_x(fctx)` at CLOSURE-RUN time — + `mv_to_q4(px, mv.1, ss_x(fctx))` in the sub-8x8 group's `build_c` (and the + same shape in the 4x4-piece and leaf-8 chroma builds) — so every worker + fetched its chroma reference at HALF the true position: the prediction was + wrong, the recorded op replayed faithfully at the wrong content. `exec_intra`'s + CfL AC read (`cfl_ac_ss(.., ss_x(fctx), ss_y(fctx))`) is the same class one + reader over. Serial is exact because there the closure runs at push time on + the parse thread's real context. Every earlier wavefront gate stream is + 4:2:0, where the default happens to BE the frame's pair — the defect was + invisible to the whole existing recon-threads gate set. +3. FIX: `WaveState` carries `subsampling: (u8, u8)`; `WaveGuard::install` + copies it from the tile's `FrameCtx` next to `bit_depth`; + `wave_worker` seeds it into the worker context. All replay-side ss readers + (the three `build_c` closure shapes and `exec_intra`'s CfL) are fixed by + the one field; no recorded op changed shape, no push-site read moved. +4. Verified: + - recon=2/filter=1 and recon=4/filter=1 now byte-identical to serial on + all three frames of the fixture (`dump_yuv` output compare; the example + binary rebuilt from this tree). + - Serial byte-identical pre/post fix (same compare against the pre-fix + binary's serial run) — the inline path never constructs a `WaveState`. + - Gate: `444_sb128rect_lr_witness.obu` added to + `a_real_stream_reconstructs_identically_with_one_and_four_recon_threads` + (the 1-vs-4 recon-threads byte-exact gate, per-frame Y/U/V asserts). + Mutation-verified: commenting the worker's `subsampling_x/y.set` seed + makes the gate FAIL exactly on the new fixture ("frame 1 U differs at 4 + recon threads") while the three 4:2:0 fixtures still pass — the gate is + non-vacuous and discriminates the class. Fix restored, gate green. + - `cargo check -p ec-av1`: 0 warnings. +5. CLASS SWEEP (replay-side `FrameCtx` reads on a worker): enumerated every + fctx read reachable from `exec_op` → `exec_intra`/`exec_mc`/PredBuild + closures: `sample_max` (bit_depth — carried), `enable_edge_filter` + (carried), `subsampling` (this fix), and nothing else — + `reconstruct_mc_rect` reads only `sample_max`; `mc::predict`'s + `interp_filter` read is not in any replay path (the deferred builds pass + the explicitly parsed kernels to `predict_maybe_scaled`; the two + `mc::predict` callers are `#[cfg(test)]` gate code). Parse-side ss reads + run on the parse thread's real context and were never wrong. + +## Not touched + +- Entropy band stamping / `read_coeffs_rect` / `decode_rect4_16_strip` + (Agent044's defect A territory) — nothing here lands in entropy code. +- Osman4's LR pipeline (proven clean; recon=1/filter=4 stays exact). +- The 4:2:0 group-tail chroma SKIP arm (reserved to its owning lane). + +## State + +Committed on lane-av1-wavefront. No push. diff --git a/lanes/av1witness2.report.md b/lanes/av1witness2.report.md new file mode 100644 index 00000000..bcc2693f --- /dev/null +++ b/lanes/av1witness2.report.md @@ -0,0 +1,155 @@ +# lane-av1-witness2: Wave-2 census-shape witness hunt + +Branch `lane-av1-witness2` at `fe3e8418`. Hunt, not a fix lane: run real aomenc +streams at the four Wave-2 census refusals (lanes/av1decode.report.md §4, +Wave 2), watch for the refusal string on `decode_probe`, stop each shape after +8 encodes. **Verdict: 0 / 4 guards reached** in 31 valid encodes (one slot +spent on an invalid `--aq-mode=4` that this aomenc build rejects). Two +real-stream PANIC defects were found instead (Annex A) — both 4:4:4-only, both +in `decode_block_128rect`'s / `decode_leaf8`'s execution stages, and they cut +the 4:4:4 hunting domain short before any parse-level refusal can be evaluated. + +Method shared by every shape: content generated by ffmpeg 8.1.2 lavfi into +`/tmp/av1w2/*.y4m` (busy `testsrc2`, moving banded `geq` content at 8-px and +4-px period, mandelbrot `tile=2x2` as screen-ish content), one `aomenc +--obu --passes=1 --threads=1` encode per recipe, then +`decode_probe ` grepping for the exact refusal string; probe +stdout per stream kept as `/tmp/av1w2/.probe`. Encoder: +`$HOME/.cache/aom-oracle/build/aomenc`. No fixtures committed; nothing under +`crates/ec-av1/fixtures/`. + +## Shape 1 — "a 64-axis strip whose chroma unit has no coefficient table" + +Guard: `decode.rs:15233`, the `_` arm of the chroma-unit match in +`decode_block_rect64` (reached only for depth==0, non-skip, non-lossless +superblock-level HORZ/VERT/1:4 strips). 8 encodes (`s1a`..`s1h`): 4:4:4 +keyframes, `--tune-content=screen --enable-intrabc=1 --enable-palette=0`, +rect+1:4 partitions on, `--min-partition-size=4`, sb 64 and 128, cq 10..63, +cpu-used 0..2, `--allintra`, `--kf-max-dist=1` all-key variants. **No refusal; +not reached.** + +Evidence, two parts: + +1. The three streams that decode to completion (`s1b` bands cq45, `s1f` + bands allintra cq10, `s1h` bands cq63 ×3 keyframes) never enter + `decode_block_rect64` at all: `rect64_corner_tu: 64x32=0 32x64=0` in all + three probes (the strips that fire are the 32-level `rect4_32` + horz=7..16 / vert=8..32, and `intrabc_rect: 1..2`). The five remaining + streams panic before completing (Annex A). +2. Static reduction [INFERENCE, source-read]: the handled arms + `(32,32) (32,16) (16,32) (32,8) (8,32)` cover every conformant chroma + footprint of a 64-axis strip in both supported chroma formats — at 4:4:4 + the strip set is 64x32/32x64/64x16/16x64 → units (32,32)/(32,16)/(16,32); + at 4:2:0 the halved footprints land on (32,16)/(16,32)/(32,8)/(8,32). + There is no conformant strip whose unit misses the table, which is why no + recipe can reach the arm. A 128-root half (128x64) is a different function + (`decode_block_128rect`), and the 128 root has no 1:4 arm. + +## Shape 2 — "a rectangular inter luma transform unit whose shape has no coefficient table set here" + +Guard: `decode.rs:21541`, the `_` arm of `rect_inter_luma_set`. 8 encodes +(`s2a`..`s2h`): inter frames, `--enable-tx-size-search=1`, rect+1:4 on, +`--min-partition-size=4`, one `--max-partition-size=16` sub-16-only recipe, +one single-ref-only recipe (lag 0 + all compound off), 4:2:0 and 4:4:4, +cq 10..45, cpu-used 0..2, sb 64/128. **No refusal; not reached.** + +Evidence: the rect-TU domain was genuinely exercised — `rect_inter: tu=5..10` +and whole-block rectangular 32x8 inter TUs decoded (`rect32x8_inter_tu: +32x8=3/1` in s2b/s2g, the shape that stopped the pre-lane-rectres film cuts), +sub-8 rect pieces `sub8_inter_rect: horz8x4=41 vert4x8=19` (s2g). Static +reduction [INFERENCE, source-read]: the match covers all fourteen rect shapes +the census lists (2:1 from 8x4 up to the 64-axis adjusted units, 1:4 at 16x4 +and 32x8, plus 128-root halves tiled as squares) — the census gate +`every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan` +already carries this claim. + +## Shape 3 — "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding" + +Guard: `decode.rs:30489` in `decode_inter_block`, firing only for a +`write_w x write_h` footprint outside `rect_inter_residual_supported` +(`decode.rs:21396`). 8 encodes (`s3a`..`s3h`): banded + busy content, inter, +`--min-partition-size=4`, sb 64/128, `--max-partition-size=32`, 4-px band +content, single-ref variant, cq 20..45, cpu-used 0..1. **No refusal; not +reached.** + +Evidence: every rect strip the encoder produced is inside the supported set — +`inter_rect: 32x8=8 64x32=2` (s3a/s3f), whole-block 32x8 rect TUs +(`rect32x8_inter_tu: 32x8=4..6`), all 8/8 streams decode 4/4 frames OK. +`inter_ab16`/`inter_ab64` all 0: this content never even picked an AB arm, so +the HORZ_B-naming half of the string was not stressed, but the string can only +fire on an *unsupported* footprint, and the supported list plus the walker's +piece set (SB pieces 64x32/32x64/64x16/16x64 at 39895-39958, 32-level and +16-level rect/1:4/AB twins, 128 halves tiled as two TX_64X64) enumerate every +rect footprint AV1 partitioning can present — 1:4 stops at 64 (the 128 root +has no 1:4 symbol) [INFERENCE, source-read, matches the census gate +`a_block_shape_census_over_three_real_streams_leaves_the_rect_residual_\ +refusal_unreachable`]. + +## Shape 4 — "a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV" + +Guard: `stream.rs:1483`, per frame header. This aomenc build has **no +`--enable-segmentation` flag**; `--aq-mode` is the segmentation driver. 8 +encodes (`s4a`..`s4h`): aq-mode 1/2/3 (4 is out of range for this build — +`aq_mode out of range [..AQ_MODE_COUNT - 1]`, the slot's encode never ran), +aq-mode 3 + `--delta-lf-mode=1`, aq-mode 2 + cq45, 4:4:4 aq-mode 3, banded +aq-mode 3. **No refusal; not reached.** + +Evidence: segmentation was genuinely enabled in s4a/s4b (`EC_PROBE_HDR`: +`seg=true` on 3/3 frames, aq-mode 1 and 2) and those streams decode clean — +matching the PROVEN annotation ("What aomenc codes is SEG_LVL_ALT_Q tables and +segment_id symbols, and nothing else"). Cyclic refresh (aq-mode 3) did not +engage on this content (`seg=false`). No aq recipe made the encoder write any +of the three mode/reference/skip segment features. + +## Annex A — two real-stream panic defects found by the hunt (not fixed here) + +Both are 4:4:4-only; all sixteen 4:2:0 streams decoded clean. They are a +distinct class from the hunted refusals — a crash, not a named refusal — and +they bound every future 4:4:4 hunt: the probe dies mid-frame, so any +parse-level refusal downstream of the panic point is untestable on such +content until these are fixed. + +**P1 — `decode.rs:17631` assert in `decode_block_128rect`.** +`assertion failed: lossless_frame || (chroma_w / chroma_tx, chroma_h / +chroma_tx) == (nch_x, nch_y)` — the chroma tiling invariant of a 128-root +HORZ/VERT strip at 4:4:4. Stream: `/tmp/av1w2/s1d.obu`, 595 bytes, +sha256 `68773f2c6e01a2d211bf0213479accb4c2c360132c0e1bc3b326eab7861925b1`: + +``` +ffmpeg -f lavfi -i "nullsrc=s=320x256:rate=30:d=1,geq=lum='mod(floor((Y+T*160)/8)*67,255)':cb='128+20*sin(Y/17+T)':cr='128+20*sin(X/23+T*2)'" -pix_fmt yuv444p bands444.y4m +aomenc --codec=av1 --obu -o /tmp/av1w2/s1d.obu --passes=1 --threads=1 bands444.y4m \ + --limit=3 --kf-max-dist=1 --cpu-used=2 --end-usage=q --cq-level=20 --sb-size=128 \ + --enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=4 +``` + +**P2 — `decode.rs:3766` index OOB in `PlaneBuf::reconstruct`.** +`index out of bounds: the len is 16 but the index is 16`, frames +`reconstruct ← exec_intra ← push_intra_tx/read_plane ← decode_leaf8 ← +decode_key_frame_tile_with_cdfs` — an 8x8 key-frame leaf whose prediction +mode reaches the reconstruct dispatch outside its 16-entry table, 4:4:4 only. +Smallest stream: `/tmp/av1w2/s1e.obu`, 3577 bytes, sha256 +`72bed2791d1ceba8be7926a052c7838c5d96d4f9d56d28fb69789a753d3593af`: + +``` +ffmpeg -f lavfi -i testsrc2=size=320x256:rate=30:duration=1 -pix_fmt yuv444p busy444.y4m +aomenc --codec=av1 --obu -o /tmp/av1w2/s1e.obu --passes=1 --threads=1 busy444.y4m \ + --limit=3 --cpu-used=0 --end-usage=q --cq-level=45 --sb-size=64 \ + --enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=4 +``` + +Same panic also fires on `s1a.obu` (screen+intrabc recipe, sha256 +`5cfcb15027947acddf9a74d26ac04a2dd95ee64b48434424ab48b54715ff19fb`) and +`s2e.obu` (inter-grid recipe, sha256 +`e5d89be7a394b470e57133372e4da32084dae546294f38430947902d85fc4221`). + +## Per-shape summary + +| # | Guard | Encodes | Reached | Refusal fired | +|---|---|---|---|---| +| 1 | 64-axis strip chroma without table (`decode.rs:15233`) | 8 | no | none | +| 2 | rect inter luma TU without table (`decode.rs:21541`) | 8 | no | none | +| 3 | non-skip rect strip needs rect residual (`decode.rs:30489`) | 8 | no | none | +| 4 | segmentation REF_FRAME/SKIP/GLOBALMV (`stream.rs:1483`) | 8 (7 valid) | no | none | + +No code edited; no fixtures committed. Repro streams and probe logs live under +`/tmp/av1w2/`. diff --git a/scripts/instrument-aom-oracle.sh b/scripts/instrument-aom-oracle.sh index ec513d84..fddc2b7a 100755 --- a/scripts/instrument-aom-oracle.sh +++ b/scripts/instrument-aom-oracle.sh @@ -40,6 +40,13 @@ # its superres margin (lane-superres r5: hand-tracing the arithmetic # could only prove our own self-consistency, not correctness against # libaom). +# EC_AV1_POSTCDEF_DUMP= -> .f per frame, same shape as +# the POSTDEBLOCK rung (full ALIGNED-buffer rows), written right after +# the CDEF pass and before superres/LR -- splits a final-output +# mismatch into "already in CDEF" vs "introduced by loop restoration" +# without the 16-bit-only DUMP16 rungs (lane-av1422filter: on the +# pinned 4:2:2 keyframe this named the 251/259-sample CDEF chroma +# defect whose first samples were the ticket's first final samples). # EC_TRACE_MODE_STEP=1 -> per-symbol range ladder inside # ec_read_intra_frame_mode_info_impl (rung 5's renamed body): # "EC_ISTEP mi_row=.. mi_col=.. name=skip val=.. rng=.." after @@ -832,3 +839,66 @@ s = s.replace(anchor, anchor + dump, 1) open(path, "w").write(s) print("decodemv rung 14 (per-entry EC_STACK) instrumented") PYST + +# --- rung 15: post-CDEF, pre-superres 8-bit row dump (lane-av1422filter) --- +# The 8-bit mirror of rung 6 one stage later: written right after the CDEF +# pass (the `if (do_cdef) {...}` block) and before superres/LR, so a final +# chroma/luma mismatch splits into "already in CDEF" vs "introduced by +# loop restoration". The *_DUMP16 family covers this stage only in 16-bit +# builds (its 8-bit run SEGFAULTS); this rung is the 8-bit one. lane- +# av1422filter added it to the live oracle tree by hand first, then it was +# transcribed here (class: instrument that lives only in a build tree). +python3 - "$F" <<'PYC' +import sys +path = sys.argv[1] +s = open(path).read() +if "EC_INSTRUMENTED_POSTCDEF" in s: + print("postcdef dump already instrumented (no-op)") + sys.exit(0) + +anchor = """ if (do_cdef) { + if (pbi->num_workers > 1) { + av1_cdef_frame_mt(cm, &pbi->dcb.xd, pbi->cdef_worker, + pbi->tile_workers, &pbi->cdef_sync, + pbi->num_workers, av1_cdef_init_fb_row_mt, + do_extend_border_mt); + } else { + av1_cdef_frame(&pbi->common.cur_frame->buf, cm, &pbi->dcb.xd, + av1_cdef_init_fb_row); + } + } +""" +dump = """ + /* EC_INSTRUMENTED_POSTCDEF (8-bit twin of the POSTDEBLOCK rung: + * full aligned buffer, post-CDEF pre-superres/LR) */ + { + const char *ec_dump = getenv("EC_AV1_POSTCDEF_DUMP"); + if (ec_dump) { + static int ec_postcdef_idx = 0; + char ec_path[1024]; + snprintf(ec_path, sizeof(ec_path), "%s.f%d", ec_dump, + ec_postcdef_idx++); + FILE *ec_f = fopen(ec_path, "wb"); + if (ec_f) { + const YV12_BUFFER_CONFIG *ec_b = &cm->cur_frame->buf; + for (int ec_r = 0; ec_r < ec_b->y_height; ++ec_r) + fwrite(ec_b->y_buffer + ec_r * ec_b->y_stride, 1, ec_b->y_width, + ec_f); + if (num_planes > 1) { + for (int ec_r = 0; ec_r < ec_b->uv_height; ++ec_r) + fwrite(ec_b->u_buffer + ec_r * ec_b->uv_stride, 1, + ec_b->uv_width, ec_f); + for (int ec_r = 0; ec_r < ec_b->uv_height; ++ec_r) + fwrite(ec_b->v_buffer + ec_r * ec_b->uv_stride, 1, + ec_b->uv_width, ec_f); + } + fclose(ec_f); + } + } + } +""" +assert anchor in s, "do_cdef block anchor moved" +s = s.replace(anchor, anchor + dump, 1) +open(path, "w").write(s) +print("postcdef dump instrumented") +PYC