[FFmpeg-cvslog] avcodec/nvenc: remove unnecessary alignment

Timo Rothenpieler git at videolan.org
Tue May 23 12:47:44 EEST 2017


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue May 23 11:24:40 2017 +0200| [a1652aca7e892ea4899df894feaa87ba4170e06c] | committer: Timo Rothenpieler

avcodec/nvenc: remove unnecessary alignment

Fixes #6260

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a1652aca7e892ea4899df894feaa87ba4170e06c
---

 libavcodec/nvenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 6181e7e138..d7420d7166 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1154,8 +1154,8 @@ static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
         }
 
         allocSurf.version = NV_ENC_CREATE_INPUT_BUFFER_VER;
-        allocSurf.width = (avctx->width + 31) & ~31;
-        allocSurf.height = (avctx->height + 31) & ~31;
+        allocSurf.width = avctx->width;
+        allocSurf.height = avctx->height;
         allocSurf.bufferFmt = ctx->surfaces[idx].format;
 
         nv_status = p_nvenc->nvEncCreateInputBuffer(ctx->nvencoder, &allocSurf);
@@ -1762,8 +1762,8 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
         pic_params.inputBuffer = inSurf->input_surface;
         pic_params.bufferFmt = inSurf->format;
-        pic_params.inputWidth = avctx->width;
-        pic_params.inputHeight = avctx->height;
+        pic_params.inputWidth = inSurf->width;
+        pic_params.inputHeight = inSurf->height;
         pic_params.inputPitch = inSurf->pitch;
         pic_params.outputBitstream = inSurf->output_surface;
 



More information about the ffmpeg-cvslog mailing list