FFmpeg
prores_raw.h
Go to the documentation of this file.
1 /*
2  * ProRes RAW decoder
3  * Copyright (c) 2025 Lynne
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVCODEC_PRORES_RAW_H
23 #define AVCODEC_PRORES_RAW_H
24 
25 #include "libavutil/frame.h"
26 #include "libavutil/mem_internal.h"
27 #include "libavutil/pixfmt.h"
28 
29 #include "bytestream.h"
30 #include "blockdsp.h"
31 #include "proresdsp.h"
32 
33 typedef struct TileContext {
35  unsigned x, y;
37 } TileContext;
38 
39 typedef struct ProResRAWContext {
42 
44  unsigned int tiles_size;
45  int nb_tiles;
46  int th;
47  int nb_tw, nb_th;
48 
52 
53  int version;
54 
55  DECLARE_ALIGNED(32, uint8_t, scan)[64];
56  DECLARE_ALIGNED(32, uint8_t, qmat)[64];
57 
58  /* 8-point combined linearization curve
59  * (inv. transfer fn + encoder-defined shaping) from the frame header,
60  * applied after iDCT */
61  uint16_t lin_curve[8];
63 
64 extern const uint8_t ff_prores_raw_dc_cb[13];
65 extern const int16_t ff_prores_raw_ac_cb[95];
66 extern const int16_t ff_prores_raw_rn_cb[28];
67 extern const int16_t ff_prores_raw_ln_cb[15];
68 
69 #endif /* AVCODEC_PRORES_RAW_H */
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
blockdsp.h
mem_internal.h
GetByteContext
Definition: bytestream.h:33
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:459
ProResRAWContext::prodsp
ProresDSPContext prodsp
Definition: prores_raw.h:40
TileContext::y
unsigned y
Definition: prores_raw.h:35
ProResRAWContext::version
int version
Definition: prores_raw.h:53
BlockDSPContext
Definition: blockdsp.h:32
TileContext::log2_nb_blocks
int log2_nb_blocks
Definition: prores_raw.h:36
ProresDSPContext
Definition: proresdsp.h:29
ProResRAWContext::nb_tiles
int nb_tiles
Definition: prores_raw.h:45
ff_prores_raw_ac_cb
const int16_t ff_prores_raw_ac_cb[95]
Definition: prores_raw.c:107
ProResRAWContext::tiles
TileContext * tiles
Definition: prores_raw.h:43
ProResRAWContext::lin_curve
uint16_t lin_curve[8]
Definition: prores_raw.h:61
ff_prores_raw_ln_cb
const int16_t ff_prores_raw_ln_cb[15]
Definition: prores_raw.c:125
ff_prores_raw_rn_cb
const int16_t ff_prores_raw_rn_cb[28]
Definition: prores_raw.c:119
ProResRAWContext
Definition: prores_raw.h:39
ProResRAWContext::th
int th
Definition: prores_raw.h:46
ProResRAWContext::scan
uint8_t scan[64]
Definition: prores_raw.h:55
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem_internal.h:104
ProResRAWContext::nb_tw
int nb_tw
Definition: prores_raw.h:47
frame.h
proresdsp.h
ProResRAWContext::pix_fmt
enum AVPixelFormat pix_fmt
Definition: prores_raw.h:49
ProResRAWContext::frame
AVFrame * frame
Definition: prores_raw.h:50
pixfmt.h
TileContext::gb
GetByteContext gb
Definition: prores_raw.h:34
ProResRAWContext::bdsp
BlockDSPContext bdsp
Definition: prores_raw.h:41
ProResRAWContext::nb_th
int nb_th
Definition: prores_raw.h:47
TileContext::x
unsigned x
Definition: prores_raw.h:35
bytestream.h
TileContext
Definition: prores_raw.h:33
ProResRAWContext::hwaccel_picture_private
void * hwaccel_picture_private
Definition: prores_raw.h:51
ff_prores_raw_dc_cb
const uint8_t ff_prores_raw_dc_cb[13]
Definition: prores_raw.c:102
ProResRAWContext::tiles_size
unsigned int tiles_size
Definition: prores_raw.h:44
ProResRAWContext::qmat
uint8_t qmat[64]
Definition: prores_raw.h:56