Graphics

Blu-ray's BDMV applications use 2D graphics for it's interactive content and subtitles. Depending on the player, image graphics are either decoded in software or hardware. 

Software rendering is when video and image rendering takes place entirely in the CPU. Rendering everything with a general-purpose CPU has the main advantage that it is not restricted to the limited capabilities of graphics hardware. However, the disadvantage is that it's slower because the CPU needs more transistors to obtain the same speed as hardware rendering. Usually, cheap low-end players use software rendering.

Hardware rendering is when video and image rendering takes place entirely in the GPU or ASIC. The main advantage is taking the pressure off the CPU to increase better performance. Usually, medium/high-end players use hardware rendering for 2D graphics acceleration.

 

Decorative and Subtitle Graphics

These graphics are for subtitles or decorations. Only 32 subtitle streams are allowed.

There was a proposed feature allowing users to download and install newer subtitles for movies with an internet connection or LAN. So far, no studio has utilized this feature.

Presentation Graphics 

Presentation Graphics Streams (PGS for short, no file extension name) is cleaner and graphically improved compared to DVD subtitles. Presentation graphics are often used for subtitles; they are also used for displaying titles, labels, other information, or purely decorative graphics. PGS subs are images drawn and coded in binary bitmapped pixels similar to PNG images. It is capable of standard animation effects, Fades In/Out, Color changing, Wipe In/Out, and Scrolling with frame-accurate animation effects up to 30Hz. Compared with text-based subtitles, PGS usually has a lot of colors, styles, etc., especially for karaoke releases. Presentation Graphics are limited to 8-bit 256 colors and alpha transparency. A single PGS stream is marked with timestamps to indicate when it should be displayed, such as when a person is speaking or when translated information is being shown. These timestamps have an accuracy of 90 kHz.

Example of PGS Subtitles,  Charade Blu-ray [Criterion edition]


PGS had a few disadvantages, its file size is large, takes up memory, and is more difficult to modify than text subtitles since they're bitmapped-based and embedded in the video. However, PGS utilizes a compression technique called Run Length Encoding, which is a type of lossless compression that stores runs of data as a single value and count, rather than the original run, without losing any information. The goal is to minimize the number of bits needed to represent the data. This results in less storage space being used and faster transfer speeds. Meaning, that PGS loads faster than text subs. Bitmap fonts are faster and easier to create than vector fonts, but they are not scalable - a bitmap font requires a separate font for each size. Most Blu-ray releases use PGS subtitles and cannot be changed or modified by the user's preferences. There are some Blu-ray titles with "forced" subtitles, meaning they cannot be turned off at the user's request. In its Binary code, its magic number is 0x5047 " PG."

Another example of PGS subs using different colors and font sizes.


For more "complex" information about PGS subtitles and how they work, visit this page (external link).



Text Subtitle Streams

Text Subtitle Streams are under the OpenType (.otf) font format created by Microsoft and Adobe. It utilizes vector-based fonts, encoded text data, and multiple style definitions. It is used for subtitles or displaying information. Unlike bitmap fonts, they are a set of lines and curves instead of pixels; they can be scaled without causing pixelation. Text subtitles conserve more memory than PSG subs and do not affect the bandwidth available for a BD-ROM Title’s AV stream. Character encoding supports Unicode 2.0 (UTF-8 and UTF-16BE), Shift-JIS, KSC 5601-1987 (including KSC 5653), GB18030-2000, GB2312, and BIG5. It can have limited animation effects, Fade In/Out, and Color changes. It can also have a colored background box. Text Subtitle Streams are limited to 8-bit 256 colors and alpha transparency. A developer can easily change its presentation style with the text's position, flow, and alignment and the font's style, size, and color. One disadvantage of text fonts is that they are slower to render, especially for low-end players, because they require more processing power than bitmap fonts.  

In BD-J mode, text fonts can be used in Java programming.

Unlike PSG subs, Text Subs can be user-changeable, changing styles like text position, font size, and line space in the player's system settings. But most Blu-ray releases rarely use Text Subs because some players strangely cannot display fonts, which goes against the BD specification standards.

 

Interactive Graphics

These graphics are for interactive applications such as menus or games.

Example of an HDMV menu with IGS graphics, Ultramarines Blu-ray European edition.

Interactive Graphics (HDMV mode)

In HDMV mode, it supports a PNG-like graphics format, the Interactive Graphics Stream, for interactive menu graphics. IG streams (no file extension name) are separately stored in M2TS files and their decoding process works on a 27MHz clock. To synchronize with the Primary Video and Audio streams, an IG stream operates at a frequency of 90KHz. Like PG streams, IG streams are similar to PNG and use Run Length Encoding for lossless compression to conserve space and memory.

Interactive Graphics are limited to 8-bit 256 colors and alpha transparency, and sprites cannot overlap. They support simple animations such as scrolls, wipes, cuts, fades (transparency changes), and color changes with frame rates up to 30Hz. Supported resolutions are 1920x1080 / 1280x720 / 720x480 / 720x576.

 

 

 

 

 

 

Example of an BD-J menu with PNG graphics, T2 Skynet edition.
Java Graphics (BD-J mode)

In BD-J mode, Interactive Graphics is replaced with Java Graphics. It supports 24-bit true-color and 8-bit (256 level) alpha (transparent) images. The graphics are usually for interactive elements, buttons, sprites, fonts, backgrounds, and decorations. Java Graphics is more advanced as it can be programmably scaled, overlapped, and have smooth frame-by-frame animations. Supported resolutions are 1920x1080 / 1280x720 / 720x480 / 720x576.

BD-J officially supports four image codecs of raster bitmap graphics - PNG, GIF, JPEG, and MPEG-2. These codecs have their advantages and disadvantages. Players implement the codecs differently than others. These graphics are usually stored in the JAR folder (except for MPEG-2 which that is stored in the STREAM folder), but they can be stored outside of the JAR folder.



PNG - Portable Network Graphics (PNG) was created in 1996 as an open-source alternative to JPEG and GIF. It supports true color, grayscale, and 8-bit transparency. Most developers use PNG for its better lossless compression without losing the quality of complex images and fast loading times. It is faster than JPEG if 8-bit color is used. It does not natively support APNG and MNG files. To achieve animation, PNG frames must be put together using Java programming. It is under the .png extension. See: PNG

    JPEG - Joint Photographic Experts Group (JPEG) files were created in 1992. The codec works best for storing full-color photographic images full of complex shading and color variation. However, it doesn't support transparent backgrounds. It uses lossy compression, meaning that some original image information is lost and cannot be restored, possibly affecting image quality. The codec's compression technique was designed for faster loading times; faster than PNG. It is under the .jpeg or .jpg extension. See: JPEG
     
      GIF - Graphics Interchange Format (GIF) was developed by CompuServe led by Steve Wilhite and released on June 15, 1987. It supports transparency but is limited to 256 colors. It's best used for graphics with few colors, small icons, and simple images. It natively supports animations. However, it's barely used because it's not mandatory and slower to decode. It is under the .gif extension.

      MPEG-2 - MPEG-2 is not only used for videos but also for still images using I-frames. It can be used for still-backgrounds or browsable slideshows. It is under the .mpv extension (stored in the .m2ts container).  See: MPEG
       
       
       
      Though it is recommended to use compliant image codecs, it is possible to employ different image formats (in software and binary) like .sdt files (Kanon).
       
       Additionally, BD-J supports drawing graphics pixel-by-pixel using Java's Drawing API, java.awt.Graghics2D.
      Drawing with this API permits:
      • 32-bit color model of blue/green/blue/alpha values and lower bit depth is allowed
      • SRC_OVER allows the ability to request alpha blending within the BD-J graphics layer.
      • Ability to draw 2D shapes, like rectangles, circles, and ellipes.
      • Draw strings
      • Draw and scale images
      However, drawing is rendered in software, meaning it will slow on some low-end players if it's a complicated image.
       


      Author(s) : Æ Firestone

      on Sunday, February 11, 2024 | | A comment?
      0 responses to “Graphics”

      Leave a Reply

      Popular Pages