summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale.c
diff options
context:
space:
mode:
authorMuhammad Faiz <mfcc64@gmail.com>2017-04-22 15:57:18 +0700
committerMuhammad Faiz <mfcc64@gmail.com>2017-04-23 14:40:30 +0700
commit6af050d7d0c3c73f3d62115152db82ebd2dc5d57 (patch)
treed1c7b6d4711dc095cab3f135f5c6433b4474364a /libavfilter/vf_scale.c
parent8103c595223613c08e44bcf56ae7098d3c31be8b (diff)
downloadffmpeg-6af050d7d0c3c73f3d62115152db82ebd2dc5d57.tar.gz
avfilter: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r--libavfilter/vf_scale.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 2fe9a1fb52..c59ac6b0ea 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -409,7 +409,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
char buf[32];
int in_range;
- if (av_frame_get_colorspace(in) == AVCOL_SPC_YCGCO)
+ if (in->colorspace == AVCOL_SPC_YCGCO)
av_log(link->dst, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");
if( in->width != link->w
@@ -456,7 +456,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
if(scale->output_is_pal)
avpriv_set_systematic_pal2((uint32_t*)out->data[1], outlink->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : outlink->format);
- in_range = av_frame_get_color_range(in);
+ in_range = in->color_range;
if ( scale->in_color_matrix
|| scale->out_color_matrix
@@ -471,7 +471,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
&brightness, &contrast, &saturation);
if (scale->in_color_matrix)
- inv_table = parse_yuv_type(scale->in_color_matrix, av_frame_get_colorspace(in));
+ inv_table = parse_yuv_type(scale->in_color_matrix, in->colorspace);
if (scale->out_color_matrix)
table = parse_yuv_type(scale->out_color_matrix, AVCOL_SPC_UNSPECIFIED);
else if (scale->in_color_matrix)
@@ -496,7 +496,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
table, out_full,
brightness, contrast, saturation);
- av_frame_set_color_range(out, out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG);
+ out->color_range = out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
}
av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,