<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I have been looking the the implementation details for cropping and scaling. I found filter_frame() in vf_crop.c which seems to implement cropping, but I cannot trace where this function is being called. If filter_frame() does perform cropping, how does<br>
</p>
<p><br>
</p>
<div class="line" style="font-stretch: normal; font-size: 13px; line-height: 1; font-family: monospace, fixed; min-height: 13px; white-space: pre-wrap; word-wrap: break-word; text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; transition-duration: 0.5s;">
frame-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structAVFrame.html#a1d0f65014a8d1bf78cec8cbed2304992" title="pointer to the picture/channel planes." style="color: rgb(70, 101, 162); text-decoration: none;">data</a>[0] += s-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structCropContext.html#a76d61913bbc541445c022ca5a98446b9" title="y offset of the non-cropped area with respect to the input area" style="color: rgb(70, 101, 162); text-decoration: none;">y</a>
 * frame-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structAVFrame.html#aa52bfc6605f6a3059a0c3226cc0f6567" title="For video, size in bytes of each picture line." style="color: rgb(70, 101, 162); text-decoration: none;">linesize</a>[0];</div>
<div class="line" style="font-stretch: normal; font-size: 13px; line-height: 1; font-family: monospace, fixed; min-height: 13px; white-space: pre-wrap; word-wrap: break-word; text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; transition-duration: 0.5s;">
<a name="l00280" style="color: rgb(61, 87, 140);"></a>frame-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structAVFrame.html#a1d0f65014a8d1bf78cec8cbed2304992" title="pointer to the picture/channel planes." style="color: rgb(70, 101, 162); text-decoration: none;">data</a>[0]
 += s-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structCropContext.html#a9727f01e3312088c95ea7f08f6254972" title="x offset of the non-cropped area with respect to the input area" style="color: rgb(70, 101, 162); text-decoration: none;">x</a> * s-><a class="code" href="http://ffmpeg.org/doxygen/trunk/structCropContext.html#aa70d5633fae29ee999840abe72fee168" title="max pixel step for each plane, expressed as a number of bytes" style="color: rgb(70, 101, 162); text-decoration: none;">max_step</a>[0];<br>
</div>
<div class="line" style="font-stretch: normal; font-size: 13px; line-height: 1; font-family: monospace, fixed; min-height: 13px; white-space: pre-wrap; word-wrap: break-word; text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; transition-duration: 0.5s;">
<br>
</div>
<div class="line" style="font-stretch: normal; font-size: 13px; line-height: 1; font-family: monospace, fixed; min-height: 13px; white-space: pre-wrap; word-wrap: break-word; text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; transition-duration: 0.5s;">
<span style="font-size: 12pt;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif;">in any way change the pixels of the video?</span></span><br>
</div>
<p><br>
</p>
<p><br>
</p>
<p>Scaling on the other hand seem to be done by sws_scale() if I am not mistaken. But the wording in the documentation confuses me. Does it change/convert the pixel format of the video, or does it actually scale the video/frame to a different resolution?<br>
</p>
<p><br>
</p>
<p>Thanks for any clarification.<br>
</p>
</div>
</body>
</html>