media/filters/VP9Parser: Fix underflow for q_index

FeatureData[segment_id][SEG_LVL_ALT_Q] can be negative. Therefore, base_q_idx +
FeatureData[segment_id][SEG_LVL_ALT_Q] can be less than 0. The original VP9
parser code stores the value in size_t. It leads underflow of size_t and then
ClampQ returns 255. It should return 0 for the negative value.

Bug: 915498
Test: No wrong video frame for some issue video on eve
Change-Id: I6cfecc19aeeef60f246ffab5d6bf5f8420d1cd1b
Reviewed-on: https://chromium-review.googlesource.com/c/1424682
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625017}
2 files changed