51 # include <libavutil/imgutils.h>
58 static const float proxy_fac[] = {0.25, 0.50, 0.75, 1.00};
61 static int tc_types[] = {
69 #define INDEX_FILE_VERSION 2
80 fprintf(stderr,
"Starting work on index: %s\n", name);
93 "Couldn't open index target: %s! "
94 "Index build broken!\n",
116 fwrite(&frameno,
sizeof(
int), 1, fp->
fp);
117 fwrite(&seek_pos,
sizeof(
uint64_t), 1, fp->
fp);
118 fwrite(&seek_pos_pts,
sizeof(
uint64_t), 1, fp->
fp);
119 fwrite(&seek_pos_dts,
sizeof(
uint64_t), 1, fp->
fp);
135 e.seek_pos = seek_pos;
136 e.seek_pos_pts = seek_pos_pts;
137 e.seek_pos_dts = seek_pos_dts;
174 fprintf(stderr,
"Couldn't open indexer file: %s\n",
name);
178 if (fread(header, 12, 1, fp) != 1) {
179 fprintf(stderr,
"Couldn't read indexer file: %s\n",
name);
187 fprintf(stderr,
"Error reading %s: Binary file type string missmatch\n",
name);
193 fprintf(stderr,
"Error reading %s: File version missmatch\n",
name);
202 fseek(fp, 0, SEEK_END);
204 idx->
num_entries = (ftell(fp) - 12) / (
sizeof(
int) +
211 fseek(fp, 12, SEEK_SET);
214 "anim_index_entries");
216 size_t items_read = 0;
218 items_read += fread(&idx->
entries[i].
frameno,
sizeof(
int), 1, fp);
226 fprintf(stderr,
"Error: Element data size missmatch in: %s\n",
name);
250 if (frame_index < 0) {
261 if (frame_index < 0) {
272 if (frame_index < 0) {
315 if (frame_index < 0) {
338 old_frame_index < new_frame_index);
419 char proxy_name[256];
420 char stream_suffix[20];
421 const char *
name = (temp) ?
"proxy_%d%s_part.avi" :
"proxy_%d%s.avi";
423 stream_suffix[0] = 0;
453 const char *index_names[] = {
454 "record_run%s%s.blen_tc",
455 "free_run%s%s.blen_tc",
456 "interp_free_run%s%s.blen_tc",
457 "record_run_no_gaps%s%s.blen_tc",
460 char stream_suffix[20];
461 char index_name[256];
463 stream_suffix[0] = 0;
490 struct proxy_output_ctx {
495 struct SwsContext *sws_ctx;
503 static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
506 struct proxy_output_ctx *rv =
MEM_callocN(
sizeof(
struct proxy_output_ctx),
"alloc_proxy_output");
510 rv->proxy_size = proxy_size;
516 rv->of = avformat_alloc_context();
517 rv->of->oformat = av_guess_format(
"avi",
NULL,
NULL);
519 rv->of->url = av_strdup(fname);
521 fprintf(stderr,
"Starting work on proxy: %s\n", rv->of->url);
523 rv->st = avformat_new_stream(rv->of,
NULL);
526 rv->c = avcodec_alloc_context3(
NULL);
527 rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
528 rv->c->codec_id = AV_CODEC_ID_H264;
530 rv->of->oformat->video_codec = rv->c->codec_id;
531 rv->codec = avcodec_find_encoder(rv->c->codec_id);
535 "No ffmpeg encoder available? "
536 "Proxy not built!\n");
537 avcodec_free_context(&rv->c);
538 avformat_free_context(rv->of);
543 avcodec_get_context_defaults3(rv->c, rv->codec);
545 rv->c->width =
width;
547 rv->c->gop_size = 10;
548 rv->c->max_b_frames = 0;
550 if (rv->codec->pix_fmts) {
551 rv->c->pix_fmt = rv->codec->pix_fmts[0];
554 rv->c->pix_fmt = AV_PIX_FMT_YUVJ420P;
557 rv->c->sample_aspect_ratio = rv->st->sample_aspect_ratio = st->sample_aspect_ratio;
559 rv->c->time_base.den = 25;
560 rv->c->time_base.num = 1;
561 rv->st->time_base = rv->c->time_base;
565 const int crf_range_min = 32;
566 const int crf_range_max = 17;
567 int crf =
round_fl_to_int((quality / 100.0f) * (crf_range_max - crf_range_min) + crf_range_min);
569 AVDictionary *codec_opts =
NULL;
571 av_dict_set_int(&codec_opts,
"crf", crf, 0);
575 av_dict_set(&codec_opts,
"preset",
"veryfast", 0);
576 av_dict_set(&codec_opts,
"tune",
"fastdecode", 0);
578 if (rv->codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
579 rv->c->thread_count = 0;
585 if (rv->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) {
586 rv->c->thread_type = FF_THREAD_FRAME;
588 else if (rv->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) {
589 rv->c->thread_type = FF_THREAD_SLICE;
592 if (rv->of->flags & AVFMT_GLOBALHEADER) {
593 rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
596 avcodec_parameters_from_context(rv->st->codecpar, rv->c);
598 int ret = avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE);
602 "Couldn't open IO: %s\n"
603 "Proxy not built!\n",
605 avcodec_free_context(&rv->c);
606 avformat_free_context(rv->of);
611 ret = avcodec_open2(rv->c, rv->codec, &codec_opts);
614 "Couldn't open codec: %s\n"
615 "Proxy not built!\n",
617 avcodec_free_context(&rv->c);
618 avformat_free_context(rv->of);
623 rv->orig_height = st->codecpar->height;
625 if (st->codecpar->width !=
width || st->codecpar->height !=
height ||
626 st->codecpar->format != rv->c->pix_fmt) {
627 rv->frame = av_frame_alloc();
629 av_image_fill_arrays(rv->frame->data,
632 "alloc proxy output frame"),
638 rv->frame->format = rv->c->pix_fmt;
639 rv->frame->width =
width;
640 rv->frame->height =
height;
642 rv->sws_ctx = sws_getContext(st->codecpar->width,
644 st->codecpar->format,
648 SWS_FAST_BILINEAR | SWS_PRINT_INFO,
654 ret = avformat_write_header(rv->of,
NULL);
657 "Couldn't write header: %s\n"
658 "Proxy not built!\n",
662 av_frame_free(&rv->frame);
665 avcodec_free_context(&rv->c);
666 avformat_free_context(rv->of);
674 static void add_to_proxy_output_ffmpeg(
struct proxy_output_ctx *ctx, AVFrame *frame)
680 if (ctx->sws_ctx && frame &&
681 (frame->data[0] || frame->data[1] || frame->data[2] || frame->data[3])) {
682 sws_scale(ctx->sws_ctx,
683 (
const uint8_t *
const *)frame->data,
688 ctx->frame->linesize);
691 frame = ctx->sws_ctx ? (frame ? ctx->frame : 0) : frame;
694 frame->pts = ctx->cfra++;
697 int ret = avcodec_send_frame(ctx->c, frame);
700 fprintf(stderr,
"Can't send video frame: %s\n", av_err2str(
ret));
703 AVPacket *packet = av_packet_alloc();
706 ret = avcodec_receive_packet(ctx->c, packet);
708 if (
ret == AVERROR(EAGAIN) ||
ret == AVERROR_EOF) {
714 "Error encoding proxy frame %d for '%s': %s\n",
721 packet->stream_index = ctx->st->index;
722 av_packet_rescale_ts(packet, ctx->c->time_base, ctx->st->time_base);
723 # ifdef FFMPEG_USE_DURATION_WORKAROUND
727 int write_ret = av_interleaved_write_frame(ctx->of, packet);
728 if (write_ret != 0) {
730 "Error writing proxy frame %d "
734 av_err2str(write_ret));
739 av_packet_free(&packet);
742 static void free_proxy_output_ffmpeg(
struct proxy_output_ctx *ctx,
int rollback)
753 add_to_proxy_output_ffmpeg(ctx,
NULL);
756 avcodec_flush_buffers(ctx->c);
758 av_write_trailer(ctx->of);
760 avcodec_free_context(&ctx->c);
762 if (ctx->of->oformat) {
763 if (!(ctx->of->oformat->flags & AVFMT_NOFILE)) {
764 avio_close(ctx->of->pb);
767 avformat_free_context(ctx->of);
770 sws_freeContext(ctx->sws_ctx);
790 typedef struct FFmpegIndexBuilderContext {
793 AVFormatContext *iFormatCtx;
794 AVCodecContext *iCodecCtx;
816 double pts_time_base;
817 int frameno, frameno_gapless;
819 } FFmpegIndexBuilderContext;
827 "FFmpeg index builder context");
832 context->tcs_in_use = tcs_in_use;
833 context->proxy_sizes_in_use = proxy_sizes_in_use;
845 if (avformat_find_stream_info(
context->iFormatCtx,
NULL) < 0) {
846 avformat_close_input(&
context->iFormatCtx);
855 for (i = 0; i <
context->iFormatCtx->nb_streams; i++) {
856 if (
context->iFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
857 if (streamcount > 0) {
866 if (
context->videoStream == -1) {
867 avformat_close_input(&
context->iFormatCtx);
874 context->iCodec = avcodec_find_decoder(
context->iStream->codecpar->codec_id);
877 avformat_close_input(&
context->iFormatCtx);
883 avcodec_parameters_to_context(
context->iCodecCtx,
context->iStream->codecpar);
884 context->iCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
886 if (
context->iCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
887 context->iCodecCtx->thread_count = 0;
893 if (
context->iCodec->capabilities & AV_CODEC_CAP_FRAME_THREADS) {
894 context->iCodecCtx->thread_type = FF_THREAD_FRAME;
896 else if (
context->iCodec->capabilities & AV_CODEC_CAP_SLICE_THREADS) {
897 context->iCodecCtx->thread_type = FF_THREAD_SLICE;
901 avformat_close_input(&
context->iFormatCtx);
902 avcodec_free_context(&
context->iCodecCtx);
907 for (i = 0; i < num_proxy_sizes; i++) {
909 context->proxy_ctx[i] = alloc_proxy_output_ffmpeg(
anim,
921 for (i = 0; i < num_indexers; i++) {
922 if (tcs_in_use & tc_types[i]) {
929 tcs_in_use &= ~tc_types[i];
937 static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *
context,
int stop)
941 for (i = 0; i <
context->num_indexers; i++) {
942 if (
context->tcs_in_use & tc_types[i]) {
947 for (i = 0; i <
context->num_proxy_sizes; i++) {
949 free_proxy_output_ffmpeg(
context->proxy_ctx[i], stop);
953 avcodec_free_context(&
context->iCodecCtx);
954 avformat_close_input(&
context->iFormatCtx);
959 static void index_rebuild_ffmpeg_proc_decoded_frame(FFmpegIndexBuilderContext *
context,
960 AVPacket *curr_packet,
969 for (i = 0; i <
context->num_proxy_sizes; i++) {
970 add_to_proxy_output_ffmpeg(
context->proxy_ctx[i], in_frame);
983 if (pts < seek_pos_pts) {
988 s_pos =
context->last_seek_pos;
989 s_pts =
context->last_seek_pos_pts;
990 s_dts =
context->last_seek_pos_dts;
993 for (i = 0; i <
context->num_indexers; i++) {
994 if (
context->tcs_in_use & tc_types[i]) {
995 int tc_frameno =
context->frameno;
998 tc_frameno =
context->frameno_gapless;
1015 static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *
context,
1020 AVFrame *in_frame = av_frame_alloc();
1021 AVPacket *next_packet = av_packet_alloc();
1024 stream_size = avio_size(
context->iFormatCtx->pb);
1029 while (av_read_frame(
context->iFormatCtx, next_packet) >= 0) {
1030 float next_progress =
1031 (
float)((
int)
floor(((
double)next_packet->pos) * 100 / ((
double)stream_size) + 0.5)) / 100;
1033 if (*progress != next_progress) {
1034 *progress = next_progress;
1042 if (next_packet->stream_index ==
context->videoStream) {
1043 if (next_packet->flags & AV_PKT_FLAG_KEY) {
1048 context->seek_pos = next_packet->pos;
1049 context->seek_pos_pts = next_packet->pts;
1050 context->seek_pos_dts = next_packet->dts;
1053 int ret = avcodec_send_packet(
context->iCodecCtx, next_packet);
1055 ret = avcodec_receive_frame(
context->iCodecCtx, in_frame);
1057 if (
ret == AVERROR(EAGAIN) ||
ret == AVERROR_EOF) {
1062 fprintf(stderr,
"Error decoding proxy frame: %s\n", av_err2str(
ret));
1065 index_rebuild_ffmpeg_proc_decoded_frame(
context, next_packet, in_frame);
1068 av_packet_unref(next_packet);
1080 ret = avcodec_receive_frame(
context->iCodecCtx, in_frame);
1082 if (
ret == AVERROR(EAGAIN) ||
ret == AVERROR_EOF) {
1087 fprintf(stderr,
"Error flushing proxy frame: %s\n", av_err2str(
ret));
1090 index_rebuild_ffmpeg_proc_decoded_frame(
context, next_packet, in_frame);
1094 av_packet_free(&next_packet);
1107 typedef struct FallbackIndexBuilderContext {
1113 } FallbackIndexBuilderContext;
1115 static AviMovie *alloc_proxy_output_avi(
1158 FallbackIndexBuilderContext *
context;
1170 context =
MEM_callocN(
sizeof(FallbackIndexBuilderContext),
"fallback index builder context");
1173 context->proxy_sizes_in_use = proxy_sizes_in_use;
1184 context->proxy_ctx[i] = alloc_proxy_output_avi(
1192 static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *
context,
int stop)
1212 rename(fname_tmp, fname);
1218 static void index_rebuild_fallback(FallbackIndexBuilderContext *
context,
1230 float next_progress = (
float)
pos / (
float)cnt;
1232 if (*progress != next_progress) {
1233 *progress = next_progress;
1278 const bool overwrite,
1289 if (proxy_size & proxy_sizes_to_build) {
1294 void **filename_key_p;
1299 proxy_sizes_to_build &= ~proxy_size;
1300 printf(
"Proxy: %s already registered for generation, skipping\n", filename);
1308 if (built_proxies != 0) {
1312 if (proxy_size & built_proxies) {
1317 printf(
"Skipping proxy: %s\n", filename);
1321 proxy_sizes_to_build &= ~built_proxies;
1326 if (proxy_sizes_to_build == 0) {
1333 context = index_ffmpeg_create_context(
anim, tcs_in_use, proxy_sizes_to_build, quality);
1338 context = index_fallback_create_context(
anim, tcs_in_use, proxy_sizes_to_build, quality);
1349 UNUSED_VARS(tcs_in_use, proxy_sizes_in_use, quality);
1363 index_rebuild_ffmpeg((FFmpegIndexBuilderContext *)
context, stop, do_update, progress);
1368 index_rebuild_fallback((FallbackIndexBuilderContext *)
context, stop, do_update, progress);
1381 index_rebuild_ffmpeg_finish((FFmpegIndexBuilderContext *)
context, stop);
1386 index_rebuild_fallback_finish((FallbackIndexBuilderContext *)
context, stop);
1496 for (i = 0; i < num_proxy_sizes; i++) {
1501 existing |= proxy_size;
AviError AVI_open_compress(char *name, AviMovie *movie, int streams,...)
AviError AVI_close_compress(AviMovie *movie)
#define AVI_OPTION_TYPE_MAIN
AviError AVI_write_frame(AviMovie *movie, int frame_num,...)
AviError AVI_set_compress_option(AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data)
typedef float(TangentPoint)[2]
BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_NONNULL(1)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_rename(const char *from, const char *to) ATTR_NONNULL()
FILE * BLI_fopen(const char *filename, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_gset_ensure_p_ex(GSet *gs, const void *key, void ***r_key)
MINLINE int round_fl_to_int(float a)
bool BLI_make_existing_file(const char *name)
void BLI_path_append(char *__restrict dst, const size_t maxlen, const char *__restrict file) ATTR_NONNULL()
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
int BLI_system_thread_count(void)
Compatibility-like things for windows.
typedef double(DMatrix)[4][4]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_freeImBuf(struct ImBuf *ibuf)
void IMB_close_anim(struct anim *anim)
struct anim * IMB_open_anim(const char *name, int ib_flags, int streamindex, char colorspace[IM_MAX_SPACE])
void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf)
struct ImBuf * IMB_anim_absolute(struct anim *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
bool IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc)
void IMB_flipy(struct ImBuf *ibuf)
@ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN
@ IMB_TC_RECORD_RUN_NO_GAPS
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
FFMPEG_INLINE int64_t timestamp_from_pts_or_dts(int64_t pts, int64_t dts)
FFMPEG_INLINE int64_t av_get_pts_from_frame(AVFrame *picture)
FFMPEG_INLINE void my_guess_pkt_duration(AVFormatContext *s, AVStream *st, AVPacket *pkt)
static bool get_proxy_filename(struct anim *anim, IMB_Proxy_Size preview_size, char *fname, bool temp)
anim_index_builder * IMB_index_builder_create(const char *name)
void IMB_index_builder_proc_frame(anim_index_builder *fp, uchar *buffer, int data_size, int frameno, uint64_t seek_pos, uint64_t seek_pos_pts, uint64_t seek_pos_dts, uint64_t pts)
void IMB_anim_index_rebuild(struct IndexBuildContext *context, short *stop, short *do_update, float *progress)
static const char temp_ext[]
uint64_t IMB_indexer_get_seek_pos(struct anim_index *idx, int frame_index)
#define INDEX_FILE_VERSION
static void get_tc_filename(struct anim *anim, IMB_Timecode_Type tc, char *fname)
void IMB_anim_set_index_dir(struct anim *anim, const char *dir)
uint64_t IMB_indexer_get_seek_pos_pts(struct anim_index *idx, int frame_index)
int IMB_anim_index_get_frame_index(struct anim *anim, IMB_Timecode_Type tc, int position)
int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
IndexBuildContext * IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecode_Type tcs_in_use, IMB_Proxy_Size proxy_sizes_in_use, int quality, const bool overwrite, GSet *file_list)
static const char binary_header_str[]
struct anim_index * IMB_anim_open_index(struct anim *anim, IMB_Timecode_Type tc)
void IMB_index_builder_finish(anim_index_builder *fp, int rollback)
void IMB_indexer_close(struct anim_index *idx)
void IMB_index_builder_add_entry(anim_index_builder *fp, int frameno, uint64_t seek_pos, uint64_t seek_pos_pts, uint64_t seek_pos_dts, uint64_t pts)
uint64_t IMB_indexer_get_seek_pos_dts(struct anim_index *idx, int frame_index)
static void get_index_dir(struct anim *anim, char *index_dir, size_t index_dir_len)
IMB_Proxy_Size IMB_anim_proxy_get_existing(struct anim *anim)
void IMB_free_indices(struct anim *anim)
static const float proxy_fac[]
int IMB_indexer_get_duration(struct anim_index *idx)
struct anim * IMB_anim_open_proxy(struct anim *anim, IMB_Proxy_Size preview_size)
int IMB_indexer_can_scan(struct anim_index *idx, int old_frame_index, int new_frame_index)
uint64_t IMB_indexer_get_pts(struct anim_index *idx, int frame_index)
static const int proxy_sizes[]
struct anim_index * IMB_indexer_open(const char *name)
int IMB_proxy_size_to_array_index(IMB_Proxy_Size pr_size)
int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno)
struct IndexBuildContext IndexBuildContext
void IMB_anim_index_rebuild_finish(IndexBuildContext *context, short stop)
void IMB_anim_get_fname(struct anim *anim, char *file, int size)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
struct SELECTID_Context context
unsigned __int64 uint64_t
void(* proc_frame)(struct anim_index_builder *idx, unsigned char *buffer, int data_size, struct anim_index_entry *entry)
void(* delete_priv_data)(struct anim_index_builder *idx)
struct anim_index_entry * entries
struct anim_index * curr_idx[IMB_TC_MAX_SLOT]
struct anim * proxy_anim[IMB_PROXY_MAX_SLOT]
ccl_device_inline float2 floor(const float2 &a)