FFmpeg
Loading...
Searching...
No Matches
proresdata.c
Go to the documentation of this file.
1/*
2 * Apple ProRes compatible decoder
3 *
4 * Copyright (c) 2010-2011 Maxim Poliakovski
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#include "proresdata.h"
24
25const uint8_t ff_prores_progressive_scan[64] = {
26 0, 1, 8, 9, 2, 3, 10, 11,
27 16, 17, 24, 25, 18, 19, 26, 27,
28 4, 5, 12, 20, 13, 6, 7, 14,
29 21, 28, 29, 22, 15, 23, 30, 31,
30 32, 33, 40, 48, 41, 34, 35, 42,
31 49, 56, 57, 50, 43, 36, 37, 44,
32 51, 58, 59, 52, 45, 38, 39, 46,
33 53, 60, 61, 54, 47, 55, 62, 63
34};
35
36const uint8_t ff_prores_interlaced_scan[64] = {
37 0, 8, 1, 9, 16, 24, 17, 25,
38 2, 10, 3, 11, 18, 26, 19, 27,
39 32, 40, 33, 34, 41, 48, 56, 49,
40 42, 35, 43, 50, 57, 58, 51, 59,
41 4, 12, 5, 6, 13, 20, 28, 21,
42 14, 7, 15, 22, 29, 36, 44, 37,
43 30, 23, 31, 38, 45, 52, 60, 53,
44 46, 39, 47, 54, 61, 62, 55, 63
45};
46
47const uint8_t ff_prores_dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70 };
48
49const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
50 0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
51
52const uint8_t ff_prores_level_to_cb[10] = { 0x04, 0x0A, 0x05, 0x06, 0x04, 0x28,
53 0x28, 0x28, 0x28, 0x4C };
54
71
73{
74 switch (color_trc) {
76 case AVCOL_TRC_BT709:
80 return color_trc;
84 return AVCOL_TRC_BT709;
85 default:
87 }
88}
89
91{
92 switch (colorspace) {
93 case AVCOL_SPC_RGB:
94 case AVCOL_SPC_BT709:
98 return colorspace;
100 return AVCOL_SPC_SMPTE170M;
101 default:
103 }
104}
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
Definition csp.c:76
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition pixfmt.h:647
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition pixfmt.h:654
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition pixfmt.h:662
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
Definition pixfmt.h:649
@ AVCOL_PRI_UNSPECIFIED
Definition pixfmt.h:650
@ AVCOL_PRI_RESERVED0
Definition pixfmt.h:648
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition pixfmt.h:661
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition pixfmt.h:655
@ AVCOL_PRI_BT2020
ITU-R BT2020.
Definition pixfmt.h:658
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition pixfmt.h:677
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
Definition pixfmt.h:684
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition pixfmt.h:694
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
Definition pixfmt.h:698
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
Definition pixfmt.h:693
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
Definition pixfmt.h:692
@ AVCOL_TRC_UNSPECIFIED
Definition pixfmt.h:680
@ AVCOL_TRC_BT709
also ITU-R BT1361
Definition pixfmt.h:679
@ AVCOL_TRC_RESERVED0
Definition pixfmt.h:678
AVColorSpace
YUV colorspace type.
Definition pixfmt.h:711
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
Definition pixfmt.h:713
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
Definition pixfmt.h:717
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
Definition pixfmt.h:712
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition pixfmt.h:722
@ AVCOL_SPC_UNSPECIFIED
Definition pixfmt.h:714
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
Definition pixfmt.h:718
int ff_prores_color_trc(enum AVColorTransferCharacteristic color_trc)
Definition proresdata.c:72
int ff_prores_color_primaries(enum AVColorPrimaries color_primaries)
Map color properties to the codes a frame header can carry (SMPTE RDD 36), substituting an equivalent...
Definition proresdata.c:55
const uint8_t ff_prores_dc_codebook[7]
Definition proresdata.c:47
const uint8_t ff_prores_run_to_cb[16]
Definition proresdata.c:49
int ff_prores_colorspace(enum AVColorSpace colorspace)
Definition proresdata.c:90
const uint8_t ff_prores_progressive_scan[64]
Definition proresdata.c:25
const uint8_t ff_prores_level_to_cb[10]
Definition proresdata.c:52
const uint8_t ff_prores_interlaced_scan[64]
Definition proresdata.c:36