Commits
Commits on
7fc807b2a08fe5cf967e2a6ed0a735bba13891722026-09-08
test(av1): a witness that builds an SVT-AV1 screen stream whose palette map is cut by the frame edgeAhmet Kaan Gümüş · 7fc807b
test(av1): a witness that builds an SVT-AV1 screen stream whose palette map is cut by the frame edge docs(av1): lane-svtinter report
fix(av1): the palette colour-index map is read over the block's on-screen part onlyAhmet Kaan Gümüş · 2461f80
fix(av1): the palette colour-index map is read over the block's on-screen part only A palette block cut by the frame's bottom or right mi edge codes its colour-index map over spec 5.11.50's onscreenWidth x onscreenHeight corner and replicates it outward; this decoder read the full block grid, consuming symbols libaom never wrote and desyncing the rest of the tile (the symptom was either a wrong bottom-edge superblock row or a 'Golomb tail longer than this decoder reads' refusal further down).
Merge branch 'lane-svt1' (6ec1414a): a skipped square intra block armed its palette/intrabc override only when the transform equalled the block, so a skipped split-transform palette block predicted DC; SVT-AV1 screen stream sample-exactAhmet Kaan Gümüş · bab01c8Browse files
Merge branch 'lane-hpmv' (8c75ea8a): the writer can code allow_high_precision_mv frames (mv_hp symbols, pricer, eighth-pel search stage); refuted as a default on both films, ships offAhmet Kaan Gümüş · 6c45e10Browse files
test(av1): NEWMV census prints the hp symbol count; lane-hpmv reportAhmet Kaan Gümüş · 057f20b
test(av1): NEWMV census prints the hp symbol count; lane-hpmv report The eighth-pel capability is refuted as a default on both films: film B 12 frames control +24.6/-2.0 vs +25.0/-1.8 (qindex<96), +25.1/-1.8 (qindex<128, libaom's own rule), +26.6/-0.3 (always on) -- monotone worse in how much high precision is armed. It fires (53% of the hp bits coded are zero, i.e. vectors the control cannot name) and costs 1.2-1.5 more mv bits per coded NEWMV than it earns. Film A flat (+20.3/-5.0 -> +20.3/-4.9). Ships default off (HP_MV_QTHRESH = 0); no default stream moved, so no byte pin moved.
docs(av1): lane-svt1 report -- skipped palette block with a split transformAhmet Kaan Gümüş · 68e4b83Browse files
fix(av1): a skipped palette block with a split transform predicted DC off its edgesAhmet Kaan Gümüş · 1edcdab
fix(av1): a skipped palette block with a split transform predicted DC off its edges A square intra block that is SKIPPED predicts its whole side x side luma in one call; the palette (and intrabc) prediction override was armed only when the transform covered the whole block, so a 16x16 palette block with tx_depth == 1 and skip == 1 fell back to edge prediction. Right symbols -- the whole mode ladder diffs clean against an instrumented aomdec -- wrong pixels: 812 luma samples in the key frame of an SVT-AV1 preset-8 screen stream, carried by the V_PRED blocks under it to 10122 over 12 frames. Sibling paths (decode_leaf8, decode_rect_split, the intra-in-inter walk) already arm on both arms; this was the one site left. Gate rides the kept stream via EC_AV1_SVT1_STREAM (SKIP when unset), asserts the fixed arm fires, and adds EC_AV1_DEBUG_SKIP_LR beside the deblock/CDEF debug rungs for the stage bisect.
feat(av1): code allow_high_precision_mv frames -- header bit, mv_hp symbols, pricer, eighth-pel search stageAhmet Kaan Gümüş · c5d3832
feat(av1): code allow_high_precision_mv frames -- header bit, mv_hp symbols, pricer, eighth-pel search stage The writer refused any odd eighth-pel mv residual, so the finest vector this encoder could commit to was a quarter pel. It can now code a frame with allow_high_precision_mv: the header bit follows libaom's own rule (qindex below a threshold), tile::write_mv_component codes the mv_hp/mv_class0_hp symbol, encode::mv_component_bits prices it, round_to_valid_mv stops rounding, and motion::search runs a fourth refinement stage at 1/8 pel in such a frame. Default stays off (HP_MV_QTHRESH = 0) until the BD sweep decides the policy. Witness: a_high_precision_frame_codes_eighth_pel_motion_vectors_both_decoders_read -- 0 hp symbols off, 6 on (5 of them eighth-pel vectors the off arm cannot name), both arms sample-exact through ffmpeg and decode_stream.
Merge branch 'lane-dq' (b4f6b455): preset 0 codes per-superblock delta_q from libaom's objective tpl mapping at strength 0.25 (long-GOP film A −0.8, film B −0.7 vs libaom); pins re-taken at the merge 8252 / 33053Ahmet Kaan Gümüş · 1e4e107Browse files
docs(av1): lane-dq report -- the two delta_q mappings censused on one tpl map, objective at 0.25 shipped for preset 0Ahmet Kaan Gümüş · ce95864Browse files
Merge branch 'lane-sb128b' (c124d29d): the inter writer signalled a clamped drl index while pricing against the unclamped predictor; the four writer arms take their base mv from the signalled index; symbol-trace instrument; 128 roots refuted on film BAhmet Kaan Gümüş · 7d2ddc2Browse files
Merge branch 'lane-newmv' (02c51eed): the motion search weighs its mv rate at half the SSE lambda and re-runs each subpel stage from its winner; NEWMV census instrument; pins re-taken 8288 / 33090Ahmet Kaan Gümüş · 4a23ee3Browse files
docs(av1): lane-newmv report -- the NEWMV census, the sweep, and what shippedAhmet Kaan Gümüş · 629901fBrowse files
perf(av1): the symbol-trace annotations allocate only when the trace is armedAhmet Kaan Gümüş · 2301cb5Browse files
feat(av1): preset 0 codes a per-superblock delta_q from libaom's objective tpl mapping at strength 0.25Ahmet Kaan Gümüş · 7680c47
feat(av1): preset 0 codes a per-superblock delta_q from libaom's objective tpl mapping at strength 0.25 Long-GOP (48 pictures) BD vs libaom/rav1e: film A +25.2/-7.2 -> +24.4/-7.5, film B +86.7/+7.3 -> +86.0/+7.3; the 12-frame gate reads flat and the screen capture stays byte-identical (no delta syntax on a screen frame). Byte pins re-taken.
perf(av1): the motion search charges its rate term at half the block lambda and iterates each subpel stageAhmet Kaan Gümüş · 215871e
perf(av1): the motion search charges its rate term at half the block lambda and iterates each subpel stage
The search compares SAD while the lambda it is handed is an SSE-domain RD
weight, so a coded vector was over-priced inside the search itself; and one
round per subpel stage cannot reach a winner two half-pels from the integer
centre. MV_SEARCH_LAMBDA 0.5 and MV_SUBPEL_ITERS 4, both swept.
Native BD gate, ours vs libaom / vs rav1e:
12-frame film A +21.0/-4.8 -> +20.6/-5.1, film B +24.9/-1.9 -> +24.8/-2.1,
screen +14.5/-33.2 -> +14.6/-33.2
long-GOP film A +25.2/-7.2 -> +24.7/-7.5, film B +86.7/+7.3 -> +86.8/+7.4
Encoder wall +5-7%. Pins re-taken (inter vectors move).docs(av1): lane-sb128b -- the clamped-drl writer defect, and 128 roots refuted on film BAhmet Kaan Gümüş · fcfba04Browse files
test(av1): a 128-superblock witness for the clamped drl predictorAhmet Kaan Gümüş · d93d5b5
test(av1): a 128-superblock witness for the clamped drl predictor lavfi mandelbrot 1280x768, 12 frames, EC_AV1_SB128 forced on: the writer clamps 7 drl indices whose predictor moves, and every frame of the stream decodes sample-exact against the encoder's own reconstruction. Red before the writer took its base MV from the index it signals (frame 3 luma differs), green after. The counter is the gate on the fixture itself.
fix(av1): the inter writer's MV predictor comes from the drl index it SIGNALSAhmet Kaan Gümüş · d5a4212
fix(av1): the inter writer's MV predictor comes from the drl index it SIGNALS A search-chosen ref_mv_idx past the write-time stack's last entry was coded as the clamped index the drl loop can carry while the residual was priced against stack.pred_mv, so the decoder derived a different motion vector with the entropy stream still in sync. The drift only surfaced frames later as a drl symbol desync, which the encoder's own trial decode then reported as a missing reference slot. write_drl_idx returns the index it signals and both single-reference arms plus the two compound drl arms take their base MV from it. Adds the writer/reader symbol trace the desync was bisected with (EC_AV1_SYMTRACE=<dir>, EC_AV1_SYMTRACE_AT=<i|from:to>) and the mv-stack note beside it.
test(av1): the objective delta_q mapping leans the right way and stops at libaom's clampAhmet Kaan Gümüş · 3676d05Browse files
instrument(av1): a NEWMV census plus mv-rate weights for the block decision and the searchAhmet Kaan Gümüş · f00abe4
instrument(av1): a NEWMV census plus mv-rate weights for the block decision and the search EC_AV1_NEWMV_CENSUS=1 prints, per block side, how often a LAST NEWMV is searched, offered to RD, and wins, the RD margin either way, the searched vector's distance from NEARESTMV, and the mv syntax bits it spends, plus the two pre-RD margins' skip shares and the search's own bound witness (how often the winner was walked to at the log stage's widest step). EC_AV1_MV_LAMBDA weights the mv rate term of the block decision only and EC_AV1_MV_SEARCH_LAMBDA the search's own; both default 1.0, byte-identical.
feat(av1): libaom's objective per-SB delta_q mapping behind EC_AV1_DQ_TPL, plus an EC_AV1_DQ_CENSUS instrumentAhmet Kaan Gümüş · 4cfdb9d
feat(av1): libaom's objective per-SB delta_q mapping behind EC_AV1_DQ_TPL, plus an EC_AV1_DQ_CENSUS instrument The tpl map now hands out its raw per-cell dependence ratio beside the lambda factors; deltaq_libaom inverts dc_q through beta = r0/rk the way av1_get_q_for_deltaq_objective does and clamps to +-(delta_q_res*9-1). Default behaviour is unchanged (both flags off).
Merge branch 'lane-cen3' (79792051): matched-rate bit census of film B against libaom and rav1e; syntax_census takes EC_CENSUS_TABLESAhmet Kaan Gümüş · 19e7ef8Browse files
docs(av1): lane-cen3 -- film B at matched rate, ours vs libaom vs rav1e, per level and per syntax familyAhmet Kaan Gümüş · 1cb5cf6
docs(av1): lane-cen3 -- film B at matched rate, ours vs libaom vs rav1e, per level and per syntax family At the 48-frame film B window and matched bytes (ours 71601 B/45.444 dB, libaom cpu-used 6 crf 34 70345 B/46.539, rav1e speed 6 q110 75452 B/45.751) the whole 1.10 dB deficit is inter: our key is the cheapest of the three and 0.29 dB above libaom's. At equal size we spend 9.2 kB MORE on mode syntax and 6.9 kB LESS on residual than libaom. Our per-block mode cost equals libaom's to two decimals (3.26 bits), so the mode gap is block COUNT: 38754 coded blocks against 16178, and at the leaf level 85.5% of ours are already at the 64x64 maximum. Second: +5633 B of inter coefficients against -1545 B of mv, with NEWMV coded on 18-33% of our blocks against libaom's 54-76% on the same motion field. Long-GOP against rav1e names the top-ARF level as the overspent one (+68% bytes for -0.22 dB) and the key as the under-quality one (-0.61 dB). Instrument: EC_CENSUS_TABLES sets how many CDF tables syntax_census names per row (default 8, unchanged when unset) -- the default hid the mode family's own split. No encoder behaviour changed; pins unmoved.
Merge branch 'lane-split' (5e2874fd): split-trial lambda swept and refuted (single-peaked at 1.0), split census instrument; encoder bytes unchangedAhmet Kaan Gümüş · abd9bdbBrowse files
docs(av1): the then_some sweep in the split report names the real hit countAhmet Kaan Gümüş · 47929feBrowse files
docs(av1): lane-split report -- the split lambda swept, control wins, census shippedAhmet Kaan Gümüş · d8a0bf9
docs(av1): lane-split report -- the split lambda swept, control wins, census shipped Also extracts split_census_base and enumerates its whole domain in a test.
Revert the tx_depth context pricing: no split-lambda calibration recovers itAhmet Kaan Gümüş · 9c0f629
Revert the tx_depth context pricing: no split-lambda calibration recovers it lane-split's charter. With the correct pricing on, EC_AV1_SPLIT_LAMBDA sweeps 0.6/0.8/1.0/1.25/1.5/2.0 on the film B gate row to +28.4/+0.5, +26.1/-0.9, +25.2/-1.6, +25.9/-1.1, +26.2/-0.9, +26.3/-0.8: a single-peaked curve whose optimum IS the control weight, and every point is worse than the row-0-priced control (+24.9/-1.9). So the split trial's rate weight was not the mis-calibrated term either, and the pricing fix goes back out; the census and the swept knob (SPLIT_LAMBDA = 1.0) stay. Encoder output is byte-identical to 2caf213b (both stream pins green, unmoved).
fix(av1): the split census guard printed on every unarmed encode (then_some drops its argument)Ahmet Kaan Gümüş · 651e207Browse files
feat(av1): EC_AV1_SPLIT_LAMBDA on the split trial's rate, plus a split censusAhmet Kaan Gümüş · c781f74
feat(av1): EC_AV1_SPLIT_LAMBDA on the split trial's rate, plus a split census The class rd-rate-term-calibration knob lane-txd's report asks for. The intra tx_depth depth>0 candidates and the inter var-tx depth-1 trial now charge their rate at split_lambda_mult() * lambda (SPLIT_LAMBDA = 1.0, the control), and EC_AV1_SPLIT_CENSUS=1 prints per site / frame type / block side how many trials were offered, how many the split won, and the mean (rate, distortion) of winner and loser.
test(av1): re-take the encoder's own stream pins at 8381 / 33016Ahmet Kaan Gümüş · 5f55543
test(av1): re-take the encoder's own stream pins at 8381 / 33016 Same reason as the fix itself: every intra block's tx_depth symbol is now priced at the writer's context row on both frame types, so the depth-versus-split margins moved. Green at the default preset and at EC_AV1_SPEED=6.
fix(av1): the tx_depth symbol is priced at the writer's context on both frame typesAhmet Kaan Gümüş · 4eb77f9
fix(av1): the tx_depth symbol is priced at the writer's context on both frame types Class pricer-context-zero, the last site. A key frame reads the deblock grid (tile::tx_size_ctx_of over Neighbours::record_tx's bands, lane-ctx2's half, restored here); an INTER frame's intra block reads the TXFM_CONTEXT bands instead (tx_size_ctx_txfm, where an inter neighbour votes its own BLOCK size and a skipped inter block publishes its block size), which the encoder published nowhere -- so lane-ctx2 shipped half a fix and the two frame types judged the same depth-versus-split margin against different rows. The bands ride beside MiGrid::cells (one u8 per mi cell, like skips: the cell must stay 16 bytes), filled by record_mi at every publication point -- every coded block, skipped inter blocks and var-tx roots included -- and the rule itself is one function, tile::tx_size_ctx_txfm_of, that the writer's Neighbours::tx_size_ctx_txfm now calls too. encode::tests::the_tx_depth_pricer_uses_the_writers_own_context_row is red before: the grid's row is 0 where the writer codes row 2, and at row 2 a 16x16 depth-0 symbol prices 1.4169 bits against the writer's 0.8110.
Merge branch 'lane-txd' (3c743b34): the full tx_depth context fix measured worse and is reverted; report only (split calibration is the blocker)Ahmet Kaan Gümüş · 8fa4f6aBrowse files
docs(av1): lane-txd report -- both tx_depth context halves built, censused and refutedAhmet Kaan Gümüş · a383f5dBrowse files
Revert the tx_depth context fix: correct pricing measures worseAhmet Kaan Gümüş · 1d2760b
Revert the tx_depth context fix: correct pricing measures worse REFUTED on the 12-frame native gate against a control reproduced in this worktree at 3c106765. Arm = both halves (key frame off the deblock grid, inter frame's intra block off the TXFM_CONTEXT bands the encoder now published per mi cell): | row | control | arm | |--------|--------------|--------------| | film A | +21.0 / -4.8 | +20.9 / -4.8 | | film B | +24.9 / -1.9 | +25.2 / -1.6 | | screen | +14.5 / -33.2| +14.5 / -33.2| | bars 1080p | -2.0 / -17.6 | -2.0 / -17.6 | | bars 2160p | +8.7 / -13.4 | +8.7 / -13.4 | Film B moves the wrong way on BOTH columns by 0.3 while film A gains 0.1 on one, so no keep rule is met (not both-improve, not 0.5-down-and-flat, not flat-within-0.2). Census of the row the writer really codes each `tx_depth` symbol at, over the pin encode's key + inter pictures: key frames ctx0 767 ctx1 457 ctx2 156 (ctx2 11.3%) inter-frame intra ctx0 227 ctx1 731 ctx2 1902 (ctx2 66.5%) libaom's default rows 0 and 1 are identical, so only ctx2 moves a price, and the direction is one-sided: at ctx2 depth 0 costs 0.28 (8x8), 0.61 (16x16), 0.90 (32x32) and 1.54 (64x64) bits LESS than at row 0, while depth 1 costs 0.56-0.76 bits MORE. Correct pricing therefore discourages transform splitting, and it does so on two thirds of an inter frame's intra blocks against one ninth of a key frame's -- which is exactly the row that loses. The gate says the search's residual/lambda calibration was leaning on the row-0 handicap; the symbol price itself is not what is mispriced here. Nothing else consumed the published bands, so the bands, the shared tile::tx_size_ctx_txfm_of, the MiGrid cell band and the re-taken pins go with it (the tree is byte-identical to 3c106765 again). Class pricer-context-zero has no site left that pays.
docs(av1): drop a dangling half-sentence in the stream-pin history commentAhmet Kaan Gümüş · 9419b29Browse files
test(av1): re-take the encoder's own stream pins at 8381 / 33016Ahmet Kaan Gümüş · 4e28683
test(av1): re-take the encoder's own stream pins at 8381 / 33016 Same reason as the fix itself: every intra block's tx_depth symbol is now priced at the writer's context row on both frame types, so the depth-versus-split margins moved. Green at the default preset and at EC_AV1_SPEED=6.
fix(av1): the tx_depth symbol is priced at the writer's context on both frame typesAhmet Kaan Gümüş · b6c0331
fix(av1): the tx_depth symbol is priced at the writer's context on both frame types Class pricer-context-zero, the last site. A key frame reads the deblock grid (tile::tx_size_ctx_of over Neighbours::record_tx's bands, lane-ctx2's half, restored here); an INTER frame's intra block reads the TXFM_CONTEXT bands instead (tx_size_ctx_txfm, where an inter neighbour votes its own BLOCK size and a skipped inter block publishes its block size), which the encoder published nowhere -- so lane-ctx2 shipped half a fix and the two frame types judged the same depth-versus-split margin against different rows. The bands ride beside MiGrid::cells (one u8 per mi cell, like skips: the cell must stay 16 bytes), filled by record_mi at every publication point -- every coded block, skipped inter blocks and var-tx roots included -- and the rule itself is one function, tile::tx_size_ctx_txfm_of, that the writer's Neighbours::tx_size_ctx_txfm now calls too. encode::tests::the_tx_depth_pricer_uses_the_writers_own_context_row is red before: the grid's row is 0 where the writer codes row 2, and at row 2 a 16x16 depth-0 symbol prices 1.4169 bits against the writer's 0.8110.
Merge branch 'lane-ctx2' (2efeb8f6): single-reference candidates pay comp_mode=0 at the writer's context; the key-only tx_size context arm measured worse and is reverted; pins re-taken 8325 / 33014Ahmet Kaan Gümüş · b3d0d7cBrowse files
docs(av1): lane-ctx2 report -- comp_mode term ships, tx_size depth context refutedAhmet Kaan Gümüş · e61e88bBrowse files
Revert "fix(av1): a key frame's tx_depth symbol is priced at the writer's context row"Ahmet Kaan Gümüş · c46955e
Revert "fix(av1): a key frame's tx_depth symbol is priced at the writer's context row" REFUTED on the 12-frame native gate: against its own control (this lane's comp_mode arm) film A goes +21.0/-4.8 -> +21.1/-4.6 and film B +24.9/-1.9 -> +25.0/-1.9, i.e. every film column moves the wrong way for no win anywhere (screen and both bars rows byte-for-byte flat). The keep rule is not met. The likely reason it costs rather than pays: this was HALF the fix -- an inter frame's intra block still prices its tx_depth at row 0 (it reads the TXFM_CONTEXT bands, which the encoder publishes nowhere), so key and inter frames now judge the same depth-versus-split margin against different rows. This reverts commit 7499152e.
fix(av1): a key frame's tx_depth symbol is priced at the writer's context rowAhmet Kaan Gümüş · ae42b5f
fix(av1): a key frame's tx_depth symbol is priced at the writer's context row The writer codes tx_depth off tx_size_ctx -- whether the transform above and the one to the left are at least as wide as this block's own largest transform -- while the RD search priced every block at row 0, the row where both neighbours are narrower and splitting reads cheapest (class pricer-context-zero). The key-frame tile search now keeps the same two bands the writer's record_tx publishes (each coded block's resolved transform side over its own 4x4 units, frame-absolute so a superblock row needs no reset), and code_square prices its tx_depth off tile::tx_size_ctx_of, the writer's own rule, now shared rather than transcribed. Pins re-taken: 8325 / 33014, both hashes new.
fix(av1): the RD pricer pays comp_mode=0 for a single-reference candidateAhmet Kaan Gümüş · ef9e91a
fix(av1): the RD pricer pays comp_mode=0 for a single-reference candidate On a reference_select frame the writer codes a comp_mode symbol ahead of every inter block's reference syntax, but the pricer charged only the compound side (comp_mode=1 inside compound_ref_bits) and the single side nothing at all, so compound carried the whole symbol as a handicap. single_ref_bits now adds comp_mode=0 at the writer's own reference_mode_ctx, and pays nothing on a frame that carries no reference_select bit -- exactly where write_comp_mode returns early. Pins re-taken: 8325 / 33014.
Merge branch 'lane-ctx' (ad3b6f81): the RD pricer reads the writer's contexts for skip, is_inter and the whole compound reference tree; pins re-taken 8311 / 33087Ahmet Kaan Gümüş · 55a7370Browse files
docs(av1): lane-ctx report -- pricer context sites, per-arm gate tables, deferralsAhmet Kaan Gümüş · 6ea5a69Browse files
fix(av1): keep the mi cell at 16 bytes -- the pricer's skip band rides beside itAhmet Kaan Gümüş · c73918f
fix(av1): keep the mi cell at 16 bytes -- the pricer's skip band rides beside it mi_info_cell_stays_compact and mi_info_stays_small_enough_for_a_4k_grid went red: a bool in MiInfo took the cell from 16 to 18 bytes, and that struct is what every mv-stack scan walks. The flag moves to a Vec<bool> beside the cells, filled only by the encoder's record_mi and read only by the stack's above_skip/left_skip. Streams are byte-identical (both pins unchanged).