Skip to content

Commit 31b8b16

Browse files
committed
rstdoc: update ShowCRC32 parameters (#479)
1 parent 652f8fd commit 31b8b16

3 files changed

Lines changed: 113 additions & 7 deletions

File tree

distrib/Readme/readme_history.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ For online documentation check https://avisynthplus.readthedocs.io/en/latest/
99
Actual:
1010
https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/changelist376.html
1111

12+
20260508 3.7.5.r45XX (pre 3.7.6)
13+
--------------------------------
14+
- ShowCRC32: new "channels" (select planes), "mode" (0=combined, 1=per-plane), and
15+
"showmode" (0=display, 1=display+frameprop, 2=frameprop only) parameters;
16+
frame property "ShowCRC32" is an int64 array of unsigned 32-bit CRC values;
17+
planar RGB(A) planes always in R,G,B,A order; packed formats with default parameters
18+
hash the raw buffer unchanged (backward-compatible).
19+
- rstdoc: document Invert's chroma inversion behavior
20+
1221
20260506 3.7.5.r4589 (pre 3.7.6)
1322
--------------------------------
1423
TL;DR (since r4565):

distrib/docs/english/source/avisynthdoc/changelist376.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ Additions, changes
125125
overlay Y; pass 2 processes luma at full resolution. The ``"placement"`` parameter is respected for
126126
correct 4:2:0 / 4:2:2 mask downsampling.
127127
See :doc:`Layer <./corefilters/layer>`.
128+
- ``ShowCRC32``: add ``channels``, ``mode``, and ``showmode`` parameters.
129+
130+
* ``channels`` — selects which planes to checksum using their initial letters (Y, U, V, A for YUV;
131+
R, G, B, A for RGB), defaulting to all planes. Unrecognised letters are silently ignored.
132+
* ``mode`` — ``0`` (default): one combined CRC32 over all selected planes; ``1``: separate CRC32
133+
per plane displayed as ``"Y:XXXXXXXX U:XXXXXXXX ..."``.
134+
* ``showmode`` — ``0`` (default): display text only; ``1``: display text and store result as frame
135+
property ``"ShowCRC32"`` (``int64`` array — one element for ``mode=0``, one per active plane for
136+
``mode=1``); ``2``: store frame property only, no text drawn. Values are unsigned 32-bit integers
137+
stored as ``int64``.
138+
* For packed formats (YUY2, RGB24/32/48/64) with default parameters the raw interleaved buffer
139+
is hashed directly, preserving backward compatibility.
140+
* Planar RGB(A): planes are always processed in R, G, B, A logical order.
141+
See :doc:`showframes <./corefilters/showframes>`.
128142
- "Layer": add ``"top_left"`` option for the ``"placement"`` parameter — HEVC/AV1 left+top co-sited
129143
chroma (point-sample, fastest). Affects ``"mul"``, ``"add"``, ``"subtract"``, ``"lighten"``,
130144
``"darken"``, and ``"mulovr"`` modes with 4:2:0 / 4:2:2 sources.
@@ -361,6 +375,7 @@ Documentation
361375
- Add :doc:`SetFilterProp / SetFilterPropPassthrough <./corefilters/setfilterprop>`
362376
- Add ``ShowCRC32`` documentation to :doc:`showframes <./corefilters/showframes>`
363377
(filter exists since 3.7.0; rst page was not updated at the time).
378+
Document new ``channels`` and ``mode`` parameters added in 3.7.6.
364379
- Update :doc:`Layer <./corefilters/layer>` with ``"mulovr"`` mode, ``"top_left"`` placement
365380
option, and related chroma-placement refactoring notes.
366381
- Update :doc:`Overlay <./corefilters/overlay>` with ``"placement"`` parameter for ``"blend"`` mode.

distrib/docs/english/source/avisynthdoc/corefilters/showframes.rst

Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Set of filters to overlay frame numbers, timecodes, and debug information onto a
77
* `ShowFrameNumber`_ displays the frame number on each frame.
88
* `ShowSMPTE`_ displays SMPTE timecodes.
99
* `ShowTime`_ displays time for the current frame.
10-
* `ShowCRC32`_ computes and displays the CRC32 checksum of the default plane (debug filter).
10+
* `ShowCRC32`_ computes and displays the CRC32 checksum of selected planes (debug filter).
1111

1212
See the `Examples`_ section for visuals.
1313

@@ -398,10 +398,19 @@ See the :ref:`ShowTime examples <ShowTime-examples>` section.
398398
ShowCRC32
399399
---------
400400

401-
A debug filter that computes the CRC32 checksum of the **default plane** of each frame
402-
and overlays the result as an 8-character uppercase hexadecimal string (e.g. ``"AB12CD34"``).
403-
Only the default plane is checksummed: luma (Y) for YUV clips, the green plane for planar RGB,
404-
or the interleaved data for packed formats such as YUY2.
401+
A debug filter that computes the CRC32 checksum of selected planes of each frame and overlays
402+
the result as an uppercase hexadecimal string.
403+
404+
By default (no ``channels`` or ``mode`` given) the result is a single 8-character value
405+
(e.g. ``"AB12CD34"``). With the ``channels`` and ``mode`` parameters the filter can cover
406+
any combination of planes and either combine them into one CRC or show them side by side.
407+
408+
For **packed formats** (YUY2, RGB24/32/48/64) with default parameters the interleaved
409+
buffer is hashed directly, matching the original pre-3.7.6 behaviour. When ``channels``
410+
or ``mode`` is specified the clip is internally converted to a planar equivalent first.
411+
412+
For **planar RGB(A)** clips planes are always processed in R, G, B, A logical order,
413+
regardless of the physical plane storage order.
405414

406415
The text placement and scrolling behaviour are identical to `ShowFrameNumber`_.
407416

@@ -411,7 +420,8 @@ The text placement and scrolling behaviour are identical to `ShowFrameNumber`_.
411420

412421
ShowCRC32 (clip, bool "scroll", int "offset", float "x", float "y", string "font", float "size",
413422
int "text_color", int "halo_color", float "font_width", float "font_angle",
414-
bool "bold", bool "italic", bool "noaa")
423+
bool "bold", bool "italic", bool "noaa", string "channels", int "mode",
424+
int "showmode")
415425

416426
.. describe:: clip
417427

@@ -493,6 +503,41 @@ The text placement and scrolling behaviour are identical to `ShowFrameNumber`_.
493503

494504
Default: false
495505

506+
.. describe:: channels
507+
508+
| Selects which planes to include in the checksum, using their initial letters.
509+
| For YUV(A) clips: Y, U, V, A. For RGB(A) clips: R, G, B, A.
510+
| Letters are not case-sensitive and may appear in any order; unrecognised
511+
letters are silently ignored.
512+
| For planar RGB(A) planes are always processed in R, G, B, A order regardless
513+
of the order given here.
514+
515+
Default: all planes of the current color space (same set as ``Invert``).
516+
517+
.. describe:: mode
518+
519+
| Controls how checksums from multiple planes are combined.
520+
| ``0`` — compute a single CRC32 over all selected planes concatenated in order;
521+
the result is one 8-character hex value (e.g. ``"AB12CD34"``).
522+
| ``1`` — compute a separate CRC32 per selected plane; the result shows each
523+
plane label followed by its value (e.g. ``"Y:AB12CD34 U:12345678 V:ABCDEF01"``).
524+
525+
Default: 0
526+
527+
.. describe:: showmode
528+
529+
| Controls whether the CRC result is overlaid as text, stored as a frame property,
530+
or both.
531+
| ``0`` — display only (default; original behaviour).
532+
| ``1`` — display the text *and* store the CRC value(s) as an integer array frame
533+
property named ``ShowCRC32``. For ``mode=0`` the array has one element; for
534+
``mode=1`` it has one element per active plane, in display order.
535+
| ``2`` — store the frame property only; no text is drawn on the output.
536+
| Values are unsigned 32-bit integers stored as ``int64`` (the native array element
537+
type for AviSynth frame properties).
538+
539+
Default: 0
540+
496541

497542
Examples
498543
--------
@@ -586,12 +631,49 @@ Examples
586631
LSMASHSource("sintel-2048-surround.mp4")
587632
ShowTime()
588633

634+
.. _ShowCRC32-examples:
635+
636+
.. rubric:: `ShowCRC32`_
637+
638+
* Default behaviour on a packed RGB32 clip — the whole interleaved frame buffer is
639+
hashed and a single 8-character hex value is overlaid::
640+
641+
ColorBars(pixel_type="RGB32").ShowCRC32()
642+
643+
* Equivalent explicit call — ``mode=0`` combines all RGBA planes into one CRC.
644+
For packed RGB32 with explicit parameters the clip is first converted to planar
645+
RGBA internally, so all four planes are covered::
646+
647+
ColorBars(pixel_type="RGB32").ShowCRC32(mode=0, channels="RGBA")
648+
649+
* Per-plane mode — display a separate CRC for each of the R, G, B planes side by
650+
side (e.g. ``"R:AB12CD34 G:12345678 B:ABCDEF01"``)::
651+
652+
ColorBars(pixel_type="RGB32").ShowCRC32(mode=1, channels="RGB")
653+
654+
* Store CRC values as a frame property without drawing anything on screen, then
655+
display the property with ``propShow``. ``channels="RGBA"`` is specified, but
656+
``RGBP8`` has no alpha plane — the ``A`` letter is silently ignored, so the
657+
property array will have three elements (R, G, B) rather than four. No error
658+
is raised::
659+
660+
ColorBars(pixel_type="RGBP8")
661+
ShowCRC32(mode=1, channels="RGBA", showmode=2)
662+
propShow(props="ShowCRC32", align=1)
663+
589664
Changelog
590665
---------
591666

592667
+-----------------+-----------------------------------------------------------------------------+
593668
| Version | Changes |
594669
+=================+=============================================================================+
670+
| AviSynth+ 3.7.6 || ``ShowCRC32``: add ``channels``, ``mode``, and ``showmode`` parameters. |
671+
| || ``channels``: select planes individually. |
672+
| || ``mode``: combined (0) or per-plane (1) CRC output. |
673+
| || ``showmode``: display only (0), display + frame property (1), property |
674+
| | only (2). Frame property name: ``ShowCRC32`` (int64 array). |
675+
| || Planar RGB(A): planes always processed in R, G, B, A order. |
676+
+-----------------+-----------------------------------------------------------------------------+
595677
| AviSynth+ 3.7.3 | Add ``bold``, ``italic`` and ``noaa`` |
596678
+-----------------+-----------------------------------------------------------------------------+
597679
| AviSynth+ 3.7.0 | Added ``ShowCRC32``. |
@@ -606,7 +688,7 @@ Changelog
606688
| AviSynth 2.5.6 | Added ``offset`` and other options. |
607689
+-----------------+-----------------------------------------------------------------------------+
608690

609-
$Date: 2026/05/08 11:02:00 $
691+
$Date: 2026/05/08 11:57:00 $
610692

611693
.. _Interlaced Fieldbased:
612694
http://avisynth.nl/index.php/Interlaced_fieldbased

0 commit comments

Comments
 (0)