Blender V5.0
movie_util.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "BLI_path_utils.hh"
10#include "BLI_threads.h"
11#include "BLI_utildefines.h"
12
13#include "CLG_log.h"
14#include "DNA_scene_types.h"
15
16#include "MOV_enums.hh"
17#include "MOV_util.hh"
18
19#include "ffmpeg_swscale.hh"
20#include "movie_util.hh"
21#include <mutex>
22
23#ifdef WITH_FFMPEG
24
25# include "BLI_string.h"
26
27extern "C" {
28# include "ffmpeg_compat.h"
29# include <libavcodec/avcodec.h>
30# include <libavdevice/avdevice.h>
31# include <libavformat/avformat.h>
32# include <libavutil/log.h>
33}
34
35static CLG_LogRef LOG = {"video.ffmpeg"};
36
37static char ffmpeg_last_error_buffer[1024];
38
39/* BLI_vsnprintf in ffmpeg_log_callback() causes invalid warning */
40# ifdef __GNUC__
41# pragma GCC diagnostic push
42# pragma GCC diagnostic ignored "-Wmissing-format-attribute"
43# endif
44
45static size_t ffmpeg_log_to_buffer(char *buffer,
46 const size_t buffer_size,
47 const char *format,
48 va_list arg)
49{
50 va_list args_cpy;
51 size_t n;
52
53 va_copy(args_cpy, arg);
54 n = BLI_vsnprintf(buffer, buffer_size, format, args_cpy);
55 va_end(args_cpy);
56
57 return n;
58}
59
60static void ffmpeg_log_callback(void * /*ptr*/, int level, const char *format, va_list arg)
61{
62 CLG_Level clg_level;
63
64 switch (level) {
65 case AV_LOG_PANIC:
66 case AV_LOG_FATAL:
67 clg_level = CLG_LEVEL_FATAL;
68 break;
69 case AV_LOG_ERROR:
70 case AV_LOG_WARNING:
71 case AV_LOG_INFO:
72 /* Note: most ffmpeg internal errors/warnings are not actionable; treat them as "info"
73 * log level. */
74 clg_level = CLG_LEVEL_INFO;
75 break;
76 case AV_LOG_VERBOSE:
77 case AV_LOG_DEBUG:
78 clg_level = CLG_LEVEL_DEBUG;
79 break;
80 case AV_LOG_TRACE:
81 default:
82 clg_level = CLG_LEVEL_TRACE;
83 break;
84 }
85
86 static std::mutex mutex;
87 std::scoped_lock lock(mutex);
88
89 if (ELEM(level, AV_LOG_PANIC, AV_LOG_FATAL, AV_LOG_ERROR)) {
90 const size_t n = ffmpeg_log_to_buffer(
91 ffmpeg_last_error_buffer, sizeof(ffmpeg_last_error_buffer), format, arg);
92 /* Strip trailing \n. */
93 ffmpeg_last_error_buffer[n - 1] = '\0';
94 }
95
96 if (CLOG_CHECK(&LOG, clg_level)) {
97 /* FFmpeg calls this multiple times without a line ending, so accumulate until
98 * we reach a line ending. This will not work well with multithreading, but the
99 * output would be garbled either way. */
100 static char buffer[1024];
101 static int buffer_used = 0;
102
103 buffer_used += ffmpeg_log_to_buffer(
104 buffer + buffer_used, sizeof(buffer) - buffer_used, format, arg);
105
106 if (buffer_used >= sizeof(buffer) || (buffer_used > 0 && buffer[buffer_used - 1] == '\n')) {
107 if (buffer[buffer_used - 1] == '\n') {
108 buffer[buffer_used - 1] = '\0';
109 }
110 CLOG_STR_AT_LEVEL(&LOG, clg_level, buffer);
111 buffer_used = 0;
112 }
113 }
114}
115
116# ifdef __GNUC__
117# pragma GCC diagnostic pop
118# endif
119
120const char *ffmpeg_last_error()
121{
122 return ffmpeg_last_error_buffer;
123}
124
125static int isffmpeg(const char *filepath)
126{
127 AVFormatContext *pFormatCtx = nullptr;
128 uint i;
129 int videoStream;
130 const AVCodec *pCodec;
131
132 if (BLI_path_extension_check_n(filepath,
133 ".swf",
134 ".jpg",
135 ".jp2",
136 ".j2c",
137 ".png",
138 ".dds",
139 ".tga",
140 ".bmp",
141 ".tif",
142 ".exr",
143 ".cin",
144 ".wav",
145 nullptr))
146 {
147 return 0;
148 }
149
150 if (avformat_open_input(&pFormatCtx, filepath, nullptr, nullptr) != 0) {
151 return 0;
152 }
153
154 if (avformat_find_stream_info(pFormatCtx, nullptr) < 0) {
155 avformat_close_input(&pFormatCtx);
156 return 0;
157 }
158
159 /* Find the first video stream */
160 videoStream = -1;
161 for (i = 0; i < pFormatCtx->nb_streams; i++) {
162 if (pFormatCtx->streams[i] && pFormatCtx->streams[i]->codecpar &&
163 (pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO))
164 {
165 videoStream = i;
166 break;
167 }
168 }
169
170 if (videoStream == -1) {
171 avformat_close_input(&pFormatCtx);
172 return 0;
173 }
174
175 AVCodecParameters *codec_par = pFormatCtx->streams[videoStream]->codecpar;
176
177 /* Find the decoder for the video stream */
178 pCodec = avcodec_find_decoder(codec_par->codec_id);
179 if (pCodec == nullptr) {
180 avformat_close_input(&pFormatCtx);
181 return 0;
182 }
183
184 avformat_close_input(&pFormatCtx);
185
186 return 1;
187}
188
189/* -------------------------------------------------------------------- */
190/* AVFrame de-interlacing. Code for this was originally based on FFMPEG 2.6.4 (LGPL). */
191
192# define MAX_NEG_CROP 1024
193
194# define times4(x) x, x, x, x
195# define times256(x) times4(times4(times4(times4(times4(x)))))
196
197static const uint8_t ff_compat_crop_tab[256 + 2 * MAX_NEG_CROP] = {
198 times256(0x00), 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
199 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
200 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,
201 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E,
202 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
203 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46,
204 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52,
205 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E,
206 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
207 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
208 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x80, 0x81, 0x82,
209 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E,
210 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A,
211 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
212 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2,
213 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE,
214 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
215 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
216 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2,
217 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE,
218 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA,
219 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, times256(0xFF)};
220
221# undef times4
222# undef times256
223
224/* filter parameters: [-1 4 2 4 -1] // 8 */
225FFMPEG_INLINE void deinterlace_line(uint8_t *dst,
226 const uint8_t *lum_m4,
227 const uint8_t *lum_m3,
228 const uint8_t *lum_m2,
229 const uint8_t *lum_m1,
230 const uint8_t *lum,
231 int size)
232{
233 const uint8_t *cm = ff_compat_crop_tab + MAX_NEG_CROP;
234 int sum;
235
236 for (; size > 0; size--) {
237 sum = -lum_m4[0];
238 sum += lum_m3[0] << 2;
239 sum += lum_m2[0] << 1;
240 sum += lum_m1[0] << 2;
241 sum += -lum[0];
242 dst[0] = cm[(sum + 4) >> 3];
243 lum_m4++;
244 lum_m3++;
245 lum_m2++;
246 lum_m1++;
247 lum++;
248 dst++;
249 }
250}
251
252FFMPEG_INLINE void deinterlace_line_inplace(
253 uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size)
254{
255 const uint8_t *cm = ff_compat_crop_tab + MAX_NEG_CROP;
256 int sum;
257
258 for (; size > 0; size--) {
259 sum = -lum_m4[0];
260 sum += lum_m3[0] << 2;
261 sum += lum_m2[0] << 1;
262 lum_m4[0] = lum_m2[0];
263 sum += lum_m1[0] << 2;
264 sum += -lum[0];
265 lum_m2[0] = cm[(sum + 4) >> 3];
266 lum_m4++;
267 lum_m3++;
268 lum_m2++;
269 lum_m1++;
270 lum++;
271 }
272}
273
278FFMPEG_INLINE void deinterlace_bottom_field(
279 uint8_t *dst, int dst_wrap, const uint8_t *src1, int src_wrap, int width, int height)
280{
281 const uint8_t *src_m2, *src_m1, *src_0, *src_p1, *src_p2;
282 int y;
283
284 src_m2 = src1;
285 src_m1 = src1;
286 src_0 = &src_m1[src_wrap];
287 src_p1 = &src_0[src_wrap];
288 src_p2 = &src_p1[src_wrap];
289 for (y = 0; y < (height - 2); y += 2) {
290 memcpy(dst, src_m1, width);
291 dst += dst_wrap;
292 deinterlace_line(dst, src_m2, src_m1, src_0, src_p1, src_p2, width);
293 src_m2 = src_0;
294 src_m1 = src_p1;
295 src_0 = src_p2;
296 src_p1 += 2 * src_wrap;
297 src_p2 += 2 * src_wrap;
298 dst += dst_wrap;
299 }
300 memcpy(dst, src_m1, width);
301 dst += dst_wrap;
302 /* do last line */
303 deinterlace_line(dst, src_m2, src_m1, src_0, src_0, src_0, width);
304}
305
306FFMPEG_INLINE int deinterlace_bottom_field_inplace(uint8_t *src1,
307 int src_wrap,
308 int width,
309 int height)
310{
311 uint8_t *src_m1, *src_0, *src_p1, *src_p2;
312 int y;
313 uint8_t *buf = (uint8_t *)av_malloc(width);
314 if (!buf) {
315 return AVERROR(ENOMEM);
316 }
317
318 src_m1 = src1;
319 memcpy(buf, src_m1, width);
320 src_0 = &src_m1[src_wrap];
321 src_p1 = &src_0[src_wrap];
322 src_p2 = &src_p1[src_wrap];
323 for (y = 0; y < (height - 2); y += 2) {
324 deinterlace_line_inplace(buf, src_m1, src_0, src_p1, src_p2, width);
325 src_m1 = src_p1;
326 src_0 = src_p2;
327 src_p1 += 2 * src_wrap;
328 src_p2 += 2 * src_wrap;
329 }
330 /* do last line */
331 deinterlace_line_inplace(buf, src_m1, src_0, src_0, src_0, width);
332 av_free(buf);
333 return 0;
334}
335
336int ffmpeg_deinterlace(
337 AVFrame *dst, const AVFrame *src, enum AVPixelFormat pix_fmt, int width, int height)
338{
339 int i, ret;
340
341 if (!ELEM(pix_fmt,
342 AV_PIX_FMT_YUV420P,
343 AV_PIX_FMT_YUVJ420P,
344 AV_PIX_FMT_YUV422P,
345 AV_PIX_FMT_YUVJ422P,
346 AV_PIX_FMT_YUV444P,
347 AV_PIX_FMT_YUV411P,
348 AV_PIX_FMT_GRAY8))
349 {
350 return -1;
351 }
352 if ((width & 3) != 0 || (height & 3) != 0) {
353 return -1;
354 }
355
356 for (i = 0; i < 3; i++) {
357 if (i == 1) {
358 switch (pix_fmt) {
359 case AV_PIX_FMT_YUVJ420P:
360 case AV_PIX_FMT_YUV420P:
361 width >>= 1;
362 height >>= 1;
363 break;
364 case AV_PIX_FMT_YUV422P:
365 case AV_PIX_FMT_YUVJ422P:
366 width >>= 1;
367 break;
368 case AV_PIX_FMT_YUV411P:
369 width >>= 2;
370 break;
371 default:
372 break;
373 }
374 if (pix_fmt == AV_PIX_FMT_GRAY8) {
375 break;
376 }
377 }
378 if (src == dst) {
379 ret = deinterlace_bottom_field_inplace(dst->data[i], dst->linesize[i], width, height);
380 if (ret < 0) {
381 return ret;
382 }
383 }
384 else {
385 deinterlace_bottom_field(
386 dst->data[i], dst->linesize[i], src->data[i], src->linesize[i], width, height);
387 }
388 }
389 return 0;
390}
391
392AVCodecID mov_av_codec_id_get(IMB_Ffmpeg_Codec_ID id)
393{
394 switch (id) {
396 return AV_CODEC_ID_NONE;
398 return AV_CODEC_ID_MPEG1VIDEO;
400 return AV_CODEC_ID_MPEG2VIDEO;
402 return AV_CODEC_ID_MPEG4;
404 return AV_CODEC_ID_FLV1;
406 return AV_CODEC_ID_DVVIDEO;
408 return AV_CODEC_ID_HUFFYUV;
410 return AV_CODEC_ID_H264;
412 return AV_CODEC_ID_THEORA;
414 return AV_CODEC_ID_FFV1;
416 return AV_CODEC_ID_QTRLE;
418 return AV_CODEC_ID_PNG;
420 return AV_CODEC_ID_DNXHD;
422 return AV_CODEC_ID_VP9;
424 return AV_CODEC_ID_H265;
426 return AV_CODEC_ID_AV1;
428 return AV_CODEC_ID_PRORES;
430 return AV_CODEC_ID_PCM_S16LE;
432 return AV_CODEC_ID_MP2;
434 return AV_CODEC_ID_MP3;
436 return AV_CODEC_ID_AAC;
438 return AV_CODEC_ID_AC3;
440 return AV_CODEC_ID_VORBIS;
442 return AV_CODEC_ID_FLAC;
444 return AV_CODEC_ID_OPUS;
445 }
446
448 return AV_CODEC_ID_NONE;
449}
450
451static void ffmpeg_preset_set(RenderData *rd, int preset)
452{
453 bool is_ntsc = (rd->frs_sec != 25);
454
455 switch (preset) {
458 rd->ffcodecdata.codec_id_set(FFMPEG_CODEC_ID_H264);
459 rd->ffcodecdata.video_bitrate = 6000;
460 rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
461 rd->ffcodecdata.rc_max_rate = 9000;
462 rd->ffcodecdata.rc_min_rate = 0;
463 rd->ffcodecdata.rc_buffer_size = 224 * 8;
464 rd->ffcodecdata.mux_packet_size = 2048;
465 rd->ffcodecdata.mux_rate = 10080000;
466 break;
467
470 if (preset == FFMPEG_PRESET_XVID) {
472 rd->ffcodecdata.codec_id_set(FFMPEG_CODEC_ID_MPEG4);
473 }
474 else if (preset == FFMPEG_PRESET_THEORA) {
475 rd->ffcodecdata.type = FFMPEG_OGG; /* XXX broken */
476 rd->ffcodecdata.codec_id_set(FFMPEG_CODEC_ID_THEORA);
477 }
478
479 rd->ffcodecdata.video_bitrate = 6000;
480 rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
481 rd->ffcodecdata.rc_max_rate = 9000;
482 rd->ffcodecdata.rc_min_rate = 0;
483 rd->ffcodecdata.rc_buffer_size = 224 * 8;
484 rd->ffcodecdata.mux_packet_size = 2048;
485 rd->ffcodecdata.mux_rate = 10080000;
486 break;
487
490 rd->ffcodecdata.codec_id_set(FFMPEG_CODEC_ID_AV1);
491 rd->ffcodecdata.video_bitrate = 6000;
492 rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
493 rd->ffcodecdata.rc_max_rate = 9000;
494 rd->ffcodecdata.rc_min_rate = 0;
495 rd->ffcodecdata.rc_buffer_size = 224 * 8;
496 rd->ffcodecdata.mux_packet_size = 2048;
497 rd->ffcodecdata.mux_rate = 10080000;
498 break;
499 }
500}
501
502int MOV_codec_valid_bit_depths(AVCodecID av_codec_id)
503{
504 int bit_depths = R_IMF_CHAN_DEPTH_8;
505 /* Note: update properties_output.py `use_bpp` when changing this function. */
506 if (ELEM(av_codec_id,
507 AV_CODEC_ID_H264,
508 AV_CODEC_ID_H265,
509 AV_CODEC_ID_AV1,
510 AV_CODEC_ID_PRORES,
511 AV_CODEC_ID_FFV1))
512 {
513 bit_depths |= R_IMF_CHAN_DEPTH_10;
514 }
515 if (ELEM(av_codec_id, AV_CODEC_ID_H265, AV_CODEC_ID_AV1, AV_CODEC_ID_FFV1)) {
516 bit_depths |= R_IMF_CHAN_DEPTH_12;
517 }
518 if (ELEM(av_codec_id, AV_CODEC_ID_FFV1)) {
519 bit_depths |= R_IMF_CHAN_DEPTH_16;
520 }
521 return bit_depths;
522}
523
524bool MOV_codec_supports_alpha(AVCodecID av_codec_id, int ffmpeg_profile)
525{
526 if (av_codec_id == AV_CODEC_ID_PRORES) {
528 }
529 return ELEM(av_codec_id,
530 AV_CODEC_ID_FFV1,
531 AV_CODEC_ID_QTRLE,
532 AV_CODEC_ID_PNG,
533 AV_CODEC_ID_VP9,
534 AV_CODEC_ID_HUFFYUV);
535}
536
537bool MOV_codec_supports_crf(AVCodecID av_codec_id)
538{
539 return ELEM(av_codec_id,
540 AV_CODEC_ID_H264,
541 AV_CODEC_ID_H265,
542 AV_CODEC_ID_MPEG4,
543 AV_CODEC_ID_VP9,
544 AV_CODEC_ID_AV1);
545}
546
547int MOV_thread_count()
548{
549 /* ffmpeg does not recommend thread counts above 16. */
550 return std::min(BLI_system_thread_count(), 16);
551}
552
553#endif /* WITH_FFMPEG */
554
555bool MOV_is_movie_file(const char *filepath)
556{
557 BLI_assert(!BLI_path_is_rel(filepath));
558
559#ifdef WITH_FFMPEG
560 if (isffmpeg(filepath)) {
561 return true;
562 }
563#else
564 UNUSED_VARS(filepath);
565#endif
566
567 return false;
568}
569
571{
572#ifdef WITH_FFMPEG
573 avdevice_register_all();
574
575 ffmpeg_last_error_buffer[0] = '\0';
576
578 av_log_set_level(AV_LOG_INFO);
579 }
580 else if (CLOG_CHECK(&LOG, CLG_LEVEL_DEBUG)) {
581 av_log_set_level(AV_LOG_DEBUG);
582 }
583 else if (CLOG_CHECK(&LOG, CLG_LEVEL_TRACE)) {
584 av_log_set_level(AV_LOG_TRACE);
585 }
586
587 /* set separate callback which could store last error to report to UI */
588 av_log_set_callback(ffmpeg_log_callback);
589#endif
590}
591
593{
594#ifdef WITH_FFMPEG
595 ffmpeg_sws_exit();
596#endif
597}
598
600{
601#ifdef WITH_FFMPEG
602
603 if (imf->imtype == R_IMF_IMTYPE_FFMPEG) {
604 if (rd->ffcodecdata.type <= 0 || rd->ffcodecdata.codec_id_get() <= 0 ||
605 rd->ffcodecdata.video_bitrate <= 1)
606 {
607 ffmpeg_preset_set(rd, FFMPEG_PRESET_H264);
611 }
612 if (rd->ffcodecdata.type == FFMPEG_OGG) {
614 }
615 }
616#else
617 UNUSED_VARS(rd, imf);
618#endif
619}
620
622{
623#ifdef WITH_FFMPEG
624 return MOV_codec_valid_bit_depths(mov_av_codec_id_get(codec_id));
625#else
626 UNUSED_VARS(codec_id);
627 return R_IMF_CHAN_DEPTH_8;
628#endif
629}
630
631bool MOV_codec_supports_alpha(IMB_Ffmpeg_Codec_ID codec_id, int ffmpeg_profile)
632{
633#ifdef WITH_FFMPEG
634 return MOV_codec_supports_alpha(mov_av_codec_id_get(codec_id), ffmpeg_profile);
635#else
636 UNUSED_VARS(codec_id, ffmpeg_profile);
637 return false;
638#endif
639}
640
642{
643#ifdef WITH_FFMPEG
644 return MOV_codec_supports_crf(mov_av_codec_id_get(codec_id));
645#else
646 UNUSED_VARS(codec_id);
647 return false;
648#endif
649}
#define BLI_assert_unreachable()
Definition BLI_assert.h:93
#define BLI_assert(a)
Definition BLI_assert.h:46
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
bool BLI_path_extension_check_n(const char *path,...) ATTR_NONNULL(1) ATTR_SENTINEL(0)
size_t BLI_vsnprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
unsigned int uint
int BLI_system_thread_count(void)
Definition threads.cc:253
#define UNUSED_VARS(...)
#define ELEM(...)
#define CLOG_CHECK(clg_ref, verbose_level,...)
Definition CLG_log.h:147
CLG_Level
Definition CLG_log.h:52
@ CLG_LEVEL_DEBUG
Definition CLG_log.h:62
@ CLG_LEVEL_INFO
Definition CLG_log.h:60
@ CLG_LEVEL_FATAL
Definition CLG_log.h:54
@ CLG_LEVEL_TRACE
Definition CLG_log.h:64
#define CLOG_STR_AT_LEVEL(clg_ref, verbose_level, str)
Definition CLG_log.h:168
IMB_Ffmpeg_Codec_ID
@ FFMPEG_CODEC_ID_VP9
@ FFMPEG_CODEC_ID_THEORA
@ FFMPEG_CODEC_ID_FLV1
@ FFMPEG_CODEC_ID_FFV1
@ FFMPEG_CODEC_ID_PRORES
@ FFMPEG_CODEC_ID_H264
@ FFMPEG_CODEC_ID_MPEG1VIDEO
@ FFMPEG_CODEC_ID_QTRLE
@ FFMPEG_CODEC_ID_PCM_S16LE
@ FFMPEG_CODEC_ID_MP3
@ FFMPEG_CODEC_ID_HUFFYUV
@ FFMPEG_CODEC_ID_AV1
@ FFMPEG_CODEC_ID_PNG
@ FFMPEG_CODEC_ID_DNXHD
@ FFMPEG_CODEC_ID_MP2
@ FFMPEG_CODEC_ID_AAC
@ FFMPEG_CODEC_ID_OPUS
@ FFMPEG_CODEC_ID_DVVIDEO
@ FFMPEG_CODEC_ID_MPEG4
@ FFMPEG_CODEC_ID_FLAC
@ FFMPEG_CODEC_ID_MPEG2VIDEO
@ FFMPEG_CODEC_ID_VORBIS
@ FFMPEG_CODEC_ID_H265
@ FFMPEG_CODEC_ID_NONE
@ FFMPEG_CODEC_ID_AC3
@ FFM_PRESET_GOOD
@ FFM_CRF_MEDIUM
@ R_IMF_CHAN_DEPTH_8
@ R_IMF_CHAN_DEPTH_16
@ R_IMF_CHAN_DEPTH_12
@ R_IMF_CHAN_DEPTH_10
@ FFM_PRORES_PROFILE_4444_XQ
@ FFM_PRORES_PROFILE_4444
@ R_IMF_IMTYPE_FFMPEG
@ FFMPEG_AV1
Definition MOV_enums.hh:25
@ FFMPEG_MPEG2
Definition MOV_enums.hh:13
@ FFMPEG_MKV
Definition MOV_enums.hh:21
@ FFMPEG_AVI
Definition MOV_enums.hh:15
@ FFMPEG_OGG
Definition MOV_enums.hh:22
@ FFMPEG_PRESET_AV1
Definition MOV_enums.hh:33
@ FFMPEG_PRESET_H264
Definition MOV_enums.hh:30
@ FFMPEG_PRESET_THEORA
Definition MOV_enums.hh:31
@ FFMPEG_PRESET_XVID
Definition MOV_enums.hh:32
volatile int lock
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
static T sum(const btAlignedObjectArray< T > &items)
#define FFMPEG_INLINE
ThreadMutex mutex
format
#define LOG(level)
Definition log.h:97
void MOV_init()
bool MOV_is_movie_file(const char *filepath)
void MOV_exit()
int MOV_codec_valid_bit_depths(IMB_Ffmpeg_Codec_ID codec_id)
bool MOV_codec_supports_alpha(IMB_Ffmpeg_Codec_ID codec_id, int ffmpeg_profile)
void MOV_validate_output_settings(RenderData *rd, const ImageFormatData *imf)
bool MOV_codec_supports_crf(IMB_Ffmpeg_Codec_ID codec_id)
return ret
struct FFMpegCodecData ffcodecdata
i
Definition text_draw.cc:230