[FFmpeg-cvslog] avcodec/utils: Document 32 min for h264 width
Michael Niedermayer
git at videolan.org
Fri Jul 10 19:02:00 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 10 18:31:42 2015 +0200| [47d077337a62f3ece41ee90a4d5000876d5c46d1] | committer: Michael Niedermayer
avcodec/utils: Document 32 min for h264 width
Suggested-by: "Ronald S. Bultje" <rsbultje at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47d077337a62f3ece41ee90a4d5000876d5c46d1
---
libavcodec/utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 925b3ed..4245b1a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -432,6 +432,11 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
// some of the optimized chroma MC reads one line too much
// which is also done in mpeg decoders with lowres > 0
*height += 2;
+
+ // H.264 uses edge emulation for out of frame motion vectors, for this
+ // it requires a temporary area large enough to hold a 21x21 block,
+ // increasing witdth ensure that the temporary area is large enough,
+ // the next rounded up width is 32
*width = FFMAX(*width, 32);
}
More information about the ffmpeg-cvslog
mailing list