diff --git a/libvmaf/src/feature/integer_motion.c b/libvmaf/src/feature/integer_motion.c index 5a8889cb7..81681e657 100644 --- a/libvmaf/src/feature/integer_motion.c +++ b/libvmaf/src/feature/integer_motion.c @@ -295,7 +295,6 @@ static int extract(VmafFeatureExtractor *fex, { MotionState *s = fex->priv; (void) dist_pic; - int err = 0; s->index = index; const unsigned blur_idx_0 = (index + 0) % 3; @@ -312,7 +311,7 @@ static int extract(VmafFeatureExtractor *fex, uint64_t sad; s->sad(&s->blur[blur_idx_2], &s->blur[blur_idx_0], &sad); double score = s->score = - normalize_and_scale_sad(sad, ref_pic->h[0], ref_pic->w[0]); + normalize_and_scale_sad(sad, ref_pic->w[0], ref_pic->h[0]); if (index == 1) return 0; @@ -321,12 +320,9 @@ static int extract(VmafFeatureExtractor *fex, double score2 = normalize_and_scale_sad(sad2, ref_pic->w[0], ref_pic->h[0]); score2 = score2 < score ? score2 : score; - err = vmaf_feature_collector_append(feature_collector, - "'VMAF_feature_motion2_integer_score'", - score2, index - 1); - if (err) return err; - - return 0; + return vmaf_feature_collector_append(feature_collector, + "'VMAF_feature_motion2_integer_score'", + score2, index - 1); } static int close(VmafFeatureExtractor *fex)