| @@ -136,20 +136,42 @@ typedef struct AVFilmGrainH274Params { · 135 unmodified lines |
| 136 | 136 | */ |
| 137 | 137 | int model_id; |
| 138 | 138 | |
| 139 | | − /** |
| 140 | | − * Specifies the bit depth used for the luma component. |
| 141 | | − */ |
| 139 | +#if FF_API_H274_FILM_GRAIN_VCS |
| 140 | + /** |
| 141 | + * TODO: On this ABI bump, please also re-order the fields in |
| 142 | + * AVFilmGrainParams (see below) |
| 143 | + */ |
| 144 | + |
| 145 | + /** |
| 146 | + * Specifies the bit depth used for the luma component. |
| 147 | + * |
| 148 | + * @deprecated use AVFilmGrainParams.bit_depth_luma. |
| 149 | + */ |
| 150 | + attribute_deprecated |
| 142 | 151 | int bit_depth_luma; |
| 143 | 152 | |
| 144 | 153 | /** |
| 145 | 154 | * Specifies the bit depth used for the chroma components. |
| 155 | + * |
| 156 | + * @deprecated use AVFilmGrainParams.bit_depth_chroma. |
| 146 | 157 | */ |
| 158 | + attribute_deprecated |
| 147 | 159 | int bit_depth_chroma; |
| 148 | 160 | |
| 161 | + /** |
| 162 | + * Specifies the video signal characteristics. |
| 163 | + * |
| 164 | + * @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}. |
| 165 | + */ |
| 166 | + attribute_deprecated |
| 149 | 167 | enum AVColorRange color_range; |
| 168 | + attribute_deprecated |
| 150 | 169 | enum AVColorPrimaries color_primaries; |
| 170 | + attribute_deprecated |
| 151 | 171 | enum AVColorTransferCharacteristic color_trc; |
| 172 | + attribute_deprecated |
| 152 | 173 | enum AVColorSpace color_space; |
| 174 | +#endif |
| 153 | 175 | |
| 154 | 176 | /** |
| 155 | 177 | * Specifies the blending mode used to blend the simulated film grain |
| @@ -231,11 +253,40 @@ typedef struct AVFilmGrainParams { · 75 unmodified lines |
| 231 | 253 | * Additional fields may be added both here and in any structure included. |
| 232 | 254 | * If a codec's film grain structure differs slightly over another |
| 233 | 255 | * codec's, fields within may change meaning depending on the type. |
| 256 | + * |
| 257 | + * TODO: Move this to the end of the structure, at the next ABI bump. |
| 234 | 258 | */ |
| 235 | 259 | union { |
| 236 | 260 | AVFilmGrainAOMParams aom; |
| 237 | 261 | AVFilmGrainH274Params h274; |
| 238 | 262 | } codec; |
| 263 | + |
| 264 | + /** |
| 265 | + * Intended display resolution. May be 0 if the codec does not specify |
| 266 | + * any restrictions. |
| 267 | + */ |
| 268 | + |
| 269 | + int width, height; |
| 270 | + |
| 271 | + /** |
| 272 | + * Intended subsampling ratio, or 0 for luma-only streams. |
| 273 | + */ |
| 274 | + int subsampling_x, subsampling_y; |
| 275 | + |
| 276 | + /** |
| 277 | + * Intended video signal characteristics. |
| 278 | + */ |
| 279 | + enum AVColorRange color_range; |
| 280 | + enum AVColorPrimaries color_primaries; |
| 281 | + enum AVColorTransferCharacteristic color_trc; |
| 282 | + enum AVColorSpace color_space; |
| 283 | + |
| 284 | + /** |
| 285 | + * Intended bit depth, or 0 for unknown/unspecified. |
| 286 | + */ |
| 287 | + int bit_depth_luma; |
| 288 | + int bit_depth_chroma; |
| 289 | + |
| 239 | 290 | } AVFilmGrainParams; |
| 240 | 291 | |
| 241 | 292 | /** |