118
#include "IMB_colormanagement.h"
119
#include "IMB_colormanagement_intern.h"
117
121
int ismovie(const char *UNUSED(filepath))
122
/* never called, just keep the linker happy */
123
static int startmovie(struct anim *UNUSED(anim)) { return 1; }
124
static ImBuf * movie_fetchibuf(struct anim *UNUSED(anim), int UNUSED(position)) { return NULL; }
125
static void free_anim_movie(struct anim *UNUSED(anim)) { ; }
126
/* never called, just keep the linker happy */
127
static int startmovie(struct anim *UNUSED(anim))
131
static ImBuf *movie_fetchibuf(struct anim *UNUSED(anim), int UNUSED(position))
135
static void free_anim_movie(struct anim *UNUSED(anim))
128
141
#if defined(_WIN32)
131
144
# define PATHSEPERATOR '/'
134
static int an_stringdec(const char *string, char* head, char *tail, unsigned short *numlen)
147
static int an_stringdec(const char *string, char *head, char *tail, unsigned short *numlen)
136
unsigned short len,nume,nums=0;
149
unsigned short len, nume, nums = 0;
150
short i, found = FALSE;
152
len = strlen(string);
142
for (i=len-1;i>=0;i--) {
143
if (string[i]==PATHSEPERATOR) break;
155
for (i = len - 1; i >= 0; i--) {
156
if (string[i] == PATHSEPERATOR) break;
144
157
if (isdigit(string[i])) {
255
273
IMB_free_indices(anim);
258
struct anim * IMB_open_anim( const char * name, int ib_flags, int streamindex)
276
struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex, char colorspace[IM_MAX_SPACE])
262
anim = (struct anim*)MEM_callocN(sizeof(struct anim), "anim struct");
280
anim = (struct anim *)MEM_callocN(sizeof(struct anim), "anim struct");
263
281
if (anim != NULL) {
283
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
284
BLI_strncpy(anim->colorspace, colorspace, sizeof(anim->colorspace));
287
colorspace_set_default_role(anim->colorspace, sizeof(anim->colorspace), COLOR_ROLE_DEFAULT_BYTE);
264
290
BLI_strncpy(anim->name, name, sizeof(anim->name));
265
291
anim->ib_flags = ib_flags;
266
292
anim->streamindex = streamindex;
285
311
streamcount = anim->streamindex;
288
anim->avi = MEM_callocN (sizeof(AviMovie),"animavi");
314
anim->avi = MEM_callocN(sizeof(AviMovie), "animavi");
290
316
if (anim->avi == NULL) {
291
317
printf("Can't open avi: %s\n", anim->name);
295
avierror = AVI_open_movie (anim->name, anim->avi);
321
avierror = AVI_open_movie(anim->name, anim->avi);
297
323
#if defined(_WIN32) && !defined(FREE_WINDOWS)
298
324
if (avierror == AVI_ERROR_COMPRESSION) {
406
ibuf = IMB_allocImBuf (anim->x, anim->y, 24, IB_rect);
436
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect);
408
tmp = AVI_read_frame (anim->avi, AVI_FORMAT_RGB32, position,
409
AVI_get_stream(anim->avi, AVIST_VIDEO, 0));
438
tmp = AVI_read_frame(anim->avi, AVI_FORMAT_RGB32, position,
439
AVI_get_stream(anim->avi, AVIST_VIDEO, 0));
411
441
if (tmp == NULL) {
412
printf ("Error reading frame from AVI");
413
IMB_freeImBuf (ibuf);
442
printf("Error reading frame from AVI: '%s'\n", anim->name);
417
for (y=0; y < anim->y; y++) {
418
memcpy (&(ibuf->rect)[((anim->y-y)-1)*anim->x], &tmp[y*anim->x],
447
for (y = 0; y < anim->y; y++) {
448
memcpy(&(ibuf->rect)[((anim->y - y) - 1) * anim->x], &tmp[y * anim->x],
425
ibuf->profile = IB_PROFILE_SRGB;
455
ibuf->rect_colorspace = colormanage_colorspace_get_named(anim->colorspace);
459
#endif /* WITH_AVI */
430
461
#ifdef WITH_FFMPEG
432
extern void do_init_ffmpeg(void);
434
static int startffmpeg(struct anim * anim)
463
static int startffmpeg(struct anim *anim)
439
AVFormatContext *pFormatCtx;
468
AVFormatContext *pFormatCtx = NULL;
440
469
AVCodecContext *pCodecCtx;
454
483
streamcount = anim->streamindex;
458
if (av_open_input_file(&pFormatCtx, anim->name, NULL, 0, NULL)!=0) {
485
if (avformat_open_input(&pFormatCtx, anim->name, NULL, NULL) != 0) {
462
if (av_find_stream_info(pFormatCtx)<0) {
489
if (avformat_find_stream_info(pFormatCtx, NULL) < 0) {
463
490
av_close_input_file(pFormatCtx);
498
524
pCodecCtx->workaround_bugs = 1;
500
if (avcodec_open(pCodecCtx, pCodec) < 0) {
526
if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
501
527
av_close_input_file(pFormatCtx);
505
anim->duration = ceil(pFormatCtx->duration
506
* av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate)
531
anim->duration = ceil(pFormatCtx->duration *
532
av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate) /
509
frs_num = pFormatCtx->streams[videoStream]->r_frame_rate.num;
535
frs_num = pFormatCtx->streams[videoStream]->r_frame_rate.num;
510
536
frs_den = pFormatCtx->streams[videoStream]->r_frame_rate.den;
512
538
frs_den *= AV_TIME_BASE;
543
569
anim->pFrameDeinterlaced = avcodec_alloc_frame();
544
570
anim->pFrameRGB = avcodec_alloc_frame();
546
if (avpicture_get_size(PIX_FMT_RGBA, anim->x, anim->y)
547
!= anim->x * anim->y * 4) {
549
"ffmpeg has changed alloc scheme ... ARGHHH!\n");
572
if (avpicture_get_size(PIX_FMT_RGBA, anim->x, anim->y) !=
573
anim->x * anim->y * 4)
576
"ffmpeg has changed alloc scheme ... ARGHHH!\n");
550
577
avcodec_close(anim->pCodecCtx);
551
578
av_close_input_file(anim->pFormatCtx);
552
579
av_free(anim->pFrameRGB);
575
602
anim->img_convert_ctx = sws_getContext(
576
anim->pCodecCtx->width,
577
anim->pCodecCtx->height,
578
anim->pCodecCtx->pix_fmt,
579
anim->pCodecCtx->width,
580
anim->pCodecCtx->height,
582
SWS_FAST_BILINEAR | SWS_PRINT_INFO,
603
anim->pCodecCtx->width,
604
anim->pCodecCtx->height,
605
anim->pCodecCtx->pix_fmt,
606
anim->pCodecCtx->width,
607
anim->pCodecCtx->height,
609
SWS_FAST_BILINEAR | SWS_PRINT_INFO,
585
612
if (!anim->img_convert_ctx) {
587
"Can't transform color space??? Bailing out...\n");
614
"Can't transform color space??? Bailing out...\n");
588
615
avcodec_close(anim->pCodecCtx);
589
616
av_close_input_file(anim->pFormatCtx);
590
617
av_free(anim->pFrameRGB);
597
624
#ifdef FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
598
625
/* Try do detect if input has 0-255 YCbCR range (JFIF Jpeg MotionJpeg) */
599
if (!sws_getColorspaceDetails(anim->img_convert_ctx, (int**)&inv_table, &srcRange,
600
&table, &dstRange, &brightness, &contrast, &saturation)) {
626
if (!sws_getColorspaceDetails(anim->img_convert_ctx, (int **)&inv_table, &srcRange,
627
&table, &dstRange, &brightness, &contrast, &saturation))
602
629
srcRange = srcRange || anim->pCodecCtx->color_range == AVCOL_RANGE_JPEG;
603
630
inv_table = sws_getCoefficients(anim->pCodecCtx->colorspace);
605
632
if (sws_setColorspaceDetails(anim->img_convert_ctx, (int *)inv_table, srcRange,
606
table, dstRange, brightness, contrast, saturation)) {
633
table, dstRange, brightness, contrast, saturation))
608
635
printf("Warning: Could not set libswscale colorspace details.\n");
612
639
printf("Warning: Could not set libswscale colorspace details.\n");
622
649
* Output is anim->last_frame
625
static void ffmpeg_postprocess(struct anim * anim)
652
static void ffmpeg_postprocess(struct anim *anim)
627
AVFrame * input = anim->pFrame;
628
ImBuf * ibuf = anim->last_frame;
654
AVFrame *input = anim->pFrame;
655
ImBuf *ibuf = anim->last_frame;
629
656
int filter_y = 0;
631
ibuf->profile = IB_PROFILE_SRGB;
633
658
if (!anim->pFrameComplete) {
637
662
/* This means the data wasnt read properly,
638
663
* this check stops crashing */
639
if (input->data[0]==0 && input->data[1]==0 &&
640
input->data[2]==0 && input->data[3]==0)
664
if (input->data[0] == 0 && input->data[1] == 0 &&
665
input->data[2] == 0 && input->data[3] == 0)
642
667
fprintf(stderr, "ffmpeg_fetchibuf: "
643
"data not read properly...\n");
668
"data not read properly...\n");
670
avpicture_fill((AVPicture*) anim->pFrameRGB,
671
(unsigned char*) ibuf->rect,
695
avpicture_fill((AVPicture *) anim->pFrameRGB,
696
(unsigned char *) ibuf->rect,
672
697
PIX_FMT_RGBA, anim->x, anim->y);
674
699
if (ENDIAN_ORDER == B_ENDIAN) {
675
int * dstStride = anim->pFrameRGB->linesize;
676
uint8_t** dst = anim->pFrameRGB->data;
700
int *dstStride = anim->pFrameRGB->linesize;
701
uint8_t **dst = anim->pFrameRGB->data;
677
702
int dstStride2[4] = { dstStride[0], 0, 0, 0 };
678
uint8_t* dst2[4] = { dst[0], 0, 0, 0 };
680
unsigned char* bottom;
703
uint8_t *dst2[4] = { dst[0], 0, 0, 0 };
705
unsigned char *bottom;
683
708
sws_scale(anim->img_convert_ctx,
684
(const uint8_t * const *)input->data,
709
(const uint8_t *const *)input->data,
687
712
anim->pCodecCtx->height,
691
bottom = (unsigned char*) ibuf->rect;
692
top = bottom + ibuf->x * (ibuf->y-1) * 4;
716
bottom = (unsigned char *) ibuf->rect;
717
top = bottom + ibuf->x * (ibuf->y - 1) * 4;
694
719
h = (ibuf->y + 1) / 2;
697
722
for (y = 0; y < h; y++) {
698
723
unsigned char tmp[4];
699
unsigned int * tmp_l =
724
unsigned int *tmp_l =
725
(unsigned int *) tmp;
702
727
for (x = 0; x < w; x++) {
703
728
tmp[0] = bottom[0];
710
735
bottom[2] = top[2];
711
736
bottom[3] = top[3];
713
*(unsigned int*) top = *tmp_l;
738
*(unsigned int *) top = *tmp_l;
722
int * dstStride = anim->pFrameRGB->linesize;
723
uint8_t** dst = anim->pFrameRGB->data;
747
int *dstStride = anim->pFrameRGB->linesize;
748
uint8_t **dst = anim->pFrameRGB->data;
724
749
int dstStride2[4] = { -dstStride[0], 0, 0, 0 };
725
uint8_t* dst2[4] = { dst[0] + (anim->y - 1)*dstStride[0],
750
uint8_t *dst2[4] = { dst[0] + (anim->y - 1) * dstStride[0],
728
753
sws_scale(anim->img_convert_ctx,
729
(const uint8_t * const *)input->data,
754
(const uint8_t *const *)input->data,
732
757
anim->pCodecCtx->height,
796
820
anim->next_packet.stream_index = -1;
823
if (rval == AVERROR_EOF) {
824
/* this sets size and data fields to zero,
825
which is necessary to decode the remaining data
826
in the decoder engine after EOF. It also prevents a memory
827
leak, since av_read_frame spills out a full size packet even
828
on EOF... (and: it's save to call on NULL packets) */
830
av_free_packet(&anim->next_packet);
832
anim->next_packet.size = 0;
833
anim->next_packet.data = 0;
835
anim->pFrameComplete = 0;
837
avcodec_decode_video2(
839
anim->pFrame, &anim->pFrameComplete,
842
if (anim->pFrameComplete) {
843
anim->next_pts = av_get_pts_from_frame(
844
anim->pFormatCtx, anim->pFrame);
846
av_log(anim->pFormatCtx,
848
" FRAME DONE (after EOF): next_pts=%lld "
849
"pkt_pts=%lld, guessed_pts=%lld\n",
850
(anim->pFrame->pts == AV_NOPTS_VALUE) ?
851
-1 : (long long int)anim->pFrame->pts,
852
(anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
853
-1 : (long long int)anim->pFrame->pkt_pts,
854
(long long int)anim->next_pts);
800
860
anim->next_packet.stream_index = -1;
802
862
av_log(anim->pFormatCtx,
803
863
AV_LOG_ERROR, " DECODE READ FAILED: av_read_frame() "
804
"returned error: %d\n", rval);
864
"returned error: %d\n", rval);
807
867
return (rval >= 0);
810
870
static void ffmpeg_decode_video_frame_scan(
811
struct anim * anim, int64_t pts_to_search)
871
struct anim *anim, int64_t pts_to_search)
813
873
/* there seem to exist *very* silly GOP lengths out in the wild... */
814
874
int count = 1000;
860
920
len = MAX2(p - names, namelen);
861
921
if (!BLI_strncasecmp(name, names, len))
865
925
return !BLI_strcasecmp(name, names);
868
928
static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
870
static const char * byte_seek_list [] = { "mpegts", 0 };
930
static const char *byte_seek_list[] = { "mpegts", 0 };
873
933
if (pFormatCtx->iformat->flags & AVFMT_TS_DISCONT) {
915
975
new_frame_index = IMB_indexer_get_frame_index(
917
977
old_frame_index = IMB_indexer_get_frame_index(
918
tc_index, anim->curposition);
919
pts_to_search = IMB_indexer_get_pts(
920
tc_index, new_frame_index);
978
tc_index, anim->curposition);
979
pts_to_search = IMB_indexer_get_pts(
980
tc_index, new_frame_index);
923
983
pts_to_search = (long long)
924
floor(((double) position)
925
/ pts_time_base / frame_rate + 0.5);
984
floor(((double) position) /
985
pts_time_base / frame_rate + 0.5);
927
987
if (st_time != AV_NOPTS_VALUE) {
928
pts_to_search += st_time / pts_time_base
988
pts_to_search += st_time / pts_time_base / AV_TIME_BASE;
933
992
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
934
993
"FETCH: looking for PTS=%lld "
935
994
"(pts_timebase=%g, frame_rate=%g, st_time=%lld)\n",
936
(long long int)pts_to_search,pts_time_base, frame_rate, st_time);
995
(long long int)pts_to_search, pts_time_base, frame_rate, st_time);
938
997
if (anim->last_frame &&
939
anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search) {
998
anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search)
940
1000
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
941
1001
"FETCH: frame repeat: last: %lld next: %lld\n",
942
1002
(long long int)anim->last_pts,
974
1034
unsigned long long dts;
976
1036
pos = IMB_indexer_get_seek_pos(
977
tc_index, new_frame_index);
1037
tc_index, new_frame_index);
978
1038
dts = IMB_indexer_get_seek_pos_dts(
979
tc_index, new_frame_index);
1039
tc_index, new_frame_index);
981
1041
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
982
1042
"TC INDEX seek pos = %lld\n", pos);
988
1048
"... using BYTE pos\n");
990
1050
ret = av_seek_frame(anim->pFormatCtx,
992
pos, AVSEEK_FLAG_BYTE);
1052
pos, AVSEEK_FLAG_BYTE);
993
1053
av_update_cur_dts(anim->pFormatCtx, v_st, dts);
996
1056
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
997
1057
"... using DTS pos\n");
998
1058
ret = av_seek_frame(anim->pFormatCtx,
1000
dts, AVSEEK_FLAG_BACKWARD);
1060
dts, AVSEEK_FLAG_BACKWARD);
1004
pos = (long long) (position - anim->preseek)
1005
* AV_TIME_BASE / frame_rate;
1064
pos = (long long) (position - anim->preseek) *
1065
AV_TIME_BASE / frame_rate;
1007
1067
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
1008
1068
"NO INDEX seek pos = %lld, st_time = %lld\n",
1136
ibuf = IMB_allocImBuf(raw_frame->width * 2,
1137
raw_frame->height * 2, 32, IB_rectfloat);
1197
ibuf = IMB_allocImBuf(raw_frame->width * 2,
1198
raw_frame->height * 2, 32, IB_rectfloat);
1139
1200
redcode_decode_video_float(raw_frame, ibuf->rect_float, 1);
1144
static void free_anim_redcode(struct anim * anim)
1205
static void free_anim_redcode(struct anim *anim)
1146
1207
if (anim->redcodeCtx) {
1147
1208
redcode_close(anim->redcodeCtx);
1155
/* probeer volgende plaatje te lezen */
1156
/* Geen plaatje, probeer dan volgende animatie te openen */
1157
/* gelukt, haal dan eerste plaatje van animatie */
1216
/* Try next picture to read */
1217
/* No picture, try to open next animation */
1218
/* Succeed, remove first image from animation */
1159
static struct ImBuf * anim_getnew(struct anim * anim)
1220
static ImBuf *anim_getnew(struct anim *anim)
1161
1222
struct ImBuf *ibuf = NULL;
1163
1224
if (anim == NULL) return(NULL);
1165
1226
free_anim_movie(anim);
1166
1229
free_anim_avi(anim);
1167
1232
#ifdef WITH_QUICKTIME
1168
1233
free_anim_quicktime(anim);
1178
1243
if (anim->curtype != 0) return (NULL);
1179
anim->curtype = imb_get_anim_type(anim->name);
1244
anim->curtype = imb_get_anim_type(anim->name);
1181
1246
switch (anim->curtype) {
1183
ibuf = IMB_loadiffname(anim->name, anim->ib_flags);
1185
BLI_strncpy(anim->first, anim->name, sizeof(anim->first));
1190
if (startmovie(anim)) return (NULL);
1191
ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); /* fake */
1194
if (startavi(anim)) {
1195
printf("couldnt start avi\n");
1198
ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
1248
ibuf = IMB_loadiffname(anim->name, anim->ib_flags, anim->colorspace);
1250
BLI_strncpy(anim->first, anim->name, sizeof(anim->first));
1255
if (startmovie(anim)) return (NULL);
1256
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0); /* fake */
1260
if (startavi(anim)) {
1261
printf("couldnt start avi\n");
1264
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
1200
1267
#ifdef WITH_QUICKTIME
1202
if (startquicktime(anim)) return (0);
1203
ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
1269
if (startquicktime(anim)) return (0);
1270
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
1206
1273
#ifdef WITH_FFMPEG
1208
if (startffmpeg(anim)) return (0);
1209
ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
1275
if (startffmpeg(anim)) return (0);
1276
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
1212
1279
#ifdef WITH_REDCODE
1214
if (startredcode(anim)) return (0);
1215
ibuf = IMB_allocImBuf (8, 8, 32, 0);
1281
if (startredcode(anim)) return (0);
1282
ibuf = IMB_allocImBuf(8, 8, 32, 0);
1222
struct ImBuf * IMB_anim_previewframe(struct anim * anim)
1289
struct ImBuf *IMB_anim_previewframe(struct anim *anim)
1224
struct ImBuf * ibuf = NULL;
1291
struct ImBuf *ibuf = NULL;
1225
1292
int position = 0;
1227
1294
ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE);
1229
1296
IMB_freeImBuf(ibuf);
1230
1297
position = anim->duration / 2;
1231
1298
ibuf = IMB_anim_absolute(anim, position, IMB_TC_NONE,
1237
struct ImBuf * IMB_anim_absolute(struct anim * anim, int position,
1238
IMB_Timecode_Type tc,
1239
IMB_Proxy_Size preview_size) {
1240
struct ImBuf * ibuf = NULL;
1304
struct ImBuf *IMB_anim_absolute(struct anim *anim, int position,
1305
IMB_Timecode_Type tc,
1306
IMB_Proxy_Size preview_size) {
1307
struct ImBuf *ibuf = NULL;
1241
1308
char head[256], tail[256];
1242
1309
unsigned short digits;
1247
1314
filter_y = (anim->ib_flags & IB_animdeinterlace);
1249
if (anim->curtype == 0) {
1316
if (anim->curtype == 0) {
1250
1317
ibuf = anim_getnew(anim);
1251
1318
if (ibuf == NULL) {
1255
1322
IMB_freeImBuf(ibuf); /* ???? */
1259
1326
if (position < 0) return(NULL);
1260
1327
if (position >= anim->duration) return(NULL);
1262
1329
if (preview_size != IMB_PROXY_NONE) {
1263
struct anim * proxy = IMB_anim_open_proxy(anim, preview_size);
1330
struct anim *proxy = IMB_anim_open_proxy(anim, preview_size);
1266
1333
position = IMB_anim_index_get_frame_index(
1267
anim, tc, position);
1334
anim, tc, position);
1268
1335
return IMB_anim_absolute(
1270
IMB_TC_NONE, IMB_PROXY_NONE);
1337
IMB_TC_NONE, IMB_PROXY_NONE);
1274
switch(anim->curtype) {
1276
pic = an_stringdec(anim->first, head, tail, &digits);
1278
an_stringenc(anim->name, head, tail, digits, pic);
1279
ibuf = IMB_loadiffname(anim->name, IB_rect);
1281
anim->curposition = position;
1285
ibuf = movie_fetchibuf(anim, position);
1287
anim->curposition = position;
1288
IMB_convert_rgba_to_abgr(ibuf);
1289
ibuf->profile = IB_PROFILE_SRGB;
1293
ibuf = avi_fetchibuf(anim, position);
1295
anim->curposition = position;
1341
switch (anim->curtype) {
1343
pic = an_stringdec(anim->first, head, tail, &digits);
1345
an_stringenc(anim->name, head, tail, digits, pic);
1346
ibuf = IMB_loadiffname(anim->name, IB_rect, anim->colorspace);
1348
anim->curposition = position;
1352
ibuf = movie_fetchibuf(anim, position);
1354
anim->curposition = position;
1355
IMB_convert_rgba_to_abgr(ibuf);
1360
ibuf = avi_fetchibuf(anim, position);
1362
anim->curposition = position;
1297
1365
#ifdef WITH_QUICKTIME
1299
ibuf = qtime_fetchibuf(anim, position);
1301
anim->curposition = position;
1367
ibuf = qtime_fetchibuf(anim, position);
1370
/* OCIO_TODO: should happen in quicktime module, but it currently doesn't have access
1371
* to color management's internals
1373
ibuf->rect_colorspace = colormanage_colorspace_get_named(anim->colorspace);
1376
anim->curposition = position;
1304
1380
#ifdef WITH_FFMPEG
1306
ibuf = ffmpeg_fetchibuf(anim, position, tc);
1308
anim->curposition = position;
1309
filter_y = 0; /* done internally */
1382
ibuf = ffmpeg_fetchibuf(anim, position, tc);
1384
anim->curposition = position;
1385
filter_y = 0; /* done internally */
1312
1388
#ifdef WITH_REDCODE
1314
ibuf = redcode_fetchibuf(anim, position);
1315
if (ibuf) anim->curposition = position;
1390
ibuf = redcode_fetchibuf(anim, position);
1391
if (ibuf) anim->curposition = position;