biari.asm 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540
  1. .686
  2. .XMM
  3. .model FLAT
  4. ; Slice
  5. tex_ctx@Slice = 100
  6. coeff@Slice = 15632
  7. coeff_ctr@Slice = 15760
  8. pos@Slice = 15764
  9. last_dquant@Slice = 88
  10. mot_ctx@Slice = 96
  11. slice_type@Slice = 64
  12. ; VideoParameters
  13. structure@VideoParameters = 697200
  14. dec_picture@VideoParameters = 698192
  15. bitdepth_chroma_qp_scale@VideoParameters = 697456
  16. ; Macroblock
  17. p_Slice@Macroblock = 0
  18. p_Vid@Macroblock = 4
  19. qp@macroblock = 60
  20. qp_scaled@Macroblock = 72
  21. mb_field@Macroblock = 344
  22. read_and_store_CBP_block_bit@Macroblock = 400
  23. ; StorablePicture
  24. structure@StorablePicture = 0
  25. chroma_qp_offset@StorablePicture = 158688
  26. ; TextureInfoContexts
  27. map_contexts@TextureInfoContexts = 436
  28. last_contexts@TextureInfoContexts = 3252
  29. one_contexts@TextureInfoContexts = 6068
  30. abs_contexts@TextureInfoContexts = 6508
  31. _DATA SEGMENT
  32. _pos2ctx_map DD FLAT:_pos2ctx_map4x4
  33. DD FLAT:_pos2ctx_map4x4
  34. DD FLAT:_pos2ctx_map8x8
  35. DD FLAT:_pos2ctx_map8x4
  36. DD FLAT:_pos2ctx_map8x4
  37. DD FLAT:_pos2ctx_map4x4
  38. DD FLAT:_pos2ctx_map4x4
  39. DD FLAT:_pos2ctx_map4x4
  40. DD FLAT:_pos2ctx_map2x4c
  41. DD FLAT:_pos2ctx_map4x4c
  42. DD FLAT:_pos2ctx_map4x4
  43. DD FLAT:_pos2ctx_map4x4
  44. DD FLAT:_pos2ctx_map8x8
  45. DD FLAT:_pos2ctx_map8x4
  46. DD FLAT:_pos2ctx_map8x4
  47. DD FLAT:_pos2ctx_map4x4
  48. DD FLAT:_pos2ctx_map4x4
  49. DD FLAT:_pos2ctx_map4x4
  50. DD FLAT:_pos2ctx_map8x8
  51. DD FLAT:_pos2ctx_map8x4
  52. DD FLAT:_pos2ctx_map8x4
  53. DD FLAT:_pos2ctx_map4x4
  54. _pos2ctx_map_int DD FLAT:_pos2ctx_map4x4
  55. DD FLAT:_pos2ctx_map4x4
  56. DD FLAT:_pos2ctx_map8x8i
  57. DD FLAT:_pos2ctx_map8x4i
  58. DD FLAT:_pos2ctx_map4x8i
  59. DD FLAT:_pos2ctx_map4x4
  60. DD FLAT:_pos2ctx_map4x4
  61. DD FLAT:_pos2ctx_map4x4
  62. DD FLAT:_pos2ctx_map2x4c
  63. DD FLAT:_pos2ctx_map4x4c
  64. DD FLAT:_pos2ctx_map4x4
  65. DD FLAT:_pos2ctx_map4x4
  66. DD FLAT:_pos2ctx_map8x8i
  67. DD FLAT:_pos2ctx_map8x4i
  68. DD FLAT:_pos2ctx_map8x4i
  69. DD FLAT:_pos2ctx_map4x4
  70. DD FLAT:_pos2ctx_map4x4
  71. DD FLAT:_pos2ctx_map4x4
  72. DD FLAT:_pos2ctx_map8x8i
  73. DD FLAT:_pos2ctx_map8x4i
  74. DD FLAT:_pos2ctx_map8x4i
  75. DD FLAT:_pos2ctx_map4x4
  76. _pos2ctx_last DD FLAT:_pos2ctx_last4x4
  77. DD FLAT:_pos2ctx_last4x4
  78. DD FLAT:_pos2ctx_last8x8
  79. DD FLAT:_pos2ctx_last8x4
  80. DD FLAT:_pos2ctx_last8x4
  81. DD FLAT:_pos2ctx_last4x4
  82. DD FLAT:_pos2ctx_last4x4
  83. DD FLAT:_pos2ctx_last4x4
  84. DD FLAT:_pos2ctx_last2x4c
  85. DD FLAT:_pos2ctx_last4x4c
  86. DD FLAT:_pos2ctx_last4x4
  87. DD FLAT:_pos2ctx_last4x4
  88. DD FLAT:_pos2ctx_last8x8
  89. DD FLAT:_pos2ctx_last8x4
  90. DD FLAT:_pos2ctx_last8x4
  91. DD FLAT:_pos2ctx_last4x4
  92. DD FLAT:_pos2ctx_last4x4
  93. DD FLAT:_pos2ctx_last4x4
  94. DD FLAT:_pos2ctx_last8x8
  95. DD FLAT:_pos2ctx_last8x4
  96. DD FLAT:_pos2ctx_last8x4
  97. DD FLAT:_pos2ctx_last4x4
  98. _DATA ENDS
  99. CONST SEGMENT
  100. _rLPS_table_64x4 DB 080H
  101. DB 080H
  102. DB 080H
  103. DB 07bH
  104. DB 074H
  105. DB 06fH
  106. DB 069H
  107. DB 064H
  108. DB 05fH
  109. DB 05aH
  110. DB 055H
  111. DB 051H
  112. DB 04dH
  113. DB 049H
  114. DB 045H
  115. DB 042H
  116. DB 03eH
  117. DB 03bH
  118. DB 038H
  119. DB 035H
  120. DB 033H
  121. DB 030H
  122. DB 02eH
  123. DB 02bH
  124. DB 029H
  125. DB 027H
  126. DB 025H
  127. DB 023H
  128. DB 021H
  129. DB 020H
  130. DB 01eH
  131. DB 01dH
  132. DB 01bH
  133. DB 01aH
  134. DB 018H
  135. DB 017H
  136. DB 016H
  137. DB 015H
  138. DB 014H
  139. DB 013H
  140. DB 012H
  141. DB 011H
  142. DB 010H
  143. DB 0fH
  144. DB 0eH
  145. DB 0eH
  146. DB 0dH
  147. DB 0cH
  148. DB 0cH
  149. DB 0bH
  150. DB 0bH
  151. DB 0aH
  152. DB 0aH
  153. DB 09H
  154. DB 09H
  155. DB 08H
  156. DB 08H
  157. DB 07H
  158. DB 07H
  159. DB 07H
  160. DB 06H
  161. DB 06H
  162. DB 06H
  163. DB 02H
  164. DB 0b0H
  165. DB 0a7H
  166. DB 09eH
  167. DB 096H
  168. DB 08eH
  169. DB 087H
  170. DB 080H
  171. DB 07aH
  172. DB 074H
  173. DB 06eH
  174. DB 068H
  175. DB 063H
  176. DB 05eH
  177. DB 059H
  178. DB 055H
  179. DB 050H
  180. DB 04cH
  181. DB 048H
  182. DB 045H
  183. DB 041H
  184. DB 03eH
  185. DB 03bH
  186. DB 038H
  187. DB 035H
  188. DB 032H
  189. DB 030H
  190. DB 02dH
  191. DB 02bH
  192. DB 029H
  193. DB 027H
  194. DB 025H
  195. DB 023H
  196. DB 021H
  197. DB 01fH
  198. DB 01eH
  199. DB 01cH
  200. DB 01bH
  201. DB 01aH
  202. DB 018H
  203. DB 017H
  204. DB 016H
  205. DB 015H
  206. DB 014H
  207. DB 013H
  208. DB 012H
  209. DB 011H
  210. DB 010H
  211. DB 0fH
  212. DB 0eH
  213. DB 0eH
  214. DB 0dH
  215. DB 0cH
  216. DB 0cH
  217. DB 0bH
  218. DB 0bH
  219. DB 0aH
  220. DB 09H
  221. DB 09H
  222. DB 09H
  223. DB 08H
  224. DB 08H
  225. DB 07H
  226. DB 07H
  227. DB 02H
  228. DB 0d0H
  229. DB 0c5H
  230. DB 0bbH
  231. DB 0b2H
  232. DB 0a9H
  233. DB 0a0H
  234. DB 098H
  235. DB 090H
  236. DB 089H
  237. DB 082H
  238. DB 07bH
  239. DB 075H
  240. DB 06fH
  241. DB 069H
  242. DB 064H
  243. DB 05fH
  244. DB 05aH
  245. DB 056H
  246. DB 051H
  247. DB 04dH
  248. DB 049H
  249. DB 045H
  250. DB 042H
  251. DB 03fH
  252. DB 03bH
  253. DB 038H
  254. DB 036H
  255. DB 033H
  256. DB 030H
  257. DB 02eH
  258. DB 02bH
  259. DB 029H
  260. DB 027H
  261. DB 025H
  262. DB 023H
  263. DB 021H
  264. DB 020H
  265. DB 01eH
  266. DB 01dH
  267. DB 01bH
  268. DB 01aH
  269. DB 019H
  270. DB 017H
  271. DB 016H
  272. DB 015H
  273. DB 014H
  274. DB 013H
  275. DB 012H
  276. DB 011H
  277. DB 010H
  278. DB 0fH
  279. DB 0fH
  280. DB 0eH
  281. DB 0dH
  282. DB 0cH
  283. DB 0cH
  284. DB 0bH
  285. DB 0bH
  286. DB 0aH
  287. DB 0aH
  288. DB 09H
  289. DB 09H
  290. DB 08H
  291. DB 02H
  292. DB 0f0H
  293. DB 0e3H
  294. DB 0d8H
  295. DB 0cdH
  296. DB 0c3H
  297. DB 0b9H
  298. DB 0afH
  299. DB 0a6H
  300. DB 09eH
  301. DB 096H
  302. DB 08eH
  303. DB 087H
  304. DB 080H
  305. DB 07aH
  306. DB 074H
  307. DB 06eH
  308. DB 068H
  309. DB 063H
  310. DB 05eH
  311. DB 059H
  312. DB 055H
  313. DB 050H
  314. DB 04cH
  315. DB 048H
  316. DB 045H
  317. DB 041H
  318. DB 03eH
  319. DB 03bH
  320. DB 038H
  321. DB 035H
  322. DB 032H
  323. DB 030H
  324. DB 02dH
  325. DB 02bH
  326. DB 029H
  327. DB 027H
  328. DB 025H
  329. DB 023H
  330. DB 021H
  331. DB 01fH
  332. DB 01eH
  333. DB 01cH
  334. DB 01bH
  335. DB 019H
  336. DB 018H
  337. DB 017H
  338. DB 016H
  339. DB 015H
  340. DB 014H
  341. DB 013H
  342. DB 012H
  343. DB 011H
  344. DB 010H
  345. DB 0fH
  346. DB 0eH
  347. DB 0eH
  348. DB 0dH
  349. DB 0cH
  350. DB 0cH
  351. DB 0bH
  352. DB 0bH
  353. DB 0aH
  354. DB 09H
  355. DB 02H
  356. _AC_next_state_MPS_64 DB 01H
  357. DB 02H
  358. DB 03H
  359. DB 04H
  360. DB 05H
  361. DB 06H
  362. DB 07H
  363. DB 08H
  364. DB 09H
  365. DB 0aH
  366. DB 0bH
  367. DB 0cH
  368. DB 0dH
  369. DB 0eH
  370. DB 0fH
  371. DB 010H
  372. DB 011H
  373. DB 012H
  374. DB 013H
  375. DB 014H
  376. DB 015H
  377. DB 016H
  378. DB 017H
  379. DB 018H
  380. DB 019H
  381. DB 01aH
  382. DB 01bH
  383. DB 01cH
  384. DB 01dH
  385. DB 01eH
  386. DB 01fH
  387. DB 020H
  388. DB 021H
  389. DB 022H
  390. DB 023H
  391. DB 024H
  392. DB 025H
  393. DB 026H
  394. DB 027H
  395. DB 028H
  396. DB 029H
  397. DB 02aH
  398. DB 02bH
  399. DB 02cH
  400. DB 02dH
  401. DB 02eH
  402. DB 02fH
  403. DB 030H
  404. DB 031H
  405. DB 032H
  406. DB 033H
  407. DB 034H
  408. DB 035H
  409. DB 036H
  410. DB 037H
  411. DB 038H
  412. DB 039H
  413. DB 03aH
  414. DB 03bH
  415. DB 03cH
  416. DB 03dH
  417. DB 03eH
  418. DB 03eH
  419. DB 03fH
  420. _AC_next_state_LPS_64 DB 00H
  421. DB 00H
  422. DB 01H
  423. DB 02H
  424. DB 02H
  425. DB 04H
  426. DB 04H
  427. DB 05H
  428. DB 06H
  429. DB 07H
  430. DB 08H
  431. DB 09H
  432. DB 09H
  433. DB 0bH
  434. DB 0bH
  435. DB 0cH
  436. DB 0dH
  437. DB 0dH
  438. DB 0fH
  439. DB 0fH
  440. DB 010H
  441. DB 010H
  442. DB 012H
  443. DB 012H
  444. DB 013H
  445. DB 013H
  446. DB 015H
  447. DB 015H
  448. DB 016H
  449. DB 016H
  450. DB 017H
  451. DB 018H
  452. DB 018H
  453. DB 019H
  454. DB 01aH
  455. DB 01aH
  456. DB 01bH
  457. DB 01bH
  458. DB 01cH
  459. DB 01dH
  460. DB 01dH
  461. DB 01eH
  462. DB 01eH
  463. DB 01eH
  464. DB 01fH
  465. DB 020H
  466. DB 020H
  467. DB 021H
  468. DB 021H
  469. DB 021H
  470. DB 022H
  471. DB 022H
  472. DB 023H
  473. DB 023H
  474. DB 023H
  475. DB 024H
  476. DB 024H
  477. DB 024H
  478. DB 025H
  479. DB 025H
  480. DB 025H
  481. DB 026H
  482. DB 026H
  483. DB 03fH
  484. _renorm_table_32 DB 06H
  485. DB 05H
  486. DB 04H
  487. DB 04H
  488. DB 03H
  489. DB 03H
  490. DB 03H
  491. DB 03H
  492. DB 02H
  493. DB 02H
  494. DB 02H
  495. DB 02H
  496. DB 02H
  497. DB 02H
  498. DB 02H
  499. DB 02H
  500. DB 01H
  501. DB 01H
  502. DB 01H
  503. DB 01H
  504. DB 01H
  505. DB 01H
  506. DB 01H
  507. DB 01H
  508. DB 01H
  509. DB 01H
  510. DB 01H
  511. DB 01H
  512. DB 01H
  513. DB 01H
  514. DB 01H
  515. DB 01H
  516. _renorm_table_256 DB 06H
  517. DB 06H
  518. DB 06H
  519. DB 06H
  520. DB 06H
  521. DB 06H
  522. DB 06H
  523. DB 06H
  524. DB 05H
  525. DB 05H
  526. DB 05H
  527. DB 05H
  528. DB 05H
  529. DB 05H
  530. DB 05H
  531. DB 05H
  532. DB 04H
  533. DB 04H
  534. DB 04H
  535. DB 04H
  536. DB 04H
  537. DB 04H
  538. DB 04H
  539. DB 04H
  540. DB 04H
  541. DB 04H
  542. DB 04H
  543. DB 04H
  544. DB 04H
  545. DB 04H
  546. DB 04H
  547. DB 04H
  548. DB 03H
  549. DB 03H
  550. DB 03H
  551. DB 03H
  552. DB 03H
  553. DB 03H
  554. DB 03H
  555. DB 03H
  556. DB 03H
  557. DB 03H
  558. DB 03H
  559. DB 03H
  560. DB 03H
  561. DB 03H
  562. DB 03H
  563. DB 03H
  564. DB 03H
  565. DB 03H
  566. DB 03H
  567. DB 03H
  568. DB 03H
  569. DB 03H
  570. DB 03H
  571. DB 03H
  572. DB 03H
  573. DB 03H
  574. DB 03H
  575. DB 03H
  576. DB 03H
  577. DB 03H
  578. DB 03H
  579. DB 03H
  580. DB 02H
  581. DB 02H
  582. DB 02H
  583. DB 02H
  584. DB 02H
  585. DB 02H
  586. DB 02H
  587. DB 02H
  588. DB 02H
  589. DB 02H
  590. DB 02H
  591. DB 02H
  592. DB 02H
  593. DB 02H
  594. DB 02H
  595. DB 02H
  596. DB 02H
  597. DB 02H
  598. DB 02H
  599. DB 02H
  600. DB 02H
  601. DB 02H
  602. DB 02H
  603. DB 02H
  604. DB 02H
  605. DB 02H
  606. DB 02H
  607. DB 02H
  608. DB 02H
  609. DB 02H
  610. DB 02H
  611. DB 02H
  612. DB 02H
  613. DB 02H
  614. DB 02H
  615. DB 02H
  616. DB 02H
  617. DB 02H
  618. DB 02H
  619. DB 02H
  620. DB 02H
  621. DB 02H
  622. DB 02H
  623. DB 02H
  624. DB 02H
  625. DB 02H
  626. DB 02H
  627. DB 02H
  628. DB 02H
  629. DB 02H
  630. DB 02H
  631. DB 02H
  632. DB 02H
  633. DB 02H
  634. DB 02H
  635. DB 02H
  636. DB 02H
  637. DB 02H
  638. DB 02H
  639. DB 02H
  640. DB 02H
  641. DB 02H
  642. DB 02H
  643. DB 02H
  644. DB 01H
  645. DB 01H
  646. DB 01H
  647. DB 01H
  648. DB 01H
  649. DB 01H
  650. DB 01H
  651. DB 01H
  652. DB 01H
  653. DB 01H
  654. DB 01H
  655. DB 01H
  656. DB 01H
  657. DB 01H
  658. DB 01H
  659. DB 01H
  660. DB 01H
  661. DB 01H
  662. DB 01H
  663. DB 01H
  664. DB 01H
  665. DB 01H
  666. DB 01H
  667. DB 01H
  668. DB 01H
  669. DB 01H
  670. DB 01H
  671. DB 01H
  672. DB 01H
  673. DB 01H
  674. DB 01H
  675. DB 01H
  676. DB 01H
  677. DB 01H
  678. DB 01H
  679. DB 01H
  680. DB 01H
  681. DB 01H
  682. DB 01H
  683. DB 01H
  684. DB 01H
  685. DB 01H
  686. DB 01H
  687. DB 01H
  688. DB 01H
  689. DB 01H
  690. DB 01H
  691. DB 01H
  692. DB 01H
  693. DB 01H
  694. DB 01H
  695. DB 01H
  696. DB 01H
  697. DB 01H
  698. DB 01H
  699. DB 01H
  700. DB 01H
  701. DB 01H
  702. DB 01H
  703. DB 01H
  704. DB 01H
  705. DB 01H
  706. DB 01H
  707. DB 01H
  708. DB 01H
  709. DB 01H
  710. DB 01H
  711. DB 01H
  712. DB 01H
  713. DB 01H
  714. DB 01H
  715. DB 01H
  716. DB 01H
  717. DB 01H
  718. DB 01H
  719. DB 01H
  720. DB 01H
  721. DB 01H
  722. DB 01H
  723. DB 01H
  724. DB 01H
  725. DB 01H
  726. DB 01H
  727. DB 01H
  728. DB 01H
  729. DB 01H
  730. DB 01H
  731. DB 01H
  732. DB 01H
  733. DB 01H
  734. DB 01H
  735. DB 01H
  736. DB 01H
  737. DB 01H
  738. DB 01H
  739. DB 01H
  740. DB 01H
  741. DB 01H
  742. DB 01H
  743. DB 01H
  744. DB 01H
  745. DB 01H
  746. DB 01H
  747. DB 01H
  748. DB 01H
  749. DB 01H
  750. DB 01H
  751. DB 01H
  752. DB 01H
  753. DB 01H
  754. DB 01H
  755. DB 01H
  756. DB 01H
  757. DB 01H
  758. DB 01H
  759. DB 01H
  760. DB 01H
  761. DB 01H
  762. DB 01H
  763. DB 01H
  764. DB 01H
  765. DB 01H
  766. DB 01H
  767. DB 01H
  768. DB 01H
  769. DB 01H
  770. DB 01H
  771. DB 01H
  772. _maxpos DB 0fH
  773. DB 0eH
  774. DB 03fH
  775. DB 01fH
  776. DB 01fH
  777. DB 0fH
  778. DB 03H
  779. DB 0eH
  780. DB 07H
  781. DB 0fH
  782. DB 0fH
  783. DB 0eH
  784. DB 03fH
  785. DB 01fH
  786. DB 01fH
  787. DB 0fH
  788. DB 0fH
  789. DB 0eH
  790. DB 03fH
  791. DB 01fH
  792. DB 01fH
  793. DB 0fH
  794. ORG $+2
  795. _c1isdc DB 01H
  796. DB 00H
  797. DB 01H
  798. DB 01H
  799. DB 01H
  800. DB 01H
  801. DB 01H
  802. DB 00H
  803. DB 01H
  804. DB 01H
  805. DB 01H
  806. DB 00H
  807. DB 01H
  808. DB 01H
  809. DB 01H
  810. DB 01H
  811. DB 01H
  812. DB 00H
  813. DB 01H
  814. DB 01H
  815. DB 01H
  816. DB 01H
  817. ORG $+2
  818. _type2ctx_bcbp DB 00H
  819. DB 01H
  820. DB 02H
  821. DB 03H
  822. DB 03H
  823. DB 04H
  824. DB 05H
  825. DB 06H
  826. DB 05H
  827. DB 05H
  828. DB 0aH
  829. DB 0bH
  830. DB 0cH
  831. DB 0dH
  832. DB 0dH
  833. DB 0eH
  834. DB 010H
  835. DB 011H
  836. DB 012H
  837. DB 013H
  838. DB 013H
  839. DB 014H
  840. ORG $+2
  841. _type2ctx_map DW 00H
  842. DW 010H
  843. DW 020H
  844. DW 030H
  845. DW 040H
  846. DW 050H
  847. DW 060H
  848. DW 070H
  849. DW 060H
  850. DW 060H
  851. DW 0A0H
  852. DW 0B0H
  853. DW 0C0H
  854. DW 0D0H
  855. DW 0E0H
  856. DW 0F0H
  857. DW 0100H
  858. DW 0110H
  859. DW 0120H
  860. DW 0130H
  861. DW 0140H
  862. DW 0150H
  863. ORG $+2
  864. _type2ctx_last DW 00H
  865. DW 010H
  866. DW 020H
  867. DW 030H
  868. DW 040H
  869. DW 050H
  870. DW 060H
  871. DW 070H
  872. DW 060H
  873. DW 060H
  874. DW 0A0H
  875. DW 0B0H
  876. DW 0C0H
  877. DW 0D0H
  878. DW 0E0H
  879. DW 0F0H
  880. DW 0100H
  881. DW 0110H
  882. DW 0120H
  883. DW 0130H
  884. DW 0140H
  885. DW 0150H
  886. ORG $+2
  887. _type2ctx_one DB 00H
  888. DB 01H
  889. DB 02H
  890. DB 03H
  891. DB 03H
  892. DB 04H
  893. DB 05H
  894. DB 06H
  895. DB 05H
  896. DB 05H
  897. DB 0aH
  898. DB 0bH
  899. DB 0cH
  900. DB 0dH
  901. DB 0dH
  902. DB 0eH
  903. DB 010H
  904. DB 011H
  905. DB 012H
  906. DB 013H
  907. DB 013H
  908. DB 014H
  909. ORG $+2
  910. _type2ctx_abs DB 00H
  911. DB 01H
  912. DB 02H
  913. DB 03H
  914. DB 03H
  915. DB 04H
  916. DB 05H
  917. DB 06H
  918. DB 05H
  919. DB 05H
  920. DB 0aH
  921. DB 0bH
  922. DB 0cH
  923. DB 0dH
  924. DB 0dH
  925. DB 0eH
  926. DB 010H
  927. DB 011H
  928. DB 012H
  929. DB 013H
  930. DB 013H
  931. DB 014H
  932. ORG $+2
  933. plus_one_clip4 DD 1,2,3,4,4
  934. plus_one_clip3 DD 1,2,3,3
  935. _max_c2 DD plus_one_clip4
  936. DD plus_one_clip4
  937. DD plus_one_clip4
  938. DD plus_one_clip4
  939. DD plus_one_clip4
  940. DD plus_one_clip4
  941. DD plus_one_clip3
  942. DD plus_one_clip4
  943. DD plus_one_clip3
  944. DD plus_one_clip4
  945. DD plus_one_clip4
  946. DD plus_one_clip4
  947. DD plus_one_clip4
  948. DD plus_one_clip4
  949. DD plus_one_clip4
  950. DD plus_one_clip4
  951. DD plus_one_clip4
  952. DD plus_one_clip4
  953. DD plus_one_clip4
  954. DD plus_one_clip4
  955. DD plus_one_clip4
  956. DD plus_one_clip4
  957. ORG $+6
  958. _pos2ctx_map8x8 DB 00H
  959. DB 01H
  960. DB 02H
  961. DB 03H
  962. DB 04H
  963. DB 05H
  964. DB 05H
  965. DB 04H
  966. DB 04H
  967. DB 03H
  968. DB 03H
  969. DB 04H
  970. DB 04H
  971. DB 04H
  972. DB 05H
  973. DB 05H
  974. DB 04H
  975. DB 04H
  976. DB 04H
  977. DB 04H
  978. DB 03H
  979. DB 03H
  980. DB 06H
  981. DB 07H
  982. DB 07H
  983. DB 07H
  984. DB 08H
  985. DB 09H
  986. DB 0aH
  987. DB 09H
  988. DB 08H
  989. DB 07H
  990. DB 07H
  991. DB 06H
  992. DB 0bH
  993. DB 0cH
  994. DB 0dH
  995. DB 0bH
  996. DB 06H
  997. DB 07H
  998. DB 08H
  999. DB 09H
  1000. DB 0eH
  1001. DB 0aH
  1002. DB 09H
  1003. DB 08H
  1004. DB 06H
  1005. DB 0bH
  1006. DB 0cH
  1007. DB 0dH
  1008. DB 0bH
  1009. DB 06H
  1010. DB 09H
  1011. DB 0eH
  1012. DB 0aH
  1013. DB 09H
  1014. DB 0bH
  1015. DB 0cH
  1016. DB 0dH
  1017. DB 0bH
  1018. DB 0eH
  1019. DB 0aH
  1020. DB 0cH
  1021. DB 0eH
  1022. _pos2ctx_map8x4 DB 00H
  1023. DB 01H
  1024. DB 02H
  1025. DB 03H
  1026. DB 04H
  1027. DB 05H
  1028. DB 07H
  1029. DB 08H
  1030. DB 09H
  1031. DB 0aH
  1032. DB 0bH
  1033. DB 09H
  1034. DB 08H
  1035. DB 06H
  1036. DB 07H
  1037. DB 08H
  1038. DB 09H
  1039. DB 0aH
  1040. DB 0bH
  1041. DB 09H
  1042. DB 08H
  1043. DB 06H
  1044. DB 0cH
  1045. DB 08H
  1046. DB 09H
  1047. DB 0aH
  1048. DB 0bH
  1049. DB 09H
  1050. DB 0dH
  1051. DB 0dH
  1052. DB 0eH
  1053. DB 0eH
  1054. _pos2ctx_map4x4 DB 00H
  1055. DB 01H
  1056. DB 02H
  1057. DB 03H
  1058. DB 04H
  1059. DB 05H
  1060. DB 06H
  1061. DB 07H
  1062. DB 08H
  1063. DB 09H
  1064. DB 0aH
  1065. DB 0bH
  1066. DB 0cH
  1067. DB 0dH
  1068. DB 0eH
  1069. DB 0eH
  1070. _pos2ctx_map2x4c DB 00H
  1071. DB 00H
  1072. DB 01H
  1073. DB 01H
  1074. DB 02H
  1075. DB 02H
  1076. DB 02H
  1077. DB 02H
  1078. DB 02H
  1079. DB 02H
  1080. DB 02H
  1081. DB 02H
  1082. DB 02H
  1083. DB 02H
  1084. DB 02H
  1085. DB 02H
  1086. _pos2ctx_map4x4c DB 00H
  1087. DB 00H
  1088. DB 00H
  1089. DB 00H
  1090. DB 01H
  1091. DB 01H
  1092. DB 01H
  1093. DB 01H
  1094. DB 02H
  1095. DB 02H
  1096. DB 02H
  1097. DB 02H
  1098. DB 02H
  1099. DB 02H
  1100. DB 02H
  1101. DB 02H
  1102. _pos2ctx_map8x8i DB 00H
  1103. DB 01H
  1104. DB 01H
  1105. DB 02H
  1106. DB 02H
  1107. DB 03H
  1108. DB 03H
  1109. DB 04H
  1110. DB 05H
  1111. DB 06H
  1112. DB 07H
  1113. DB 07H
  1114. DB 07H
  1115. DB 08H
  1116. DB 04H
  1117. DB 05H
  1118. DB 06H
  1119. DB 09H
  1120. DB 0aH
  1121. DB 0aH
  1122. DB 08H
  1123. DB 0bH
  1124. DB 0cH
  1125. DB 0bH
  1126. DB 09H
  1127. DB 09H
  1128. DB 0aH
  1129. DB 0aH
  1130. DB 08H
  1131. DB 0bH
  1132. DB 0cH
  1133. DB 0bH
  1134. DB 09H
  1135. DB 09H
  1136. DB 0aH
  1137. DB 0aH
  1138. DB 08H
  1139. DB 0bH
  1140. DB 0cH
  1141. DB 0bH
  1142. DB 09H
  1143. DB 09H
  1144. DB 0aH
  1145. DB 0aH
  1146. DB 08H
  1147. DB 0dH
  1148. DB 0dH
  1149. DB 09H
  1150. DB 09H
  1151. DB 0aH
  1152. DB 0aH
  1153. DB 08H
  1154. DB 0dH
  1155. DB 0dH
  1156. DB 09H
  1157. DB 09H
  1158. DB 0aH
  1159. DB 0aH
  1160. DB 0eH
  1161. DB 0eH
  1162. DB 0eH
  1163. DB 0eH
  1164. DB 0eH
  1165. DB 0eH
  1166. _pos2ctx_map8x4i DB 00H
  1167. DB 01H
  1168. DB 02H
  1169. DB 03H
  1170. DB 04H
  1171. DB 05H
  1172. DB 06H
  1173. DB 03H
  1174. DB 04H
  1175. DB 05H
  1176. DB 06H
  1177. DB 03H
  1178. DB 04H
  1179. DB 07H
  1180. DB 06H
  1181. DB 08H
  1182. DB 09H
  1183. DB 07H
  1184. DB 06H
  1185. DB 08H
  1186. DB 09H
  1187. DB 0aH
  1188. DB 0bH
  1189. DB 0cH
  1190. DB 0cH
  1191. DB 0aH
  1192. DB 0bH
  1193. DB 0dH
  1194. DB 0dH
  1195. DB 0eH
  1196. DB 0eH
  1197. DB 0eH
  1198. _pos2ctx_map4x8i DB 00H
  1199. DB 01H
  1200. DB 01H
  1201. DB 01H
  1202. DB 02H
  1203. DB 03H
  1204. DB 03H
  1205. DB 04H
  1206. DB 04H
  1207. DB 04H
  1208. DB 05H
  1209. DB 06H
  1210. DB 02H
  1211. DB 07H
  1212. DB 07H
  1213. DB 08H
  1214. DB 08H
  1215. DB 08H
  1216. DB 05H
  1217. DB 06H
  1218. DB 09H
  1219. DB 0aH
  1220. DB 0aH
  1221. DB 0bH
  1222. DB 0bH
  1223. DB 0bH
  1224. DB 0cH
  1225. DB 0dH
  1226. DB 0dH
  1227. DB 0eH
  1228. DB 0eH
  1229. DB 0eH
  1230. _pos2ctx_last8x8 DB 00H
  1231. DB 01H
  1232. DB 01H
  1233. DB 01H
  1234. DB 01H
  1235. DB 01H
  1236. DB 01H
  1237. DB 01H
  1238. DB 01H
  1239. DB 01H
  1240. DB 01H
  1241. DB 01H
  1242. DB 01H
  1243. DB 01H
  1244. DB 01H
  1245. DB 01H
  1246. DB 02H
  1247. DB 02H
  1248. DB 02H
  1249. DB 02H
  1250. DB 02H
  1251. DB 02H
  1252. DB 02H
  1253. DB 02H
  1254. DB 02H
  1255. DB 02H
  1256. DB 02H
  1257. DB 02H
  1258. DB 02H
  1259. DB 02H
  1260. DB 02H
  1261. DB 02H
  1262. DB 03H
  1263. DB 03H
  1264. DB 03H
  1265. DB 03H
  1266. DB 03H
  1267. DB 03H
  1268. DB 03H
  1269. DB 03H
  1270. DB 04H
  1271. DB 04H
  1272. DB 04H
  1273. DB 04H
  1274. DB 04H
  1275. DB 04H
  1276. DB 04H
  1277. DB 04H
  1278. DB 05H
  1279. DB 05H
  1280. DB 05H
  1281. DB 05H
  1282. DB 06H
  1283. DB 06H
  1284. DB 06H
  1285. DB 06H
  1286. DB 07H
  1287. DB 07H
  1288. DB 07H
  1289. DB 07H
  1290. DB 08H
  1291. DB 08H
  1292. DB 08H
  1293. DB 08H
  1294. _pos2ctx_last8x4 DB 00H
  1295. DB 01H
  1296. DB 01H
  1297. DB 01H
  1298. DB 01H
  1299. DB 01H
  1300. DB 01H
  1301. DB 01H
  1302. DB 02H
  1303. DB 02H
  1304. DB 02H
  1305. DB 02H
  1306. DB 02H
  1307. DB 02H
  1308. DB 02H
  1309. DB 02H
  1310. DB 03H
  1311. DB 03H
  1312. DB 03H
  1313. DB 03H
  1314. DB 04H
  1315. DB 04H
  1316. DB 04H
  1317. DB 04H
  1318. DB 05H
  1319. DB 05H
  1320. DB 06H
  1321. DB 06H
  1322. DB 07H
  1323. DB 07H
  1324. DB 08H
  1325. DB 08H
  1326. _pos2ctx_last4x4 DB 00H
  1327. DB 01H
  1328. DB 02H
  1329. DB 03H
  1330. DB 04H
  1331. DB 05H
  1332. DB 06H
  1333. DB 07H
  1334. DB 08H
  1335. DB 09H
  1336. DB 0aH
  1337. DB 0bH
  1338. DB 0cH
  1339. DB 0dH
  1340. DB 0eH
  1341. DB 0fH
  1342. _pos2ctx_last2x4c DB 00H
  1343. DB 00H
  1344. DB 01H
  1345. DB 01H
  1346. DB 02H
  1347. DB 02H
  1348. DB 02H
  1349. DB 02H
  1350. DB 02H
  1351. DB 02H
  1352. DB 02H
  1353. DB 02H
  1354. DB 02H
  1355. DB 02H
  1356. DB 02H
  1357. DB 02H
  1358. _pos2ctx_last4x4c DB 00, 00, 00, 00, 01, 01, 01, 01, 02, 02, 02, 02, 02, 02, 02, 02
  1359. plus_one_clip0_4 DD 0,2,3,4,4
  1360. align 16
  1361. _QP_SCALE_CR DD 00H
  1362. DD 01H
  1363. DD 02H
  1364. DD 03H
  1365. DD 04H
  1366. DD 05H
  1367. DD 06H
  1368. DD 07H
  1369. DD 08H
  1370. DD 09H
  1371. DD 0aH
  1372. DD 0bH
  1373. DD 0cH
  1374. DD 0dH
  1375. DD 0eH
  1376. DD 0fH
  1377. DD 010H
  1378. DD 011H
  1379. DD 012H
  1380. DD 013H
  1381. DD 014H
  1382. DD 015H
  1383. DD 016H
  1384. DD 017H
  1385. DD 018H
  1386. DD 019H
  1387. DD 01aH
  1388. DD 01bH
  1389. DD 01cH
  1390. DD 01dH
  1391. DD 01dH
  1392. DD 01eH
  1393. DD 01fH
  1394. DD 020H
  1395. DD 020H
  1396. DD 021H
  1397. DD 022H
  1398. DD 022H
  1399. DD 023H
  1400. DD 023H
  1401. DD 024H
  1402. DD 024H
  1403. DD 025H
  1404. DD 025H
  1405. DD 025H
  1406. DD 026H
  1407. DD 026H
  1408. DD 026H
  1409. DD 027H
  1410. DD 027H
  1411. DD 027H
  1412. DD 027H
  1413. align 16
  1414. _51 DD 51
  1415. CONST ENDS
  1416. PUBLIC _biari_decode_symbol
  1417. _TEXT SEGMENT
  1418. dep = 4 ; size = 4
  1419. bi_ct = 8 ; size = 4
  1420. _biari_decode_symbol PROC
  1421. STACKOFFSET=0
  1422. mov edx, DWORD PTR dep[esp+STACKOFFSET] ; edx = dep
  1423. STACKOFFSET=STACKOFFSET+4
  1424. push ebx
  1425. mov ebx, DWORD PTR bi_ct[esp+STACKOFFSET] ; ebx = bi_ct
  1426. movzx eax, WORD PTR [ebx] ; eax = state
  1427. push ebp
  1428. push edi
  1429. STACKOFFSET = STACKOFFSET+8
  1430. mov edi, DWORD PTR [edx] ; edi = range
  1431. mov ecx, edi ; ecx = range
  1432. and ecx, 0C0H ; range >>= 6
  1433. movzx ebp, BYTE PTR _rLPS_table_64x4[ecx+eax] ; ebp = rLPS
  1434. ; register state:
  1435. ; eax: state (bi_ct->state)
  1436. ; ebx: bi_ct
  1437. ; edx: dep
  1438. ; edi: range
  1439. ; ebp: rLPS
  1440. mov ecx, DWORD PTR [edx+8] ; ecx = bitsleft
  1441. sub edi, ebp ; range -= rLPS
  1442. shl edi, cl ; range << bitsleft
  1443. cmp DWORD PTR [edx+4], edi ; value < (range << bitsleft)
  1444. jge SHORT CABAC@LPS
  1445. movzx ax, BYTE PTR _AC_next_state_MPS_64[eax] ; eax = state = AC_next_state_MPS_64[state]
  1446. shr edi, cl ; undo earlier shift
  1447. mov WORD PTR [ebx], ax ; bi_ct->MPS = state
  1448. cmp edi, 256 ; 00000100H
  1449. setb cl
  1450. ; register state
  1451. ; eax: state
  1452. ; ebx: bi_ct
  1453. ; ecx: state (old)
  1454. ; edx: dep
  1455. ; edi: range
  1456. ; ebp: rLPS
  1457. shl edi, cl
  1458. sub DWORD PTR [edx+8], ecx ; dep->DbitsLeft--
  1459. mov DWORD PTR [edx], edi ; dep->Drange = range
  1460. movzx eax, BYTE PTR [ebx+2] ; return bit
  1461. jz SHORT READ_TWO_BYTES; if (dep->DbitsLeft==0)
  1462. pop edi
  1463. pop ebp
  1464. pop ebx
  1465. ret 0
  1466. align 16
  1467. CABAC@LPS:
  1468. sub DWORD PTR [edx+4], edi
  1469. movzx cx, BYTE PTR _AC_next_state_LPS_64[eax] ; cx: state = AC_next_state_LPS_64[state]
  1470. mov WORD PTR [ebx], cx ; store state back to bi_ct->MPS
  1471. ; register state:
  1472. ; eax: state (old)
  1473. ; ebx: bi_ct
  1474. ; ecx: state (new)
  1475. ; edx: dep
  1476. ; edi: range
  1477. ; ebp: rLPS
  1478. mov edi, ebx
  1479. test eax, eax ; if state(old) == 0
  1480. movzx ecx, BYTE PTR _renorm_table_256[ebp] ; ecx = renorm_table_32[rLPS>>3]
  1481. sete bl ; bl = 1 [ if state(old) == 0 ]
  1482. movzx eax, BYTE PTR [edi+2]
  1483. xor eax, 1
  1484. xor BYTE PTR [edi+2], bl ; al ^= bi_ct->state
  1485. ; register state:
  1486. ; eax: !state
  1487. ; ebx: bi_ct
  1488. ; ecx: renorm
  1489. ; edx: dep
  1490. ; edi: range
  1491. ; ebp: rLPS
  1492. shl ebp, cl ; ebp = range = rLPS <<= renorm
  1493. sub DWORD PTR [edx+8], ecx ; dep->DbitsLeft -= renorm;
  1494. mov DWORD PTR [edx], ebp ; dep->Drange = range;
  1495. jle SHORT READ_TWO_BYTES ; if( dep->DbitsLeft <= 0 )
  1496. ; register state:
  1497. ; eax: !state
  1498. ; ebx: bi_ct
  1499. ; ecx: renorm
  1500. ; edx: dep
  1501. ; edi: range
  1502. ; ebp: range = rLPS <<= renorm
  1503. pop edi
  1504. pop ebp
  1505. pop ebx
  1506. ret 0
  1507. align 16
  1508. READ_TWO_BYTES:
  1509. ; register state:
  1510. ; eax: !state
  1511. ; ebx: bi_ct
  1512. ; ecx: renorm
  1513. ; edx: dep
  1514. ; edi: range
  1515. mov ebx, DWORD PTR [edx+16] ; eax = dep->Dcodestrm_len
  1516. mov ecx, DWORD PTR [ebx] ; ecx = *dep->Dcodestrm_len
  1517. lea edi, DWORD PTR [ecx+2] ; edi = *dep->Dcodestrm_len + 2
  1518. mov DWORD PTR [ebx], edi ; *dep->Dcodestrm_len += 2
  1519. mov ebx, DWORD PTR [edx+12] ; edx = dep->Dcodestrm
  1520. movzx ecx, WORD PTR [ebx+ecx]
  1521. xchg cl, ch
  1522. shl DWORD PTR [edx+4], 16
  1523. mov WORD PTR [edx+4], cx
  1524. add DWORD PTR [edx+8], 16 ; dep->DbitsLeft += 16
  1525. ;mov eax, DWORD PTR _bit$[esp+STACKOFFSET] ; eax = bit = return value
  1526. pop edi
  1527. pop ebp
  1528. pop ebx
  1529. ret 0
  1530. _biari_decode_symbol ENDP
  1531. _TEXT ENDS
  1532. ;
  1533. ;
  1534. ; a version of biari_decode_symbol slightly optimized
  1535. ; pass dep in edx and ctx in eax. edx retains dep on exit
  1536. _TEXT SEGMENT
  1537. _biari_decode_symbol_map PROC NEAR
  1538. STACKOFFSET=0
  1539. push ebx
  1540. STACKOFFSET=4
  1541. movzx ebx, WORD PTR [eax] ; ebx = state
  1542. push ebp
  1543. push edi
  1544. STACKOFFSET = 12
  1545. mov edi, DWORD PTR [edx] ; edi = range
  1546. mov ecx, edi ; ecx = range
  1547. and ecx, 0C0H ; range >>= 6
  1548. movzx ebp, BYTE PTR _rLPS_table_64x4[ecx+ebx] ; ebp = rLPS
  1549. ; register state:
  1550. ; ebx: state (bi_ct->state)
  1551. ; eax: bi_ct
  1552. ; edx: dep
  1553. ; edi: range
  1554. ; ebp: rLPS
  1555. mov ecx, DWORD PTR [edx+8] ; ecx = bitsleft
  1556. sub edi, ebp ; range -= rLPS
  1557. shl edi, cl ; range << bitsleft
  1558. cmp DWORD PTR [edx+4], edi ; value < (range << bitsleft)
  1559. jge SHORT CABAC_OPT@LPS
  1560. ; MPS
  1561. movzx bx, BYTE PTR _AC_next_state_MPS_64[ebx] ; ebx = state = AC_next_state_MPS_64[state]
  1562. shr edi, cl ; undo earlier shift
  1563. mov WORD PTR [eax], bx ; bi_ct->MPS = state
  1564. cmp edi, 256 ; 00000100H
  1565. setb cl
  1566. ; register state
  1567. ; ebx: state
  1568. ; eax: bi_ct
  1569. ; ecx: state (old)
  1570. ; edx: dep
  1571. ; edi: range
  1572. ; ebp: rLPS
  1573. shl edi, cl
  1574. sub DWORD PTR [edx+8], ecx ; dep->DbitsLeft--
  1575. mov DWORD PTR [edx], edi ; dep->Drange = range
  1576. movzx eax, BYTE PTR [eax+2] ; return bit
  1577. jz SHORT READ_TWO_BYTES ; if (dep->DbitsLeft==0)
  1578. ; register state
  1579. ; ebx: state
  1580. ; eax: bi_ct
  1581. ; ecx: range<<1
  1582. ; edx: dep
  1583. ; edi: range
  1584. ; ebp: rLPS
  1585. pop edi
  1586. pop ebp
  1587. pop ebx
  1588. ret 0
  1589. align 16
  1590. CABAC_OPT@LPS:
  1591. sub DWORD PTR [edx+4], edi
  1592. movzx cx, BYTE PTR _AC_next_state_LPS_64[ebx] ; cx: state = AC_next_state_LPS_64[state]
  1593. mov WORD PTR [eax], cx ; store state back to bi_ct->MPS
  1594. ; register state:
  1595. ; ebx: state (old)
  1596. ; eax: bi_ct
  1597. ; ecx: state (new)
  1598. ; edx: dep
  1599. ; edi: range
  1600. ; ebp: rLPS
  1601. mov edi, eax
  1602. movzx eax, BYTE PTR [eax+2]
  1603. xor eax, 1
  1604. test ebx, ebx ; if state(old) == 0
  1605. movzx ecx, BYTE PTR _renorm_table_256[ebp] ; ecx = renorm_table_32[rLPS>>3]
  1606. sete bl ; bl = 1 [ if state(old) == 0 ]
  1607. xor BYTE PTR [edi+2], bl ; bl ^= bi_ct->state
  1608. ; register state:
  1609. ; ebx: !state
  1610. ; eax: bi_ct
  1611. ; ecx: renorm
  1612. ; edx: dep
  1613. ; edi: range
  1614. ; ebp: rLPS
  1615. shl ebp, cl ; ebp = range = rLPS <<= renorm
  1616. sub DWORD PTR [edx+8], ecx ; dep->DbitsLeft -= renorm;
  1617. mov DWORD PTR [edx], ebp ; dep->Drange = range;
  1618. jle SHORT READ_TWO_BYTES ; if( dep->DbitsLeft <= 0 )
  1619. ; register state:
  1620. ; ebx: !state
  1621. ; eax: bi_ct
  1622. ; ecx: renorm
  1623. ; edx: dep
  1624. ; edi: range
  1625. ; ebp: range = rLPS <<= renorm
  1626. pop edi
  1627. pop ebp
  1628. pop ebx
  1629. ret 0
  1630. align 16
  1631. READ_TWO_BYTES:
  1632. ; register state:
  1633. ; ebx: !state
  1634. ; eax: bi_ct
  1635. ; ecx: renorm
  1636. ; edx: dep
  1637. ; edi: range
  1638. mov ebx, DWORD PTR [edx+16] ; ebx = dep->Dcodestrm_len
  1639. mov ecx, DWORD PTR [ebx] ; ecx = *dep->Dcodestrm_len
  1640. lea edi, DWORD PTR [ecx+2] ; edi = *dep->Dcodestrm_len + 2
  1641. mov DWORD PTR [ebx], edi ; *dep->Dcodestrm_len += 2
  1642. mov ebx, DWORD PTR [edx+12] ; edx = dep->Dcodestrm
  1643. movzx ecx, WORD PTR [ebx+ecx]
  1644. xchg cl, ch
  1645. shl DWORD PTR [edx+4], 16
  1646. mov WORD PTR [edx+4], cx
  1647. add DWORD PTR [edx+8], 16 ; dep->DbitsLeft += 16
  1648. pop edi
  1649. pop ebp
  1650. pop ebx
  1651. ret 0
  1652. _biari_decode_symbol_map ENDP
  1653. _TEXT ENDS
  1654. ; ebx, ebp and edi are NOT preserved
  1655. ; pass tex_ctx in ebp
  1656. ; pass type in ebx
  1657. ; pass dep in edx
  1658. ; pass coeff in edi
  1659. SigCoefFunction MACRO MaxC2, TypeCtxOne, TypeCtxAbs, MaxPos
  1660. _abs_contexts$ = 28 ; local variable (safe because of how the function is called)
  1661. _one_contexts$ = 32 ; local variable (safe because of how the function is called)
  1662. STACKOFFSET=0
  1663. lea eax, DWORD PTR [ebp+TypeCtxOne*20+6068] ; 6068 = offsetof(tex_ctx, one_contexts)
  1664. mov DWORD PTR _one_contexts$[esp+STACKOFFSET], eax ; one_contexts = tex_ctx->one_contexts[type2ctx_one[type]];
  1665. ;push esi
  1666. STACKOFFSET=STACKOFFSET+0
  1667. ;esi: i (loop variable) = maxpos[type]
  1668. lea ecx, DWORD PTR [ebp+TypeCtxAbs*20+6508]
  1669. mov ebp, 1 ; ebp: c1
  1670. xor ebx, ebx ; ebx: c2
  1671. mov DWORD PTR _abs_contexts$[esp+STACKOFFSET], ecx ; abs_contexts = tex_ctx->abs_contexts[type2ctx_abs[type]];
  1672. SIGN_COEFF@LOOP_AGAIN:
  1673. cmp WORD PTR [edi+esi*2], 0 ;if (coeff[i]!=0)
  1674. je SHORT SIGN_COEFF@LOOP_ITR
  1675. mov ecx, DWORD PTR _one_contexts$[esp+STACKOFFSET]
  1676. lea eax, DWORD PTR [ecx+ebp*4]
  1677. mov ebp, DWORD PTR plus_one_clip0_4[ebp*4] ; c1 = plus_one_clip0_4[c1];
  1678. call _biari_decode_symbol_map ; biari_decode_symbol (dep_dp, one_contexts + c1);
  1679. test eax, eax
  1680. jz SHORT SIGN_COEFF@DECODE_EQ_PROB
  1681. ;add WORD PTR [edi+esi*2], ax ; coeff[i] +=
  1682. mov ecx, DWORD PTR _abs_contexts$[esp+STACKOFFSET]
  1683. lea eax, DWORD PTR [ecx+ebx*4]
  1684. call _unary_exp_golomb_level_decode ;unary_exp_golomb_level_decode (dep_dp, abs_contexts + c2);
  1685. inc eax
  1686. add WORD PTR [edi+esi*2], ax ; coeff[i] += return val
  1687. xor ebp, ebp ; c1 = 0
  1688. mov ebx, DWORD PTR MaxC2[ebx*4]
  1689. SIGN_COEFF@DECODE_EQ_PROB:
  1690. call _biari_decode_symbol_eq_prob_asm ; biari_decode_symbol_eq_prob(dep_dp)
  1691. js SHORT SIGN_COEFF@LOOP_ITR
  1692. neg WORD PTR [edi+esi*2]
  1693. SIGN_COEFF@LOOP_ITR:
  1694. sub esi, 1
  1695. jns SHORT SIGN_COEFF@LOOP_AGAIN
  1696. pop esi
  1697. ret 0
  1698. ENDM
  1699. _TEXT SEGMENT
  1700. _read_significant_coefficients0 PROC
  1701. SigCoefFunction plus_one_clip4, 0, 0, 15
  1702. _read_significant_coefficients0 ENDP
  1703. _read_significant_coefficients1 PROC
  1704. SigCoefFunction plus_one_clip4, 1, 1, 14
  1705. _read_significant_coefficients1 ENDP
  1706. _read_significant_coefficients2 PROC
  1707. SigCoefFunction plus_one_clip4, 2, 2, 63
  1708. _read_significant_coefficients2 ENDP
  1709. _read_significant_coefficients3 PROC
  1710. SigCoefFunction plus_one_clip4, 3, 3, 31
  1711. _read_significant_coefficients3 ENDP
  1712. _read_significant_coefficients4 PROC
  1713. SigCoefFunction plus_one_clip4, 3, 3, 31
  1714. _read_significant_coefficients4 ENDP
  1715. _read_significant_coefficients5 PROC
  1716. SigCoefFunction plus_one_clip4, 4, 4, 15
  1717. _read_significant_coefficients5 ENDP
  1718. _read_significant_coefficients6 PROC
  1719. SigCoefFunction plus_one_clip3, 5, 5, 3
  1720. _read_significant_coefficients6 ENDP
  1721. _read_significant_coefficients7 PROC
  1722. SigCoefFunction plus_one_clip4, 6, 6, 14
  1723. _read_significant_coefficients7 ENDP
  1724. _read_significant_coefficients8 PROC
  1725. SigCoefFunction plus_one_clip3, 5, 5, 7
  1726. _read_significant_coefficients8 ENDP
  1727. _read_significant_coefficients9 PROC
  1728. SigCoefFunction plus_one_clip4, 5, 5, 15
  1729. _read_significant_coefficients9 ENDP
  1730. _read_significant_coefficients10 PROC
  1731. SigCoefFunction plus_one_clip4, 10, 10, 15
  1732. _read_significant_coefficients10 ENDP
  1733. _read_significant_coefficients11 PROC
  1734. SigCoefFunction plus_one_clip4, 11, 11, 14
  1735. _read_significant_coefficients11 ENDP
  1736. _read_significant_coefficients12 PROC
  1737. SigCoefFunction plus_one_clip4, 12, 12, 63
  1738. _read_significant_coefficients12 ENDP
  1739. _read_significant_coefficients13 PROC
  1740. SigCoefFunction plus_one_clip4, 13, 13, 31
  1741. _read_significant_coefficients13 ENDP
  1742. _read_significant_coefficients14 PROC
  1743. SigCoefFunction plus_one_clip4, 13, 13, 31
  1744. _read_significant_coefficients14 ENDP
  1745. _read_significant_coefficients15 PROC
  1746. SigCoefFunction plus_one_clip4, 14, 14, 15
  1747. _read_significant_coefficients15 ENDP
  1748. _read_significant_coefficients16 PROC
  1749. SigCoefFunction plus_one_clip4, 16, 16, 15
  1750. _read_significant_coefficients16 ENDP
  1751. _read_significant_coefficients17 PROC
  1752. SigCoefFunction plus_one_clip4, 17, 17, 14
  1753. _read_significant_coefficients17 ENDP
  1754. _read_significant_coefficients18 PROC
  1755. SigCoefFunction plus_one_clip4, 18, 18, 63
  1756. _read_significant_coefficients18 ENDP
  1757. _read_significant_coefficients19 PROC
  1758. SigCoefFunction plus_one_clip4, 19, 19, 31
  1759. _read_significant_coefficients19 ENDP
  1760. _read_significant_coefficients20 PROC
  1761. SigCoefFunction plus_one_clip4, 19, 19, 31
  1762. _read_significant_coefficients20 ENDP
  1763. _read_significant_coefficients21 PROC
  1764. SigCoefFunction plus_one_clip4, 20, 20, 15
  1765. _read_significant_coefficients21 ENDP
  1766. _TEXT ENDS
  1767. ;
  1768. ; push eax ; currSlice->coeff
  1769. ; push ecx ; tex_ctx
  1770. ; edi is NOT preserved
  1771. ; pass currMB in edi
  1772. ; pass dep in ebp
  1773. ; pass type in ebx
  1774. ; on return, edi contains coeff, edx contains dep
  1775. SigMapFunction MACRO PosCtxMap, TypeCtxLast, IsDC, MaxPos, PosCtxLast, TypeCtxMap, Func
  1776. last_ctx$ = 24 ; local variable (cheating and using stack space from _readRunLevel_CABAC)
  1777. coeff_ctr$ = 28 ; local variable (cheating and using stack space from _readRunLevel_CABAC)
  1778. STACKOFFSET=0
  1779. mov edx, DWORD PTR [edi+p_Vid@Macroblock] ; edx: p_Vid
  1780. push esi
  1781. xor esi, esi
  1782. STACKOFFSET=STACKOFFSET+4
  1783. mov edx, DWORD PTR [edx+structure@VideoParameters]
  1784. add edx, DWORD PTR [edi+mb_field@Macroblock] ; currMB->mb_field
  1785. mov edi, eax ; edi: coeff
  1786. mov eax, 1408 ; 16 * 22 * sizeof(BiContextType)
  1787. cmovz eax, esi
  1788. mov edx, OFFSET PosCtxMap
  1789. cmovnz edx, DWORD PTR _pos2ctx_map_int[ebx*4]
  1790. IF IsDC EQ 0
  1791. lea ebx, [edx + 1]
  1792. ELSE
  1793. mov ebx, edx ; pos2ctx_Map = (fld) ? pos2ctx_map_int[type] : pos2ctx_map[type];
  1794. ENDIF
  1795. mov edx, ebp
  1796. lea ebp, [eax+ecx+TypeCtxMap*64+map_contexts@TextureInfoContexts] ; map_ctx = tex_ctx->map_contexts[fld][type2ctx_map [type]];
  1797. lea ecx, DWORD PTR [eax+ecx+TypeCtxLast*64+last_contexts@TextureInfoContexts]
  1798. mov DWORD PTR last_ctx$[esp+STACKOFFSET], ecx ; last_ctx = tex_ctx->last_contexts[fld][type2ctx_last[type]];
  1799. mov DWORD PTR coeff_ctr$[esp+STACKOFFSET], esi; coeff_ctr = 0
  1800. ;jne LOOP_AGAIN
  1801. ; esi: i
  1802. ; ebx: i1 (loop end)
  1803. ; ebp: dep_dp
  1804. ; edi: coeff
  1805. ; for (i=i0; i < i1; ++i) // if last coeff is reached, it has to be significant
  1806. LOOP_AGAIN:
  1807. ; --- read significance symbol ---
  1808. ; if (biari_decode_symbol (dep_dp, map_ctx + pos2ctx_Map[i]))
  1809. movzx eax, BYTE PTR [esi+ebx]
  1810. lea eax, DWORD PTR [ebp+eax*4]
  1811. call _biari_decode_symbol_map
  1812. test eax, eax
  1813. mov WORD PTR [edi+esi*2], ax ; coeff[i] = biari_decode_symbol()
  1814. je SHORT LOOP_ITR
  1815. ; --- read last coefficient symbol ---
  1816. ; if (biari_decode_symbol (dep_dp, last_ctx + last[i]))
  1817. inc DWORD PTR coeff_ctr$[esp+STACKOFFSET] ; coeff_ctr++
  1818. IF IsDC EQ 0
  1819. movzx ecx, BYTE PTR PosCtxLast[esi+1]
  1820. ELSE
  1821. movzx ecx, BYTE PTR PosCtxLast[esi]
  1822. ENDIF
  1823. mov eax, DWORD PTR last_ctx$[esp+STACKOFFSET]
  1824. lea eax, DWORD PTR [eax+ecx*4]
  1825. call _biari_decode_symbol_map
  1826. test eax, eax
  1827. je SHORT LOOP_ITR
  1828. mov eax, DWORD PTR coeff_ctr$[esp+STACKOFFSET]; return coeff_ctr;
  1829. mov ecx, DWORD PTR [esp]
  1830. mov ebp, DWORD PTR [ecx+tex_ctx@Slice] ; ; edx: currSlice->tex_ctx
  1831. mov DWORD PTR [ecx+coeff_ctr@Slice], eax ; currSlice->coeff_ctr = return value (read_significance_map)
  1832. jmp Func
  1833. align 16
  1834. LOOP_ITR:
  1835. inc esi
  1836. cmp esi, MaxPos
  1837. jl SHORT LOOP_AGAIN
  1838. mov eax, DWORD PTR coeff_ctr$[esp+STACKOFFSET]
  1839. mov WORD PTR [edi+esi*2], 1
  1840. inc eax
  1841. mov ecx, DWORD PTR [esp]
  1842. mov ebp, DWORD PTR [ecx+tex_ctx@Slice] ; ; edx: currSlice->tex_ctx
  1843. mov DWORD PTR [ecx+coeff_ctr@Slice], eax ; currSlice->coeff_ctr = return value (read_significance_map)
  1844. jmp Func
  1845. ENDM
  1846. _TEXT SEGMENT
  1847. _read_significance_map0 PROC
  1848. SigMapFunction _pos2ctx_map4x4, 0, 1, 15, _pos2ctx_last4x4, 0, _read_significant_coefficients0
  1849. _read_significance_map0 ENDP
  1850. _read_significance_map1 PROC
  1851. SigMapFunction _pos2ctx_map4x4, 1, 0, 14, _pos2ctx_last4x4, 1, _read_significant_coefficients1
  1852. _read_significance_map1 ENDP
  1853. _read_significance_map2 PROC
  1854. SigMapFunction _pos2ctx_map8x8, 2, 1, 63, _pos2ctx_last8x8, 2, _read_significant_coefficients2
  1855. _read_significance_map2 ENDP
  1856. _read_significance_map3 PROC
  1857. SigMapFunction _pos2ctx_map8x4, 3, 1, 31, _pos2ctx_last8x4, 3, _read_significant_coefficients3
  1858. _read_significance_map3 ENDP
  1859. _read_significance_map4 PROC
  1860. SigMapFunction _pos2ctx_map8x4, 4, 1, 31, _pos2ctx_last8x4, 4, _read_significant_coefficients4
  1861. _read_significance_map4 ENDP
  1862. _read_significance_map5 PROC
  1863. SigMapFunction _pos2ctx_map4x4, 5, 1, 15, _pos2ctx_last4x4, 5, _read_significant_coefficients5
  1864. _read_significance_map5 ENDP
  1865. _read_significance_map6 PROC
  1866. SigMapFunction _pos2ctx_map4x4, 6, 1, 3, _pos2ctx_last4x4, 6, _read_significant_coefficients6
  1867. _read_significance_map6 ENDP
  1868. _read_significance_map7 PROC
  1869. SigMapFunction _pos2ctx_map4x4, 7, 0, 14, _pos2ctx_last4x4, 7, _read_significant_coefficients7
  1870. _read_significance_map7 ENDP
  1871. _read_significance_map8 PROC
  1872. SigMapFunction _pos2ctx_map2x4c, 6, 1, 7, _pos2ctx_last2x4c, 6, _read_significant_coefficients8
  1873. _read_significance_map8 ENDP
  1874. _read_significance_map9 PROC
  1875. SigMapFunction _pos2ctx_map4x4c, 6, 1, 15, _pos2ctx_last4x4c, 6, _read_significant_coefficients9
  1876. _read_significance_map9 ENDP
  1877. _read_significance_map10 PROC
  1878. SigMapFunction _pos2ctx_map4x4, 10, 1, 15, _pos2ctx_last4x4, 10, _read_significant_coefficients10
  1879. _read_significance_map10 ENDP
  1880. _read_significance_map11 PROC
  1881. SigMapFunction _pos2ctx_map4x4, 11, 0, 14, _pos2ctx_last4x4, 11, _read_significant_coefficients11
  1882. _read_significance_map11 ENDP
  1883. _read_significance_map12 PROC
  1884. SigMapFunction _pos2ctx_map8x8, 12, 1, 63, _pos2ctx_last8x8, 12, _read_significant_coefficients12
  1885. _read_significance_map12 ENDP
  1886. _read_significance_map13 PROC
  1887. SigMapFunction _pos2ctx_map8x4, 13, 1, 31, _pos2ctx_last8x4, 13, _read_significant_coefficients13
  1888. _read_significance_map13 ENDP
  1889. _read_significance_map14 PROC
  1890. SigMapFunction _pos2ctx_map8x4, 14, 1, 31, _pos2ctx_last8x4, 14, _read_significant_coefficients14
  1891. _read_significance_map14 ENDP
  1892. _read_significance_map15 PROC
  1893. SigMapFunction _pos2ctx_map4x4, 15, 1, 15, _pos2ctx_last4x4, 15, _read_significant_coefficients15
  1894. _read_significance_map15 ENDP
  1895. _read_significance_map16 PROC
  1896. SigMapFunction _pos2ctx_map4x4, 16, 1, 15, _pos2ctx_last4x4, 16, _read_significant_coefficients16
  1897. _read_significance_map16 ENDP
  1898. _read_significance_map17 PROC
  1899. SigMapFunction _pos2ctx_map4x4, 17, 0, 14, _pos2ctx_last4x4, 17, _read_significant_coefficients17
  1900. _read_significance_map17 ENDP
  1901. _read_significance_map18 PROC
  1902. SigMapFunction _pos2ctx_map8x8, 18, 1, 63, _pos2ctx_last8x8, 18, _read_significant_coefficients18
  1903. _read_significance_map18 ENDP
  1904. _read_significance_map19 PROC
  1905. SigMapFunction _pos2ctx_map8x4, 19, 1, 31, _pos2ctx_last8x4, 19, _read_significant_coefficients19
  1906. _read_significance_map19 ENDP
  1907. _read_significance_map20 PROC
  1908. SigMapFunction _pos2ctx_map8x4, 20, 1, 31, _pos2ctx_last8x4, 20, _read_significant_coefficients20
  1909. _read_significance_map20 ENDP
  1910. _read_significance_map21 PROC
  1911. SigMapFunction _pos2ctx_map4x4, 21, 1, 15, _pos2ctx_last4x4, 21, _read_significant_coefficients21
  1912. _read_significance_map21 ENDP
  1913. _TEXT ENDS
  1914. _TEXT SEGMENT
  1915. ; edx: dep - unchanged by function
  1916. ; SF holds the return value
  1917. _biari_decode_symbol_eq_prob_asm PROC
  1918. mov ecx, DWORD PTR [edx+8]; dep->DbitsLeft
  1919. dec ecx ; dep->DbitsLeft--
  1920. mov eax, DWORD PTR [edx+4] ; eax: dep->DValue
  1921. push esi
  1922. jnz SHORT $LN3@biari_deco; if(--(dep->DbitsLeft) == 0)
  1923. mov ecx, DWORD PTR [edx+16] ; ebp: dep->Dcodestrm_len
  1924. mov esi, DWORD PTR [ecx] ; esi: *dep->Dcodestrm_len
  1925. add DWORD PTR [ecx], 2 ; *dep->Dcodestrm_len += 2
  1926. mov ecx, DWORD PTR [edx+12] ; ebp: dep->Dcodestrm
  1927. shl eax, 16
  1928. mov ax, WORD PTR [ecx+esi] ; value = (value << 16) | getword( dep )
  1929. xchg ah, al
  1930. mov ecx, 16 ; dep->DbitsLeft = 16;
  1931. $LN3@biari_deco:
  1932. mov esi, DWORD PTR [edx] ; dep->Drange
  1933. shl esi, cl ; (dep->Drange << dep->DbitsLeft)
  1934. mov DWORD PTR [edx+8], ecx
  1935. mov ecx, eax
  1936. sub ecx, esi
  1937. pop esi
  1938. cmovns eax, ecx ; if (tmp_value <0) value = tmp_value
  1939. mov DWORD PTR [edx+4], eax ; dep->Dvalue = value;
  1940. ret 0
  1941. _biari_decode_symbol_eq_prob_asm ENDP
  1942. _TEXT ENDS
  1943. _TEXT SEGMENT
  1944. ; edx: dep. retained on return
  1945. ; esi and ebp are NOT retained, because the (only) calling function doesn't need them to be
  1946. _exp_golomb_decode_eq_prob0 PROC
  1947. STACKOFFSET=0
  1948. xor esi, esi ; esi: binary_symbol
  1949. xor ebp, ebp ; ebp: symbol
  1950. push edi
  1951. mov edi, 1 ; edi: k
  1952. DECODE_EQ@LOOP_AGAIN:
  1953. call _biari_decode_symbol_eq_prob_asm ; l = biari_decode_symbol_eq_prob(dep_dp);
  1954. js SHORT DECODE_EQ@LOOP_DONE
  1955. add ebp, edi ; symbol += k
  1956. shl edi, 1 ; k <<= 1
  1957. jmp SHORT DECODE_EQ@LOOP_AGAIN
  1958. align 16
  1959. DECODE_EQ@LOOP_DONE:
  1960. shr edi, 1
  1961. jz SHORT DECODE_EQ@RETURN
  1962. call _biari_decode_symbol_eq_prob_asm ; if (biari_decode_symbol_eq_prob(dep_dp)==1)
  1963. js SHORT DECODE_EQ@LOOP_DONE
  1964. or esi, edi ; binary_symbol |= (1<<k);
  1965. jmp SHORT DECODE_EQ@LOOP_DONE
  1966. align 16
  1967. DECODE_EQ@RETURN:
  1968. lea eax, DWORD PTR [esi+ebp+13] ; return (unsigned int) (symbol + binary_symbol);
  1969. pop edi
  1970. ret 0
  1971. _exp_golomb_decode_eq_prob0 ENDP
  1972. _TEXT ENDS
  1973. ;
  1974. ;
  1975. ; pass dep in edx, context in eax
  1976. ; edx is retained on return
  1977. ; ebp is destroyed
  1978. _TEXT SEGMENT
  1979. ctx = 4 ; second parameter
  1980. _unary_exp_golomb_level_decode PROC
  1981. STACKOFFSET=0
  1982. mov ebp, eax ; eax (and now ebp also) contains the context pointer
  1983. call _biari_decode_symbol_map
  1984. test eax, eax ; if (symbol==0)
  1985. jne SHORT SYMBOL_NOT_ZERO
  1986. ret 0
  1987. align 16
  1988. SYMBOL_NOT_ZERO:
  1989. push esi
  1990. xor esi, esi
  1991. LEVEL_DECODE@LOOP_AGAIN:
  1992. mov eax, ebp ; _biari_decode_symbol_map wants ctx in eax
  1993. inc esi ; ++symbol;
  1994. call _biari_decode_symbol_map ; l = biari_decode_symbol(dep_dp, ctx);
  1995. test eax, eax ; if (!l)
  1996. je SHORT LEVEL_IS_ZERO
  1997. cmp esi, 12 ; exp_start-1
  1998. jb SHORT LEVEL_DECODE@LOOP_AGAIN
  1999. call _exp_golomb_decode_eq_prob0 ; exp_golomb_decode_eq_prob(dep_dp,0)
  2000. pop esi
  2001. ret 0
  2002. align 16
  2003. LEVEL_IS_ZERO:
  2004. mov eax, esi ; return symbol;
  2005. pop esi
  2006. ret 0
  2007. _unary_exp_golomb_level_decode ENDP
  2008. _TEXT ENDS
  2009. CONST SEGMENT
  2010. sigmap_functions DD FLAT:_read_significance_map0
  2011. DD FLAT:_read_significance_map1
  2012. DD FLAT:_read_significance_map2
  2013. DD FLAT:_read_significance_map3
  2014. DD FLAT:_read_significance_map4
  2015. DD FLAT:_read_significance_map5
  2016. DD FLAT:_read_significance_map6
  2017. DD FLAT:_read_significance_map7
  2018. DD FLAT:_read_significance_map8
  2019. DD FLAT:_read_significance_map9
  2020. DD FLAT:_read_significance_map10
  2021. DD FLAT:_read_significance_map11
  2022. DD FLAT:_read_significance_map12
  2023. DD FLAT:_read_significance_map13
  2024. DD FLAT:_read_significance_map14
  2025. DD FLAT:_read_significance_map15
  2026. DD FLAT:_read_significance_map16
  2027. DD FLAT:_read_significance_map17
  2028. DD FLAT:_read_significance_map18
  2029. DD FLAT:_read_significance_map19
  2030. DD FLAT:_read_significance_map20
  2031. DD FLAT:_read_significance_map21
  2032. CONST ENDS
  2033. PUBLIC _readRunLevel_CABAC
  2034. _TEXT SEGMENT
  2035. _currMB$ = 4 ; first parameter
  2036. _dep_dp$ = 8 ; second parameter
  2037. _context$ = 12 ; third parameter
  2038. _readRunLevel_CABAC PROC
  2039. push esi
  2040. push edi
  2041. STACKOFFSET=8
  2042. mov edi, DWORD PTR _currMB$[esp+STACKOFFSET] ; edi: currMB
  2043. mov esi, DWORD PTR [edi] ; esi: currSlice = currMB->p_Slice;
  2044. cmp DWORD PTR [esi+coeff_ctr@Slice], 0 ; if (currSlice->coeff_ctr >= 0)
  2045. jge SHORT SET_RUN_AND_LEVEL
  2046. ; ===== decode CBP-BIT =====
  2047. mov eax, DWORD PTR [edi+read_and_store_CBP_block_bit@Macroblock] ; eax: currMB->read_and_store_CBP_block_bit
  2048. push ebx
  2049. STACKOFFSET=STACKOFFSET+4
  2050. mov ebx, DWORD PTR _context$[esp+STACKOFFSET] ; ebx: context
  2051. push ebp
  2052. STACKOFFSET=STACKOFFSET+4
  2053. mov ebp, DWORD PTR _dep_dp$[esp+STACKOFFSET] ; ebp: dep
  2054. push ebx ; context
  2055. push ebp ; dep
  2056. push edi ; currMB
  2057. call eax ; currMB->read_and_store_CBP_block_bit(currMB, dep_dp, context)
  2058. add esp, 12
  2059. mov DWORD PTR [esi+coeff_ctr@Slice], eax ; currSlice->coeff_ctr = return value
  2060. test eax, eax ; if (currSlice->coeff_ctr == 0)
  2061. je SHORT SET_RUN_AND_LEVEL_POP
  2062. ; ===== decode significance coefficients =====
  2063. mov ecx, DWORD PTR [esi+tex_ctx@Slice] ; ecx: currSlice->tex_ctx
  2064. lea eax, DWORD PTR [esi+coeff@Slice] ; eax: currSlice->coeff
  2065. ;push eax ; currSlice->coeff
  2066. ;push ecx ; tex_ctx
  2067. ;call _read_significance_map ; read_significance_map(currSlice->tex_ctx, currMB, dep_dp, context, currSlice->coeff);
  2068. call sigmap_functions[ebx*4]
  2069. SET_RUN_AND_LEVEL_POP:
  2070. pop ebp
  2071. pop ebx
  2072. STACKOFFSET=STACKOFFSET-8
  2073. SET_RUN_AND_LEVEL:
  2074. ; --- set run and level ---
  2075. xor edx, edx ; edx: 0
  2076. dec DWORD PTR [esi+coeff_ctr@Slice] ; if (currSlice->coeff_ctr--)
  2077. js SHORT EOB
  2078. ; --- set run and level (coefficient) ---
  2079. mov ecx, DWORD PTR [esi+pos@Slice] ; ecx: currSlice->pos
  2080. xor edi, edi ; edi: run=0
  2081. cmp WORD PTR [esi+ecx*2+coeff@Slice], dx ; currSlice->coeff[currSlice->pos] == 0
  2082. jne SHORT LOOP_END
  2083. LOOP_ITR:
  2084. cmp WORD PTR [esi+ecx*2+1+coeff@Slice], dx ; currSlice->coeff[currSlice->pos] == 0
  2085. lea ecx, [ecx+1]
  2086. lea edi, [edi+1]
  2087. je SHORT LOOP_ITR
  2088. LOOP_END:
  2089. movsx eax, WORD PTR [esi+ecx*2+coeff@Slice] ; eax: value = currSlice->coeff[currSlice->pos]
  2090. inc ecx ; currSlice->pos++
  2091. ; --- decrement coefficient counter and re-set position ---
  2092. ;cmp DWORD PTR [esi+coeff_ctr@Slice], edx ; if (currSlice->coeff_ctr == 0)
  2093. ;cmove ecx, edx ; currSlice->pos = 0
  2094. mov edx, edi
  2095. pop edi
  2096. mov DWORD PTR [esi+pos@Slice], ecx ; store currSlice->pos
  2097. pop esi
  2098. ret 0 ; eax contains value
  2099. align 16
  2100. EOB:
  2101. xor eax, eax ; return 0
  2102. mov DWORD PTR [esi+pos@Slice], edx ; currSlice->pos = 0;
  2103. pop edi
  2104. pop esi
  2105. ret 0
  2106. _readRunLevel_CABAC ENDP
  2107. _TEXT ENDS
  2108. ;
  2109. ; edi is not saved
  2110. ; pass dep_dp in edx, retained on exit
  2111. ; pass ctx in edi
  2112. ; return value in esi
  2113. PUBLIC _unary_exp_golomb_mv_decode3
  2114. _TEXT SEGMENT
  2115. _ctx$ = 4 ; second parameter
  2116. _unary_exp_golomb_mv_decode3 PROC
  2117. STACKOFFSET=0
  2118. mov eax, edi
  2119. call _biari_decode_symbol_map ; pass dep in edx and ctx in eax. edx retains dep on exit
  2120. test eax, eax ; if (symbol)
  2121. jne SHORT SYMBOL_NOT_ZERO
  2122. xor esi, esi
  2123. ret 0
  2124. align 16
  2125. SYMBOL_NOT_ZERO:
  2126. push ebp
  2127. STACKOFFSET=STACKOFFSET+4
  2128. mov ebp, 3
  2129. add edi, 4 ; ctx++
  2130. mov esi, 1 ; esi: symbol
  2131. LOOP_START:
  2132. mov eax, edi
  2133. call _biari_decode_symbol_map ; pass dep in edx and ctx in eax. edx retains dep on exit
  2134. test eax, eax
  2135. je SHORT SYMBOL_ZERO_RETURN
  2136. inc esi
  2137. cmp esi, 2 ; if (symbol == 2)
  2138. sete al ; eax will be 1, so this is safe to do
  2139. lea edi, [edi + eax*4] ; ctx += (symbol == 2)
  2140. cmp esi, ebp ; if (symbol == max_bin)
  2141. sete al ; eax will have nothing set high, so this is safe to do
  2142. lea edi, [edi + eax*4] ; ctx += (symbol != max_bin)
  2143. cmp esi, 8 ; if (symbol < exp_start)
  2144. jb SHORT LOOP_START
  2145. ; return exp_start + exp_golomb_decode_eq_prob(dep_dp,3);
  2146. xor ebp, ebp ; ebp: symbol
  2147. mov edi, ebp ; edi: binary_symbol
  2148. DECODE_EQ3@LOOP1:
  2149. call _biari_decode_symbol_eq_prob_asm ; edx holds dep_dp
  2150. js SHORT DECODE_EQ3@LOOP2
  2151. or ebp, esi; symbol += (l<<k)
  2152. shl esi, 1 ; k <<= 1
  2153. jmp SHORT DECODE_EQ3@LOOP1
  2154. align 16
  2155. DECODE_EQ3@LOOP2:
  2156. shr esi, 1
  2157. jz SHORT DECODE_EQ3@RETURN
  2158. call _biari_decode_symbol_eq_prob_asm
  2159. js SHORT DECODE_EQ3@LOOP2
  2160. or edi, esi ; binary_symbol |= (1<<k);
  2161. jmp SHORT DECODE_EQ3@LOOP2
  2162. align 16
  2163. DECODE_EQ3@RETURN:
  2164. ; return (unsigned int) (symbol + binary_symbol);
  2165. lea esi, [edi+ebp+8]
  2166. pop ebp
  2167. ret 0
  2168. align 16
  2169. SYMBOL_ZERO_RETURN:
  2170. ; return symbol is in esi
  2171. pop ebp
  2172. ret 0
  2173. _unary_exp_golomb_mv_decode3 ENDP
  2174. _TEXT ENDS
  2175. _TEXT SEGMENT
  2176. _unary_bin_decode1 PROC
  2177. ; _ctx$ = eax
  2178. ; _dep_dp$ = edx
  2179. push edi
  2180. mov edi, eax
  2181. call _biari_decode_symbol_map ; biari_decode_symbol(dep_dp, ctx );
  2182. test eax, eax ; if (symbol)
  2183. jne SHORT $LN5@unary_bin_@2
  2184. mov eax, 2
  2185. shr eax, 1
  2186. pop edi
  2187. ret 0
  2188. align 16
  2189. $LN5@unary_bin_@2:
  2190. xor esi, esi ; symbol = 0;
  2191. $LL3@unary_bin_@2:
  2192. inc esi ; ++symbol;
  2193. lea eax, DWORD PTR [edi+4] ; ctx + ctx_offset
  2194. call _biari_decode_symbol_map ; biari_decode_symbol(dep_dp, ctx);
  2195. test eax, eax ; while( l != 0 );
  2196. jne SHORT $LL3@unary_bin_@2
  2197. lea eax, [esi + 2]; return symbol+2;
  2198. shr eax, 1
  2199. pop edi
  2200. ret 0
  2201. _unary_bin_decode1 ENDP
  2202. _TEXT ENDS
  2203. PUBLIC _readDquant_CABAC
  2204. _TEXT SEGMENT
  2205. _currSlice$ = 4 ; first parameter
  2206. _dep_dp$ = 8 ; second parameter
  2207. _readDquant_CABAC PROC
  2208. STACKOFFSET=0
  2209. ; 815 : MotionInfoContexts *ctx = currSlice->mot_ctx;
  2210. ; 816 : short dquant;
  2211. ; 817 : int act_ctx = ((currSlice->last_dquant != 0) ? 1 : 0);
  2212. ; 818 : int act_sym = biari_decode_symbol(dep_dp,ctx->delta_qp_contexts + act_ctx );
  2213. mov edx, DWORD PTR _dep_dp$[esp+STACKOFFSET]
  2214. push esi
  2215. push edi
  2216. STACKOFFSET = STACKOFFSET + 8
  2217. mov edi, DWORD PTR _currSlice$[esp+STACKOFFSET]
  2218. mov esi, DWORD PTR [edi+mot_ctx@Slice]
  2219. xor eax, eax
  2220. cmp DWORD PTR [edi+last_dquant@Slice], eax
  2221. setne al
  2222. lea eax, DWORD PTR [esi+eax*4+332]
  2223. ; pass dep in edx and ctx in eax. edx retains dep on exit
  2224. call _biari_decode_symbol_map
  2225. test eax, eax ; if (!act_sym)
  2226. jz SHORT $LN2@readDquant
  2227. lea eax, DWORD PTR [esi+340] ; unary_bin_decode(dep_dp,ctx->delta_qp_contexts + 2,1);
  2228. call _unary_bin_decode1
  2229. jnc SHORT $LN2@readDquant ; lsb is signed bit
  2230. neg eax ; dquant = -dquant;
  2231. movzx eax, ax
  2232. $LN2@readDquant:
  2233. movsx edx, ax
  2234. mov DWORD PTR [edi+last_dquant@Slice], edx ; currSlice->last_dquant = dquant;
  2235. pop edi
  2236. pop esi
  2237. ;mov ax, cx ; return dquant;
  2238. ret 0
  2239. _readDquant_CABAC ENDP
  2240. _TEXT ENDS
  2241. PUBLIC _readIntraPredMode_CABAC
  2242. _TEXT SEGMENT
  2243. _currSlice$ = 4 ; first parameter
  2244. _dep_dp$ = 8 ; second parameter
  2245. _readIntraPredMode_CABAC PROC
  2246. ; 720 : TextureInfoContexts *ctx =
  2247. STACKOFFSET=0
  2248. mov eax, DWORD PTR _currSlice$[esp + STACKOFFSET]
  2249. push esi
  2250. mov esi, DWORD PTR [eax+100] ; currSlice->tex_ctx;
  2251. STACKOFFSET=4
  2252. ; 721 : int act_sym;
  2253. ; 722 :
  2254. ; 723 : // use_most_probable_mode
  2255. ; 724 : act_sym = biari_decode_symbol(dep_dp, ctx->ipr_contexts);
  2256. mov edx, DWORD PTR _dep_dp$[esp+STACKOFFSET]
  2257. lea eax, DWORD PTR [esi+12]
  2258. call _biari_decode_symbol_map
  2259. ; remaining_mode_selector
  2260. test eax, eax ; if (act_sym == 0)
  2261. jz SHORT $LN2@readIntraP
  2262. or eax, -1 ; return -1;
  2263. pop esi
  2264. ret 0
  2265. align 16
  2266. $LN2@readIntraP:
  2267. push ebx
  2268. add esi, 16 ; 00000010H
  2269. mov eax, esi
  2270. call _biari_decode_symbol_map
  2271. mov ebx, eax
  2272. ; 735 : pred_mode |= (biari_decode_symbol(dep_dp, ctx->ipr_contexts+1) << 1);
  2273. mov eax, esi
  2274. call _biari_decode_symbol_map
  2275. lea ebx, [ebx+2*eax]
  2276. ; 736 : pred_mode |= (biari_decode_symbol(dep_dp, ctx->ipr_contexts+1) << 2);
  2277. mov eax, esi
  2278. call _biari_decode_symbol_map
  2279. lea eax, [ebx+4*eax] ; return pred_mode;
  2280. pop ebx
  2281. pop esi
  2282. ret 0
  2283. _readIntraPredMode_CABAC ENDP
  2284. _TEXT ENDS
  2285. PUBLIC _readMB_skip_flagInfo_CABAC
  2286. _TEXT SEGMENT
  2287. _currMB$ = 4 ; first parameter
  2288. _dep_dp$ = 12 ; size = 4
  2289. _readMB_skip_flagInfo_CABAC PROC
  2290. ; 406 : Slice *currSlice = currMB->p_Slice;
  2291. STACKOFFSET=0
  2292. mov ecx, DWORD PTR _currMB$[esp + STACKOFFSET]
  2293. push ebp
  2294. xor eax, eax
  2295. push esi
  2296. mov esi, DWORD PTR [ecx + p_Slice@Macroblock] ; esi: currSlice
  2297. cmp DWORD PTR [esi+slice_type@Slice], 1 ; int bframe=(currSlice->slice_type == B_SLICE);
  2298. push edi
  2299. mov edi, DWORD PTR [esi+mot_ctx@Slice] ; edi: ctx = currSlice->mot_ctx;
  2300. sete al ; int bframe=(currSlice->slice_type == B_SLICE);
  2301. ; 409 : int a = (currMB->mb_left != NULL) ? (currMB->mb_left->skip_flag == 0) : 0;
  2302. xor edx, edx
  2303. mov ebp, eax
  2304. mov eax, DWORD PTR [ecx+104]
  2305. test eax, eax
  2306. je SHORT READ_B
  2307. cmp DWORD PTR [eax+348], edx
  2308. sete dl
  2309. ; 410 : int b = (currMB->mb_up != NULL) ? (currMB->mb_up ->skip_flag == 0) : 0;
  2310. READ_B:
  2311. mov ecx, DWORD PTR [ecx+100]
  2312. xor eax, eax
  2313. test ecx, ecx
  2314. je SHORT $LN9@readMB_ski
  2315. cmp DWORD PTR [ecx+348], eax
  2316. sete al
  2317. $LN9@readMB_ski:
  2318. ; 414 : if (bframe)
  2319. ; 415 : {
  2320. ; 416 : act_ctx = 7 + a + b;
  2321. ; 418 : skip = biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][act_ctx]);
  2322. add eax, edx
  2323. test ebp, ebp
  2324. mov edx, DWORD PTR _dep_dp$[esp+8]
  2325. je SHORT $LN3@readMB_ski
  2326. lea eax, DWORD PTR [edi+eax*4+116]
  2327. jmp SHORT $LN11@readMB_ski
  2328. align 16
  2329. $LN3@readMB_ski:
  2330. ; 422 : act_ctx = a + b;
  2331. ; 424 : skip = biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][act_ctx]);
  2332. lea eax, DWORD PTR [edi+eax*4+44]
  2333. $LN11@readMB_ski:
  2334. call _biari_decode_symbol_map
  2335. test eax, eax ; if (!skip)
  2336. je SHORT $LN1@readMB_ski
  2337. ; 429 : currSlice->last_dquant = 0;
  2338. mov DWORD PTR [esi + last_dquant@Slice], 0
  2339. $LN1@readMB_ski:
  2340. pop edi
  2341. pop esi
  2342. pop ebp
  2343. ret 0
  2344. _readMB_skip_flagInfo_CABAC ENDP
  2345. _TEXT ENDS
  2346. PUBLIC _set_chroma_qp
  2347. _TEXT SEGMENT
  2348. _currMB$ = 4 ; first parameter
  2349. _set_chroma_qp PROC
  2350. mov eax, DWORD PTR _currMB$[esp] ; eax: currMB
  2351. mov ecx, DWORD PTR [eax+4] ; ecx: currMB->p_Vid
  2352. mov edx, DWORD PTR [ecx+bitdepth_chroma_qp_scale@VideoParameters] ; edx: p_Vid->bitdepth_chroma_qp_scale;
  2353. push edi
  2354. mov edi, DWORD PTR [ecx+dec_picture@VideoParameters] ; edi: p_Vid->dec_picture
  2355. mov ecx, DWORD PTR [edi+chroma_qp_offset@StorablePicture] ; ecx: dec_picture->chroma_qp_offset[0]
  2356. add ecx, DWORD PTR [eax+qp@macroblock] ; ecx: dec_picture->chroma_qp_offset[0] + currMB->qp
  2357. neg edx ; edx: -p_Vid->bitdepth_chroma_qp_scale;
  2358. cmp ecx, edx
  2359. cmovl ecx, edx
  2360. cmp ecx, 51
  2361. cmovg ecx, DWORD PTR _51 ; cmov doesn't allow for immediates
  2362. test ecx, ecx
  2363. cmovge ecx, DWORD PTR _QP_SCALE_CR[ecx*4]
  2364. mov DWORD PTR [eax+64], ecx
  2365. sub ecx, edx; currMB->qpc[0] + p_Vid->bitdepth_chroma_qp_scale;
  2366. mov DWORD PTR [eax+qp_scaled@Macroblock + 4], ecx ; currMB->qp_scaled[1]
  2367. mov ecx, DWORD PTR [edi+chroma_qp_offset@StorablePicture + 4]
  2368. add ecx, DWORD PTR [eax+qp@macroblock]
  2369. cmp ecx, edx
  2370. cmovl ecx, edx
  2371. cmp ecx, 51
  2372. cmovg ecx, DWORD PTR _51 ; cmov doesn't allow for immediates
  2373. test ecx, ecx
  2374. cmovge ecx, DWORD PTR _QP_SCALE_CR[ecx*4]
  2375. mov DWORD PTR [eax+64+4], ecx
  2376. sub ecx, edx
  2377. pop edi
  2378. mov DWORD PTR [eax+72 + 8], ecx
  2379. ret 0
  2380. _set_chroma_qp ENDP
  2381. _TEXT ENDS
  2382. PUBLIC _decodeMVD_CABAC
  2383. _TEXT SEGMENT
  2384. _dep_dp$ = 4 ; first parameter
  2385. _mv_ctx$ = 8 ; second parameter
  2386. _act_ctx$ = 12; third parameter
  2387. _err$ = 16 ; 4th parameter
  2388. _decodeMVD_CABAC PROC
  2389. STACKOFFSET = 0
  2390. mov eax, DWORD PTR _act_ctx$[esp+STACKOFFSET]
  2391. push edi
  2392. STACKOFFSET = STACKOFFSET + 4
  2393. mov edi, DWORD PTR _mv_ctx$[esp+STACKOFFSET]
  2394. lea edi, [edi+eax*4] ; mv_ctx[0][act_ctx]
  2395. mov eax, DWORD PTR _err$[esp+STACKOFFSET]
  2396. lea eax, DWORD PTR [edi+eax*4] ; &mv_ctx[0][act_ctx+err]
  2397. mov edx, DWORD PTR _dep_dp$[esp+STACKOFFSET]
  2398. call _biari_decode_symbol_map ; int act_sym = biari_decode_symbol(dep_dp,&mv_ctx[0][act_ctx+err] );
  2399. test eax, eax ; if (act_sym != 0)
  2400. je SHORT SYMBOL_ZERO
  2401. push esi
  2402. STACKOFFSET = STACKOFFSET + 4
  2403. lea edi, [edi + 40] ; mv_ctx[1]+act_ctx
  2404. call _unary_exp_golomb_mv_decode3 ; act_sym = unary_exp_golomb_mv_decode3(dep_dp,mv_ctx[1]+act_ctx);
  2405. inc esi ; ++act_sym;
  2406. call _biari_decode_symbol_eq_prob_asm ; mv_sign = biari_decode_symbol_eq_prob(dep_dp);
  2407. js SHORT SKIP_NEGATE; if(mv_sign)
  2408. neg esi ; act_sym = -act_sym;
  2409. SKIP_NEGATE:
  2410. mov eax, esi
  2411. pop esi
  2412. SYMBOL_ZERO:
  2413. pop edi
  2414. ret 0
  2415. _decodeMVD_CABAC ENDP
  2416. _TEXT ENDS
  2417. END