edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiB5530fbdTahinli3 months ago209 commits
| 1 | //! Export: the edit list rendered back out as one mp4 (H.264, AV1 or HEVC) or |
| 2 | //! one Matroska file (AV1 or HEVC) — or, picture left behind, as one WAV, FLAC |
| 3 | //! or MP3 of the timeline's audio alone. |
| 4 | //! |
| 5 | //! The HEVC pair is **intra-only**, and says so wherever it is offered: every |
| 6 | //! frame is a self-contained IDR from the vendored `oxideav-h265`, which is the |
| 7 | //! only shape of a pure-Rust HEVC encode fast enough to wait for (its inter |
| 8 | //! modes code 1080p at 0.81 fps across 12 cores against the intra path's 4.30). |
| 9 | //! That makes it an intraframe master in the family of ProRes and DNxHD — large |
| 10 | //! files, every frame a cut point — and not a delivery codec. |
| 11 | //! |
| 12 | //! Video is fully re-encoded — a cut lands mid-GOP, so stream-copying across it |
| 13 | //! is impossible — while audio is copied packet for packet wherever a copy can |
| 14 | //! say what the timeline says: a copy is exact, free and never a generation of |
| 15 | //! loss. Where it *cannot* — a second audio lane to mix in, a speeded clip, an |
| 16 | //! equalized one, a source that is not AAC inside an mp4's own sample table — |
| 17 | //! the sound is decoded, mixed and encoded again with `rusty_aac` |
| 18 | //! ([`encode_audio`]). The audio-only formats have no such split: `hound` writes |
| 19 | //! PCM, `flacenc` encodes FLAC and `rusty_mp3` encodes MP3, so those are always |
| 20 | //! *decoded* out of the timeline. The worker owns everything: the caller gets an |
| 21 | //! [`ExportHandle`] and polls it from its render loop. |
| 22 | //! |
| 23 | //! **Every video format here carries the timeline's sound**, in whichever |
| 24 | //! container: the mp4 muxer writes an AAC track and so does the Matroska one. |
| 25 | //! Nothing is written picture-only and nothing is left silent without saying so |
| 26 | //! — the only sound that does not come out is sound this engine cannot decode at |
| 27 | //! all (Opus and AC-3 inside a Matroska file), and that is an error by name. |
| 28 | //! |
| 29 | //! A **speeded** clip splits along the same line, and for the same reason. The |
| 30 | //! picture is re-encoded, so the frame walk honours a rate: it takes the source |
| 31 | //! frame each timeline frame shows ([`crate::project::Speed::source_at`], the |
| 32 | //! very frame preview holds there) and encodes a held one again rather than |
| 33 | //! decoding it twice. A clip whose *file* was shot at another rate than the |
| 34 | //! timeline goes through the same walk with one more conversion on the end |
| 35 | //! ([`crate::project::Rate`]), so it is encoded at the speed it was shot at. |
| 36 | //! The sound is *copied* unless something forces a decode, and a packet carries |
| 37 | //! no rate — so a speeded lane is one of the things that forces one |
| 38 | //! ([`copy_audio`]) rather than being written out at 1.00x under a re-timed |
| 39 | //! picture. WAV, FLAC and MP3 are decoded and resampled, so they honour a rate |
| 40 | //! like the picture does. |
| 41 | //! |
| 42 | //! Nothing partial survives a failure: the worker writes to `<out>.part` and |
| 43 | //! renames it onto `out` only once the file is closed and complete, so the |
| 44 | //! output either does not exist or is finished — there is no window where a |
| 45 | //! half-written `.export.mp4` is sitting there looking playable. Cancel and |
| 46 | //! every error path delete the `.part`. A killed *process* leaves the `.part` |
| 47 | //! behind (only in-process cleanup is promised), which is an orphan a user can |
| 48 | //! delete rather than a file that plays for two seconds and stops. |
| 49 | |
| 50 | use File; |
| 51 | use ; |
| 52 | use ; |
| 53 | use ; |
| 54 | use ; |
| 55 | use thread; |
| 56 | |
| 57 | use ; |
| 58 | |
| 59 | use BitRepr; |
| 60 | use Verify; |
| 61 | |
| 62 | use crate; |
| 63 | use crate; |
| 64 | use crate; |
| 65 | use crate; |
| 66 | use crate; |
| 67 | use crateComposer; |
| 68 | |
| 69 | /// Progress is reported in permille: an atomic integer the render loop can read |
| 70 | /// without a lock, fine enough for any progress bar. |
| 71 | const PROGRESS_SCALE: u32 = 1_000; |
| 72 | |
| 73 | /// D2 rate control: bits per pixel per second, then a sane range. 720p30 lands |
| 74 | /// at 2.76 Mbps, which S1 measured the software encoder hitting within 1%. |
| 75 | const BITS_PER_PIXEL: f64 = 0.1; |
| 76 | const MIN_BITRATE: u64 = 1_000_000; |
| 77 | const MAX_BITRATE: u64 = 20_000_000; |
| 78 | |
| 79 | /// `rav1e`'s fastest preset. Anything slower is minutes per second of timeline |
| 80 | /// on a build with no assembly, which is what this one is. |
| 81 | const AV1_SPEED: u8 = 10; |
| 82 | |
| 83 | /// The HEVC coding tree block this encoder is fixed at: the coded picture is a |
| 84 | /// whole number of them, which is what the conformance window crops back. |
| 85 | const CTB: usize = 16; |
| 86 | /// How many frames the intra HEVC encoder codes at once. Twelve is where the |
| 87 | /// 2026-08-11 bench stopped scaling on this box (4.30 fps at 1080p); more lanes |
| 88 | /// only holds more decoded frames in memory. |
| 89 | const HEVC_LANES: usize = 12; |
| 90 | /// Bits per pixel the intra encoder spends at QP 27, measured on the same bench: |
| 91 | /// 0.607 at 720p and 0.586 at 1080p. What [`hevc_qp`] maps a bitrate row through. |
| 92 | const HEVC_BPP_AT_27: f64 = 0.6; |
| 93 | /// The band [`hevc_qp`] is clamped into, for the reason stated there. |
| 94 | const HEVC_QP_MIN: i32 = 22; |
| 95 | const HEVC_QP_MAX: i32 = 40; |
| 96 | |
| 97 | /// What an export writes. H.264-in-mp4, AV1 and HEVC -- each of the last two in |
| 98 | /// Matroska or in mp4, the user's pick of container -- are the *video* pairs |
| 99 | /// with both an encoder and a decoder under this project's no-install rule, and |
| 100 | /// WAV, FLAC and MP3 are the standalone audio formats with a pure-Rust encoder: |
| 101 | /// `hound`, `flacenc` and `rusty_mp3`. Vorbis and Opus have none. (AAC does -- |
| 102 | /// `rusty_aac`, which is what a re-encoded video track's sound leaves through -- |
| 103 | /// but AAC is a container's own audio, never a file of its own here.) VP9 is the |
| 104 | /// one codec left that comes in through the plugin and stops there, HEVC having |
| 105 | /// gained an encoder (an intra-only one, which the rows say). A front-end says |
| 106 | /// so rather than hiding the row. |
| 107 | /// |
| 108 | /// **Every video format carries sound.** Which way it carries it is the only |
| 109 | /// difference: copied packet for packet where a copy can say what the timeline |
| 110 | /// says, decoded and encoded again ([`encode_audio`]) where it cannot. |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | /// What the caller gets to decide about the output. The codec is not among it: |
| 195 | /// [`Format`] names a container *and* what goes in it, because every pair we |
| 196 | /// can write is a pair we can also read back. |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | /// A running export. Poll [`is_finished`](ExportHandle::is_finished) once per |
| 222 | /// rendered frame and take the [`result`](ExportHandle::result) when it flips; |
| 223 | /// dropping the handle does *not* stop the worker, [`cancel`](ExportHandle::cancel) |
| 224 | /// does. |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | /// Starts the worker. Failures are reported through the handle rather than |
| 262 | /// returned, so a caller has exactly one place to look. The files to read are |
| 263 | /// the project's own [`sources`](Project::sources) -- every clip names one -- |
| 264 | /// so nothing but the edit list decides what is decoded. |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | /// Whether any video lane holds anything at all -- what tells an audio-only |
| 332 | /// timeline from one that merely opens on a gap. Asked of the *lanes* rather |
| 333 | /// than of the sources, because a project may name a video file no clip plays |
| 334 | /// from any more. |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | /// Whether any audio lane holds anything, [`has_picture`]'s pair: what tells a |
| 343 | /// timeline whose export will carry sound from one whose file has none. |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | /// Whether any equalizer on the sound is doing something -- the one edit a |
| 352 | /// packet copy cannot carry, so an mp4 whose lane has one is decoded and |
| 353 | /// re-encoded ([`encode_audio`]) instead of copied. Asked of every audio lane: |
| 354 | /// the copy path has exactly one by the time it asks, and [`planned_audio`] is |
| 355 | /// asked before that is settled. |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | /// Whether the *mix* is doing something -- a lane turned off unity, or a |
| 364 | /// limiter in circuit. [`equalized`]'s pair, and a copy cannot carry either of |
| 365 | /// them: both live where the lanes are summed |
| 366 | /// ([`AudioSession::open_mixed_streams_master`]), and a copied packet was never |
| 367 | /// summed at all. An mp4 whose timeline is mixed is decoded and re-encoded. |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | /// The bitrate an export codes at: the caller's number through the same clamp |
| 373 | /// as the computed one, for the reason [`Enc::open`] states. |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | /// The hardware seat for these settings, opened exactly as the export opens it |
| 381 | /// -- the same pins, the same AV1 opt-in, the same dimensions a driver may |
| 382 | /// refuse -- or `None` where the software encoder takes the file. The single |
| 383 | /// place that choice is made, which is what lets [`planned_video`] *measure* it |
| 384 | /// instead of promising it. |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | /// How a front-end names a video seat: which of the two encoders has the file, |
| 408 | /// and which library that is. Not the codec -- a caller shows this beside the |
| 409 | /// format it picked, and `rav1e` names AV1 as `rusty_h264` names H.264. One |
| 410 | /// place, so what a card says before an export and what its progress line says |
| 411 | /// during one cannot drift apart. |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | /// The cheap half of "does this timeline's sound have to be re-encoded": what |
| 422 | /// the *edit* says, with no file opened. Two lanes are a mix and a mix is not a |
| 423 | /// copy; a speeded lane is resampled; an equalizer is sample math. The other |
| 424 | /// half -- whether the sources can be copied out of at all -- costs a file open |
| 425 | /// each and belongs to [`copy_audio`], which may re-encode where this says copy. |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | /// What the sound is written by. Every audio encoder here is software -- there |
| 441 | /// is no hardware AAC, PCM, FLAC or MP3 seat -- so this names *which* one, and |
| 442 | /// whether a container escapes encoding altogether by copying the packets it was |
| 443 | /// given. Both AV1 formats are in it like the mp4: an AV1 export carries the |
| 444 | /// timeline's sound too, so leaving it unnamed would be the old lie. |
| 445 | /// |
| 446 | /// A prediction, and it says so: `copied` is what [`copy_audio`] *did*, which a |
| 447 | /// card asking before the export has no way to know (a source that cannot be |
| 448 | /// copied out of is only found by opening it). `None` predicts from the edit |
| 449 | /// alone. |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | /// What [`start`] would write this timeline's sound with, before one is |
| 471 | /// started. Pure: no probe and no file opened, so a card may ask it per repaint. |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | /// What [`start`] would encode the picture with, probed the way the export |
| 477 | /// probes it -- the very encoder is opened and closed again -- so this is a |
| 478 | /// measurement and not a promise. `None` for a format that carries no picture. |
| 479 | /// |
| 480 | /// Costs that open (~100 ms here): ask it off a render thread and keep the |
| 481 | /// answer until the format, the resolution or the bitrate changes. |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | /// The audio track an export writes, and how it was made -- a copy is the |
| 496 | /// source's own packets, bit for bit, and anything else is this project's |
| 497 | /// encoder over the decoded mix. [`run`] publishes which of the two really |
| 498 | /// happened, so the encoder line a user reads is measured and not promised. |
| 499 | pub |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | /// The timeline's audio track for a file that carries picture: copied packet for |
| 507 | /// packet where a copy says exactly what the timeline says, and decoded, mixed |
| 508 | /// and encoded again ([`encode_audio`]) where it cannot -- a second audio lane, |
| 509 | /// a speeded clip, an equalizer, a source that is not AAC inside an mp4 sample |
| 510 | /// table. Nothing is refused for being uncopyable any more; the only refusals |
| 511 | /// left below the copy are about sound this engine cannot *decode* either, and |
| 512 | /// those come out of the decode path by name. |
| 513 | /// |
| 514 | /// The copy is still the default and still bit-exact: a timeline nobody has |
| 515 | /// touched leaves as the very packets its source holds. |
| 516 | /// |
| 517 | /// ponytail: this holds the whole exported AAC track in memory (~3 kB per |
| 518 | /// 23 ms packet, so ~500 MB for an hour). Upgrade path is a streaming |
| 519 | /// `copy_segments` that yields packets instead of collecting them. |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | /// The same lane, *decoded*: what a packet copy cannot carry comes out here as |
| 603 | /// AAC written by this project's own encoder. |
| 604 | /// |
| 605 | /// The samples are the very ones [`run_audio`] would put in a WAV -- the same |
| 606 | /// opener with the same equalizers, the same rates and the same resize onto the |
| 607 | /// timeline's own length -- so an mp4 and a WAV of one timeline are one mix, |
| 608 | /// not two that could disagree. |
| 609 | /// |
| 610 | /// AAC-LC's encoder delay is one 1024-frame block, which is exactly the priming |
| 611 | /// a reader drops when the file carries no edit list (`audio::DEFAULT_PRIMING`, |
| 612 | /// and [`crate::mux::Mp4Muxer`] writes none): the first packet is that delay, so |
| 613 | /// the sound starts at timeline frame 0 as a copied track's does. |
| 614 | /// |
| 615 | /// ponytail: the mix sits in memory as f32 before it is encoded (~46 MB a |
| 616 | /// minute of 48 kHz stereo), for [`run_audio`]'s reason -- `rusty_aac` buffers |
| 617 | /// the whole stream anyway, since it encodes its frames in parallel. Upgrade |
| 618 | /// path is a chunked push once that encoder streams. |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | /// What rate `path` was shot at against a timeline at `timeline_fps` |
| 914 | /// ([`Rate`]). [`Rate::REAL_TIME`] for the files that have no rate of their own |
| 915 | /// -- a still, a song -- and for one that will not open here: the decoder is |
| 916 | /// opened a few lines later and fails the export by name, which is a better |
| 917 | /// error than this one could raise. |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | /// The audio lanes alone, summed, as a WAV or a FLAC. |
| 932 | /// |
| 933 | /// Nothing here re-derives the edit: the play lists are |
| 934 | /// [`Project::audio_segments_from`] and they are handed to the very |
| 935 | /// [`AudioSession::open_mixed_streams`] playback feeds from, so what is written |
| 936 | /// is what was heard -- every lane, mixed the same way, gaps included, which |
| 937 | /// arrive as real silence from that choke point rather than as a hole this would |
| 938 | /// have to invent. |
| 939 | /// |
| 940 | /// The length is the *timeline's*: each segment resolves its window to whole |
| 941 | /// samples on its own, so the sum can miss the timeline by a sample or two, and |
| 942 | /// a source that runs out early would leave the file short. Both are settled by |
| 943 | /// one `resize` at the end -- padding with silence, trimming what overshot -- |
| 944 | /// so an exported file is exactly as long as what was edited. |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | |
| 1017 | |
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 | /// 16-bit PCM at the timeline's own rate and layout: no resampling anywhere in |
| 1022 | /// this engine, so what the decoder handed over is what the header says. |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | /// The same samples as MPEG-1 Layer III, `rusty_mp3` doing the encoding -- pure |
| 1043 | /// Rust like every other encoder here, and the reason this format is a row at |
| 1044 | /// all: the LGPL `shine-rs` was the only one when it was not. |
| 1045 | /// |
| 1046 | /// 256 kbps CBR, for [`encode_audio`]'s reason: an export is a master a person |
| 1047 | /// edits from again, not a delivery file, and this is a lossy generation over |
| 1048 | /// sources that may already have been one. The rate is snapped to a legal Layer |
| 1049 | /// III value by the encoder, and a sample rate MPEG has no frame for (anything |
| 1050 | /// but 8-48 kHz) is refused there by name rather than written as something else. |
| 1051 | /// |
| 1052 | /// ponytail: CBR only, and no rate is offered to the caller -- the export card |
| 1053 | /// has one bitrate control and it is the *picture's*. Upgrade path is |
| 1054 | /// `Mp3EncoderConfig::vbr_quality` behind a setting of its own. |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | /// The same samples, losslessly compressed. `flacenc`'s errors are flattened to |
| 1079 | /// text: they are not `Send + Sync`, and every one of them fails the export the |
| 1080 | /// same way. |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | /// The I420 planes of one black picture, allocated once for a whole export: a |
| 1115 | /// gap in the video lane is encoded, not skipped, or every frame after it would |
| 1116 | /// arrive early. Limited-range black is `Y=16, U=V=128`, the same convention |
| 1117 | /// [`crate::convert`] decodes with. |
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | /// `Err` once a cancel has been asked for. Called at every point where the work |
| 1142 | /// left is more than an instant, so an `esc` at 99.9% still stops the export |
| 1143 | /// instead of quietly completing it. |
| 1144 | |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | /// The two containers an export writes, so the picture loop above is one loop: |
| 1152 | /// H.264 goes into mp4, AV1 into Matroska, and nothing else is offered. |
| 1153 | |
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | /// Writes one access unit, creating the file on the first one -- the parameter |
| 1168 | /// sets for `avcC` (and the sequence header for `CodecPrivate`) only exist once |
| 1169 | /// the encoder has coded something. Units with no coded slice are skipped: a |
| 1170 | /// software encoder may hand back an empty buffer while it buffers, and the |
| 1171 | /// muxer rejects a sample that would carry no picture. |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | |
| 1177 | |
| 1178 | |
| 1179 | |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | |
| 1207 | |
| 1208 | |
| 1209 | |
| 1210 | |
| 1211 | |
| 1212 | |
| 1213 | |
| 1214 | |
| 1215 | |
| 1216 | |
| 1217 | |
| 1218 | |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | |
| 1299 | |
| 1300 | |
| 1301 | |
| 1302 | |
| 1303 | |
| 1304 | |
| 1305 | |
| 1306 | |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | /// The `hvcC` record of the first coded unit, or the refusal by name. Split out |
| 1315 | /// because both HEVC containers ask it in the same words. |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | /// Hardware where it is available, software everywhere else -- chosen once for |
| 1331 | /// the whole export, so the stream never changes encoder mid-file. Both codecs |
| 1332 | /// have both seats: an AV1 export runs on the plugin's VA-API encoder where the |
| 1333 | /// GPU has one and on `rav1e` where it has not, which is the same pair H.264 has |
| 1334 | /// had and the same silent fallback. |
| 1335 | |
| 1336 | |
| 1337 | |
| 1338 | |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | |
| 1363 | /// The intra HEVC seat. Frames arrive one at a time (the export walk is one |
| 1364 | /// picture per timeline frame) and are held until there are [`lanes`] of them, |
| 1365 | /// then coded in parallel and queued in **display order** -- fanning out is the |
| 1366 | /// only thing that makes a pure-Rust HEVC export bearable (4.30 fps at 1080p on |
| 1367 | /// 12 lanes against 0.55 fps on one, measured 2026-08-11), and an export whose |
| 1368 | /// frames came back shuffled would be no export at all. |
| 1369 | /// |
| 1370 | /// ponytail: a batch of padded planes sits in memory (~3 MB a frame at 1080p, |
| 1371 | /// so ~37 MB at 12 lanes) and the tail of a timeline is coded on fewer lanes |
| 1372 | /// than the middle. Upgrade path is a pipeline that keeps every lane fed from a |
| 1373 | /// decoder running ahead of the encoder rather than a batch barrier. |
| 1374 | |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | |
| 1390 | |
| 1391 | |
| 1392 | |
| 1393 | |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | |
| 1398 | |
| 1399 | |
| 1400 | |
| 1401 | |
| 1402 | |
| 1403 | |
| 1404 | |
| 1405 | |
| 1406 | |
| 1407 | |
| 1408 | |
| 1409 | |
| 1410 | |
| 1411 | |
| 1412 | |
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | |
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | |
| 1431 | |
| 1432 | |
| 1433 | |
| 1434 | |
| 1435 | |
| 1436 | |
| 1437 | |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | |
| 1447 | |
| 1448 | |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
| 1454 | |
| 1455 | |
| 1456 | |
| 1457 | |
| 1458 | |
| 1459 | |
| 1460 | |
| 1461 | |
| 1462 | |
| 1463 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | |
| 1476 | |
| 1477 | |
| 1478 | |
| 1479 | |
| 1480 | |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | |
| 1489 | |
| 1490 | |
| 1491 | |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | |
| 1507 | |
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 | |
| 1512 | |
| 1513 | |
| 1514 | |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | |
| 1519 | |
| 1520 | |
| 1521 | |
| 1522 | |
| 1523 | |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | |
| 1534 | |
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | |
| 1555 | |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | |
| 1578 | |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | |
| 1583 | |
| 1584 | |
| 1585 | |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | |
| 1593 | |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | |
| 1598 | |
| 1599 | |
| 1600 | |
| 1601 | |
| 1602 | |
| 1603 | |
| 1604 | |
| 1605 | |
| 1606 | |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 | |
| 1611 | |
| 1612 | |
| 1613 | |
| 1614 | |
| 1615 | |
| 1616 | |
| 1617 | |
| 1618 | |
| 1619 | |
| 1620 | |
| 1621 | |
| 1622 | |
| 1623 | |
| 1624 | |
| 1625 | |
| 1626 | |
| 1627 | |
| 1628 | |
| 1629 | |
| 1630 | |
| 1631 | |
| 1632 | |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | |
| 1641 | |
| 1642 | |
| 1643 | |
| 1644 | |
| 1645 | |
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | |
| 1657 | |
| 1658 | |
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | |
| 1666 | |
| 1667 | |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | |
| 1673 | |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | |
| 1686 | |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | |
| 1714 | /// The oldest coded intra AU, lent out under the same "valid until the next |
| 1715 | /// call" contract [`pop_av1`] has. Every one of them is an IDR, so the key flag |
| 1716 | /// is not a guess. |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | /// One I420 picture copied onto the padded plane sizes the CTB grid needs, the |
| 1723 | /// added rows and columns filled by **replicating the edge** rather than with |
| 1724 | /// black: the padding is coded and then cropped away, and a black border would |
| 1725 | /// bleed into the last real column through the intra prediction and the |
| 1726 | /// transform that straddles it. |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | |
| 1735 | |
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | |
| 1740 | |
| 1741 | |
| 1742 | |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | |
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 | |
| 1752 | |
| 1753 | /// The quantiser an intra HEVC export codes at, mapped from the *bitrate* row a |
| 1754 | /// user picked -- the card has no QP control and this codec has no rate control, |
| 1755 | /// so the two are joined by measurement rather than promised to each other. |
| 1756 | /// |
| 1757 | /// The encoder codes ~0.6 bits per pixel at QP 27 ([`HEVC_BPP_AT_27`], measured |
| 1758 | /// on the 720p and 1080p benches to within 4% of each other), and a step of 6 QP |
| 1759 | /// is a factor of two in rate, which is the classic HEVC relation. So the QP |
| 1760 | /// that would land on a target is `27 + 6 * log2(0.6 / target)` -- and it is |
| 1761 | /// clamped, because this is a *quality* dial and not a rate controller: below QP |
| 1762 | /// 22 the file grows without a picture to show for it, and past QP 40 an |
| 1763 | /// intra-only frame goes blocky in a way no bitrate row asked for. A 1080p30 |
| 1764 | /// timeline at the automatic 6.2 Mbps therefore codes at QP 40 and comes out |
| 1765 | /// bigger than that, which is what "intra-only, large files" on the format row |
| 1766 | /// means: the row buys quality, not a size. |
| 1767 | |
| 1768 | |
| 1769 | |
| 1770 | |
| 1771 | |
| 1772 | |
| 1773 | |
| 1774 | /// Every temporal unit `rav1e` has finished, moved into the queue in display |
| 1775 | /// order. `NeedMoreData` (send another picture) and `LimitReached` (the flush is |
| 1776 | /// through) are the two ways it says there is nothing more; `Encoded` means a |
| 1777 | /// picture was coded but not yet packetised, which is a *keep asking* -- taking |
| 1778 | /// it for an end leaves the tail of the export inside the encoder. |
| 1779 | |
| 1780 | |
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | |
| 1792 | |
| 1793 | |
| 1794 | /// The oldest finished unit, moved into the buffer that is lent out -- the same |
| 1795 | /// "valid until the next call" contract the plugin's slice has. |
| 1796 | |
| 1797 | |
| 1798 | |
| 1799 | |
| 1800 | |
| 1801 | |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | /// I420 straight out of the decoder: the export never converts to BGRA and back, |
| 1806 | /// which would cost two conversions and a generation of colour precision. |
| 1807 | /// |
| 1808 | /// This mirrors `decode`'s two worker loops rather than reusing `DecodeSession`, |
| 1809 | /// which only speaks BGRA. Unlike playback there is no mid-clip fallback to |
| 1810 | /// software: a hardware decode that fails after the first picture fails the |
| 1811 | /// export, which then deletes the half-written file. |
| 1812 | |
| 1813 | |
| 1814 | |
| 1815 | |
| 1816 | |
| 1817 | |
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | |
| 1822 | |
| 1823 | |
| 1824 | |
| 1825 | |
| 1826 | |
| 1827 | |
| 1828 | |
| 1829 | |
| 1830 | |
| 1831 | |
| 1832 | |
| 1833 | |
| 1834 | |
| 1835 | |
| 1836 | |
| 1837 | |
| 1838 | |
| 1839 | |
| 1840 | |
| 1841 | |
| 1842 | |
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | |
| 1847 | |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | |
| 1858 | |
| 1859 | |
| 1860 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 | |
| 1868 | |
| 1869 | |
| 1870 | |
| 1871 | |
| 1872 | |
| 1873 | |
| 1874 | |
| 1875 | |
| 1876 | |
| 1877 | |
| 1878 | |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | |
| 1883 | |
| 1884 | |
| 1885 | |
| 1886 | |
| 1887 | |
| 1888 | |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | |
| 1899 | |
| 1900 | |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | |
| 1907 | |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | |
| 1913 | |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | |
| 1919 | |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | |
| 1929 | |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | |
| 1934 | |
| 1935 | |
| 1936 | |
| 1937 | |
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | |
| 1942 | |
| 1943 | |
| 1944 | |
| 1945 | |
| 1946 | |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | |
| 1954 | |
| 1955 | |
| 1956 | |
| 1957 | |
| 1958 | |
| 1959 | |
| 1960 | |
| 1961 | |
| 1962 | |
| 1963 | |
| 1964 | |
| 1965 | |
| 1966 | |
| 1967 | |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | |
| 1972 | |
| 1973 | |
| 1974 | |
| 1975 | |
| 1976 | |
| 1977 | |
| 1978 | |
| 1979 | |
| 1980 | |
| 1981 | |
| 1982 | |
| 1983 | |
| 1984 | |
| 1985 | |
| 1986 | |
| 1987 | |
| 1988 | |
| 1989 | |
| 1990 | |
| 1991 | |
| 1992 | |
| 1993 | |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | |
| 2002 | |
| 2003 | |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 | |
| 2010 | |
| 2011 | |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | |
| 2017 | |
| 2018 | |
| 2019 | |
| 2020 | |
| 2021 | |
| 2022 | |
| 2023 | |
| 2024 | |
| 2025 | |
| 2026 |