Monday, June 23, 2014

Shoutcast/Icecast Protocol

The Shoutcast/Icecast streaming protocols began in 1998 as a simple hack to stream MP3 radio stations. A company called Nullsoft (now part of AOL), using a slightly customized version of the HTTP protocol (called the ICY protocol, with a URL like icy://http://www.masteringinternetvideo.com:8200), created the Shoutcast server, which can send or receive streamed MP3 or pretty much any streamable audio or video codec.
The first version of the protocol was so simple it consisted of merely MP3s shoved one after another. Later versions of the protocol added support for sending track names, titles, and more, along with the songs and having the client players display them. Finally, very stable video streaming features were added.
An explosion of different players that can play these streams as well as a variety of services that could reflect the streams resulted in the rapid improvement and de facto standardization of the Shoutcast protocol. In fact, there are more players for Shoutcast MP3 streams than any other kind of player. Every streaming MP3 player on the market—including the big three media players as well as Apple's iTunes—plays Shoutcast audio streams. Looked at it in this light: Shout-cast is in some ways the most cross-platform, interoperable protocol for streaming audio. Currently, however, the video playback is limited to WinAmp and other NSV (Nullsoft Video) players. This allows digital audio content, primarily in MP3 or HE-AAC format,

Intra Prediction Mode Algorithm HEVC/H.265

H265 currently implements three algorithms for intra-prediction mode selection:
  • brute-force: test all 35 modes and compute exact bitrate. This should practically be the optimum possible.
  • min-residual: compute a simple distortion measure on the residual image and select the mode with minimum distortion. See below for supported distortion measures.
  • fast-brute: use a simple distortion measure to select the n-best modes with minimum distortion. Additionally, put the 3 candidate modes into the candidate list. For each candidate mode, compute the exact bitrate and select the best mode.
    The following distortion measures are implemented in Libde265:
  • SAD: sum of absolute differences
  • SSD: sum of squared differences
  • SATD-H: sum of absolute transformed differences (with Hadamard transform)
  • SATD-D: sum of absolute transformed differences (with DCT/DST transform)
SSIM quality
Considering SSIM quality, it can be observed that the HM quality is even below Min-Residual. It should be evaluated in the future if this is the case for other sequences, too. X265 has very good SSIM at high bitrates, but again drops off sharply at low bitrates. For Fast-Brute the results are again very close to optimum over the whole bitrate range.

Computation times
Computation times (x265 is not included here, but it is much faster because of its optimized routines). Brute-force is by far the most computational expensive and computation time increases with bitrate because the exact bitrate computation takes more time at higher rates. The Fast-Brute algorithm is about a factor 4 faster and computation time does not increase as much. Computation time of Min-Residual is almost constant, because there is no bitrate dependent computation, only the final encoding takes a bit more time.

Thursday, June 12, 2014

libdec265 Decoder performance

Speedup (libde265, v0.7)

  • ToS: Tears-of-Steel movie
  • no LF: deblocking and SAO disabled

Absolute frame-rates (v0.7)

threadsSpreed HD(T)ToS(D) 7(W)ToS 7(T)ToS 4K(T)ToS 4K(W)ToS 4K(TN)ToS 4K(WN)
183.14215.84150.0728.8225.3542.1540.93
2154.76397.85280.3854.0447.3778.2174.64
3216.66509.10393.9475.7367.38101.16103.34
4260.94503.13421.3492.0077.68126.04102.21
5271.04514.17473.9898.6675.58130.3398.38
6292.41527.05515.10116.4581.70145.32110.56
7302.75546.02549.62117.2490.75152.15123.21
8310.90553.52578.10118.1597.44158.92132.43
9323.29550.79593.53120.75104.22164.15143.71
10331.15553.86602.10123.25106.16167.54148.32
11327.78551.15597.07124.60105.83169.28146.40
12327.19548.55587.60125.11102.06168.39138.44
  • Spreed HD(T): Spreed movie, tiles, 1920x1080
  • ToS(D) 7(W): Tears-of-steel (DivX encoder), WPP, 1280x720
  • ToS 7(T): Tears-of-steel, tiles, 1720x720
  • ToS 4K(T): Tears-of-steel, tiles, 4096x1714
  • ToS 4K(W): Tears-of-steel, WPP, 4096x1714
  • ToS 4K(TN): Tears-of-steel, tiles, 4096x1714, no deblocking+SAO
  • ToS 4K(WN): Tears-of-steel, WPP, 4096x1714, no deblocking+SAO
CPU: Intel(R) Core(TM) i7-4960X CPU @ 3.60GHz
CPU was in 'ondemand' configuration. 'performance' configuration gives 10%-15% higher fps.