History

avfilter/scale: store frame change eval

Better readability and allows reuse

Gyan Doshi committed 6 years ago

Commit c21462d1 parent b55c6b81 file · +8 −4Browse files

Unified · Split

libavfilter/vf_scale.c+8−4
@@ -398,15 +398,19 @@ static int scale_frame(AVFilterLink *link, AVFrame *in, AVFrame **frame_out) · 397 unmodified lines
398 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);398 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
399 char buf[32];399 char buf[32];
400 int in_range;400 int in_range;
401 int frame_changed;
401 402
402 *frame_out = NULL;403 *frame_out = NULL;
403 if (in->colorspace == AVCOL_SPC_YCGCO)404 if (in->colorspace == AVCOL_SPC_YCGCO)
404 av_log(link->dst, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");405 av_log(link->dst, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");
405 406
406 if ( in->width != link->w407 frame_changed = in->width != link->w ||
407 || in->height != link->h408 in->height != link->h ||
408 || in->format != link->format409 in->format != link->format ||
409 || in->sample_aspect_ratio.den != link->sample_aspect_ratio.den || in->sample_aspect_ratio.num != link->sample_aspect_ratio.num) {410 in->sample_aspect_ratio.den != link->sample_aspect_ratio.den ||
411 in->sample_aspect_ratio.num != link->sample_aspect_ratio.num;
412
413 if (frame_changed) {
410 int ret;414 int ret;
411 415
412 if (scale->eval_mode == EVAL_MODE_INIT) {416 if (scale->eval_mode == EVAL_MODE_INIT) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t