Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format
       [not found]       ` <3c400dee9fc251dd1c35864952ead7c91d90bee5.camel@intel.com>
@ 2022-01-21  5:56         ` Xiang, Haihao
  2022-01-23  0:06           ` Carl Eugen Hoyos
  0 siblings, 1 reply; 4+ messages in thread
From: Xiang, Haihao @ 2022-01-21  5:56 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Xiang,
> Haihao
> Sent: Tuesday, June 30, 2020 15:34
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel
> format
> 
> > Am So., 28. Juni 2020 um 23:01 Uhr schrieb Mark Thompson <sw@jkqxz.net>:
> >
> > > FFmpeg has always used pixfmt as defining both the memory layout
> > > and which bits are used in that (so, for example, ARGB and 0RGB
> > > are not the same thing)
> >
> > But they have the same bitdepth per component...
> >

> Agree with Mark. P012 and P016 have different significant bits, we should use
> different pixfmts, otherwise an extra field in AVFrame is needed for bit depth.
> 
> BTW there are the YUV420P variants for 10 / 12 / 14 / 16 bit in FFmpeg, it
> would
> be better to follow FFmpeg's style to introduce P012 format instead of reusing
> P016.

Sorry for picking up this old thread.

We'd like to add the support for 12bit decoding / encoding in VAAPI and QSV.  Is there any other concern if adding P012 in FFmpeg ? 

Thanks
Haihao
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format
  2022-01-21  5:56         ` [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format Xiang, Haihao
@ 2022-01-23  0:06           ` Carl Eugen Hoyos
  2022-01-26  8:32             ` Xiang, Haihao
  0 siblings, 1 reply; 4+ messages in thread
From: Carl Eugen Hoyos @ 2022-01-23  0:06 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Am Fr., 21. Jan. 2022 um 06:56 Uhr schrieb Xiang, Haihao
<haihao.xiang-at-intel.com@ffmpeg.org>:
>
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Xiang,
> > Haihao
> > Sent: Tuesday, June 30, 2020 15:34
> > To: ffmpeg-devel@ffmpeg.org
> > Subject: Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel
> > format
> >
> > > Am So., 28. Juni 2020 um 23:01 Uhr schrieb Mark Thompson <sw@jkqxz.net>:
> > >
> > > > FFmpeg has always used pixfmt as defining both the memory layout
> > > > and which bits are used in that (so, for example, ARGB and 0RGB
> > > > are not the same thing)
> > >
> > > But they have the same bitdepth per component...
>
> > Agree with Mark. P012 and P016 have different significant bits, we should use
> > different pixfmts, otherwise an extra field in AVFrame is needed for bit depth.
> >
> > BTW there are the YUV420P variants for 10 / 12 / 14 / 16 bit in FFmpeg, it
> > would be better to follow FFmpeg's style to introduce P012 format instead
> > of reusing P016.

I was under the impression that YUV420P12 is much more different from
YUV420P16 than P012 from P016: Did I misunderstand?
(Reading the thread again, I don't think I did)

> Sorry for picking up this old thread.
>
> We'd like to add the support for 12bit decoding / encoding in VAAPI and QSV.
> Is there any other concern if adding P012 in FFmpeg ?

Did you already explain why you cannot use P016 or in which situation
it would create a different output?

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format
  2022-01-23  0:06           ` Carl Eugen Hoyos
@ 2022-01-26  8:32             ` Xiang, Haihao
  2022-01-26 22:30               ` Carl Eugen Hoyos
  0 siblings, 1 reply; 4+ messages in thread
From: Xiang, Haihao @ 2022-01-26  8:32 UTC (permalink / raw)
  To: ffmpeg-devel

On Sun, 2022-01-23 at 01:06 +0100, Carl Eugen Hoyos wrote:
> Am Fr., 21. Jan. 2022 um 06:56 Uhr schrieb Xiang, Haihao
> <haihao.xiang-at-intel.com@ffmpeg.org>:
> > 
> > > -----Original Message-----
> > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Xiang,
> > > Haihao
> > > Sent: Tuesday, June 30, 2020 15:34
> > > To: ffmpeg-devel@ffmpeg.org
> > > Subject: Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel
> > > format
> > > 
> > > > Am So., 28. Juni 2020 um 23:01 Uhr schrieb Mark Thompson <sw@jkqxz.net>:
> > > > 
> > > > > FFmpeg has always used pixfmt as defining both the memory layout
> > > > > and which bits are used in that (so, for example, ARGB and 0RGB
> > > > > are not the same thing)
> > > > 
> > > > But they have the same bitdepth per component...
> > > Agree with Mark. P012 and P016 have different significant bits, we should
> > > use
> > > different pixfmts, otherwise an extra field in AVFrame is needed for bit
> > > depth.
> > > 
> > > BTW there are the YUV420P variants for 10 / 12 / 14 / 16 bit in FFmpeg, it
> > > would be better to follow FFmpeg's style to introduce P012 format instead
> > > of reusing P016.
> 
> I was under the impression that YUV420P12 is much more different from
> YUV420P16 than P012 from P016: Did I misunderstand?
> (Reading the thread again, I don't think I did)

I understand YUV420P12 is a LSB format, so YUV420P12 can't be taken
as YUV420P16. The style here means FFmpeg uses pixfmt for both memory layout and
bit depth. 

> 
> > Sorry for picking up this old thread.
> > 
> > We'd like to add the support for 12bit decoding / encoding in VAAPI and QSV.
> > Is there any other concern if adding P012 in FFmpeg ?
> 
> Did you already explain why you cannot use P016 or in which situation
> it would create a different output?

$ ffmpeg -hwaccel vaapi -f rawvideo -pix_fmt p016 -s 1920x1080 -i input.yuv -vf
"hwupload,format=vaapi" -c:v hevc_vaapi -f null -

If using P016, how will we know the input is 12bit indeed, not 14/16bit if
hevc_vaapi may support both 12bit and 14/16bit inputs in the future ? Will we
add a new option to ffmpeg to specify the bit depth and a new flag in AVFrame ?

Thanks
Haihao

> 
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format
  2022-01-26  8:32             ` Xiang, Haihao
@ 2022-01-26 22:30               ` Carl Eugen Hoyos
  0 siblings, 0 replies; 4+ messages in thread
From: Carl Eugen Hoyos @ 2022-01-26 22:30 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Am Mi., 26. Jan. 2022 um 09:33 Uhr schrieb Xiang, Haihao
<haihao.xiang-at-intel.com@ffmpeg.org>:

> > Did you already explain why you cannot use P016 or in which situation
> > it would create a different output?
>
> $ ffmpeg -hwaccel vaapi -f rawvideo -pix_fmt p016 -s 1920x1080 -i input.yuv
> -vf "hwupload,format=vaapi" -c:v hevc_vaapi -f null -
>
> If using P016, how will we know the input is 12bit indeed

Thank you for explaining this, at least I didn't realize this reason earlier!

I hope we can find another solution than to add an additional pix_fmt.
I believe I had suggested an additional property bit_depth for raw video
a long time ago.

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-26 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200619015248.21873-1-fei.w.wang@intel.com>
     [not found] ` <CA+anqdyoVCxv+cbq3Jv3b12sNzPTV4Q97x48LfFzRUy+3Sko0A@mail.gmail.com>
     [not found]   ` <3655b2de-b1b4-7bd6-6b5d-40fd7e1022a3@jkqxz.net>
     [not found]     ` <CAB0OVGoUrUORFimsZ65a6qExHWtsLwvYtTJM5DoFxWaQ4U9F_w@mail.gmail.com>
     [not found]       ` <3c400dee9fc251dd1c35864952ead7c91d90bee5.camel@intel.com>
2022-01-21  5:56         ` [FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format Xiang, Haihao
2022-01-23  0:06           ` Carl Eugen Hoyos
2022-01-26  8:32             ` Xiang, Haihao
2022-01-26 22:30               ` Carl Eugen Hoyos

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git