Changes between Initial Version and Version 1 of Ticket #6260, comment 2


Ignore:
Timestamp:
May 23, 2017, 8:37:47 AM (9 years ago)
Author:
dpavlekovic

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6260, comment 2

    initial v1  
    66}}}
    77If I remove this adjustment then the output looks OK (1920x1080 source, would be padded to 1920x1088). I've no experience though with NVEnc APIs, so not sure if this is a right thing to do for all cases.
     8
     9Alternatively, keeping the padding and setting the input picture width/height to padded input surface dimensions rather than original frame dims in ''ff_nvenc_encode_frame'' seems to work as well:
     10{{{
     11@@ -1737,8 +1790,8 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     12
     13         pic_params.inputBuffer = inSurf->input_surface;
     14         pic_params.bufferFmt = inSurf->format;
     15-        pic_params.inputWidth = avctx->width;
     16-        pic_params.inputHeight = avctx->height;
     17+        pic_params.inputWidth = inSurf->width;
     18+        pic_params.inputHeight = inSurf->height;
     19         pic_params.inputPitch = inSurf->pitch;
     20         pic_params.outputBitstream = inSurf->output_surface;
     21}}}