高效率图像文件格式





































High Efficiency Image File Format
扩展名
.heif、.heic

互联网媒体类型

image/heif、image/heic、image/heif-sequence、image/heic-sequence
开发者
MPEG
格式类型
图像容器格式
标准
ISO/IEC CD 23008-12
网站
http://mpeg.chiariglione.org/standards/mpeg-h/image-file-format

高效率图像文件格式英语:High Efficiency Image File Format, HEIF;也称高效图像文件格式[1])是一个用于单张图像或图像序列的檔案格式。它由运动图像专家组(MPEG)开发,并在MPEG-H Part 12(ISO/IEC 23008-12)中定义。


HEIF规范也定义了高效率视频编码(HEVC)编码的内嵌图像和HEVC编码的图像序列的存储方式,其中以受约束的方式应用帧间预测英语Inter frame


HEIF文件与ISO基本媒体文件格式英语ISO base media file format(ISOBMFF,ISO/IEC 14496-12)兼容,并且还可以包括其他媒体流,例如定时的文本和音频。




目录






  • 1 历史


  • 2 用例


    • 2.1 数码相机和智能手机


    • 2.2 网页和接入互联网的图像应用程序


    • 2.3 图像编辑




  • 3 特性


  • 4 比较


    • 4.1 特性比较


    • 4.2 压缩性能比较




  • 5 语法和结构


    • 5.1 图像项


    • 5.2 派生图像


    • 5.3 图像序列




  • 6 支持的媒体编解码器


  • 7 HEVC图像文件格式


    • 7.1 支持




  • 8 品牌及MIME类型


  • 9 相关标准


  • 10 参考资料


  • 11 外部链接





历史


HEIF的要求和主要用途于2013年定义。[2][3]该规范的技术开发用时约一年半,并于2015年夏季完成。[4]



用例


HEIF支持的用法包括:



  • 存储单个或多个图像及其缩略图

  • 存储连拍照片

  • 支持同时捕获视频和静止图像,即将静止图像和定时图像序列存储在同一文件中

  • 高效地表示动画和动态静图

  • 存储焦点堆叠和曝光堆叠英语Bracketing到同一个容器文件

  • 存储从其他图像文件派生的图像,无论是以非破坏性图像编辑英语Layers (digital image editing)操作为目的派生的图像,还是作为预先计算派生的图像

  • 支持存储其他媒体,例如音频和定时的文本,将定时的图像序列存储在同一个容器文件中,并且同步播放。


由于HEVC支持各种色度格式和样品保真度至无损编码,该格式可以满足当今消费类设备所有的图像存储需求,从典型的8位图像到高端、专业设备所要求的高保真度和动态范围的16位图像。HEIF促进的一些使用场景如下:



数码相机和智能手机


为了节约存储空间,HEIF封装的HEVC编码的图像可以用于压缩全分辨率图像,同时保留一个较低分辨率的JPEG副本(例如4K分辨率或更低)用于屏幕显示。


数码相机和智能手机可以使用HEIF来实现单文件存储连拍、焦点堆叠或曝光堆叠的照片。与此类似,拍摄的视频与静态图像也可以存储在同一个HEIF文件中。HEIF还可以将任何图像集合存储在单个文件中,从而可以轻松分享。



网页和接入互联网的图像应用程序


HTML5.2的图片元素提供了为同一图像指示多个替代方案的能力,网页浏览器可以选择最适合其目的的一份。网页和连接的应用程序使用HEIF的一个动机是减少网页和图像内容的下载时间。



图像编辑


改变方向和裁剪是HEIF的基本功能,并且不需要重新编码图像。此外,HEIF引入了非破坏编辑操作的框架,具体可由外部规范指定。图像编辑应用程序可以使用此功能将编辑指令与原始图像保存在同一文件中。



特性


ISOBMFF英语ISO base media file format中,连续或定时的媒体/元数据流形成一个轨道(track),而静态媒体或元数据作为项目(items)存储。也是因此,HEIF具有如下基本设计:



  • 静态图像作为项存储。所有图像项都独立编码,解码不依赖其他项。一个文件中可以包含任意数量的图像项。

  • 图像序列存储为轨道。可以将图像序列轨道指定为以定时或非定时的方式显示,例如作为画廊或图片专辑。在图像之间存在编码上的依赖关系时,使用图像轨迹轨道而非图像项。

  • 一个文件可以包含图像项、图像序列轨道以及其他媒体。例如,可以创建HEIF文件,其中包括符合HEIF的图像项目或图像序列轨道,以及符合ISOBMFF的任何衍生格式的音频或定时文本轨道。


根据上述设计原则,HEIF文件可以存储下列数据类型:[5]




  • 图像项(Image Items):存储单个图像、图像属性或缩略图。


  • 图像衍生(Image Derivations): 衍生图像是在运行时基于旋转、网格和叠加等描述生成的。这些图像取决于存储在HEIF文件中的其他图像。衍生图像的存储空间很小。


  • 图像序列(Image Sequences):存储多个时间相关或时间预测的图像(如突发式照片拍摄或电影图形动画)其属性和缩略图。 可以使用不同的预测选项来利用图像之间的时间和空间相似性。 因此,即使将数十张图像存储在同一个HEIF文件中,文件大小也可以大幅降低。


  • 辅助图像项(Auxiliary Image Items): 存储补充另一图像项目的图像数据。 一个alpha平面或深度图是这种图像的例子。 这些数据并非如此显示,而是以各种形式用于补充另一图像项目。


  • 图像元数据(Image Metadata):存储同一个HEIF文件中存储图像的EXIF、XMP等元数据。



比较



特性比较


下表显示了不同图像格式的比较:

















































































































































































































一些图像文件格式的特征比较[5]

HEIF (.heic)
JPEG/Exif
PNG
GIF (89a)
WebP
JPEG-XR / TIFF
JPEG-XR / JPX
BPG

格式和可扩展性
基本容器文件格式
ISOBMFF
TIFF
-
-
RIFF
TIFF
- 4
-
有损压缩
是 (HEVC)
是 (JPEG)


是 (VP8)


是 (HEVC10)
无损压缩
是 (HEVC)
是 (TIFF Rev 6.0)
是 (PNG)1
是 (GIF)1
是 (VP8L)


是 (HEVC10)
可扩展至其他编码格式

8



8
5

元数据格式(在内部、顶部)
Exif, XMP, MPEG-7
Exif
-
-
Exif, XMP
Exif, XMP
JPX, (XMP)6
Exif, XMP
可扩展至其他元数据格式






是(基于XML)

其他媒体类型(音频、文本等)

Audio2




7


多图像特性
同一个文件中多个图像

11

3
3


9
图像序列/动画








图像编码









派生图像
多次90度旋转








裁剪








平铺/堆叠








可扩展至其他编辑操作









辅助图片信息
透明度(alpha通道)



12




深度映射








缩略图









备注

1:在GIF和有索引彩色PNG编码中,无损压缩的色彩量化图像会应用有损色彩量化。


2:PCM、µ-Law PCM和ADPCM封装在RIFF WAV中。


3:仅适用于图像和平铺/叠加。


4: JPX是与ISOBMFF兼容的盒子结构格式。但是,只有文件类型框在JPX和ISOBMFF中很常见。


5:JPEG-2000和JPEG-XR的封装已为JPX容器指定。其他编解码器的映射可以照此完成。


6:JPX(ITU-T T.800和T.801)规定了一个自由的元数据方案,但能够携带XML格式的元数据,如XMP。


7:JPX可以包含符合ISOBMFF(或其衍生物)的媒体。JPX动画与其他媒体之间没有精确的同步。


8:TIFF作为一个容器格式,有利于扩展其他编码格式。


9:仅适用动画、缩略图和Alpha平面。不支持非定时的图像集合。


10:HEVC Main 4:4:4 16 Still Picture profile, Level 8.5, with additional constraints


11:可以通过MP扩展启用。


12:可以指定完全透明的调色板索引。


上述比较使用了下列参考资料:











































图像格式
版本或日期
参考资料/网址
HEIF (.heic)
03/2015
ISO/IEC 23008-12

http://mpeg.chiariglione.org/standards/mpeg-h/image-file-format/draft-text-isoiec-fdis-23008-12-carriage-still-image-and-image


JPEG
ISO/IEC 10918-1 | ITU-T Rec. T.81

http://www.w3.org/Graphics/JPEG/itu-t81.pdf


Exif

http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
PNG

http://www.w3.org/TR/PNG/
GIF
89a

http://www.w3.org/Graphics/GIF/spec-gif89a.txt
WebP

https://developers.google.com/speed/webp/docs/riff_containerVP8L: https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification
JPEG-XR

ISO/IEC 29199-2 | ITU-T Rec. T.832

ISO/IEC 15444-2 | ITU-T Rec. T.801 (for JPX)


BPG
0.9.5

http://bellard.org/bpg/bpg_spec.txt

备注:可以肯定的是,该比较表中的摘要在涉及不同格式的特征时有些可能不完整。例如,该表没有涵盖JPEG的某些扩展。



压缩性能比较


下表列出了HEVC帧内编码与知名的静止图像编解码器的编码效率。结果表明JPEG需要2.39倍的文件大小才能达到相同的客观画质。而JPEG-XR需要1.66倍,JPEG-2000需要1.44倍。











































































HEVC帧内编码性能与其他早期编码的比较

formats. File size multiplier factors which represent the compression ratios
against the listed picture codecs[5]



类别



分辨率



特征



JPEG



JPEG XR



JPEG 2000


Class A
2560x1600
Cropped 4Kx2K sequences for Ultra HDTV services
1.87
1.44
1.48

Class B



1920x1080



High resolution sequences for streaming and broadcast services



2.24



1.62



1.15



Class C



832x480



Medium resolution sequences for internet/mobile video services



2.22



1.53



1.50



Class C



832x480



Medium resolution sequences for internet/mobile video services



2.22



1.53



1.50



Class D



416x240



Low resolution sequences for services to resource constrained devices



2.10



1.47



1.43



Class E



1280x720



720p sequences for video conferencing applications



2.70



1.73



1.23



Class F



1024x768, 1280x720



Computer screen content and computer generated content



3.23



2.18



1.87



Average



2.39



1.66



1.44



对于自然内容,受限帧间编码通常可提供比帧内编码好2-3倍的压缩比{{fact}}。在大多数为静态场景的动画中,压缩效率更可以显着超过这些级别,比帧内编码效率高几十倍。下表提供了数个比较信息:










































































HEVC图像文件格式的低延迟预测编码提供了编码效率的改进。比特率影响和编码增益按HEVC帧内编码报告[5]

内容



类型






码率变化



编码增益


Class A
Image burst
8
-46%
1.9

Class B



Image burst


8
-51%
2.0

Class C



Image burst


8
-60%
2.5

Class D



Image burst


8
-63%
2.7

Class E



Image burst


8
-79%
4.8

Class F



Image burst


8
-55%
2.2

Memorial



Exposure stack


16
-29%
1.4

Mersu



Focal stack


13
-25%
1.3

Car&Tractor



Cinemagraph


48
-97%
33.3


语法和结构


HEIF符合ISO基本媒体文件格式英语ISO base media file format(ISO/IEC 14496-12)。图像项存储在根级元框中,图像序列存储为视频媒体轨。


一个文件可以包含图像项目、图像序列轨道以及其他媒体。创建符合HEIF规范的文件时可以包含图像项、图像序列轨道,以及任何符合ISOBMFF的衍生格式的音频和定时的文本轨。


符合ISOBMFF的文件由称为框(box)的数据结构序列组成,每个数据结构都包含一个四字符代码(4CC)指示框的类型、框的大小(以字节为单位)和框的有效载荷。框可以嵌套,即框中可以包含其他框。 ISOBMFF和HEIF对框的顺序和层次结构有进行约束。



图像项


HEIF中定义的图像项的作用如下所示。单个图像可以关联多个角色。








































角色



描述



编码图像



A coded representation of an image.



派生图像



An image that is represented in a file by an indicated operation to indicated input images and can be obtained by performing the operation to the input images.



封面图像


(也称主项)



A representative image of the image items and image sequence tracks of the file. The cover image should be displayed when no other information is available on the preference to display the image items of the file. The file can have only one cover image.



缩略图像



A smaller-resolution representation of a master image. A master image can have multiple thumbnail images (e.g. different resolutions).



辅助图像



An image that complements a master image. For example, an alpha plane or a depth map. Can assist in displaying the master image but is not typically displayed as such.



主图像



An image that is not a thumbnail image or an auxiliary image. It typically represents a full-resolution displayable image.



隐藏图像



An image that should never be displayed. Can be present in the file for example as an input image for a derived image.



pre-derived coded image



A coded image that has been derived from other images. For example, a high dynamic range image derived from an exposure-bracketed set of images. The input images used for derivation are linked to the final pre-derived coded image by referencing. No derivation operation is defined.



HEIF允许为不同图像项之间存储共享的图像属性。属性有两种:描述和变形。描述属性提供有关图像项的信息,而不对图像本身进行修改。变形属性提供有关图像项需要完成的变形修改的信息。HEIF标准规定了旋转90°、180°和270°的变形属性以及裁剪属性。除了描述属性之外,图像项还可选用元数据项表述特征,例如Exif或XMP元数据。



派生图像


派生图像的作用是可以进行无损的图像编辑,使原始编码的图像继续保存在文件中,而新的图像被称为派生图像,可以为一个或多个输入图像应用变换操作来制成。HEIF定义了将派生图像存储为项的一般结构以及几种派生图像的类型。派生图像项的项目类型表示变换操作,而项载荷包含操作的输入参数。输入图像可以是编码的图像或者派生图像。下面列出了HEIF标准中定义的派生图像类型。其他类型可能在其他文档或HEIF标准的更新版本中定义。
























派生图像项

名称



Item 4CC



描述



Identity transformation



iden



Cropping and/or rotation by 90, 180, or 270 degrees, imposed through the respective transformative properties.



圖像覆蓋



iovl



Overlaying any number of input images in indicated order and locations onto the canvas of the output image.



Image grid



grid



Reconstructing a grid of input images of the same width and height.




图像序列


图像序列轨道继承了ISOBMFF的视频轨道的属性和特征。图像序列轨道与视频轨道之间的关键差异在于为轨道给出的定时信息的解释:While the timing information given for a video track adheres the decoding and output timing of the contained video bitstream, the timing information of an image sequence track can represent the capture times (e.g. for separate images of an exposure stack) or the suggested display timing (e.g. for a slide show). It can be indicated whether an image sequence track should be played as a timed sequence or by some non-timed means, such as an image gallery.


HEIF allows the use of inter-picture prediction (a.k.a. inter coding), which can provide significant coding efficiency improvement to image sequences when images are correlated. Such correlation is especially evident in content like image bursts or animation clips. When inter coding is in use, accessing and decoding a particular picture from an image sequence also requires decoding of its reference pictures for inter prediction. HEIF specifies indications assisting players in random access.


Roles can be indicated for image sequence tracks similarly to image items. Below is the list of roles of the image sequence tracks:




















图像序列轨道的角色

角色



描述



thumbnail image sequence



A smaller-resolution representation of a master image sequence.



auxiliary image sequence



An image sequence that complements a master image sequence. For example, a sequence of alpha plane or depth map images. Can assist in displaying the master image sequence but is not typically displayed as such.



master image sequence



An image sequence that is not a thumbnail image sequence or an auxiliary image sequence. Typically contains full-resolution displayable images.



ISOBMFF specifies indications for video and image sequence tracks, such as width and height of the coded images, color information, such as the ICC profile or color primaries, rectangular cropping, transformation matrix, e.g. for rotation. Additionally, timed metadata track(s) can be used to convey Exif, XMP, and MPEG-7 metadata applying to time-parallel samples of the linked image sequence track.


The most important features that enable controlling the playback of an HEIF file are listed below. Some of these features were introduced in the ISOBMFF or ISO/IEC 14496-15 and are explicitly inherited by HEIF, while other features were specifically designed for the HEIF standard.



































控制图像序列播放的特性

特性



首次出现时间



描述


不可显示的样本
ISO/IEC 14496-15
Is never displayed, but can be used as a reference for predicting other images in the track.

timed vs. non-timed playback



HEIF



In timed playback, the image sequence is played as video, whereas in non-timed playback the samples of the track are displayed by other means, such as an image gallery. Non-timed playback may be indicated e.g. when a track is used for achieving a better compression efficiency for an exposure stack.



edit list



ISOBMFF



A list of ranges of the image sequence track in their playback order. Enables modifying the playback order and pace of samples.



looping



HEIF



HEIF allows indicating edit list repetition e.g. for looping animations. The repetition can be indicated to last for a certain duration or be infinite.



cropping and rotation



ISOBMFF



Rectangular cropping and rotation by 90, 180, 270 degrees can be specified.




支持的媒体编解码器


HEIF指定了一种结构格式,从中可以派生特定编解码器的图像格式。HEIF还包括封装图像的图像和图像序列以符合高效率视频编码(HEVC,ISO/IEC 23008-2 | ITU-T Rec. H.265)的规范。该标准的未来版本可能包括其他视频和静态图像媒体编解码器。



HEVC图像文件格式


HEIF标准包括封装HEVC编码的图像和图像序列为HEIF兼容文件的规范。该规范包含以下几个方面:



  • The sample entry format and the sample format of HEVC image sequence tracks are identical to those of the HEVC video tracks specified in ISO/IEC 14496-15. For compatibility with HEVC-capable video players, it is therefore advisable to create both an HEVC image sequence track and an HEVC video track that refer to the same coded images.

  • The format of the decoder configuration information in the image entry item is identical to that in the sample entry format. Likewise, the item format is identical to the sample format of HEVC video and image sequence tracks. This enables having the same intra-coded image as an image item and as a sample in an HEVC image sequence or video track.

  • The configuration information of alpha planes and depth maps follows the respective supplemental enhancement information of HEVC.

  • HEVC image players are required to support rectangular cropping and rotation by 90, 180, and 270 degrees. The primary use case for the mandatory support for rotation by 90 degrees is for the photo shooting situations in which the camera orientation is incorrectly detected or concluded. This requirement makes it possible to manually adjust the image or image sequence orientation afterwards without the need for re-encoding the image or image sequence. Similarly, cropping may be useful to enable post-shooting zoom without the need for re-encoding. As rotation by 90, 180, or 270 degrees as well as cropping are mandatory for all HEVC image file players, it is guaranteed that re-encoding is not required to carry out these operations.

  • Samples in image sequence tracks must be either intra-coded images or inter-picture predicted images with reference to only intra-coded images. These constraints of inter-picture prediction reduce the decoding latency for accessing any particular image within an HEVC image sequence track.



支持


HEIF得到了下列支持:


操作系统


  • Microsoft Windows 10(version 1803 预览版,build 17123)[6],在此前需要通過安裝名為CopyTrans HEIC for Windows的解碼器來實現對HEIF/HEIC的支援,或者安裝其它支援HEIF/HEIC的圖像管理器。[7]



  • macOS High Sierra[8]


  • iOS 11[9][10]


  • Android Pie[11]


图像编辑软件



  • Adobe Lightroom[12](仅限macOS High Sierra、iOS 11+及Android 9+)


  • GIMP[13]

  • ImageMagick


  • Zoner Photo Studio X[14][15][15]


其他



  • Nokia为网页浏览器提供一个开源JavaScript HEIF解码器[16]

  • 开源软件库“libheif”支持读取和存储HEIF文件



品牌及MIME类型


Files conforming to HEIF start with a FileTypeBox as defined in the ISOBMFF standard, which contains a list of brands the file complies with. As the FileTypeBox is located at the start of the file, it provides easily accessible indications of the file contents to media players. Each brand is identified by its unique four-character code. The specification of a brand can include requirements and constraints for files of the brand and for file players supporting the brand. A brand included in the FileTypeBox permits a player that supports the requirements of the brand to play the file.


HEIF标准中指定的品牌如下表所示。HEIF标准规定了“mif1”和“msf1”结构品牌。另外,HEVC的品牌如表1所列。专有品牌“heic”和“hevc”表示使用了HEVC Main Profile。




























































HEIF的品牌、MIME子类型和文件扩展名
品牌
编码格式
图像/序列?
MIME类型
MIME子类型
文件扩展名
mif1
任何
图像
图像
heif
.heif
msf1
任何
序列
图像
heif-sequence
.heif
heic
HEVC(主要或主要静态图片配置)
图像
图像
heic
.heic
heix
HEVC(主要10或格式范围扩展配置)
图像
图像
heic
.heic
hevc
HEVC(主要或主要静态图片配置)
序列
图像
heic-sequence
.heic
hevx
HEVC(主要10或格式范围扩展配置)
序列
图像
heic-sequence
.heic

互联网媒体类型(也称MIME,多用途互联网邮件扩展)被各种应用程序用于标识资源或文件的类型。MIME类型包括媒体类型(HEIF文件为'image')和一个子类型,以及零个或多个可选参数。对于多用途文件,可以给予文件的主要用途选择子类型。


可选的编解码器MIME参数可以用来指示文件中存在的轨道和项使用的编码格式。编解码器MIME参数还包括HEVC编码图像项目或图像序列轨道的配置级别值。


截至2016年1月 (2016-01)[update]image/heifimage/heif-sequenceimage/heic尚未注册为MIME类型。[17]



相关标准



  • MPEG-H


  • HEVC(H.265)

  • ISO基本媒体文件格式英语ISO base media file format



参考资料





  1. ^ iOS 11 今秋将为 iPhone 和 iPad 带来众多强大新功能. Apple. 2017-06-05 [2017-06-08]. 在 iOS 11 中,Apple 引入了一项名为“高效图像文件格式”(High Efficiency Image File Format,简称 HEIF) 的新技术,可让 iPhone 7 和 iPhone 7 Plus 拍摄的每一张照片缩小文件尺寸。 


  2. ^ Requirements for still image coding using HEVC | MPEG. [2015-11-25]. 


  3. ^ Requirements for HEVC image sequences | MPEG. [2015-11-25]. 


  4. ^ Evidence motivates MPEG to launch new standardization effort for HDR. 


  5. ^ 5.05.15.25.3 M. M. Hannuksela. Overview of the High Efficiency Image File Format. JCT-VC document JCTVC-V0072, Oct. 2015. 


  6. ^ Announcing Windows 10 Insider Preview Build 17123 for Fast Ring Subscribers. [2018-03-16] (美国英语). 


  7. ^ HEIC File Extension - What is a .heic file and how do I open it?. fileinfo.com (英语). 


  8. ^ Hollister, Sean. Apple answers iPhone storage woes with smaller photos, videos. CNET. CBS Interactive. June 5, 2017 [September 30, 2017]. 


  9. ^ Snell, Jason. iOS 11: HEVC, HEIF, and what you need to know about these new video and photo formats. Macworld. September 20, 2017 [September 30, 2017]. 


  10. ^ Shu, Lee. Here’s what HEIF and HEVC are, and why they’ll improve your iPhone with iOS 11. Digital Trends. September 19, 2017 [September 30, 2017]. 


  11. ^ Previewing Android P. Android Developers Blog. [2018-03-07] (美国英语). 


  12. ^ HEIC and HEVC media files support in Lightroom and Camera Raw. helpx.adobe.com. [2018-08-06] (英语). 


  13. ^ GIMP 2.10.2 Released. GIMP News. 2018-05-20 [2018-05-22]. 


  14. ^ Zoner Photo Studio X brings support for the HEIF image format to Windows. DPReview. [2018-03-20]. 


  15. ^ 15.015.1 HEIF support comes to Windows with Zoner Photo Studio - DIY Photography. DIY Photography. 2017-11-28 [2018-03-20] (美国英语). 


  16. ^ https://github.com/nokiatech/heif


  17. ^ Media Types. IANA. 2016-01-14 [2016-01-18]. 




外部链接




  • MPEG图像文件格式标准的网站(英文)


  • 该文件格式的网站(英文)


  • 在GitHub上的源代码(英文)





Popular posts from this blog

Lambaréné

Chris Pine

Kashihara Line