39 { 640, 480, 2, 0, 0, 1, 1, 640, 480, 0, 0, 1, 0 },
40 { 176, 120, 2, 0, 0, 9, 2, 176, 120, 0, 0, 1, 1 },
41 { 176, 144, 2, 0, 1, 10, 3, 176, 144, 0, 0, 1, 2 },
42 { 352, 240, 2, 0, 0, 9, 2, 352, 240, 0, 0, 1, 1 },
43 { 352, 288, 2, 0, 1, 10, 3, 352, 288, 0, 0, 1, 2 },
44 { 704, 480, 2, 0, 0, 9, 2, 704, 480, 0, 0, 1, 1 },
45 { 704, 576, 2, 0, 1, 10, 3, 704, 576, 0, 0, 1, 2 },
46 { 720, 480, 1, 1, 0, 4, 2, 704, 480, 8, 0, 3, 1 },
47 { 720, 576, 1, 1, 1, 3, 3, 704, 576, 8, 0, 3, 2 },
49 { 1280, 720, 1, 0, 1, 7, 1, 1280, 720, 0, 0, 3, 3 },
50 { 1280, 720, 1, 0, 1, 6, 1, 1280, 720, 0, 0, 3, 3 },
51 { 1920, 1080, 1, 1, 1, 4, 1, 1920, 1080, 0, 0, 3, 3 },
52 { 1920, 1080, 1, 1, 1, 3, 1, 1920, 1080, 0, 0, 3, 3 },
53 { 1920, 1080, 1, 0, 1, 7, 1, 1920, 1080, 0, 0, 3, 3 },
54 { 1920, 1080, 1, 0, 1, 6, 1, 1920, 1080, 0, 0, 3, 3 },
55 { 2048, 1080, 0, 0, 1, 2, 1, 2048, 1080, 0, 0, 4, 4 },
56 { 4096, 2160, 0, 0, 1, 2, 1, 4096, 2160, 0, 0, 4, 4 },
58 { 3840, 2160, 1, 0, 1, 7, 1, 3840, 2160, 0, 0, 3, 3 },
59 { 3840, 2160, 1, 0, 1, 6, 1, 3840, 2160, 0, 0, 3, 3 },
60 { 7680, 4320, 1, 0, 1, 7, 1, 3840, 2160, 0, 0, 3, 3 },
61 { 7680, 4320, 1, 0, 1, 6, 1, 3840, 2160, 0, 0, 3, 3 },
100 static const struct {
124 unsigned luma_depth = 8, luma_offset = 16;
126 int chroma_x_shift, chroma_y_shift;
244 if ((source->
width % (1<<chroma_x_shift)) || (source->
height % (1<<chroma_y_shift))) {
245 av_log(avctx,
AV_LOG_ERROR,
"Dimensions must be an integer multiple of the chroma subsampling\n");
295 unsigned version_major;
296 unsigned video_format, picture_coding_mode;
308 if (version_major < 2)
310 else if (version_major > 2)
313 if (video_format > 20
U)
317 *source = dirac_source_parameters_defaults[video_format];
333 if (picture_coding_mode != 0) {
335 picture_coding_mode);
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
#define AV_LOG_WARNING
Something somehow does not look correct.
uint16_t clean_right_offset
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
enum AVColorRange color_range
MPEG vs JPEG YUV range.
uint8_t frame_rate_index
index into dirac_frame_rate[]
static unsigned svq3_get_ue_golomb(GetBitContext *gb)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
AVColorTransferCharacteristic
Color Transfer Characteristic.
enum AVColorTransferCharacteristic color_trc
static const dirac_source_params dirac_source_parameters_defaults[]
Interface to Dirac Decoder/Encoder.
AVColorSpace
YUV colorspace type.
uint8_t color_spec_index
index into dirac_color_spec_presets[]
enum AVColorRange color_range
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
int ff_set_sar(AVCodecContext *avctx, AVRational sar)
Check that the provided sample aspect ratio is valid and set it on the codec context.
AVColorRange
MPEG vs JPEG YUV range.
static enum AVPixelFormat dirac_pix_fmt[2][3]
AVColorPrimaries
Chromaticity coordinates of the source primaries.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
enum AVColorPrimaries color_primaries
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Libavcodec external API header.
uint8_t chroma_format
0: 444 1: 422 2: 420
int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, dirac_source_params *source)
uint8_t aspect_ratio_index
index into dirac_aspect_ratio[]
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
the normal 2^n-1 "JPEG" YUV ranges
uint8_t pixel_range_index
index into dirac_pixel_range_presets[]
static const AVRational dirac_frame_rate[]
static const struct @39 pixel_range_presets[]
main external API structure.
static enum AVColorPrimaries dirac_primaries[]
static unsigned int get_bits1(GetBitContext *s)
enum AVColorSpace colorspace
YUV colorspace type.
rational number numerator/denominator
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
static const AVRational dirac_preset_aspect_ratios[]
static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb, dirac_source_params *source)
the normal 219*2^(n-8) "MPEG" YUV ranges
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
uint16_t clean_left_offset
static const struct @40 dirac_color_presets[]
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
enum AVColorSpace colorspace
AVPixelFormat
Pixel format.
const AVRational ff_mpeg12_frame_rate_tab[16]