Opened 14 years ago
Closed 19 months ago
#2151 closed defect (invalid)
Warning: data is not aligned! This can lead to a speedloss
| Reported by: | viric | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | swscale |
| Version: | 1.1 | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% ffmpeg -ss 01:05:30 -i album-familiar-1.mkv -t 00:07:28 -vf "yadif, crop=690:560:16" -vcodec mpeg4 -vtag xvid -qscale:v 4 -ac 1 -acodec libmp3lame -qscale:a 3 /tmp/tieta2.avi
ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 13 2013 22:22:02 with gcc 4.6.3 (GCC)
configuration: --disable-static --prefix=/nix/store/1pja3gxi62f2hjwyww67ys84mxqfjgwm-ffmpeg-1.1 --enable-gpl --enable-postproc --enable-swscale --disable-ffplay --enable-shared --enable-runtime-cpudetect --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-vdpau
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'album-familiar-1.mkv':
Metadata:
ENCODER : Lavf54.59.106
Duration: 03:04:49.44, start: 0.000000, bitrate: 65334 kb/s
Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv422p, 720x576, SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Stream #0:1: Audio: flac, 44100 Hz, stereo, s16 (default)
Output #0, avi, to '/tmp/tieta2.avi':
Metadata:
ISFT : Lavf54.59.106
Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 690x560 [SAR 1:1 DAR 69:56], q=2-31, 200 kb/s, 25 tbn, 25 tbc (default)
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p (default)
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (flac -> libmp3lame)
Press [q] to stop, [?] for help
[swscaler @ 0x752040] Warning: data is not aligned! This can lead to a speedloss
frame= 6 fps=0.0 q=4.0 Lsize= 91kB time=00:00:00.24 bitrate=3118.7kbits/s dup=0 drop=7
video:75kB audio:6kB subtitle:0 global headers:0kB muxing overhead 12.867035%
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
I added the ticket because I was told through irc that this line should not appear, and asked me to submit a ticket. But as time went by, someone told me it's normal. So it may be closed freely, as you want.
comment:3 by , 19 months ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
I'm pretty sure this is an unavoidable consequence of cropping to an unaligned offset. There is nothing we can do about this except do a full memcpy into an aligned buffer, which I'm pretty sure will not help.
swscale.c prints this message whenever the data pointers are not a multiple of 16, and since the yuv422p chroma plane is subsampled by a factor of 2 (in the horizontal direction), that means the chroma plane now starts at an offset of 8 (relative to the aligned image start).
Closing since everything is "working as intended". The message is just letting you know that you are requesting a crop that will inevitably slow down scaling.



The full log:
$ ffmpeg -v 9 -loglevel 99 -ss 00:24:50 -i album-familiar-2.mkv -t 00:00:30 -vf "yadif, crop=700:560:20" -vcodec mpeg4 -vtag xvid -qscale:v 4 -ac 1 -acodec libmp3lame -qscale:a 3 /tmp/calaguapa.avi ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers built on Jan 13 2013 22:22:02 with gcc 4.6.3 (GCC) configuration: --disable-static --prefix=/nix/store/1pja3gxi62f2hjwyww67ys84mxqfjgwm-ffmpeg-1.1 --enable-gpl --enable-postproc --enable-swscale --disable-ffplay --enable-shared --enable-runtime-cpudetect --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-vdpau libavutil 52. 13.100 / 52. 13.100 libavcodec 54. 86.100 / 54. 86.100 libavformat 54. 59.106 / 54. 59.106 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 32.100 / 3. 32.100 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument '99'. Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '00:24:50'. Reading option '-i' ... matched as input file with argument 'album-familiar-2.mkv'. Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '00:00:30'. Reading option '-vf' ... matched as option 'vf' (video filters) with argument 'yadif, crop=700:560:20'. Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'mpeg4'. Reading option '-vtag' ... matched as option 'vtag' (force video tag/fourcc) with argument 'xvid'. Reading option '-qscale:v' ... matched as option 'qscale' (use fixed quality scale (VBR)) with argument '4'. Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '1'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libmp3lame'. Reading option '-qscale:a' ... matched as option 'qscale' (use fixed quality scale (VBR)) with argument '3'. Reading option '/tmp/calaguapa.avi' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set libav* logging level) with argument 9. Successfully parsed a group of options. Parsing a group of options: input file album-familiar-2.mkv. Applying option ss (set the start time offset) with argument 00:24:50. Successfully parsed a group of options. Opening an input file: album-familiar-2.mkv. [matroska,webm @ 0x99f7e0] Format matroska,webm probed with size=2048 and score=100 st:0 removing common factor 1000000 from timebase st:1 removing common factor 1000000 from timebase [matroska,webm @ 0x99f7e0] File position before avformat_find_stream_info() is 669 [h264 @ 0x9a67e0] Using externally provided dimensions [matroska,webm @ 0x99f7e0] All info found [matroska,webm @ 0x99f7e0] File position after avformat_find_stream_info() is 1671349 Input #0, matroska,webm, from 'album-familiar-2.mkv': Metadata: ENCODER : Lavf54.59.106 Duration: 03:40:46.48, start: 0.000000, bitrate: 61847 kb/s Stream #0:0, 8, 1/1000: Video: h264 (High 4:4:4 Predictive), yuv422p, 720x576, 1/50, SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 50 tbc (default) Stream #0:1, 3, 1/1000: Audio: flac, 44100 Hz, mono, s16 (default) Successfully openened the file. Parsing a group of options: output file /tmp/calaguapa.avi. Applying option t (record or transcode "duration" seconds of audio/video) with argument 00:00:30. Applying option vf (video filters) with argument yadif, crop=700:560:20. Applying option vcodec (force video codec ('copy' to copy stream)) with argument mpeg4. Applying option vtag (force video tag/fourcc) with argument xvid. Applying option qscale:v (use fixed quality scale (VBR)) with argument 4. Applying option ac (set number of audio channels) with argument 1. Applying option acodec (force audio codec ('copy' to copy stream)) with argument libmp3lame. Applying option qscale:a (use fixed quality scale (VBR)) with argument 3. Successfully parsed a group of options. Opening an output file: /tmp/calaguapa.avi. y Successfully openened the file. [Parsed_yadif_0 @ 0x1b8f0a0] mode:0 parity:-1 deint:0 [crop @ 0x1b8f760] Setting 'w' to value '700' [crop @ 0x1b8f760] Setting 'h' to value '560' [crop @ 0x1b8f760] Setting 'x' to value '20' [buffer @ 0x1b8d3c0] Setting entry with key 'video_size' to value '720x576' [buffer @ 0x1b8d3c0] Setting entry with key 'pix_fmt' to value '4' [buffer @ 0x1b8d3c0] Setting entry with key 'time_base' to value '1/1000' [buffer @ 0x1b8d3c0] Setting entry with key 'pixel_aspect' to value '1/1' [buffer @ 0x1b8d3c0] Setting entry with key 'sws_param' to value 'flags=2' [buffer @ 0x1b8d3c0] Setting entry with key 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 0x1b8d100] w:720 h:576 pixfmt:yuv422p tb:1/1000 fr:25/1 sar:1/1 sws_param:flags=2 [scale @ 0x1810260] Setting 'w' to value '0' [scale @ 0x1810260] Setting 'h' to value '0' [scale @ 0x1810260] Setting 'flags' to value '0x4' [auto-inserted scaler 0 @ 0x1b90160] w:0 h:0 flags:'0x4' interl:0 [format @ 0x1b8fe20] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_crop_1' and the filter 'format' [Parsed_crop_1 @ 0x1b8f640] w:720 h:576 sar:1/1 -> w:700 h:560 sar:1/1 [auto-inserted scaler 0 @ 0x1b90160] w:700 h:560 fmt:yuv422p sar:1/1 -> w:700 h:560 fmt:yuv420p sar:1/1 flags:0x4 [abuffer @ 0x1c0b300] Setting entry with key 'time_base' to value '1/44100' [abuffer @ 0x1c0b300] Setting entry with key 'sample_rate' to value '44100' [abuffer @ 0x1c0b300] Setting entry with key 'sample_fmt' to value 's16' [abuffer @ 0x1c0b300] Setting entry with key 'channel_layout' to value '0x4' [graph 1 input from stream 0:1 @ 0x1810aa0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x4 [aformat @ 0x1c09420] Setting entry with key 'sample_fmts' to value 's32p,fltp,s16p' [aformat @ 0x1c09420] Setting entry with key 'sample_rates' to value '44100,48000,32000,22050,24000,16000,11025,12000,8000' [aformat @ 0x1c09420] Setting entry with key 'channel_layouts' to value '0x4' [audio format for output stream 0:1 @ 0x1c09160] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1' [auto-inserted resampler 0 @ 0x1c12960] chl:mono fmt:s16 r:44100Hz -> chl:mono fmt:s16p r:44100Hz [mpeg4 @ 0x1b8dd20] detected 1 logical cores [mpeg4 @ 0x1b8dd20] intra_quant_bias = 0 inter_quant_bias = -64 [h264 @ 0x18197e0] detected 1 logical cores Output #0, avi, to '/tmp/calaguapa.avi': Metadata: ISFT : Lavf54.59.106 Stream #0:0, 0, 1/25: Video: mpeg4 (xvid / 0x64697678), yuv420p, 700x560 [SAR 1:1 DAR 5:4], 1/25, q=2-31, 200 kb/s, 25 tbn, 25 tbc (default) Stream #0:1, 0, 32/1225: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p (default) Stream mapping: Stream #0:0 -> #0:0 (h264 -> mpeg4) Stream #0:1 -> #0:1 (flac -> libmp3lame) Press [q] to stop, [?] for help [h264 @ 0x18197e0] Using externally provided dimensions [swscaler @ 0x17fe2e0] Warning: data is not aligned! This can lead to a speedloss *** drop! Last message repeated 14 times *** drop! 0 fps=0.0 q=0.0 size= 10kB time=00:00:00.00 bitrate=N/A dup=0 drop=15 Last message repeated 15 times *** drop! 0 fps=0.0 q=0.0 size= 10kB time=00:00:00.00 bitrate=N/A dup=0 drop=31 Last message repeated 14 times *** drop! 0 fps=0.0 q=0.0 size= 10kB time=00:00:00.00 bitrate=N/A dup=0 drop=46 Last message repeated 14 times *** drop! 0 fps=0.0 q=0.0 size= 10kB time=00:00:00.00 bitrate=N/A dup=0 drop=61 Last message repeated 13 times *** drop! 0 fps=0.0 q=0.0 size= 10kB time=00:00:00.00 bitrate=N/A dup=0 drop=75 Last message repeated 7 times [libmp3lame @ 0x1b8e5a0] Trying to remove 47 more samples than there are in the queue frame= 0 fps=0.0 q=0.0 Lsize= 48kB time=00:00:00.00 bitrate=N/A dup=0 drop=83 video:0kB audio:35kB subtitle:0 global headers:0kB muxing overhead 36.491072% Statistics: 25419425 bytes read, 3 seeks