v4l2_stateful_decoder: Separate BitfieldStream code

This moves the BitfieldStream definition and implementation to new
files and removes dependences on global state through use of an instance
structure. This improves reusability.

BUG=b:227248846
TEST=tast run ${DUT} video.PlatformDecoding.v4l2_h264*

Change-Id: Ib6e7e28151711539fcadec2821d1f345ac3388c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/3566875
Tested-by: Nathan Hebert <nhebert@chromium.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Nathan Hebert <nhebert@chromium.org>
4 files changed