[media] Scale |natural_size| to match |visible_rect| for HW decoders.
For some media, the container's |natural_size| is actually just an aspect ratio, and therefore we should not use it directly as the VideoFrame's |natural_size|. Instead it should be scaled based on the |visible_rect| of the decoded frame. FFmpegVideoDecoder already does this, this CL applies the same logic in GpuVideoDecoder and VdaVideoDecoder. Note: This change will make it possible for HW decoders to emit frames of different sizes without a config change, which was not possible before. Bug: 766657 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I7b263245c401c845bca30fa0683eb3e337ed6f81 Reviewed-on: https://chromium-review.googlesource.com/1022968 Commit-Queue: Dan Sanders <sandersd@chromium.org> Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#553384}
Showing
Please register or sign in to comment