From: Marton Balint <cus@passwd.hu> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] AVFrame data alignment issues Date: Sun, 16 Jan 2022 01:59:44 +0100 (CET) Message-ID: <552433aa-e5a5-5821-fc10-3f5525ee468@passwd.hu> (raw) Hi, I wonder if there are strict requirements for alignment of AVFrame buffers. Yes, it is usually aligned by default, but there are filters, like crop or pad which tries to avoid copying data even at the cost of breaking the alignment. This unfortunately causes crashes for code which requires it, some examples: - the zscale filter only checks input buffer alignment but not output buffer alignment, therefore might crash if a later pad filter provides an unaligned get_buffer callback for a filter chain. - the blend/tblend filter has a similar problem, it's ASM code is using aligned movs for output. (not for input however). - the dnxhd encoder depends on aligment of its input buffers. How this should be fixed? - Change pad/crop filters to only do "smart" pad/crop if alignment can be guaranteed? Maybe a user option should be added to enable "unsafe" mode? - Add checks for aligment where it is actually required, e.g. in dnxhd encoder or blend/zscale filter? - Change blend code to use unaligned movs even for output? Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2022-01-16 0:59 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-16 0:59 Marton Balint [this message] 2022-01-16 1:37 ` Ronald S. Bultje
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=552433aa-e5a5-5821-fc10-3f5525ee468@passwd.hu \ --to=cus@passwd.hu \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git