Locutus wrote:
> I've just migrated from r12279 to r13712 and I'm seeing different
> behaviour 
> of the av_picture_pad function.  In the earlier version, the function
> would 
> copy the source picture to the destination and then apply the padding of 
> specified color.  With the latter version, I'm seeing the source picture
> is 
> copied to the destination, but then I see a strip of pink replacing the
> end 
> of the picture (the width of the padding) followed by the padding of 
> specified color.  The source image is 704x480 and the destination image is 
> 768x480, so the requested padding is (64=768-704) as right padding.  The 
> r12279 build did not have the --enable-swscale option, while the r13712
> does 
> have the --enable-swscale option.
> 

The issue seems to be an alignment issue.  With the previous version of the
libav library, a call to avcodec_decode_video would decode the video
resulting in an image of the same dimensions.  With this newer library, I
see an increase in width.  

The crux of my problem is this:  As an example, I have MPEG2 video at
704x480 that I need decoded and provided in YUYV422 format with a stride of
768.  Thus, I need to resulting 704x480 image put into a buffer with
dimensions of 768x480.

The call to avcodec_decode_video places the decoded 704x480 image into a
736x480 buffer, which never happened with the older library.  At this point,
I still need to do the colorspace conversion from YUV420P to YUYV422 and get
the image placed into a 768x480 buffer to account for the required stride.

What is the proper approach to achieve this desired end result, a 704x480
image in a 768x480 buffer (to account for stride) and at the desired YUYV422
colorspace?  

Could the fact that the call to avcodec_decode_video is returning a decoded
image in a buffer of dimensions different from the source indicate a
mis-compiled libav library for the target platform (windows)?
-- 
View this message in context: 
http://www.nabble.com/Padding-tp18793448p18794807.html
Sent from the libav-users mailing list archive at Nabble.com.

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to