>              avctx->width << 1, avctx->height);
> +    } else if (frame->format == AV_PIX_FMT_RGBA || frame->format ==
> AV_PIX_FMT_RGB0) {
> +      av_image_copy_plane(buf, lockBufferParams->pitch,
> +           frame->data[0], frame->linesize[0],
> +           avctx->width << 2, avctx->height);
> +    } else if (frame->format == AV_PIX_FMT_BGRA || frame->format ==
> AV_PIX_FMT_BGR0) {
> +      av_image_copy_plane(buf, lockBufferParams->pitch,
> +           frame->data[0], frame->linesize[0],
> +           avctx->width << 2, avctx->height);
>      } else {

These are identical, so please put them into one if.

Also, why is the twist from AV_PIX_FMT_RGBA to NV_ENC_BUFFER_FORMAT_ABGR
necessary?

The nvenc header describes it as "8 bit Packed A8B8G8R8", so did they
mess it up?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to