[FFmpeg-devel] [BUG] 1/2 Pad/crop fails for non YUVplanar pixformats

Víctor Paesa wzrlpy
Mon May 14 23:28:53 CEST 2007


Cropping PNGs fails:

$ ffmpeg -i gradient.png -croptop 100 -f image2 out.png
FFmpeg version SVN-r9025, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --disable-static --enable-shared --enable-gpl
--enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth
--enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora
--enable-libvorbis --enable-x264 --enable-xvid --enable-libamr_nb
--enable-libamr_wb --cpu=prescott
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on May 14 2007 22:59:55, gcc: 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125)
Input #0, image2, from 'gradient.png':
  Duration: 00:00:00.0, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: png, rgb24, 720x576, 25.00 fps(r)
Output #0, image2, to 'out.png':
  Stream #0.0: Video: png, rgb24, 720x476, q=2-31, 200 kb/s, 25.00 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
error cropping picture
frame=    0 fps=  0 q=0.0 Lsize=       0kB time=10000000000.0 bitrate=  
video:0kB audio:0kB global headers:0kB muxing overhead nan%

The reason is that av_picture_crop()/av_picture_pad() only work with YUV
planar pixel formats.

This first patch logs an error in av_picture_crop()/av_picture_pad() when
you attempt to use them with non YUV planar pixel formats.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.pad-only-planar.1.diff
Type: application/octet-stream
Size: 1210 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070514/a1b0523c/attachment.obj>

More information about the ffmpeg-devel mailing list