29 #define OFFSET(x) offsetof(IDETContext, x)
30 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
37 {
"analyze_interlaced_flag",
"set number of frames to use to determine if the interlace flag is accurate",
OFFSET(analyze_interlaced_flag),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX,
FLAGS },
46 case TFF :
return "tff";
47 case BFF :
return "bff";
54 #define PRECISION 1048576
56 static uint64_t
uintpow(uint64_t
b,
unsigned int e)
67 uint64_t print_precision =
uintpow(10, digits);
71 snprintf(valuestr,
sizeof(valuestr),
"%"PRId64
".%0*"PRId64,
72 value / print_precision, digits, value % print_precision);
79 switch(repeated_field) {
93 int v = (*a++ + *c++) - 2 * *b++;
106 int v = (*a++ + *c++) - 2 * *b++;
117 int64_t
alpha[2]={0};
119 int64_t gamma[2]={0};
135 for (y = 2; y < h - 2; y++) {
139 alpha[ y &1] += idet->
filter_line(cur-refs, prev, cur+refs, w);
140 alpha[(y^1)&1] += idet->
filter_line(cur-refs, next, cur+refs, w);
141 delta += idet->
filter_line(cur-refs, cur, cur+refs, w);
142 gamma[(y^1)&1] += idet->
filter_line(cur , prev, cur , w);
172 if(idet->
history[i] == best_type) {
213 av_log(ctx,
AV_LOG_DEBUG,
"Repeated Field:%12s, Single frame:%12s, Multi frame:%12s\n",
254 if( picref->
width != link->
w
333 }
else if (ret < 0) {
346 av_log(ctx, level,
"Repeated Fields: Neither:%6"PRId64
" Top:%6"PRId64
" Bottom:%6"PRId64
"\n",
351 av_log(ctx, level,
"Single frame detection: TFF:%6"PRId64
" BFF:%6"PRId64
" Progressive:%6"PRId64
" Undetermined:%6"PRId64
"\n",
357 av_log(ctx, level,
"Multi frame detection: TFF:%6"PRId64
" BFF:%6"PRId64
" Progressive:%6"PRId64
" Undetermined:%6"PRId64
"\n",
463 .priv_class = &idet_class,