[FFmpeg-devel] [PATCH] Export large crop values via AVCodecContext
Thu Jun 4 00:48:45 CEST 2009
On Wed, Jun 03, 2009 at 06:43:33PM -0400, David Conrad wrote:
> On Jun 3, 2009, at 11:34 AM, Michael Niedermayer wrote:
>> On Thu, May 28, 2009 at 09:10:45PM -0400, David Conrad wrote:
>>> As far as I can tell, it's impractical to crop large values internally,
>>> since buffers returned from decode_frame must have the same dimensions as
>>> AVCodecContext, which also must be the coded dimensions (or up to 15
>>> in order for get_buffer to allocate buffers of the needed size.
>>> Thus, the only solution I see is to export these values and leave it to
>>> individual applications that care about such offsets to deal with it
>> I think these values can be exported through AVCodecContext.pan_scan
> From my understanding of mpeg-2 (the only place AVPanScan is currently
> used), the area(s) in a AVPanScan are the more important areas in a frame
> that shouldn't be cropped e.g. when changing aspect ratio, while these
> cropping offsets aren't intended to be displayed ever.
My interpretation of mpeg2 is that AVPanScan is exactly the rectangle that
is intended for display of a given aspect ratio.
So i would guess that a 16:9 video could contain a single 4:3 panscan
> Also, H.264 has separate pan-scan fields than what are exported here,
> relative to this cropping (D.2.3 Pan-scan rectangle SEI message semantics)
I know, thats why i hesitated with my reply
but the crop values really are easier to use if they use the same API,
the crop rectangle maybe should be somehow marked as overriding the
main rectangle by default.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel