After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665034 - 10-Bit H.264 support
10-Bit H.264 support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-28 12:34 UTC by Dmitrij Rebrov
Modified: 2012-05-28 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Comment 1 Tim-Philipp Müller 2011-11-28 13:07:09 UTC
We don't do codecs, we just wrap other projects' codecs. You'll have to ask the libav folks to add support for this.

The only thing we can fix on our end is the confusing/wrong error message.
Comment 2 Dmitrij Rebrov 2011-11-28 13:34:58 UTC
Thanks, ill do that.
Comment 3 Dmitrij Rebrov 2011-11-28 17:58:36 UTC
Ok, i submitted bug to them:
http://bugzilla.libav.org/show_bug.cgi?id=104
And got answer:

"We already support it. GStreamer likely needs to handle PIX_FMT_YUV420P10."
Comment 4 Calvin Walton 2012-02-06 16:09:06 UTC
As the version of libav bundled with gst-ffmpeg already has a 10bit decoder, it looks like two things need to be added to gst-ffmpeg to get this to work:
First, as mentioned in comment 3, support for the YUV420P10 pixel format as a gstreamer capability/format, and the mapping from libav's internal definition to this gstreamer definition. (The error that you get when attempting to play back a 10bit file right now implies that libav can decode the format, but can't map the pixel format to gstreamer.)
Second, an image format converter from YUV420P10 to other formats, e.g. YV12. Versions of libav with 10bit h264 support also include this converter in their libswscale.
Comment 5 Dmitrij Rebrov 2012-04-07 07:30:49 UTC
So, any plans to add fixes to git?
These day there is a lot videos coded in 10bit.
Comment 6 Wim Taymans 2012-05-25 15:05:11 UTC
commit 59d8d73aa206ab01f6e85de3570ede7815eab840
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri May 25 16:58:50 2012 +0200

    video: add 10 bits I420 format
    
    Add 10 bits I420 format definitions
    Move encoded format as second entry in the array so that it doesn't end up in a
    weird place when we add formats.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=665034

commit e38b00489fc4934736ffb30e37ea4437bc89960b
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri May 25 17:03:06 2012 +0200

    libav: add support for 10 bits I420
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=665034

Next it needs support in videoconvert and also in videotestsrc.
Comment 7 Dmitrij Rebrov 2012-05-25 16:32:01 UTC
Thanks for your work.
Is it long to do?

(In reply to comment #6)
> ...Next it needs support in videoconvert and also in videotestsrc.
Comment 8 Wim Taymans 2012-05-25 18:02:45 UTC
(In reply to comment #7)
> Thanks for your work.
> Is it long to do?
> 
No it's not so much, I can do it on monday. It simply needs a getline and putline implementation in videoconvert.c

> (In reply to comment #6)
> > ...Next it needs support in videoconvert and also in videotestsrc.
Comment 9 宋文武 2012-05-26 07:32:40 UTC
(In reply to comment #6)
> commit 59d8d73aa206ab01f6e85de3570ede7815eab840
> Author: Wim Taymans <wim.taymans@collabora.co.uk>
> Date:   Fri May 25 16:58:50 2012 +0200
> 
>     video: add 10 bits I420 format
> 
>     Add 10 bits I420 format definitions
>     Move encoded format as second entry in the array so that it doesn't end up
> in a
>     weird place when we add formats.
> 
>     See https://bugzilla.gnome.org/show_bug.cgi?id=665034
> 
> commit e38b00489fc4934736ffb30e37ea4437bc89960b
> Author: Wim Taymans <wim.taymans@collabora.co.uk>
> Date:   Fri May 25 17:03:06 2012 +0200
> 
>     libav: add support for 10 bits I420
> 
>     See https://bugzilla.gnome.org/show_bug.cgi?id=665034
> 
> Next it needs support in videoconvert and also in videotestsrc.
Does not PIX_FMT_YUV420P10 in libav is like NV12 with 10-bit depth?

See also:
http://patches.libav.org/patch/12860/
http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578(v=vs.85).aspx#_420formats
Comment 10 Wim Taymans 2012-05-28 10:59:07 UTC
(In reply to comment #9)
> Does not PIX_FMT_YUV420P10 in libav is like NV12 with 10-bit depth?

No, it's more like I420 with 10 bit depth, it has the U and V in different planes.

> 
> See also:
> http://patches.libav.org/patch/12860/
> http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578(v=vs.85).aspx#_420formats

The P010 from microsoft is like NV12 with 10 bits.
Comment 11 Wim Taymans 2012-05-28 11:01:25 UTC
commit d2a1613a43866f64f36aaa196553d70be5cc492f
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Mon May 28 12:50:49 2012 +0200

    videoconvert: add support for 10bit I420
    
    Add support for 10bit I420
    Reorganize some macros, have separate plane and component macros, fix
    a problem with YV12 in the process.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=665034
Comment 12 宋文武 2012-05-28 12:41:16 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Does not PIX_FMT_YUV420P10 in libav is like NV12 with 10-bit depth?
> 
> No, it's more like I420 with 10 bit depth, it has the U and V in different
> planes.
> 
> > 
> > See also:
> > http://patches.libav.org/patch/12860/
> > http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578(v=vs.85).aspx#_420formats
> 
> The P010 from microsoft is like NV12 with 10 bits.

Sorry for bothering you, this is what confuse me early.

Finally we can handle hi10p with gstreamer, thanks!