According to "YPbPr conversion should be done from linear RGB-Space instead of sRGB":
I've compared this manually this way (if someone else wants to try):
#!/bin/bash
# JPEG: Still Image Data Compression Standard
# von William B. Pennebaker,Joan L. Mitchell
# Sec. J.1.1.2: Bi-linear ... upsampling
# Sec. K.5: weighting of neighboring samples ...
wh=`identify -format "%w x %h!" "$1"`
convert "$1" -depth 16 -colorspace YPbPr -separate x%d.pgm
convert x1.pgm -filter Box -resize 50% -resize "$wh" x1b.pgm && mv x1b.pgm x1.pgm
convert x2.pgm -filter Box -resize 50% -resize "$wh" x2b.pgm && mv x2b.pgm x2.pgm
convert x?.pgm -combine -set colorspace YPbPr -colorspace sRGB -depth 8 wronger.ppm
# edit: the -gamma in the next line should be replaced by "-set colorspace sRGB -colorspace RGB -set colorspace sRGB" of course (the first -set is cosmetic)
convert "$1" -depth 16 -gamma 0.454545 -colorspace YPbPr -separate x%d.pgm
convert x1.pgm -filter Box -resize 50% -resize "$wh" x1b.pgm && mv x1b.pgm x1.pgm
convert x2.pgm -filter Box -resize 50% -resize "$wh" x2b.pgm && mv x2b.pgm x2.pgm
# edit: and the next -gamma should be replaced by "-set colorspace RGB -colorspace sRGB". Nice series, very easily understandable
convert x?.pgm -combine -set colorspace YPbPr -colorspace sRGB -gamma 2.2 -depth 8 righter.ppm
convert wronger.ppm righter.ppm -fx '15*(u-v)+0.5' diff.ppm
convert "$1" righter.ppm wronger.ppm diff.ppm v.tif
I'll find the differences on portraits more subtle than quantization errors, so this is Prio II.
Perhaps we can defeat this error by "do subsampling the righter way, and then do righterYPbPr -> sRGB" before feeding into the jpeg library.
N.B.: Has anybody some scientific references on how much the sampling factor (Chroma / Luma) should be?