Smacker video

Last updated
Smacker
Bink Smacker Video logo.png
Filename extension
.smk
Internet media type video/vnd.radgamettools.smacker
Type code Smk2
Developed by Epic Games Tools
Type of format Video codec
Container for Smacker

Smacker video is a video file format (with the .SMK file extension) developed by Epic Games Tools, and primarily used for full-motion video in video games. [1] Smacker uses an adaptive 8-bit RGB palette. RAD's format for video at higher color depths is Bink Video. The Smacker format specifies a container format, a video compression format, and an audio compression format. [2] Since its release in 1994, Smacker has been used in over 2300 games. [1] Blizzard used this format for the cinematic videos seen in its games Warcraft II , StarCraft and Diablo I . [3]

Contents

The format has been reverse engineered and implemented in libavcodec. [4] [5] [6] A non-commercial SourceForge project libsmacker released an open source decoder in 2013. [7]

Technical details

File format (container)

Smacker defines its own container format. [2] A Smacker file can contain a Smacker video track and up to seven audio tracks. Each audio track can have either one channel (mono) or two channels (stereo) with a bit depth of either 8-bit or 16-bit. The audio can either be uncompressed PCM, compressed in the Smacker Audio format, or, in newer versions of Smacker, compressed in the Bink Audio format. [2]

Video

Smacker video supports 256 colors, but no transparency support. [2] While being a palette-based format, which is inherently limited to having not more than 256 colors in each frame, Smacker videos may still contain more colors in total due to "palette rotation", whereby the palette is updated on a per-frame basis. [2] This usually results in SMK files that look better if the source video has more than 256 colors. The compression rate depends on the content. The encoding of a video consisting of still or barely moving frames is after the first frame practically free [2] . Frames with random colors might more than double the raw size.[ citation needed ]

In Smacker video, a frame is split into 4×4 blocks in raster-scan order. [2] Each block can be coded in one of six coding modes: skip, fill, mono, and three full modes. Each mode can be signaled for multiple blocks in a run-length encoding scheme. In skip mode, the current block is copied from the previous frame in a conditional replenishment fashion. In fill mode, the current block is filled with a single color. In mono mode, the palette is locally reduced from 256 colors to two colors. Both colors are written to the bitstream and one bit per pixel is used to indicate which of the two colors a pixel should be. [2] The mono mode can be interpreted as vector quantization, where a three-dimensional vector with the components red, green, and blue is quantized using an adaptive codebook with two entries. There are three full modes, one was specified in version 2 of the Smacker format, while the other two were added in version 4. [2] In the original full mode, 16 colors are transmitted, one for each pixel, equivalent to raw uncompressed PCM. The two full modes added in version 4 use 4 and 8 colors in a block, respectively. [2] In the 4-color mode, the 4×4 block is split into four 2×2 blocks, each of which is filled with a solid color. In the 8-color mode, the 4×4 block is split into eight 1×2 blocks, each of which is filled with a solid color. [2]

Further compression is achieved by entropy coding using Huffman coding of the various bitstream elements that result from the process above. [2] There are four separate Huffman tables, each with 16-bit entries: one for mode decision, run-length, and fill color in fill color mode, one for the color indices in mono mode, one for the bitmap in mono mode, and one for all data in the full mode. Each table is adaptive and transmitted once per file in the header. The Huffman tables in the header are themselves compressed: the 16 bit values in the leaves of the code tree are split into a high byte and a low byte. Each byte is compressed using a Huffman table that is also contained in the header. [2]

Audio

Smacker audio is one of the audio formats that can be used in the Smacker container. For compression, Differential pulse code modulation (DPCM) is used. The difference between two successive samples is compressed using Huffman coding. The Huffman tables are adapted once per audio frame. [2]

See also

Related Research Articles

In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by removing unnecessary or less important information. Typically, a device that performs data compression is referred to as an encoder, and one that performs the reversal of the process (decompression) as a decoder.

<span class="mw-page-title-main">GIF</span> Bitmap image file format family

The Graphics Interchange Format is a bitmap image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released on June 15, 1987.

MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s without excessive quality loss, making video CDs, digital cable/satellite TV and digital audio broadcasting (DAB) practical.

Windows Media Audio (WMA) is a series of audio codecs and their corresponding audio coding formats developed by Microsoft. It is a proprietary technology that forms part of the Windows Media framework. WMA consists of four distinct codecs. The original WMA codec, known simply as WMA, was conceived as a competitor to the popular MP3 and RealAudio codecs. WMA Pro, a newer and more advanced codec, supports multichannel and high resolution audio. A lossless codec, WMA Lossless, compresses audio data without loss of audio fidelity. WMA Voice, targeted at voice content, applies compression using a range of low bit rates. Microsoft has also developed a digital container format called Advanced Systems Format to store audio encoded by WMA.

<span class="mw-page-title-main">Image compression</span> Reduction of image size to save storage and transmission costs

Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods which are used for other digital data.

<span class="mw-page-title-main">Video codec</span> Digital video processing

A video codec is software or hardware that compresses and decompresses digital video. In the context of video compression, codec is a portmanteau of encoder and decoder, while a device that only compresses is typically called an encoder, and one that only decompresses is a decoder.

WavPack is a free and open-source lossless audio compression format and application implementing the format. It is unique in the way that it supports hybrid audio compression alongside normal compression which is similar to how FLAC works. It also supports compressing a wide variety of lossless formats, including various variants of PCM and also DSD as used in SACDs, together with its support for surround audio.

<span class="mw-page-title-main">Huffyuv</span> Lossless video codec

Huffyuv is a lossless video codec created by Ben Rudiak-Gould which is meant to replace uncompressed YCbCr as a video capture format. The codec can also compress in the RGB color space.

QuickTime Animation format is a video compression format and codec created by Apple Computer to enable playback of RGB video in real time without expensive hardware. It is generally found in the QuickTime container with the FourCC 'rle '. It can perform either lossless or lossy compression and is one of the few video codecs that supports an alpha channel. Supported color depths are 1-bit (monochrome), 15-bit RGB, 24-bit RGB, 32-bit ARGB, as well as palettized RGB. As a result of reverse-engineering of the format, a decoder is implemented in XAnim as well as an encoder and decoder in libavcodec.

H.262 or MPEG-2 Part 2 is a video coding format standardised and jointly maintained by ITU-T Study Group 16 Video Coding Experts Group (VCEG) and ISO/IEC Moving Picture Experts Group (MPEG), and developed with the involvement of many companies. It is the second part of the ISO/IEC MPEG-2 standard. The ITU-T Recommendation H.262 and ISO/IEC 13818-2 documents are identical.

Dolby Digital Plus, also known as Enhanced AC-3, is a digital audio compression scheme developed by Dolby Labs for the transport and storage of multi-channel digital audio. It is a successor to Dolby Digital (AC-3), and has a number of improvements over that codec, including support for a wider range of data rates, an increased channel count, and multi-program support, as well as additional tools (algorithms) for representing compressed data and counteracting artifacts. Whereas Dolby Digital (AC-3) supports up to five full-bandwidth audio channels at a maximum bitrate of 640 kbit/s, E-AC-3 supports up to 15 full-bandwidth audio channels at a maximum bitrate of 6.144 Mbit/s.

Avid DNxHD is a lossy high-definition video post-production codec developed by Avid for multi-generation compositing with reduced storage and bandwidth requirements. It is an implementation of SMPTE VC-3 standard.

Microsoft Video 1 or MS-CRAM is an early lossy video compression and decompression algorithm (codec) that was released with version 1.0 of Microsoft's Video for Windows in November 1992. It is based on MotiVE, a vector quantization codec which Microsoft licensed from Media Vision. In 1993, Media Vision marketed the Pro Movie Spectrum, an ISA board that captured video in both raw and MSV1 formats.

Α video codec is software or a device that provides encoding and decoding for digital video, and which may or may not include the use of video compression and/or decompression. Most codecs are typically implementations of video coding formats.

Adaptive differential pulse-code modulation (ADPCM) is a variant of differential pulse-code modulation (DPCM) that varies the size of the quantization step, to allow further reduction of the required data bandwidth for a given signal-to-noise ratio.

<span class="mw-page-title-main">WebP</span> Image file format

WebP is a raster graphics file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency.

<span class="mw-page-title-main">VP9</span> Open and royalty-free video coding format released by Google in 2013

VP9 is an open and royalty-free video coding format developed by Google.

Apple Video is a lossy video compression and decompression algorithm (codec) developed by Apple Inc. and first released as part of QuickTime 1.0 in 1991. The codec is also known as QuickTime Video, by its FourCC RPZA and the name Road Pizza. When used in the AVI container, the FourCC AZPR is also used.

QuickTime Graphics is a lossy video compression and decompression algorithm (codec) developed by Apple Inc. and first released as part of QuickTime 1.x in the early 1990s. The codec is also known by the name Apple Graphics and its FourCC SMC. The codec operates on 8-bit palettized RGB data. The bit-stream format of QuickTime Graphics has been reverse-engineered and a decoder has been implemented in the projects XAnim and libavcodec.

References

  1. 1 2 "Smacker video Technology". RAD Game Tools. Retrieved 4 May 2013.
  2. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 "Smacker". MultimediaWiki. 11 April 2007. Retrieved 4 April 2013.
  3. Ladislav Zezula (2010). "MPQ Archives - Overview" . Retrieved 4 May 2013.
  4. "FFmpeg Documentation". FFmpeg. Retrieved 4 April 2013.
  5. FFmpeg: Smacker video and Smacker audio decoder
  6. FFmpeg: Smacker container demuxer
  7. SourceForge project libsmacker