PDA

View Full Version : SubRip 1.17.1 maps colors wrong for Scenarist


mpucoder
8th January 2005, 21:35
There is certainly something wrong with SubRip 1.17.1 when it comes to color mappings. The net result is that when using an sst produced by SubRip 1.17.1 background and E2 are swapped, as well as pattern and E1.
It can be corrected in the sst file by reversing all the colors, for example this is what the file will contain:
E2 (255 0 0 ===)
E1 (0 0 0 ===)
PA (0 0 255 ===)
BG (255 255 255 ===)

And this is what to change it to if you want the same color numbers as the original:
BG (255 0 0 ===)
PA (0 0 0 ===)
E1 (0 0 255 ===)
E2 (255 255 255 ===)

Of course, that is not what Scenarist recommends, but it corrects for a problem in the bitmap palette itself. eg color 0 of the SPU gets mapped to color 0 of the bmp, but the color of palette entry 0 (red) matches E2, which then becomes color 3 in a newly encoded SPU.

So why does the picture display OK without these changes? The colors and contrast values are also listed in the reverse order. eg the original set_color and set_contr commands are:
03 11 02 04 ff f0
The commands Scenarist makes from the SubRip sst are:
03 20 11 04 0f ff

So, while the subpicture will look alright, you cannot get a binary compare. Nor can you work with the subpictures in Scenarist unless you bear in mind that definitions are swapped.

zuggy
10th January 2005, 14:22
Subrip uses color mapping from original dvd. It looks correct in scenarist, after you type the palette from original dvd.

Typing the palette by hand is boring, but as I know, there is no way to import palette.

But look subresync from vobsub package. Subresync remap colors (in bmp & sst) to comply with standard scenarist palette.

mpucoder
10th January 2005, 16:59
I'll take a look at SubReSync - thanks for the tip.
The problem with SubRip is not the actual colors or the PGC CLUT (palette), but the pixel values mapping. Everything is reversed, so if I import an sst produced by SubRip pixels that had value 0 (BG) become 3 (E2) in the new spu. Also 1 becomes 2, 2 becomes 1, and 3 becomes 0. If I run SubRip on the newly created vob the bmp's it produces will be different than the first ones. The sst file's bmp to spu color number mappings are different, and the color and contrast are listed in the reverse order from the first sst file.

Here is what it would take to fix the problem. First the bitmap's color palette should be:
0 = white
1 = black
2 = red
3 = blue
The pixel values are fine, they match the spu pixel values.
Then in the sst file:
BG (255 255 255 ===)
PA (0 0 0 ===)
E1 (255 0 0 ===)
E2 (0 0 255 ===)
And finally, reverse the order of color and contrast, they are, left to right, E2 E1 PA BG

rte5
31st January 2005, 05:28
Whenever I rip BMPs with SubRip I switch to Sonic DVD Creator format then I change the colors according two the program I'm using, from a chart of 3 concentric circles;

For DVDLAB it's:
White (the paper), is transparent;
Red, border;
Blue, Alias;
Black dot in the center, the text.

After it finishes, then I click Output Format - Set Output Format and change it to Sonic Scenarist *.sst, then save.

If you do it that way, does that fix your problem?

mpucoder
31st January 2005, 18:53
Actually, I can get around the problems. The reason I posted was to make Zuggy aware of the problem, so hopefully he can improve his program.