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 594165 - [theoraenc] Implement support for new formats
[theoraenc] Implement support for new formats
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-04 19:53 UTC by Benjamin Otte (Company)
Modified: 2009-09-09 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
theora: Add assertions that functions don't fail (1.36 KB, patch)
2009-09-04 19:54 UTC, Benjamin Otte (Company)
committed Details | Review
theora: Split out buffer resize in its own function (9.26 KB, patch)
2009-09-04 19:56 UTC, Benjamin Otte (Company)
committed Details | Review
theora: Split yuv_buffer creation into its own function (2.02 KB, patch)
2009-09-04 19:56 UTC, Benjamin Otte (Company)
committed Details | Review
theora: Refactor the buffer copy code (6.35 KB, patch)
2009-09-04 19:56 UTC, Benjamin Otte (Company)
committed Details | Review
theora: Implement support in theoraenc for Y444 and Y42B (6.62 KB, patch)
2009-09-04 19:57 UTC, Benjamin Otte (Company)
committed Details | Review
theora: Check supported input formats in getcaps function (3.44 KB, patch)
2009-09-07 15:33 UTC, Benjamin Otte (Company)
committed Details | Review

Description Benjamin Otte (Company) 2009-09-04 19:53:12 UTC
The new upcoming release of Theora will support the Y444 and Y42B formats in addition to I420. The attached patches implement this.

The only thing they don't do yet is restrict the advertised sinkcaps when an older libtheora is used. I wasn't sure if this should be solved by using a different template caps or by using a getcaps function.
Comment 1 Benjamin Otte (Company) 2009-09-04 19:54:35 UTC
Created attachment 142495 [details] [review]
theora: Add assertions that functions don't fail

Some functions in libtheora can return an error, but that error cannot
ever happen inside theoraenc. In those cases assert that it doesn't.
Comment 2 Benjamin Otte (Company) 2009-09-04 19:56:48 UTC
Created attachment 142497 [details] [review]
theora: Split out buffer resize in its own function
Comment 3 Benjamin Otte (Company) 2009-09-04 19:56:52 UTC
Created attachment 142498 [details] [review]
theora: Split yuv_buffer creation into its own function
Comment 4 Benjamin Otte (Company) 2009-09-04 19:56:56 UTC
Created attachment 142499 [details] [review]
theora: Refactor the buffer copy code
Comment 5 Benjamin Otte (Company) 2009-09-04 19:57:00 UTC
Created attachment 142500 [details] [review]
theora: Implement support in theoraenc for Y444 and Y42B
Comment 6 Benjamin Otte (Company) 2009-09-07 15:33:06 UTC
Created attachment 142629 [details] [review]
theora: Check supported input formats in getcaps function

We want to fail early when an older libtheora release is used that does
not support Y444 or Y42B formats, so use a getcaps function that does
this.
Comment 7 Benjamin Otte (Company) 2009-09-07 15:35:58 UTC
Tim suggested using gstvideo functions for computing component strides and sizes. However, the theora code uses slightly different formulas in some places - most noticably component height where it doesn't round up. This changes the visible output when encoding with odd width or height, so I decided to not do that.
Comment 8 Sebastian Dröge (slomo) 2009-09-09 14:47:30 UTC
Thanks for splitting the changes into many small chunks, this made reviewing really easy and fast :)

commit d9c98527640e007c8ac04696a028555dd7df279c
Author: Benjamin Otte <otte@gnome.org>
Date:   Mon Sep 7 17:29:38 2009 +0200

    theora: Check supported input formats in getcaps function
    
    We want to fail early when an older libtheora release is used that does
    not support Y444 or Y42B formats, so use a getcaps function that does
    this.

commit aa46e56170b58a3cd9936ef14b824b4ee11a63f2
Author: Benjamin Otte <otte@gnome.org>
Date:   Fri Sep 4 21:37:04 2009 +0200

    theora: Implement support in theoraenc for Y444 and Y42B
    
    Fixes bug #594165.

commit 96388221cf8fc56072731f034e9a1c8ff1c01c0e
Author: Benjamin Otte <otte@gnome.org>
Date:   Fri Sep 4 20:23:52 2009 +0200

    theora: Refactor the buffer copy code

commit bac05fbf6f07cc645e730d4fae8f9c3ae6a01e82
Author: Benjamin Otte <otte@gnome.org>
Date:   Fri Sep 4 16:59:49 2009 +0200

    theora: Split yuv_buffer creation into its own function

commit c1ead16f710378bdcf3829dd5baedb560cc8a350
Author: Benjamin Otte <otte@gnome.org>
Date:   Fri Sep 4 16:49:08 2009 +0200

    theora: Split out buffer resize in its own function

commit 9d4f72f2faca7ee4793870e52d62d99a87b47f36
Author: Benjamin Otte <otte@gnome.org>
Date:   Fri Sep 4 14:06:09 2009 +0200

    theora: Add assertions that functions don't fail
    
    Some functions in libtheora can return an error, but that error cannot
    ever happen inside theoraenc. In those cases assert that it doesn't.