[FFmpeg-devel] [PATCH] avutil/hwcontext_cuda: fix YUV420P cuda_get_buffer
Timo Rothenpieler
timo at rothenpieler.org
Tue May 15 15:04:08 EEST 2018
On 15.05.2018 13:37, Marton Balint wrote:
>> Are you sure it isn't already that way? I tested specially YUV420P and
>> could not make out any issues.
>
> For 4K content linesize[0] is 3840, but linesize[1] becomes 2048 instead
> of 1920.
That's odd, 2048 seems more correct since it's a multiple of the
recommended 2048. But I guess the whole yuv420p in nvenc is some weird
hack on the driver side.
>>
>> So something like
>>
>> frame->linesize[1] = frame->linesize[2] = frame->linesize[0] / 2;
>> frame->data[2] = frame->data[1];
>> frame->data[1] = frame->data[2] + frame->linesize[2] * ctx->height
>> / 2;
>
> Ok, will use this.
Feel free to push if it works. Don't have access to an nvidia machine
right now, so can't properly test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180515/a22ef515/attachment.sig>
More information about the ffmpeg-devel
mailing list