Personal View site logo

User Tools

Site Tools


h264-resource-wip:avchd

This is an old revision of the document!


Note from Driftwood (14th Feb 2012): This is a work in progress of AVCHD resource and info. Things we know need to be rewritten and simplified and put in here. Below is not the final order of the jigsaw - some of the sections may end up in other headings. I'm going to finish everything first, and then you guys can edit it down more. Everything is written in' my way of interpretation' ie nothing is copied from other sources - if its incorrect, correct it!

What is AVCHD?

Definition; AVCHD (Advanced Video Coding High Definition) is part of the AVC standard. AVCHD was jointly developed by Panasonic and Sony and introduced in 2006 primarily for use in high definition consumer camcorders. AVCHD is the codec of choice for the Panasonic GH1 and GH2. For a full description and reference please visit: http://en.wikipedia.org/wiki/AVCHD

Specification

Click this link for a full specification to AVCHD: http://www.avchd-info.org/format/index.html

AVCHD Conformance

How does the GH2 AVCHD codec conform to the standard & profiles? [to be written]

AVCHD Prediction

A good analogy of AVCHD Prediction is how sampling works in music - you take musical sections and sample them so that you can copy and paste them later on (or before) in the song to make identical chorus or verse backing tracks. Similarly, in video the individual pictures can be broken up and sampled to form zones in the picture from previous (and/or future picture zones) to make up the current picture in the video. This process is called Prediction and it helps maximise compression to save data/memory space whilst giving good reproduction of the original part of the picture. To achieve near perfect prediction the pictures are broken down into smaller blocks of pixels for even more accurate reproduction. But they each have a special meaning and way of working.

* Prediction zones are chopped up into Macroblocks

Definition; A macroblock (abbreviation = mb) is a series of non-overlapping 4 by 4 (4×4) or 8 by 8 (8×8) pixel blocks which put together make up the composition of the coded picture frame. In AVCHD GH2 terms, these mbs (macroblocks) are divided into 4×4 blocks. Every AVCHD macroblock has a prediction - an attempt to recreate the information inside the macroblock using previously coded data which is then subtracted from the macroblock to form the quantity left over - known as the residual. How much residual data is left over dictates how well the compression is working. Less residual = better compression performance. AVCHD has many of the effecient prediction characterisitics described in the H.264/AVC standard.

  • I-Frame/P-Frame/B-Frame Macroblock prediction - Macroblock prediction works as follows; an I-mb method (I=Intra prediction) predicts from neighbouring sample blocks in the same frame, a P-mb prediction (P=predictive) is a current frame predicted from a previous or future coded frame, whereras a B-mb prediction (B=Bi-directionaly predicted) is predicted from a combination of forward and/or backward coded frame/s.

Intra prediction

  • Intra prediction; (Intra meaning 'within itself') is a coded mb which does not refer to any other data outside itself - ie its current slice. Therefore, Intra prediction is created from adjacent previously coded block samples in the same slice to predict the values in the current block. (See fig.x taken from a GH2 Intra block sample).
  • Nine modes to predict a 4×4 block - labelled 0 to 8, there are 9 ways of predicting a block from surrounding blocks (see fig.x and note the direction of the arrows) ;-
    1. Mode 0 (vertical) The upper samples are taken to form the prediction.
    2. Mode 1 (Horizontal) The left samples are taken to form the prediction.
    3. Mode 2 (DC) All samples are mean averaged from the 4×4 block to form the prediction.
    4. Mode 3 (Diagonal, Downwards-Left) The samples are taken at a 45 degree angle between lower-left and upper-right to form the prediction.
    5. Mode 4 (Diagonal, Down-Right) The samples are taken at a 45 degree angle between down and to the right to form the prediction.
    6. Mode 5 (Vertical-Left) Prediction samples are taken at an angle of approx. 26.6 degrees (ie width/height = 1/2) to the left of vertical.
    7. Mode 6 (Horizontal-Down) Prediction samples are taken at an angle of approx. 26.6 degrees below horizontal.
    8. Mode 7 (Vertical-Right) Prediction samples are taken at an angle of approx. 26.6 degrees to the right of vertical.
    9. Mode 8 (Horizontal-Up) Prediction samples are taken from an interpolation at an angle of approx. 26.6 degrees above horizontal.
  • 4×4 luma prediction modes
  • 16×16 luma prediction modes
  • chroma prediction modes
  • 8×8 luma prediction modes
  • Intra prediction mode samples of GH2 (NOTE: images and text to be integrated with above)

Inter prediction

  • Inter prediction; is the method of foretelling a block of luma or chroma samples from a picture that has previously been coded and stored (which becomes a reference picture) in the decoded picture buffer (DPB). The DPB is a repository of pictures coded from before or after the current picture in the display order.

Note: Everything in grey boxes to be written…

  IRD Reference pictures
  Insertion of reference pictures
  Macroblock partitions
  Motion vector prediction
  Motion compensation
  Inter prediction examples (GH2)
  
Loop Filter
  Definition

Deblocking

  Examples & Summary

AVCHD Transform & Quantization

Definition, 
Transform & Quantization
  Process
  Transform & quantization of 4x4 blocks
  *Transform & quantization of 8x8 blocks is not used in GH2 
  Quajntization Scaling Tables
  DC transforms
Coding (CAVLC/CABAC)

AVCHD/GH2 Rate Control

Definition1,
Choosing the right bitrate & IQ and Q (Quantisation)
GOP (Group of Pictures)
GH2's Time Limits
GH2's Video & Video 24 Buffers
*     0x01800000 = 25165824 Dec
*     0x02400000 = 37748736 Dec
*     0x02800000 = 41943040 Dec
*     0x03000000 = 50331648 Dec
*     0x03600000 = 56623104 Dec
GH2's Frame Limits
GH2's Frame buffer size

AVCHD Stream Analysis

//Definition2,//
Using Streamparser
Other tools
  Elecard Streameye Studio Lite & Pro
  

Handling AVCHD Files

//Definition3,//
AVCHD File Structure .mts
Playback InCamera
Import into computer 
Editing & conversion
.mts Repair tools

Other#4

//Definition4,//
item#4

Other#5

//Definition5,//
item#5

Other#6

//Definition6,//
item#6
h264-resource-wip/avchd.1329278347.txt.gz · Last modified: 2012/02/15 03:59 by driftwood