[Libav-user] How is cropping and scaling implemented

Kristensen, Odd-Arild okristensen at albany.edu
Mon Feb 2 17:59:55 CET 2015

Thank you, that makes perfect sense.

I am working on a project where we use the ffmpeg libraries to perform cropping and scaling. When we start breaking stuff we want to be sure that we know what the data looks like.

From: libav-user-bounces at ffmpeg.org <libav-user-bounces at ffmpeg.org> on behalf of wm4 <nfxjfg at googlemail.com>
Sent: 01 February 2015 15:53
To: libav-user at ffmpeg.org
Subject: Re: [Libav-user] How is cropping and scaling implemented

On Sun, 1 Feb 2015 14:44:11 +0000
"Kristensen, Odd-Arild" <okristensen at albany.edu> wrote:

> Fair point, cropping should not modify the pixels. But at some point you would want to remove the pixels outside the selected region, or copy the pixels inside the region to the destination frame. I dont’t see either of these things happening in filter_frame() Am I looking in the wrong place?

Cropping can be implemented by changing the pixel data pointer to point
to the top left pixel. Nothing else needs to be done. Why are you even
asking? It's completely transparent to the user.
Libav-user mailing list
Libav-user at ffmpeg.org

More information about the Libav-user mailing list