Commit f977f754 authored by Sreerenj Balachandran's avatar Sreerenj Balachandran Committed by Commit Bot

media/vp9_parser: extend frame_hdr with loop_filter and segmentation

Current implementation of vp9 parser keeps the
segmentation and loop_filter headers as members of the
the FrameContext. This patch is for extending the frame_hdr
to include a copy of segmentation and loop_filter so that
all uncompressed header parameters can be direcly accessible
from the frame_hdr. The main intention is to help the
components like VEA to depend only on frame_hdr to populate
all required parameters in the uncompressed header to va api.

Note: The segmentation and loop_filter associated with the
Vp9FrameContextManager is possessing the calculated values, not
just the parsed bitstream parameters. If the client has to
parse the compressed header (which is not required for h/w
accelerated decoder and encoder implementation),
segmentation and loop_filter in context get updated based on
the dequants([1] section 8.6.1) and loop_filter frame init process ([1] 8.8.1).
[1] https://tools.ietf.org/html/rfc6386

Bug=chromium:924786

Change-Id: I9f1cdcbc93fd3afb21be731dd8e0bd252b773231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531024Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarMatthew Wolenetz <wolenetz@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660319}
parent 03020c9c
......@@ -260,6 +260,10 @@ struct MEDIA_EXPORT Vp9FrameHeader {
Vp9FrameContext initial_frame_context;
// Current frame entropy context after header parsing.
Vp9FrameContext frame_context;
// Segmentation and loop filter params from uncompressed header
Vp9SegmentationParams segmentation;
Vp9LoopFilterParams loop_filter;
};
// A parser for VP9 bitstream.
......
......@@ -1083,10 +1083,13 @@ bool Vp9UncompressedHeaderParser::Parse(const uint8_t* stream,
}
ReadLoopFilterParams();
// Update loop_filter in current_frame_hdr
fhdr->loop_filter = context_->loop_filter_;
ReadQuantizationParams(&fhdr->quant_params);
if (!ReadSegmentationParams())
return false;
// Update segmentation in current_frame_hdr
fhdr->segmentation = context_->segmentation_;
if (!ReadTileInfo(fhdr))
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment