[FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Philip Langdale
There is a long sad story behind all this, but it's somewhat ambiguous as to whether DVD content should be treated as 720 pixels wide or 704 pixels, with 16 pixels cut off. If you decide is should be 704 pixels wide, you need to adjust the sample aspect ratio to keep the final display aspect ratio

[FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Philip Langdale
There is a long sad story behind all this, but it's somewhat ambiguous as to whether DVD content should be treated as 720 pixels wide or 704 pixels, with 16 pixels cut off. If you decide is should be 704 pixels wide, you need to adjust the sample aspect ratio to keep the final display aspect ratio

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Philip Langdale a écrit : > There is a long sad story behind all this, but it's somewhat ambiguous as to > whether DVD content should be treated as 720 pixels wide or 704 pixels, with > 16 pixels cut off. If you decide is should be 704 pixels wide, you need to > adju

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 20:01, Philip Langdale wrote: > There is a long sad story behind all this, but it's somewhat ambiguous as to > whether DVD content should be treated as 720 pixels wide or 704 pixels, with > 16 pixels cut off. If you decide is should be 704 pixels wide, you need to > adjust th

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > BT601 makes this very clear. The active picture is 702 pixels. There are two fundamental flaws with your reasoning: First, BT601 only applies to a some kind of videos. Wikipedia tells me it applies to "encoding interlaced analog video sign

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 20:42, Nicolas George wrote: > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >> BT601 makes this very clear. The active picture is 702 pixels. > > There are two fundamental flaws with your reasoning: > > First, BT601 only applies to a some kind of videos. Wikipedia

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > I don't make the standards and frankly whether you dislike them is > your problem but they exist and need to work correctly. > Instead you wish to break things based off an artificial test pattern > and your own beliefs. I do not wish to br

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 23:00, Nicolas George wrote: > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >> I don't make the standards and frankly whether you dislike them is >> your problem but they exist and need to work correctly. >> Instead you wish to break things based off an artificial

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > The behaviour of the Nvidia code I believe is correct. > As far as I understand it corrects SAR for 720-width content to comply > with BT601. That is just not true. Basic principle: THE COMPETENT USER IS RIGHT. If someone knows BT601, and

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 23:38, Nicolas George wrote: > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >> The behaviour of the Nvidia code I believe is correct. >> As far as I understand it corrects SAR for 720-width content to comply >> with BT601. > > That is just not true. > > Basic princ

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Kieran Kunhya
On 17 January 2015 at 23:46, Kieran Kunhya wrote: > On 17 January 2015 at 23:38, Nicolas George wrote: >> L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >>> The behaviour of the Nvidia code I believe is correct. >>> As far as I understand it corrects SAR for 720-width content to comply >

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > > There is a very simple way of flagging content that is supposed to comply > > with BT601: the SAR is 512/351. If SAR is 64/45, that means someone before > > nvenc decided that the video is not expected to conform with BT601, and > > nvenc

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Nicolas George
L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > Oops I misunderstood, you mean the software must comply with the users wishes. Yes. > Anyway my argument is that BT601 should be the default for the these > resolutions. If you want, but that must happen immediately when the contents ente

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-17 Thread Hendrik Leppkes
On Sun, Jan 18, 2015 at 1:02 AM, Nicolas George wrote: > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > > Oops I misunderstood, you mean the software must comply with the users > wishes. > > Yes. > > > Anyway my argument is that BT601 should be the default for the these > > resolutions

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Nicolas George
Le nonidi 29 nivôse, an CCXXIII, Hendrik Leppkes a écrit : > nvenc should behave the same as libx264, or any other video encoder, if > this patch makes it do that, then it should be applied. > > If bt601 needs special handling not yet present in avcodec, it should be > implemented in such a way th

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Kieran Kunhya
On 18 January 2015 at 09:40, Nicolas George wrote: > Le nonidi 29 nivôse, an CCXXIII, Hendrik Leppkes a écrit : >> nvenc should behave the same as libx264, or any other video encoder, if >> this patch makes it do that, then it should be applied. >> >> If bt601 needs special handling not yet presen

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Michael Niedermayer
On Sun, Jan 18, 2015 at 02:52:59AM +0100, Hendrik Leppkes wrote: > On Sun, Jan 18, 2015 at 1:02 AM, Nicolas George wrote: > > > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : > > > Oops I misunderstood, you mean the software must comply with the users > > wishes. > > > > Yes. > > > > > A

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Michael Niedermayer
On Sun, Jan 18, 2015 at 11:16:04AM +, Kieran Kunhya wrote: > On 18 January 2015 at 09:40, Nicolas George wrote: > > Le nonidi 29 nivôse, an CCXXIII, Hendrik Leppkes a écrit : > >> nvenc should behave the same as libx264, or any other video encoder, if > >> this patch makes it do that, then it

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Kieran Kunhya
On 18 January 2015 at 12:22, Michael Niedermayer wrote: > On Sun, Jan 18, 2015 at 02:52:59AM +0100, Hendrik Leppkes wrote: >> On Sun, Jan 18, 2015 at 1:02 AM, Nicolas George wrote: >> >> > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >> > > Oops I misunderstood, you mean the software m

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread compn
On Sun, 18 Jan 2015 10:40:24 +0100 Nicolas George wrote: > I have downloaded BT.601 from http://www.itu.int/rec/R-REC-BT.601/ >, both the most recent and the > oldest versions, and I did not find any explicit reference of this > 702 business, nor could I decipher indirect references, so I still >

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Michael Niedermayer
On Sun, Jan 18, 2015 at 01:28:36PM +, Kieran Kunhya wrote: > On 18 January 2015 at 12:22, Michael Niedermayer wrote: > > On Sun, Jan 18, 2015 at 02:52:59AM +0100, Hendrik Leppkes wrote: > >> On Sun, Jan 18, 2015 at 1:02 AM, Nicolas George wrote: > >> > >> > L'octidi 28 nivôse, an CCXXIII, Kie

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Kieran Kunhya
On 18 January 2015 at 13:55, Michael Niedermayer wrote: > On Sun, Jan 18, 2015 at 01:28:36PM +, Kieran Kunhya wrote: >> On 18 January 2015 at 12:22, Michael Niedermayer wrote: >> > On Sun, Jan 18, 2015 at 02:52:59AM +0100, Hendrik Leppkes wrote: >> >> On Sun, Jan 18, 2015 at 1:02 AM, Nicolas

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Reimar Döffinger
On Sat, Jan 17, 2015 at 11:35:41AM -0800, Philip Langdale wrote: > There is a long sad story behind all this, but it's somewhat ambiguous as to > whether DVD content should be treated as 720 pixels wide or 704 pixels, with > 16 pixels cut off. If you decide is should be 704 pixels wide, you need to

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread compn
On Sun, 18 Jan 2015 18:41:09 +0100 Reimar Döffinger wrote: > Oh my god, this is so horribly broken I vote for doing a "return > -EBROKENAPI" and tell them we'll enable this when NVidia fixes their > stuff. > IMHO some features are not worth the hacks necessary. [08:51] just let nvidia change asp

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Reimar Döffinger
On 19.01.2015, at 01:16, compn wrote: > On Sun, 18 Jan 2015 18:41:09 +0100 > Reimar Döffinger wrote: >> Oh my god, this is so horribly broken I vote for doing a "return >> -EBROKENAPI" and tell them we'll enable this when NVidia fixes their >> stuff. >> IMHO some features are not worth the hacks

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-18 Thread Philip Langdale
On Mon, 19 Jan 2015 07:48:24 +0100 Reimar Döffinger wrote: > On 19.01.2015, at 01:16, compn wrote: > > On Sun, 18 Jan 2015 18:41:09 +0100 > > Reimar Döffinger wrote: > >> Oh my god, this is so horribly broken I vote for doing a "return > >> -EBROKENAPI" and tell them we'll enable this when NVid

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-19 Thread Nicolas George
Le nonidi 29 nivôse, an CCXXIII, compn a écrit : > [08:57] compn: the nvidia behaviour is correct It would help a lot if he had the courtesy of actually explaining why he considers the behaviour to be correct. After all, a lot of people in this thread, possibly not as smart and knowledgeable as h

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-19 Thread Nicolas George
Le nonidi 29 nivôse, an CCXXIII, Philip Langdale a écrit : > Right. And it's obviously wrong if you consider that trying to encode > any square pixel content at this size results in non-square output. > > I'd also argue that bt.601 semantics come into play when you're > authoring the DVD, and any

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-19 Thread tim nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 17/01/15 23:52, Nicolas George wrote: > L'octidi 28 nivôse, an CCXXIII, Kieran Kunhya a écrit : >>> There is a very simple way of flagging content that is supposed to comply >>> with BT601: the SAR is 512/351. If SAR is 64/45, that means someone b

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-19 Thread Nicolas George
Le decadi 30 nivôse, an CCXXIII, tim nicholson a écrit : > I am struggling to follow some of the arguments, which seem far to > heated to be as useful as they could be. Please see my other mail, I summarize it more extensively. > I am not sure what is currently wrong, and where, but please let us

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-19 Thread Kieran Kunhya
> Taking the Sample/pixel aspect ratio (SAR) calculated above and feeding > that back into calculating a display aspect ratio *for the whole frame* > leads to a value that is not 16:9 (or 4:3), and it appears to be this > figure which is then reported as the DAR, rather than that of the active > pi

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-20 Thread Agatha Hu
On 2015/1/18 4:01, Philip Langdale wrote: There is a long sad story behind all this, but it's somewhat ambiguous as to whether DVD content should be treated as 720 pixels wide or 704 pixels, with 16 pixels cut off. If you decide is should be 704 pixels wide, you need to adjust the sample aspect r

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-21 Thread Reimar Döffinger
On 21.01.2015, at 07:17, Agatha Hu wrote: > On 2015/1/18 4:01, Philip Langdale wrote: >> There is a long sad story behind all this, but it's somewhat ambiguous as to >> whether DVD content should be treated as 720 pixels wide or 704 pixels, with >> 16 pixels cut off. If you decide is should be 704

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-21 Thread Agatha Hu
On 2015/1/21 16:00, Reimar Döffinger wrote: On 21.01.2015, at 07:17, Agatha Hu wrote: On 2015/1/18 4:01, Philip Langdale wrote: Here's the reply from NVENC engineers It is not same thing as SAR. It is the display aspect ratio i.e width/height = DAR/SAR The calculation below should be li

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-21 Thread Philip Langdale
On Thu, 22 Jan 2015 12:15:44 +0800 Agatha Hu wrote: > We will fix the issue in driver, overscan compensation will be > applied to input DAR *only* if the DAR is 4:3 or 16:9, otherwise > won't unnecessarily modify the aspect ratio for resolutions like > 720x480 and 720x576. > The fix will be on fu

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-21 Thread Reimar Döffinger
On 22.01.2015, at 05:15, Agatha Hu wrote: > On 2015/1/21 16:00, Reimar Döffinger wrote: >> On 21.01.2015, at 07:17, Agatha Hu wrote: >>> On 2015/1/18 4:01, Philip Langdale wrote: > >>> >>> Here's the reply from NVENC engineers >>> It is not same thing as SAR. It is the display aspect rati

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-21 Thread Agatha Hu
在 2015/1/22 12:29, Philip Langdale 写道: On Thu, 22 Jan 2015 12:15:44 +0800 Agatha Hu wrote: We will fix the issue in driver, overscan compensation will be applied to input DAR *only* if the DAR is 4:3 or 16:9, otherwise won't unnecessarily modify the aspect ratio for resolutions like 720x480 an

Re: [FFmpeg-devel] [PATCH] nvenc: Compensate for hardware trying to mess with aspect ratio of DVD content.

2015-01-22 Thread Philip Langdale
On Thu, 22 Jan 2015 13:12:59 +0800 Agatha Hu wrote: > Disabling compensation is the best result, adding a flag is > acceptable, but NVENC5.0 has just released, such option won't be > available until 6.0 is available, so... > Still waiting for nvenc teams feedback, the worst case is adding the >