Log in

View Full Version : pixelscope - pixel value displayer


wonkey_monkey
27th August 2018, 02:02
Download: pixelscope0.1.zip (http://horman.net/avisynth/download/pixelscope0.1.zip) v0.1 - includes source

pixelscope, a debugging filter to display pixel values.

https://i.imgur.com/lrn7ZmO.png

Yes, the numbers are very small; I view it at 200% in VirtualDub2.

At the moment, it only understands the "classic" colourspaces: RGB24, RGB32, Y8, YUY2, YV12, YV16, YV24, and YV411. If there's any interest I'll think about adding more.

There are four DLLs in the zip file - x86 and x64 versions, plus statically-linked versions so you don't have to go around installing more runtimes if you don't want to.

pixelscope (v0.1)
=================
(c) David Horman, 2018

This debugging filter displays individual pixel values. It currently only
works with the "classic" Avisynth colourspaces (RGB24, RGB32, Y8, YUY2,
YV12, YV16, YV24, YV411).

Usage
=====

pixelscope(
clip,
(int) scale = 32,
(bool) hex = false,
(int) darken = 1,
(bool) grid = true,
(bool) interlaced = false,
(string) matrix = "rec601",
(bool) nocrop = false,
(bool) right = false
)

Parameters
==========

scale:
Upscale factor.

hex:
Displays values in hexadecimal.

darken:
This parameters darkens the input video for display. It does not affect
displayed pixel values.

0: do not darken video
1: darken video (default)
2: darken video more

grid:
Enable/disable grid lines.

interlaced:
For YV12 video, this determines whether the video is treated as interlaced
when converted to RGB for display, and also changes how the UV values are
displayed to reflect interlacing.

matrix:
Colour matrix to use when converting to RGB for display. See converttorgb.

nocrop:
By default, pixelscope crops the input so that the output does not exceed
4K resolution - this is to avoid crashing Avisynth or your viewer.
Setting this to true disables cropping.

right:
Right aligns pixel values instead of centering them.

Sparktank
27th August 2018, 06:09
Interesting.
Quite!

Sharc
27th August 2018, 08:54
+1
Thanks for sharing.

StainlessS
27th August 2018, 14:40
+2
Thanx for sharing.

The RGB24 numbers look familiar, did you use some other plugin debug mode as inspiration ? (what plug).

EDIT: Can you post image of YV12 Interlaced=True, sample, am curious how you do it. [chroma numbers layout]

wonkey_monkey
27th August 2018, 15:08
Well it's not pretty:

https://i.imgur.com/QwXU6Qc.png

I may add some arrows or something to more properly indicate that lines 1 and 3 share chroma, lines 2 and 4, and so on.

As for the numbers, I drew them myself - there are only so many ways to draw 3x5 characters.

For RGB32 a white alpha number is added above red.

For YUV inputs, U is blue and V is red.

StainlessS
27th August 2018, 15:12
Lovely David, thanx, better than anticipated.
Would it then be Mpeg1 chroma placement as opposed to mpeg2 [just throwing you a curved ball :) ]

EDIT:
I may add some arrows or something to more properly indicate that lines 1 and 3 share chroma, lines 2 and 4, and so on.
Maybe not neccessary, should be reasonably obvious.
EDIT: Or maybe use different pairs of [EDIT: background] colors for "pairs of chroma pairs", if you get what I mean.
(red,grn,red,grn, - blue,yel,blu,yel) or something like that.

EDIT:
As for the numbers, I drew them mysself - there are only so many ways to draw 3x5 characters.
I think that Sinclair QL used a 3x5 font (excluding spacing), was almost impossible to create an alternative
font to the builtin one (because as you say, there are only so many ways you can do it).

EDIT: Maybe its the QL style font that is familiar to me [I did comercial s/w for it for several (4 or 5) years].

poisondeathray
16th December 2018, 17:19
Thanks for the filter



At the moment, it only understands the "classic" colourspaces: RGB24, RGB32, Y8, YUY2, YV12, YV16, YV24, and YV411. If there's any interest I'll think about adding more.



Would it be difficult to add additional ones ?

10bit is becoming more prevalent in consumer space

wonkey_monkey
16th December 2018, 19:45
It shouldn't be too hard, but I probably hardcoded a bit too much to make it really simple. Plus so far I've had no need of >8-bit myself, so it was/is low priority. It will happen at some point, though.

Emulgator
9th April 2020, 21:17
Oh I could need some 10bit support now ;-)

Sharc
30th October 2020, 15:08
Would it be possible to add a switch for optional presenting the Chroma as Cb, Cr (0....255) rather than the current Pb, Pr (-128 .... +128)?