May 1949: Africa Screams















Hey! Abbot and Costello. I haven’t seen too many of thse…

This is uncomplicated fun: A mix of physical humour, weak bon mots and general silliness. I’m smiling a lot while watching this, but I’m not actually laughing. But I can totally see an eleven-year-old me finding this to be the height of hilarity.

The bit with the cannibals has, perhaps, not aged as well.

Africa Screams. Charles Barton. 1949.

Popular movies in May 1949 according to IMDB:

PosterVotesRatingMovie
24187.4The Window
4597.2Home of the Brave
21197.1The Barkleys of Broadway
3806.8Streets of Laredo
2716.7Roughshod
6406.7Alice in Wonderland
3886.7The Lady Gambles
2406.7Manhandled
29086.5Africa Screams
2296.5Johnny Allegro

This blog post is part of the Decade series.

April 1949: The Secret Garden





















Dean Stockwell!? But he can’t possibly…

Oh, he plays the ten year old boy.

And I was thinking of Harry Dean Stanton.

ANYWAY.

This is a fascinating movie. It’s not that often you see a movie that doesn’t fit neatly into a genre category or where you have no idea where the plot is going. This is one of those rare movies.

It’s so weird.

The idea of a secret garden is a very powerful one. It’s like a Jung Bodyan archetype.

Margaret O’Brien is perfect as the snotty, entitled ex-colonial plunked into the British countryside.

The Secret Garden. Fred M. Wilcox. 1949.

Popular movies in April 1949 according to IMDB:

PosterVotesRatingMovie
26507.5Champion
19397.5The Secret Garden
9417.4The Queen of Spades
30607.2Passport to Pimlico
20147.1The Stratton Story
2377.1The Sky Dragon
4257.0Mr. Belvedere Goes to College
16747.0Flamingo Road
9306.9Ma and Pa Kettle
6306.8The Crooked Way

This blog post is part of the Decade series.

March 1949: Little Women

















Oh, this isn’t what I thought it was going to be at all? I thought it was with… Bette Davis? And an adult drama? Little Something Else? The?

Anyway, this is a big-budget Hollywood movie, and it really shows. When this kind of thing works, it really works. And this really works.

There’s so many great actors in here. Janet Leigh, Mary Astor, Elizabeth Taylor…

The “little women” in question are teenagers — I think, but because of the casting it’s a bit difficult to say. The actors range in age from 12 to 32… but at least Elizabeth Taylor is 17 here.

Anyway! This is a pretty flawless specimen. It’s got laughs, it’s got sobs, it’s got romance. And all these perfect little details.

The ending drags, though.

Veteran director Mervyn LeRoy is thoroughly professional, but not very distinctive.

Little Women. Mervyn LeRoy. 1949.

Popular movies in March 1949 according to IMDB:

PosterVotesRatingMovie
59867.8The Set-Up
4077.3Alias Nick Beal
49297.3Little Women
4927.1Manon
21057.0Impact
24126.8Take Me Out to the Ball Game
5876.8The Undercover Man
3196.7The Blue Lagoon
3746.7The Walking Hills
8676.6Edward, My Son

This blog post is part of the Decade series.

Fun with DPMS; or, An Emacs-Based Screensaver

I’ve got a bunch of monitors, large and small, that (in general) are always on. Because I’m too lazy to switch stuff off and or.

They display some useful information, but are largely decorative (i.e, some of them display temperature data, and some use xscreensaver to show what albums are playing).

But I’ve got the rest of the lights and stuff in the apt to switch off when I push the “I’m going to bed” button on the wall. I thought it might be nice to have all the monitors also switch off at the same time? And then I could link the “I’m awake now” button on the wall to switching all the monitors on again.

So cyber.

I thought this was going to be really easy, but… you know… computers.

First of all: Switching a screen off is easy:

$ xset dpms force off

And then it’s off.

$ xset dpms force on; xset -dpms

to switch it on again and disable power management again (to avoid the monitors switching themselves off again on their own volition).

So far so good!

However, there’s like a dozen things that feel free to wake monitors up.

mpv

Easiest first: I’ve got a little monitor that plays Youtube 24/7 (and displays weather data).

It would switch itself on immediately, because it uses mpv to display the youtube vids. To switch that off, just say –no-stop-screensaver.

Stereo Computer

The screen on the computer I use to control the stereo would switch it self on whenever the song changed, and after a bit of trial and error and more code reading, I found this:

(set-mouse-pixel-position (selected-frame) 2000 0)

It’s code designed to just move the mouse pointer off the screen. And it turns out that that makes X wake the monitor up!

I guess that… makes sense? I mean, moving the mouse is supposed to wake the screen up, so…

I added the following guard:

(defun jukebox-monitor-on-p ()
  (with-temp-buffer
    (call-process "xset" nil t nil "q")
    (goto-char (point-min))
    (search-forward "Monitor is On" nil t)))

xscreensaver

Many of the larger screens use xscreensaver to display the sleeve of whatever album is playing, and xscreensaver wakes the monitor up after just a few seconds. Isn’t that ironic!

Don’t you think?

It’s like a screensaver that switches on a screen that’s already saved, it’s like

Oh, where was I…

xscreensaver has a bunch of DPMS-related options:

dpmsEnabled:	False
dpmsQuickOff:	False
dpmsStandby:	24:00:00
dpmsSuspend:	24:00:00
dpmsOff:	24:00:00

But none of them seem to help with this problem. xscreensaver stubbornly wakes shit up. What’s up with that, jwz?

So.

The only solution for this problem is to write an Emacs-based screensaver.

Obviously.

It uses the xelb library to query the idleness (to schedule when to start saving the screen) and to query/restore focus after closing the screensaver window.

Man. It’d be great if somebody could write a manual for xelb. Working with it is kinda frustrating because you just have to poke around, looking at examples, until you suddenly get something that works. I spent, like, seven thousand hours (approx.) trying to get the idleness out of it until I guessed (by looking at what exwm did with randr extensions) that you had to say

(xcb:get-extension-data x 'xcb:screensaver)

before trying to call the xcb:screensaver:QueryInfo function.

[Edit: Emacs give me almost all events that’s given to the frame (mouse and keystrokes), but not when the user presses shift, etc. Is there a way to get something like xcb_wait_for_event out of the xelb library?]

SO THERE YOU ARE

Isn’t it weird how these trivial projects tend to spiral out of control?

Especially for certain people?

Don’t you think?

(Not) HDR10 to sRGB

I’m going to be watching a bunch of 4K movies in High Dynamic Range (i.e., UHD HDR) later this year, and I’m going to be screenshotting a bit. Now, as you can see from that blog post, I’m using an HDMI splitter that sends the UHD HDR bits to the TV, and sends 2K SDR bits to the screenshotting box.

There’s a right way to do the SDR conversion and a wrong way, and the HDMI splitter does it the wrong way.

As that web page explains, if you just do the moral equivalent of

ffmpeg.exe -i input.mkv -vf select=gte(n\,360) -vframes 1 output.png

then you’re going to get washed-out images. HDR10 is a 10-bit BT.2020 colourspace, and we want to end up in the 8-bit BT.709 colour space.

And as that page tells us, you can do that in a pretty sensible way, or… you can just discard some bits and end up with a washed-out low-contrast image.

Here’s an example of what comes out of the SDR port:

You can do something simple like:

convert -contrast-stretch 0.20x0.10% IMG_53.JPG norm.jpg

and get something that looks acceptable:

But that’s obviously not the “correct” transform.

As Wikipedia explains, the HDR10 format uses a static non-linear transform in the Rec. 2020 colour space. The formula is here: It’s a “perceptual quantizer” (PQ). “PQ is a non-linear electro-optical transfer function (EOTF).” So there.

So! Here’s my question, that I also asked here:

Given that we have discarded some bits, there’s no way to get the ideal SDR version of these images. But: What has been discarded is predictable (I’m guessing the upper? lower? bits?), and all the HDR10 math stuff is static.

A helpful person on the ImageMagick forum suggests using a sigmoidal contrast stretch with lots of “auto” in the parameters, and that does give me pretty good results in all the test images, so it’s “good enough”.

But since all the things that have been done to the signal is static, there should be a way to write a static transform from these non-HDR10 images to SDR.

So, like, first convert back to 10-bit space (with zeroes for the missing bits?)

And then just do the inverse of the PQ EOTF, and then chop bits again into SDR, as this explains, using one of the nice algos there.

Surely this must be a fun math challenge for somebody (who isn’t me!).

Included below are a few more screenshots of movies and TV series that are HDR10 according to the TV.