FFmpeg
Loading...
Searching...
No Matches
jpegmpf.h
Go to the documentation of this file.
1/*
2 * JPEG Multi-Picture Format common definitions
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/**
22 * @file
23 * Shared definitions for JPEG Multi-Picture Format (CIPA DC-007).
24 */
25
26#ifndef AVFORMAT_JPEGMPF_H
27#define AVFORMAT_JPEGMPF_H
28
29/* Individual Image Attribute bits, from CIPA DC-007 Figure 8 */
32 MPF_DEPENDENT_CHILD = 0x40000000,
33 MPF_REPRESENTATIVE = 0x20000000,
35 MPF_ATTR_TYPE_MASK = 0x00FFFFFF,
36 MPF_FORMAT_JPEG = 0x00000000,
37};
38
39/* MP Type Codes, from CIPA DC-007 Table 4 */
40enum MPFType {
42 MPF_TYPE_LARGE_THUMBNAIL = 0x010000, /* + class (1-5) */
43 MPF_TYPE_MULTI_FRAME = 0x020000, /* + panorama / disparity / multi-angle */
44 MPF_TYPE_PRIMARY = 0x030000, /* Baseline MP Primary Image */
45 MPF_TYPE_ORIGINAL = 0x040000, /* Original preservation image */
47
48 MPF_TYPE_INFO_MASK = 0xFF0000, /* see CIPA DC-007 Figure 9 */
49};
50
51/* Returns whether images of this type only exist as dependent images */
52static inline int mpf_type_is_child(enum MPFType type)
53{
54 switch (type & MPF_TYPE_INFO_MASK) {
58 return 1;
59 default:
60 return 0;
61 }
62}
63
64/* MP Index IFD tags, from CIPA DC-007 Table 3 */
70
71/* APP2 extension segments */
72typedef enum MPFExt {
73 MPF_EXT_XMP, /* GContainer directory, First Individual Image only */
74 MPF_EXT_INDEX, /* MP Index IFD, First Individual Image only */
75 MPF_EXT_ISO21496, /* ISO 21496-1 version fields (in the base image) */
77} MPFExt;
78
79/* Namespace URIs of the GContainer XMP extension */
80#define XMP_CONTAINER_NS "http://ns.google.com/photos/1.0/container/"
81#define XMP_ITEM_NS "http://ns.google.com/photos/1.0/container/item/"
82
83#endif /* AVFORMAT_JPEGMPF_H */
static int mpf_type_is_child(enum MPFType type)
Definition jpegmpf.h:52
MPFExt
Definition jpegmpf.h:72
@ MPF_EXT_NB
Definition jpegmpf.h:76
@ MPF_EXT_ISO21496
Definition jpegmpf.h:75
@ MPF_EXT_XMP
Definition jpegmpf.h:73
@ MPF_EXT_INDEX
Definition jpegmpf.h:74
MPFAttribute
Definition jpegmpf.h:30
@ MPF_DEPENDENT_PARENT
Definition jpegmpf.h:31
@ MPF_REPRESENTATIVE
Definition jpegmpf.h:33
@ MPF_FORMAT_JPEG
Definition jpegmpf.h:36
@ MPF_ATTR_FORMAT_MASK
Definition jpegmpf.h:34
@ MPF_DEPENDENT_CHILD
Definition jpegmpf.h:32
@ MPF_ATTR_TYPE_MASK
Definition jpegmpf.h:35
MPFTag
Definition jpegmpf.h:65
@ MPF_TAG_MPFVersion
Definition jpegmpf.h:66
@ MPF_TAG_NumberOfImages
Definition jpegmpf.h:67
@ MPF_TAG_MPEntry
Definition jpegmpf.h:68
MPFType
Definition jpegmpf.h:40
@ MPF_TYPE_UNDEFINED
Definition jpegmpf.h:41
@ MPF_TYPE_PRIMARY
Definition jpegmpf.h:44
@ MPF_TYPE_MULTI_FRAME
Definition jpegmpf.h:43
@ MPF_TYPE_GAIN_MAP
Definition jpegmpf.h:46
@ MPF_TYPE_ORIGINAL
Definition jpegmpf.h:45
@ MPF_TYPE_LARGE_THUMBNAIL
Definition jpegmpf.h:42
@ MPF_TYPE_INFO_MASK
Definition jpegmpf.h:48
enum MPFType type
Definition jpegmpfenc.c:55