Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Kieran Kunhya
> FFmpeg is correct, there is absolutely no doubt about it: This "active" > pixels nonsense is only relevant for certain very specific media, definitely > not when encoding testsrc and decoding the result to showinfo. Demuxers or > high-level tools may know when they are dealing with that kind of c

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > I haven't quite followed what's going on to decide whether Nvidia or > FFmpeg is correct. FFmpeg is correct, there is absolutely no doubt about it: This "active" pixels nonsense is only relevant for certain very specific media, definitely n

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Philip Langdale
On Sat, 17 Jan 2015 19:27:17 + Kieran Kunhya wrote: > On 17 January 2015 at 18:14, Nicolas George wrote: > > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > >> On Fri, 16 Jan 2015 22:17:56 +0100 > >> Nicolas George wrote: > >> Ok. I did this test and it produces correct result

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 18:14, Nicolas George wrote: > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : >> On Fri, 16 Jan 2015 22:17:56 +0100 >> Nicolas George wrote: >> Ok. I did this test and it produces correct results - SAR 133:221 which >> yields the correct final aspect ratio, > >

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Philip Langdale
On Sat, 17 Jan 2015 19:14:04 +0100 Nicolas George wrote: > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > The 45/44 value looks like 704/720: the sign that some people long > time ago in committees in the broadcast industry could not agree > whether the aspect ratio applies to the

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Nicolas George
Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > On Fri, 16 Jan 2015 22:17:56 +0100 > Nicolas George wrote: > Ok. I did this test and it produces correct results - SAR 133:221 which > yields the correct final aspect ratio, This is a good start. >

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Philip Langdale
On Sat, 17 Jan 2015 18:29:59 +0100 Timo Rothenpieler wrote: > > That's with Timo's patch and with hard-coding the darWidth and > > darHeight to 1024x576. Same result. > > Which patch did you use? The old one, that didn't take the > width/height into account, or the newer one? > The original one

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Timo Rothenpieler
> That's with Timo's patch and with hard-coding the darWidth and darHeight > to 1024x576. Same result. Which patch did you use? The old one, that didn't take the width/height into account, or the newer one? The original one definitely was not correct. signature.asc Description: OpenPGP digital

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread wm4
On Sat, 17 Jan 2015 13:37:30 +0100 Michael Niedermayer wrote: > On Fri, Jan 16, 2015 at 08:48:59PM -0800, Philip Langdale wrote: > > On Fri, 16 Jan 2015 22:17:56 +0100 > > Nicolas George wrote: > > > > > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > > > > Right. It is display as

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-17 Thread Michael Niedermayer
On Fri, Jan 16, 2015 at 08:48:59PM -0800, Philip Langdale wrote: > On Fri, 16 Jan 2015 22:17:56 +0100 > Nicolas George wrote: > > > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > > > Right. It is display aspect ratio, not sample aspect ratio. And then > > > you have the 45/44 probl

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-16 Thread Philip Langdale
On Fri, 16 Jan 2015 22:17:56 +0100 Nicolas George wrote: > Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > > Right. It is display aspect ratio, not sample aspect ratio. And then > > you have the 45/44 problem, unless that's somehow just affecting me. > > IIRC, the tests you ran wer

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-16 Thread Nicolas George
Le septidi 27 nivôse, an CCXXIII, Philip Langdale a écrit : > Right. It is display aspect ratio, not sample aspect ratio. And then > you have the 45/44 problem, unless that's somehow just affecting me. IIRC, the tests you ran were not accurate enough to know for sure. I suggest the following test

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-16 Thread Philip Langdale
On 2015-01-15 23:48, Nicolas George wrote: Le septidi 27 nivôse, an CCXXIII, Timo Rothenpieler a écrit : +av_reduce(&dw, &dh, avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 4096); +ctx->init_encode_params.darHeight = dw; +ctx->init_encode_params.darWidth

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-15 Thread Nicolas George
Le septidi 27 nivôse, an CCXXIII, Timo Rothenpieler a écrit : > +av_reduce(&dw, &dh, avctx->sample_aspect_ratio.num, > avctx->sample_aspect_ratio.den, 4096); > +ctx->init_encode_params.darHeight = dw; > +ctx->init_encode_params.darWidth = dh; Has this been actually tested?

[FFmpeg-devel] [PATCH 2/3] avcodec/nvenc: Handle non-square pixel aspect ratios

2015-01-15 Thread Timo Rothenpieler
--- libavcodec/nvenc.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 90856be..57ca130 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -471,6 +471,7 @@ static av_cold int nvenc_encode_init(AVCodecContext