Video Compression

VideoNerd

Note on Uniform Quantization in Spatial Domain

One of the method of quantization is to quantize pixels in spatial domain (i.e. without transforming).  For example, HEVC supports so called “transform skipping mode“, i.e. the transform can be skipped fully  quantization is performed in spatial domain. If  quantization is uniform  with a step size b, the quantization error for a digital image may […]

MP4Box Tool

Content Getting MP4Box Binaries Commands     Getting General Info on mp4-file     Encapsulation h264 elementary stream into mp4 format      Concatenation of mp4 files into new mp4-file     In-Place Removal Hint Tracks     MPEG-DASH Segmentation     How Add Copyright In-Place Add Language Tag Extract Elementary Stream     Getting MP4Box Binaries MP4Box tool is an […]

R-D Cost Function and Coding Decisions

The R-D cost function (or RDO) where ‘b’ is the block under consideration, ‘d’ is the decision to be made, ‘C’ is the cost to minimize, ‘D’ is the distortion if the decision ‘d’ is taken, ‘R’ is the corresponding change in bitrate, while λ is an application-dependent Lagrangian weighting factor expressing how much bits […]

Evaluation of cutree mode in x265

Introduction The idea of CTU-tree (cutree mode) is as follows: a block is more important if it is referenced by many other blocks, i.e. has many ancestors in the graph (or in the tree).  cutree makes sense if the lookahead is enabled, otherwise we can’t know ahead how much a given block is referenced in […]

OpenJPEG – Encoding and Decoding of JPEG2000 Images

Content Lossless Encoding RGB Input YUV420 Input Lossy Encoding Tiling Lazy Coding Decoding Appendix: subjective quality analysis between JPEG and JPEG2000 Appendix: JPEG2000 encoding with ffmpeg   The open source (BSD 3-Clause license)  OpenJPEG  contains both ready binaries for Linux, MAC and Windows and code sources, OpenJPEG supports JPEG2000 and in this post i dwell […]

WebP Image Format with ffmpeg

WebP image format was introduced by Google in 2010 and it’s is based on lossy and lossless intra-frame coding of the VP8.  Google claims WebP images using lossless compressed are 26% smaller in file size compared to PNGs, and files with lossy compression are 25-34% smaller in size compared to JPEG images at equivalent perceived […]

BPG (Better Portable Graphics) Still Image Format

BPG (Better Portable Graphics) is based on a subset of HEVC/H.265 tools. Main supported features: chroma formats – grayscale, YCbCr (4:2:0, 4:2:2, 4:4:4)  Alpha channel Native support of 8 to 14 bits per channel for a higher dynamic range. Lossless compression is supported.   Ready windows binaries (64-bit) are located at https://bellard.org/bpg/bpg-0.9.8-win64.zip   .  The binaries […]

Video Codec and Pareto Optimization

This paper was inspired by the paper “Multi-Objective Optimization“ Video Codec is characterized by three parameters:  visual quality, bitrate and complexity (or encoding times). We can’t simultaneously improve, say, the visual quality and the bitrate without sacrificing the complexity.  Similarly, we can’t reduce complexity without sacrificing visual quality and/or bitrate. This resembles Pareto optimization: The […]

How Compute BD-Rate?

The PSNR/VMAF BD-rate is a measure of coding efficiency in the terms of the average change in bitrate for a fixed PSNR or VMAF quality between two video compression methods. Additional information on BD-Rate is present here (“Bjontegaard Delta-Rate Metric” by Maxim Sharabayko)   For example, if PSNR BD-rate is -10% between codec A and […]