M-JPEG M-JPEG April 15, 2015 INF5063: Programming heterogeneous multi-core processors.

Slides:



Advertisements
Similar presentations
Multimedia System Video
Advertisements

JPEG Compresses real images Standard set by the Joint Photographic Experts Group in 1991.
Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
School of Computing Science Simon Fraser University
1 Data Compression Engineering Math Physics (EMP) Steve Lyon Electrical Engineering.
JPEG.
Image (and Video) Coding and Processing Lecture: DCT Compression and JPEG Wade Trappe Again: Thanks to Min Wu for allowing me to borrow many of her slides.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Color spaces and JPEG. Colors physically, color is electro-magnetic radiation (i.e. light with various wave length, between 390nm- 750nm) percieved by.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
JPEG Marco Fuentes García Francisco Gea Martínez.
Image Compression JPEG. Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg and can be embedded.
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
CM613 Multimedia storage and retrieval Lecture: Lossy Compression Slide 1 CM613 Multimedia storage and retrieval Lossy Compression D.Miller.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
1. Introduction JPEG standard is a collaboration among : International Telecommunication Union (ITU) International Organization for Standardization (ISO)
Page 18/30/2015 CSE 40373/60373: Multimedia Systems 4.2 Color Models in Images  Colors models and spaces used for stored, displayed, and printed images.
JPEG C OMPRESSION A LGORITHM I N CUDA Group Members: Pranit Patel Manisha Tatikonda Jeff Wong Jarek Marczewski Date: April 14, 2009.
Chapter 2 Source Coding (part 2)
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Video Video.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Indiana University Purdue University Fort Wayne Hongli Luo
JPEG CIS 658 Fall 2005.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Compression There is need for compression: bandwidth constraints of multimedia applications exceed the capability of communication channels Ex. QCIF bit.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
The JPEG Standard J. D. Huang Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC.
Data compression. lossless – looking for unicolor areas or repeating patterns –Run length encoding –Dictionary compressions Lossy – reduction of colors.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
JPEG (Joint Photographic Expert Group)
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Introduction to JPEG m Akram Ben Ahmed
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
MPEG CODING PROCESS. Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding.
By Dr. Hadi AL Saadi Lossy Compression. Source coding is based on changing of the original image content. Also called semantic-based coding High compression.
Image Compression-JPEG. Lossless and Lossy Compression Lossless Lossy 144:1.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
JPEG Compression What is JPEG? Motivation
Chapter 9 Image Compression Standards
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
JPEG Image Coding Standard
JPEG.
Digital 2D Image Basic Masaki Hayashi
Chapter 7.2: Layer 5: Compression
CMPT 365 Multimedia Systems
JPG picture compresion
Standards Presentation ECE 8873 – Data Compression and Modeling
Judith Molka-Danielsen, Oct. 02, 2000
JPEG Still Image Data Compression Standard
The JPEG Standard.
Image Coding and Compression
Chapter 8 – Compression Aims: Outline the objectives of compression.
Introduction to video coding
Presentation transcript:

M-JPEG M-JPEG April 15, 2015 INF5063: Programming heterogeneous multi-core processors

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Media  Codecs (coders/decoders) −Determine how information is represented −Important for servers and distribution systems Required sending speed Amount of loss allowed Buffers required …  Formats −Determine how data is stored −Important for servers and distribution systems Where is the data? Where is the data about the data?

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo High data volumes: Need for compression  PAL video sequence −25 images per second −3 bytes per pixel RGB (red-green-blue values) YUV (luminance + 2 chrominance values), usually often a compression already −Uncompressed data rate depending on resolution : VGA: 640 * 480 * 3 Byte * 25/s = byte/s = ~ 22 MByte/s HD 720p: 1280 * 720 * 3 Byte * 25/s = byte/s = ~ 66 Mbyte/s HD 1080p: 1920 * 1080 * 3 Byte * 25/s = byte/s = ~ 148 Mbyte/s  Network rates −5 Mbps ADSL: 4% of 1 HD1080p −1 Gbps Ethernet: 84% of 1 HD1080p −add 1000s of concurrent users ➥ Need for compression

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Compression – General Requirements  Dependence on application type: −Interactive applications (dialog mode) −Non-interactive applications (retrieval mode)

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Compression – General Requirements  Interactive applications −Focus on Low delay Low complexity Symmetry −Sacrifice compression ratio

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Compression – General Requirements  Non-nteractive applications  Focus on  High compression  Low complexity on receiver side  Low delay on receiver side  Accept asymmetry storage

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Basic Encoding Steps

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Huffman Coding  Assumption −Some symbols are more frequent than others  Example Given: A, B, C, D, E Probability to occur: p(A)=0.3, p(B)=0.3, p(C)=0.1, p(D)=0.15, p(E)=0.15

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo JPEG  “JPEG”: Joint Photographic Expert Group  International Standard: −For digital compression and coding of continuous-tone still images −Gray-scale and color  Compression rate of 1:10 yields reasonable results −Lossless mode: reasonable compression rate approx. 1:1.6  Independence of −Image resolution −Image and pixel aspect ratio −Color representation −Image complexity and statistical characteristics

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 1 - Color conversion: RGB to YCbCr  The 24-bit RGB (red, green, blue) value is often converted to YCbCr consisting of −one luma component (Y) representing brightness: −two chroma components representing color (Cb-BlueDifference and Cr-RedDifference), or of the Pb and Pr: −Kb and Kr are ordinarily derived from the definition of the corresponding RGB space, e.g., Kb = and Kr = defined for standard-definition television −the prime (') symbols mean gamma correction is being used - resulting luma (Y) value will then have a nominal range from 0 to 1, and the chroma (Cb and Cr) values will have a nominal range from -0.5 to +0.5 −in digital form, the results are scaled and rounded, and offsets are typically added

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 1 - Color conversion: RGB to YCbCr  JPEG File Interchange Format (JFIF) allows Y'CbCr where Y', Cb and Cr have the full 256 values: − Y' = * R’ * G’ * B’ − Cb = * R’ * G’ * B’ − Cr = * R’ * G’ * B’ … allowing values [0, 255]  Downsampling (first compression step) −humans can see considerably more fine detail in the brightness reduce the spatial resolution of the Cb and Cr components −4:4:4 (no downsampling) −4:2:2 (reduce by factor of 2 in horizontal direction) −4:2:0 (reduce by factor of 2 in horizontal and vertical directions) ➥ resolution of croma is usually reduced by a factor of 2 (24-bit to 16-bit)

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 1 - Color conversion: RGB to YCbCr  Y image is essentially a greyscale copy of the main image;  the white snow is represented as a middle value in both Cr and Cb;  the brown barn is represented by weak Cb and strong Cr;  the green grass is represented by weak Cb and weak Cr;  the blue sky is represented by strong Cb and weak Cr. RGBYCbCr R G B Y Cb Cr

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 2 - Split each picture in 8x8 blocks  Each Y, Cb and Cr picture is divided into 8x8 blocks, number depends on resolution

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 3 - Discrete cosine transform (DCT)  Each 8×8 block (Y, Cb, Cr) is converted to a frequency-domain representation, using a normalized, two-dimensional DCT

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 3 - Discrete cosine transform (DCT)  Each 8×8 block (Y, Cb, Cr) is converted to a frequency-domain representation, using a normalized, two-dimensional DCT −each pixel is represented by a [0, 255]-value −each pixel is transformed to a [-128, 127]-value

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 3 - Discrete cosine transform (DCT)  Each 8×8 block (Y, Cb, Cr) is converted to a frequency-domain representation, using a normalized, two-dimensional DCT −two-dimensional DCT: −G u,v is the DCT at coordinates (u,v) −u is the horizontal spatial frequency [0,8> −v is the vertical spatial frequency [0,8> −g x,y is the pixel value at coordinates (x,y) −α is a normalizing function: Note the rather large value of the top-left corner (DC coefficient). The remaining 63 are AC coefficients. The advantage of the DCT is its tendency to aggregate most of the signal in one corner of the result, as may be seen above. Compression possible: the following quantization step accentuates this effect while simultaneously reducing the overall size of the DCT coefficients

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 4 - Quantization  The human eye −is good at seeing small differences in brightness over a large area −not so good at distinguishing the exact strength of a high frequency brightness variation −can reduce the amount of information in the high frequency components −simply dividing each component in the frequency domain by a known constant for that component, and then rounding to the nearest integer: where Q j,k is a quantization matrix, e.g., for JPEG G 0,0 = -415 Q 0,0 = 16 = ≈ -26

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo 5 - Lossless compression  The resulting data for all 8×8 blocks is further compressed with a loss-less algorithm: −organizing numbers in a zigzag pattern: -26, -3, 0, -3, -2, -6, 2, -4, 1, -4, 1, 1, 5, 1, 2, -1, 1, -1, 2, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, …., 0, 0 −run-length (RLE) −Huffman coding – own table of symbols

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo DC AC

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo JPEG – Baseline Mode: Quantization  Use of quantization tables for the DCT-coefficients −Map interval of real numbers to one integer number −Allows to use different granularity for each coefficient

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo Motion JPEG  Use series of JPEG frames to encode video  Pro −Lossless mode – editing advantage −Frame-accurate seeking – editing advantage −Arbitrary frame rates– playback advantage −Arbitrary frame skipping– playback advantage −Scaling through progressive mode– distribution advantage −Min transmission delay = 1/framerate– conferencing advantage −Supported by popular frame grabbers  Contra −Series of JPEG-compressed images −No standard, no specification Worse, several competing quasi-standards −No relation to audio −No inter-frame compression

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo MJPEG in Quicktime Motion JPEG A

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo MJPEG in Quicktime Motion JPEG B

INF5063, Pål Halvorsen, Carsten Griwodz, Håvard Espeland, Håkon Stensland University of Oslo MJPEG in Quicktime Our file format: Sequence of JFIFs