All of lore.kernel.org
 help / color / mirror / Atom feed
* HEIC encoder/decoder
@ 2020-12-09 23:10 Stanimir Varbanov
  2020-12-10  9:19 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Stanimir Varbanov @ 2020-12-09 23:10 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Hans Verkuil, Nicolas Dufresne

Hello,

I have to implement HEIC image encoder (and later decoder) in Venus
driver and I wonder how to distinguish image vs video encoding using
HEVC and possibly AVC codecs.

I could imagine those two options:

* introduce a new compressed format V4L2_PIX_FMT_HEVC_IMAGE and reuse
video encoder as of now, or

* make a separate video node which supports HEVC with profiles Main
Still Picture and Main 10 Still picture only. The problem here is that
AVC doesn't provide profiles for still pictures, and in this case the
driver cannot distinguish what the client wants video or image
encoding/decoding.

It is a bit more complicated but I'd like to receive comments / ideas at
what would be the best way.

-- 
regards,
Stan

[1] https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
[2] https://source.android.com/devices/camera/heif

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

* Re: HEIC encoder/decoder
  2020-12-09 23:10 HEIC encoder/decoder Stanimir Varbanov
@ 2020-12-10  9:19 ` Hans Verkuil
  2020-12-15 15:10   ` Stanimir Varbanov
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2020-12-10  9:19 UTC (permalink / raw)
  To: Stanimir Varbanov, Linux Media Mailing List; +Cc: Nicolas Dufresne

On 10/12/2020 00:10, Stanimir Varbanov wrote:
> Hello,
> 
> I have to implement HEIC image encoder (and later decoder) in Venus
> driver and I wonder how to distinguish image vs video encoding using
> HEVC and possibly AVC codecs.
> 
> I could imagine those two options:
> 
> * introduce a new compressed format V4L2_PIX_FMT_HEVC_IMAGE and reuse
> video encoder as of now, or

This option seems to be the correct one. It is also in line with how JPEG
is used.

I wonder if it should be called V4L2_PIX_FMT_HEIC instead, but it's not
entirely clear to me from the wikipedia page what that makes sense or not.

> 
> * make a separate video node which supports HEVC with profiles Main
> Still Picture and Main 10 Still picture only. The problem here is that
> AVC doesn't provide profiles for still pictures, and in this case the
> driver cannot distinguish what the client wants video or image
> encoding/decoding.

That's too messy. A separate pixel format for still images works well.
There is a huge difference between HEVC and HEIC since with HEIC each
frame (like JPEG) is independently encoded/decoded, so the driver behaves
differently. It makes perfect sense to use a separate pixel format for this.

Regards,

	Hans

> 
> It is a bit more complicated but I'd like to receive comments / ideas at
> what would be the best way.
> 


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

* Re: HEIC encoder/decoder
  2020-12-10  9:19 ` Hans Verkuil
@ 2020-12-15 15:10   ` Stanimir Varbanov
  0 siblings, 0 replies; 3+ messages in thread
From: Stanimir Varbanov @ 2020-12-15 15:10 UTC (permalink / raw)
  To: Hans Verkuil, Linux Media Mailing List; +Cc: Nicolas Dufresne

Hi Hans,

Thanks for comments!

On 12/10/20 11:19 AM, Hans Verkuil wrote:
> On 10/12/2020 00:10, Stanimir Varbanov wrote:
>> Hello,
>>
>> I have to implement HEIC image encoder (and later decoder) in Venus
>> driver and I wonder how to distinguish image vs video encoding using
>> HEVC and possibly AVC codecs.
>>
>> I could imagine those two options:
>>
>> * introduce a new compressed format V4L2_PIX_FMT_HEVC_IMAGE and reuse
>> video encoder as of now, or
> 
> This option seems to be the correct one. It is also in line with how JPEG
> is used.
> 
> I wonder if it should be called V4L2_PIX_FMT_HEIC instead, but it's not
> entirely clear to me from the wikipedia page what that makes sense or not.

This option is preferable to me as well.

I'm going to send an RFC for that and we can continue the duscussion on
the subject.

> 
>>
>> * make a separate video node which supports HEVC with profiles Main
>> Still Picture and Main 10 Still picture only. The problem here is that
>> AVC doesn't provide profiles for still pictures, and in this case the
>> driver cannot distinguish what the client wants video or image
>> encoding/decoding.
> 
> That's too messy. A separate pixel format for still images works well.
> There is a huge difference between HEVC and HEIC since with HEIC each
> frame (like JPEG) is independently encoded/decoded, so the driver behaves
> differently. It makes perfect sense to use a separate pixel format for this.
> 
> Regards,
> 
> 	Hans
> 
>>
>> It is a bit more complicated but I'd like to receive comments / ideas at
>> what would be the best way.
>>
> 

-- 
regards,
Stan

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

end of thread, other threads:[~2020-12-15 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 23:10 HEIC encoder/decoder Stanimir Varbanov
2020-12-10  9:19 ` Hans Verkuil
2020-12-15 15:10   ` Stanimir Varbanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.