@@ -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
1212See the `Examples `_ section for visuals.
1313
@@ -398,10 +398,19 @@ See the :ref:`ShowTime examples <ShowTime-examples>` section.
398398ShowCRC32
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
406415The 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
497542Examples
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+
589664Changelog
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