Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Inter frame
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== H.264 inter frame prediction improvements == The most important improvements of the [[H.264]] technique in regard to standards before it (especially [[MPEG-2]]) are: *More flexible block partition *Resolution of up to ¼ pixel motion compensation *Multiple references *Enhanced Direct/Skip Macroblock === More flexible block partition === Luminance block partition of 16×16 ([[MPEG-2]]), 16×8, 8×16, and 8×8. The last case allows the division of the block into new blocks of 4×8, 8×4, or 4×4. [[File:H.264 block division.svg|400px]] The frame to be coded is divided into blocks of equal size as shown in the picture above. Each block prediction will be blocks of the same size as the reference pictures, offset by a small displacement. === Resolution of up to ¼ pixel motion compensation === Pixels at half-pixel position are obtained by applying a filter of length 6. H=[1 -5 20 20 -5 1], i.e. half-pixel "b"=A - 5B + 20C + 20D - 5E + F Pixels at quarter-pixel position are obtained by [[bilinear interpolation]]. While [[MPEG-2]] allowed a ½ pixel resolution, Inter frame allows up to ¼ pixel resolution. That means that it is possible to search a block in the frame to be coded in other reference frames, or we can interpolate nonexistent pixels to find blocks that are even better suited to the current block. If motion vector is an integer number of units of samples, that means it is possible to find in reference pictures the compensated block in motion. If motion vector is not an integer, the prediction will be obtained from interpolated pixels by an interpolator filter to horizontal and vertical directions. [[File:Subpel interpolation.jpg]] === Multiple references === Multiple references to motion estimation allows finding the best reference in 2 possible buffers (List 0 to past pictures, List 1 to future pictures) which contain up to 16 frames in total.<ref>{{Cite web|url=https://forum.doom9.org/showthread.php?t=129364|title = A rookie question regarding on B frame in AVC - Doom9's Forum}}</ref><ref>{{cite web|title=X264 Stats Output, the "ref B L1" part|url=http://mewiki.project357.com/wiki/X264_Stats_Output|archive-url=https://web.archive.org/web/20141122182446/http://mewiki.project357.com/wiki/X264_Stats_Output|archive-date=2014-11-22}}</ref> Block prediction is done by a weighted sum of blocks from the reference picture. It allows enhanced picture quality in scenes where there are changes of plane, zoom, or when new objects are revealed. [[File:Multiple references.jpg]] === Enhanced Direct/Skip Macroblock === Skip and Direct Mode are very frequently used, especially with B-frames. They significantly reduce the number of bits to be coded. These modes are referred to when a block is coded without sending residual error or motion vectors. The encoder will only record that it is a Skip Macroblock. The decoder will deduce the motion vector of Direct/Skip Mode coded block from other blocks already decoded. There are two ways to deduce the motion: [[File:Direct skip.jpg]] ; Temporal: It uses the block motion vector from List 1 frame, located at the same position to deduce the motion vector. List 1 block uses a List 0 block as reference. ; Spatial: It predicts the movement from neighbour macroblocks in same frame. A possible criterion could be to copy the motion vector from a neighboring block. These modes are used in uniform zones of the picture where there is not much movement. [[File:block partition.jpg]] In the figure above, pink blocks are Direct/Skip Mode coded blocks. As we can see, they are used very frequently, mainly in B-frames.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)