CHROMIUM: [media] rk3288-vpu: Preserve picture positions in H264 DPB lists
authorTomasz Figa <tfiga@chromium.org>
Tue, 31 Mar 2015 13:40:03 +0000 (22:40 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 30 Jun 2016 11:54:13 +0000 (19:54 +0800)
commit0f090e2b2b94a70516a58bc9f87a8cef54ffd734
tree7fbdb5bbce0d93a3e5bebc5dc2b197c3543f0122
parentb0ac756a6c36b001ad0c0360d62071945a9b56f1
CHROMIUM: [media] rk3288-vpu: Preserve picture positions in H264 DPB lists

Even though H264 standard allows arbitrary order of DPB entries, the
hardware requires picture with given POC to use the same DPB entry for
its whole lifetime. This means that the driver needs to reorder DPB
array to suit this requirement.

This patch modifies the driver to reorder H264 DPB and should fix
corruption issues when DPB array received from userspace does not meet
hardware requirements.

BUG=chrome-os-partner:38416
TEST=http://www.youtube.com/embed/YE7VzlLtp-4

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/263370
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ibbd0e2bc4e527aadd21ef08ec68866678bf8a659
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
drivers/media/platform/rk3288-vpu/rk3288_vpu_common.h
drivers/media/platform/rk3288-vpu/rk3288_vpu_dec.c
drivers/media/platform/rk3288-vpu/rk3288_vpu_hw_h264d.c