1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
22
27
30
33
36
37
40 {
43
48
51 if (
ctx->color_space >= 0) {
53 if (!(
ctx->color_warnings & 2)) {
55 "incompatible with profiles 0 and 2.\n");
56 ctx->color_warnings |= 2;
57 }
58 } else
60 }
61
62 if (
ctx->color_range >= 0)
65 if (!(
ctx->color_warnings & 1) && !
header->color_range) {
67 "implicitly sets color range to PC range.\n");
68 ctx->color_warnings |= 1;
69 }
71 }
75 "profile 0 are automatically BT.601.\n");
76 ctx->color_warnings |= 4;
77 }
78 }
79
80 return 0;
81 }
82
85 .fragment_name = "superframe",
86 .unit_name = "frame",
88 };
89
91 {
93 }
94
95 #define OFFSET(x) offsetof(VP9MetadataContext, x)
96 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
98 { "color_space", "Set colour space (section 7.2.2)",
115
116 { "color_range", "Set colour range (section 7.2.2)",
118 { .i64 = -1 }, -1, 1,
FLAGS,
"cr" },
120 { .i64 = 0 }, .flags =
FLAGS, .unit =
"cr" },
122 { .i64 = 1 }, .flags =
FLAGS, .unit =
"cr" },
123
125 };
126
132 };
133
136 };
137
139 .
name =
"vp9_metadata",
146 };