Re: [FFmpeg-devel] [PATCH 1/4] Correctly set Display Aspect Ratio in nvenc.

2015-01-07 Thread Mark Himsley
On 07/01/2015 18:46, Philip Langdale wrote: > On Wed, 7 Jan 2015 12:13:25 +0100 > Nicolas George wrote: > >> Can you explain the 1024? >> >> Anyway, I would suggest to use lavu's rational functions: >> >> AVRational dar = av_mul_q(avctx->sample_aspect_ratio, >> a

Re: [FFmpeg-devel] [PATCH 1/4] Correctly set Display Aspect Ratio in nvenc.

2015-01-07 Thread Philip Langdale
On Wed, 7 Jan 2015 10:46:47 -0800 Philip Langdale wrote: > > Honestly, I don't understand what the encoder is doing at this point. > The 1.02 seems to be the 'correct' scale factor for a PAL DVD, but is > incorrect for anything else. I used 1024 to avoid the floating point > problem, but you are

Re: [FFmpeg-devel] [PATCH 1/4] Correctly set Display Aspect Ratio in nvenc.

2015-01-07 Thread Philip Langdale
On Wed, 7 Jan 2015 12:13:25 +0100 Nicolas George wrote: > Can you explain the 1024? > > Anyway, I would suggest to use lavu's rational functions: > > AVRational dar = av_mul_q(avctx->sample_aspect_ratio, > av_make_q(avctx->width, avctx->height)); > av_reduc

Re: [FFmpeg-devel] [PATCH 1/4] Correctly set Display Aspect Ratio in nvenc.

2015-01-07 Thread Nicolas George
Le sextidi 16 nivôse, an CCXXIII, Philip Langdale a écrit : > The encoder writes the display aspect ratio into the output frames, which a > good player will respect, so let's make sure it's correct. > > The 1.02 scale factor is black magic, but produces correct results. I don't > know what nvenc

[FFmpeg-devel] [PATCH 1/4] Correctly set Display Aspect Ratio in nvenc.

2015-01-05 Thread Philip Langdale
The encoder writes the display aspect ratio into the output frames, which a good player will respect, so let's make sure it's correct. The 1.02 scale factor is black magic, but produces correct results. I don't know what nvenc is doing. Signed-off-by: Philip Langdale --- libavcodec/libnvenc.c