[FFmpeg-devel] [PATCH] Export large crop values via AVCodecContext
Thu Jun 4 00:51:16 CEST 2009
David Conrad <lessen42 at gmail.com> writes:
> 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 less) 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 themselves.
>> 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
Yes, pan&scan in mpeg2 is just a hint.
mans at mansr.com
More information about the ffmpeg-devel