|
|
|
@ -544,7 +544,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
SignalstatsContext *s = ctx->priv; |
|
|
|
|
AVFilterLink *outlink = ctx->outputs[0]; |
|
|
|
|
AVFrame *out = in; |
|
|
|
|
int i, j; |
|
|
|
|
int w = 0, cw = 0, // in
|
|
|
|
|
pw = 0, cpw = 0; // prev
|
|
|
|
|
int fil; |
|
|
|
@ -614,8 +613,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
const int lsz_sat = sat->linesize[0] / 2; |
|
|
|
|
const int lsz_hue = hue->linesize[0] / 2; |
|
|
|
|
// Calculate luma histogram and difference with previous frame or field.
|
|
|
|
|
for (j = 0; j < link->h; j++) { |
|
|
|
|
for (i = 0; i < link->w; i++) { |
|
|
|
|
for (int j = 0; j < link->h; j++) { |
|
|
|
|
for (int i = 0; i < link->w; i++) { |
|
|
|
|
const int yuv = AV_RN16(in->data[0] + w + i * 2); |
|
|
|
|
|
|
|
|
|
masky |= yuv; |
|
|
|
@ -627,8 +626,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Calculate chroma histogram and difference with previous frame or field.
|
|
|
|
|
for (j = 0; j < s->chromah; j++) { |
|
|
|
|
for (i = 0; i < s->chromaw; i++) { |
|
|
|
|
for (int j = 0; j < s->chromah; j++) { |
|
|
|
|
for (int i = 0; i < s->chromaw; i++) { |
|
|
|
|
const int yuvu = AV_RN16(in->data[1] + cw + i * 2); |
|
|
|
|
const int yuvv = AV_RN16(in->data[2] + cw + i * 2); |
|
|
|
|
|
|
|
|
@ -653,8 +652,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
const int lsz_sat = sat->linesize[0]; |
|
|
|
|
const int lsz_hue = hue->linesize[0]; |
|
|
|
|
// Calculate luma histogram and difference with previous frame or field.
|
|
|
|
|
for (j = 0; j < link->h; j++) { |
|
|
|
|
for (i = 0; i < link->w; i++) { |
|
|
|
|
for (int j = 0; j < link->h; j++) { |
|
|
|
|
for (int i = 0; i < link->w; i++) { |
|
|
|
|
const int yuv = in->data[0][w + i]; |
|
|
|
|
|
|
|
|
|
masky |= yuv; |
|
|
|
@ -666,8 +665,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Calculate chroma histogram and difference with previous frame or field.
|
|
|
|
|
for (j = 0; j < s->chromah; j++) { |
|
|
|
|
for (i = 0; i < s->chromaw; i++) { |
|
|
|
|
for (int j = 0; j < s->chromah; j++) { |
|
|
|
|
for (int i = 0; i < s->chromaw; i++) { |
|
|
|
|
const int yuvu = in->data[1][cw+i]; |
|
|
|
|
const int yuvv = in->data[2][cw+i]; |
|
|
|
|
|
|
|
|
@ -697,7 +696,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
|
|
|
|
memset(s->jobs_rets, 0, s->nb_jobs * sizeof(*s->jobs_rets)); |
|
|
|
|
ff_filter_execute(ctx, hbd ? filters_def[fil].process16 : filters_def[fil].process8, |
|
|
|
|
&td, s->jobs_rets, s->nb_jobs); |
|
|
|
|
for (i = 0; i < s->nb_jobs; i++) |
|
|
|
|
for (int i = 0; i < s->nb_jobs; i++) |
|
|
|
|
filtot[fil] += s->jobs_rets[i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|