h264bitwriter: Correct the all API to byte aligned.
authorHe Junyan <junyan.he@intel.com>
Thu, 27 Oct 2022 05:42:17 +0000 (13:42 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 27 Oct 2022 12:15:43 +0000 (12:15 +0000)
commitc294ba82e65fb9995e9072aa020bc93d95c4597e
treedffbbcadd0a7c296328575ff325c28b0b4d8aecd
parent9dc76185fc0017b8e225ec242de4548baac103fa
h264bitwriter: Correct the all API to byte aligned.

In fact, all the h264 bit writer have byte aligned output except
the slice header. So we change the API from bit size in unit to
byte size, which is easy to use. For slice header, we add a extra
"trail_bits_num" to return the unaligned bits number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.c
subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.h
subprojects/gst-plugins-bad/sys/va/gstvah264enc.c
subprojects/gst-plugins-bad/tests/check/libs/h264bitwriter.c