[libav-devel] [PATCH 1/1] NVENC: Update check for Lookahead

2016-12-19 Thread Yogender Gupta
I found one small bug in NVENC, the value of rc_lookahead is initialized to -1 
but the check in nvenc.c checks for if (ctx->rc_lookahead) rather than if 
(ctx->rc_lookahead > 0) , thereby considering lookahead enabled all the time.

Thanks,


---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-NVENC-Update-check-for-Lookahead.patch
Description: 0001-NVENC-Update-check-for-Lookahead.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] scale_npp: fix passthrough mode

2016-10-24 Thread Yogender Gupta
>>Sample Command Line : avconv -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -i 
>>amazing_10.mp4 -vf scale_npp=1920:1072 -vcodec h264_nvenc tmp0.mp4 
>>(amazing.mp4 should be 1920x1072 in this case)

Correction - CUVID is not supported by libav currently. A patch will be 
submitted shortly.

Thanks,
Yogender
---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] scale_npp: fix passthrough mode

2016-10-24 Thread Yogender Gupta
The pass through mode is broken, since error is returned when none of the 
stages is needed. In such a case only 0 should be returned.

Try command line with i/p resolution = o/p resolution to observe the issue.

Sample Command Line : avconv -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -i 
amazing_10.mp4 -vf scale_npp=1920:1072 -vcodec h264_nvenc tmp0.mp4 (amazing.mp4 
should be 1920x1072 in this case)

Thanks,
Yogender


---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-scale_npp-fix-passthrough-mode.patch
Description: 0001-scale_npp-fix-passthrough-mode.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [Libav-devel][Patch] Force high_444 profile for 444 inputs for H264

2016-10-06 Thread Yogender Gupta
>> I'd fold it in the current check for ctx->data_pix_fmt that is already 
>> present.
I kept it separate to maintain consistency as it is set for HEVC

>> Currently we are setting FF_PROFILE_H264_HIGH_444 should it be changed to 
>> FF_PROFILE_H264_HIGH_444_PREDICTIVE as well?
FF_PROFILE_H264_HIGH_444 is not defined anywhere in standard, libav has it only 
3 places and IMO should be removed
NV_ENC_H264_PROFILE_HIGH_444 can be renamed if this is what you are referring to

Yogender
---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [Libav-devel][Patch] Fixed error log

2016-10-06 Thread Yogender Gupta
Fixed error log

Thanks,
Yogender

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-nvenc.c-fixed-error-log.patch
Description: 0001-nvenc.c-fixed-error-log.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [Libav-devel][Patch] Force high_444 profile for 444 inputs for H264

2016-10-06 Thread Yogender Gupta
This patches forces high_444 profile selection for yuv444p inputs for 
nvenc_h264.

Thanks,
Yogender

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-nvenc.c-force-high_444-profile-for-444-input.patch
Description: 0001-nvenc.c-force-high_444-profile-for-444-input.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] CUDA Support in LibAV

2016-09-27 Thread Yogender Gupta
I am planning to add CUDA compilation support in LibAV with a CUDA sample. The 
challenge here is that NVCC Cuda Compiler supports GCC compiler under Linux and 
MSVC compiler on Windows. So GCC compilation under Windows becomes an issue.

The Clang compiler is still in infancy stage and doesn't support the latest SDK 
and architectures.

I am planning to have the CUDA files compiled for the Linux/GCC and 
Windows/MSVC (MingW) platforms, and for Windows/GCC (MingW) we can store the 
PTX files that have been generated on Linux or Windows using MSVC compiler.

We can improve this on a later date once we have more support on MinGW/GCC 
either through nvcc or Clang. Let me know if there are more ideas to explore.

Thanks,
Yogender

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] hwupload_cuda - Add P010 and YUV444P16 pixel format

2016-09-22 Thread Yogender Gupta


>>Are you going to add support for those to scale_npp as well?
yes, will submit a patch shortly

thx
yogender





---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [Libav-devel][Patch] hwupload_cuda - Add P010 and YUV444P16 pixel format

2016-09-19 Thread Yogender Gupta
Added support for P010 and YUV444P16 pixel formats to hwupload_cuda.

Thanks,
Yogender

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-hwupload_cuda-Add-P010-and-YUV444P16-pixel-format.patch
Description: 0001-hwupload_cuda-Add-P010-and-YUV444P16-pixel-format.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [Libav-devel][Patch] Patch for SDK 7 for NVENC

2016-09-16 Thread Yogender Gupta
Thanks Diego, Luca. Will take care of your comments for the next submissions.
Few points based on your review :

1. We can keep the default as HQ only instead of medium (mapping of medium is 
already to HQ), however we found of lot of people comfortable using slow, 
medium and fast, similar to what they find in x264. And that is the motivation 
of adding these, and making one of these defaults. At some point we may even 
have these kind of presets only, nothing decided as yet.
2. Am bad at writing, will try to improve the log message next time
3. I couldn't find any entry for Range extensions for HEVC, so added, if you 
feel it already exists let me know, and I will try to put a patch with the 
existing one.
4. The preset change may not be stray, the GUIDs have to be in the array in the 
same order as they are referred by. LLHP and LLHQ somehow got interchanged and 
that is why this change, let me know if I got this wrong.
5. Will follow the notation more closely as suggested by you.

Thanks,
Yogender

-Original Message-
From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of Diego 
Biurrun
Sent: Friday, September 16, 2016 1:27 AM
To: libav development
Subject: Re: [libav-devel] [Libav-devel][Patch] Patch for SDK 7 for NVENC

Some comments for next time as Luca said he wanted to take care of it.
Please try to maintain the style of the file you are working in.

> --- a/libavcodec/nvenc_hevc.c
> +++ b/libavcodec/nvenc_hevc.c
> @@ -27,8 +27,11 @@
>  #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM  
> static const AVOption options[] = {
> -{ "preset",   "Set the encoding preset",  OFFSET(preset),
>   AV_OPT_TYPE_INT,{ .i64 = PRESET_HQ }, PRESET_DEFAULT, 
> PRESET_LOSSLESS_HP, VE, "preset" },
> +{ "preset",   "Set the encoding preset",  OFFSET(preset),
>   AV_OPT_TYPE_INT,{ .i64 = PRESET_MEDIUM }, PRESET_DEFAULT, 
> PRESET_LOSSLESS_HP, VE, "preset" },
> --- a/libavcodec/nvenc_h264.c
> +++ b/libavcodec/nvenc_h264.c
> @@ -27,8 +27,11 @@
>  #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM  
> static const AVOption options[] = {
> -{ "preset",   "Set the encoding preset",  OFFSET(preset),
>   AV_OPT_TYPE_INT,{ .i64 = PRESET_HQ }, PRESET_DEFAULT, 
> PRESET_LOSSLESS_HP, VE, "preset" },
> +{ "preset",   "Set the encoding preset",  OFFSET(preset),
>   AV_OPT_TYPE_INT,{ .i64 = PRESET_MEDIUM }, PRESET_DEFAULT, 
> PRESET_LOSSLESS_HP, VE, "preset" },

Why are you changing the default from HQ to MEDIUM?

On Thu, Sep 15, 2016 at 10:40:10AM +, Yogender Gupta wrote:
> From cc4f606cfba7b1ced644fe597b1b424f2af0f2bc Mon Sep 17 00:00:00 2001
> From: Yogender Gupta <ygu...@nvidia.com>
> Date: Thu, 15 Sep 2016 16:06:44 +0530
> Subject: [PATCH] Patch for SDK 7 for NVENC

The log message should be

  nvenc: Update for SDK 7

or similar.

> ---
>  libavcodec/avcodec.h|   1 +
>  libavcodec/nvenc.c  | 117 
> ++--
>  libavcodec/nvenc.h  |  23 +-
>  libavcodec/nvenc_h264.c |  15 ++-  libavcodec/nvenc_hevc.c |  19 
> ++--
>  5 files changed, 166 insertions(+), 9 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 
> 7a5f10f..607688c 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2961,6 +2961,7 @@ typedef struct AVCodecContext {
>  #define FF_PROFILE_HEVC_MAIN1
>  #define FF_PROFILE_HEVC_MAIN_10 2
>  #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE  3
> +#define FF_PROFILE_HEVC_REXT4

This is an installed header, so there should be a matching APIchanges entry.

> --- a/libavcodec/nvenc.c
> +++ b/libavcodec/nvenc.c
> @@ -463,12 +471,15 @@ static int nvec_map_preset(NVENCContext *ctx)
>  GUIDTuple presets[] = {
>  { NV_ENC_PRESET_BD_GUID },
>  { NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID, NVENC_LOWLATENCY },
> -{ NV_ENC_PRESET_LOW_LATENCY_HP_GUID,  NVENC_LOWLATENCY },
>  { NV_ENC_PRESET_LOW_LATENCY_HQ_GUID,  NVENC_LOWLATENCY },
> +{ NV_ENC_PRESET_LOW_LATENCY_HP_GUID,  NVENC_LOWLATENCY },
>  { NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID,NVENC_LOSSLESS },
>  { NV_ENC_PRESET_LOSSLESS_HP_GUID, NVENC_LOSSLESS },

That looks like a stray change.

> @@ -589,6 +600,44 @@ static void 
> nvenc_setup_rate_control(AVCodecContext *avctx)
>  
>  if (rc->averageBitRate > 0)
>  avctx->bit_rate = rc->averageBitRate;
> +
> +if (ctx->aq)
> +{

  if (ctx->aq) {

like in the rest of the file, more

[libav-devel] [Libav-devel][Patch] Patch for SDK 7 for NVENC

2016-09-15 Thread Yogender Gupta
Attached is patch for SDK 7 for NVENC.

Thanks,
Yogender

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---


0001-Patch-for-SDK-7-for-NVENC.patch
Description: 0001-Patch-for-SDK-7-for-NVENC.patch
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel