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 719693 - encoder: h264: expose more coding tools
encoder: h264: expose more coding tools
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Wind Yuan
gstreamer-vaapi maintainer(s)
Depends on: 719529
Blocks: 719412 719694
 
 
Reported: 2013-12-02 16:03 UTC by Gwenole Beauchesne
Modified: 2014-01-13 16:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0002-encoder-h264-expose-cabac-dct8x8 (7.32 KB, patch)
2013-12-13 09:53 UTC, Wind Yuan
none Details | Review
0002-encoder-h264-expose-cabac-dct8x8 (7.37 KB, patch)
2013-12-24 08:36 UTC, Wind Yuan
none Details | Review

Description Gwenole Beauchesne 2013-12-02 16:03:07 UTC
In view to precisely expose (and test) key features of the H.264 encoder, the following properties could be added:
- "cabac": enable CABAC entropy coding (default: FALSE) ;
- "dct8x8": enable spatial transform 8x8 (default: FALSE).

Note:
- If "cabac" is set to TRUE, the profile is inferred to be Main ;
- If "dct8x8" is set to TRUE, the profile is inferred to be High.
Comment 1 Wind Yuan 2013-12-13 04:36:06 UTC
I'll take look of this bug.
Comment 2 Wind Yuan 2013-12-13 09:53:26 UTC
Created attachment 264128 [details] [review]
0002-encoder-h264-expose-cabac-dct8x8

patch attached. please review.

this patch depends on 
https://bugzilla.gnome.org/attachment.cgi?id=264048
bug https://bugzilla.gnome.org/show_bug.cgi?id=719827
Comment 3 Gwenole Beauchesne 2013-12-20 09:03:49 UTC
Review of attachment 264128 [details] [review]:

Overall, looks OK but for the public interface.

::: gst-libs/gst/vaapi/gstvaapiencoder_h264.h
@@ +51,3 @@
+gboolean
+gst_vaapi_encoder_h264_get_dct8x8_mode (GstVaapiEncoderH264 * encoder);
+

Please see bug #719529. That's why single approach through gst_vaapi_encoder_h264_{get,set}_params is simpler. :)
Comment 4 Wind Yuan 2013-12-23 08:01:51 UTC
(In reply to comment #3)
> Review of attachment 264128 [details] [review]:
> 
> Overall, looks OK but for the public interface.
> 
> ::: gst-libs/gst/vaapi/gstvaapiencoder_h264.h
> @@ +51,3 @@
> +gboolean
> +gst_vaapi_encoder_h264_get_dct8x8_mode (GstVaapiEncoderH264 * encoder);
> +
> 
> Please see bug #719529. That's why single approach through
> gst_vaapi_encoder_h264_{get,set}_params is simpler. :)

I think {get,set}_params should be fix in #719529 with other params together. not in this bug.
Comment 5 Wind Yuan 2013-12-24 08:36:09 UTC
Created attachment 264831 [details] [review]
0002-encoder-h264-expose-cabac-dct8x8

update patch since depends on https://bugzilla.gnome.org/review?bug=719827&attachment=264830
Comment 6 Gwenole Beauchesne 2014-01-11 10:21:41 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Review of attachment 264128 [details] [review] [details]:
> > 
> > Overall, looks OK but for the public interface.
> > 
> > ::: gst-libs/gst/vaapi/gstvaapiencoder_h264.h
> > @@ +51,3 @@
> > +gboolean
> > +gst_vaapi_encoder_h264_get_dct8x8_mode (GstVaapiEncoderH264 * encoder);
> > +
> > 
> > Please see bug #719529. That's why single approach through
> > gst_vaapi_encoder_h264_{get,set}_params is simpler. :)
> 
> I think {get,set}_params should be fix in #719529 with other params together.
> not in this bug.

Yes, that's why this bug was marked as depending on bug #719529. I did not mean to have public interfaces for dct8x8 and cabac, except through the params mechanism. Despite that the patch looks OK. Edited to fit newer tree.
Comment 7 Wind Yuan 2014-01-13 04:24:17 UTC
ok, I'll update when you fixed  bug #719529
Comment 8 Gwenole Beauchesne 2014-01-13 06:34:57 UTC
Wind, could you please check with the driver team why "dct8x8" = TRUE has no influence on the compression ratio? Do we need to do something else at the middleware level but setting transform_8x8_mode_flag to 1?
Comment 9 Wind Yuan 2014-01-13 07:50:44 UTC
(In reply to comment #8)
> Wind, could you please check with the driver team why "dct8x8" = TRUE has no
> influence on the compression ratio? Do we need to do something else at the
> middleware level but setting transform_8x8_mode_flag to 1?
Hi Gwenole, just checked with Haihao. There's very little influence of dct8x8 for coding. and compare from spec. it only affect I_NXN and when transform_size_8x8_flag equal to 1. QA also said MediaSDK doesn't have an option for dct8x8, maybe the same reason.
Comment 10 Gwenole Beauchesne 2014-01-13 16:39:32 UTC
commit 8df97cf9ec600d8920de43dbaa75be940c669f05
Author: Wind Yuan <feng.yuan@intel.com>
Date:   Fri Dec 13 17:36:08 2013 +0800

    encoder: h264: expose more coding tools.
    
    Add new H.264 coding tools to improve compression:
    - "cabac": enable CABAC entropy coding (default: FALSE);
    - "dct8x8": enable spatial transform 8x8 (default: FALSE).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719693
    
    Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>