Issue 1642 in webm: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller

757 views
Skip to first unread message

linjie.j… via monorail

unread,
Aug 12, 2019, 3:27:48 AM8/12/19
to webm-d...@webmproject.org
Status: Untriaged
Owner: ----
Labels: Type-Bug Pri-2
Components: libvpx

New issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642

I'm trying to enable multi-resolution encoding support for libvpxenc in ffmpeg.
Some issure occurs when it comes to resolution changing from small to large.

1. I'm trying to use vpx_codec_enc_config_set to set mew width/height for encoder

Patch could be accessed here:
https://github.com/fulinjie/ffmpeg/commit/9df64d2d567345dbc48d0708a56d7df0a82f4501

It works for resolution changes from large to small, however, when the situation comes to changing from small to large, some issues may happen.
Assumes that there is one case that resolution changes from 495x168 to 328x307, the total size is enlarged but the col size becomes smaller.

In vp9_change_config, (cm->mi_alloc_size < new_mi_size) is met so the context buf is freed:
https://chromium.googlesource.com/webm/libvpx/+/refs/heads/master/vp9/encoder/vp9_encoder.c#2022

However, when it tried to alloc new context buf in alloc_compressor_data(), (cm->above_context_alloc_cols < cm->mi_cols) is not met
since 495 is large that 328. So cm->above_context won't be allocated and leads to a failure.
https://chromium.googlesource.com/webm/libvpx/+/refs/heads/master/vp9/common/vp9_alloccommon.c#132

And this leads to encoding failure.

Also checked the unit test code in resize_test.cc which is pointed in https://patchwork.ffmpeg.org/patch/14162/,
width/height are changed all together, so above cases are not tested.

[error message]:

[graph 0 input from stream 0:0 @ 0x721940] w:495 h:168 pixfmt:p010le tb:1/1000 fr:1000/1 sar:0/1 sws_param:flags=2
Incompatible pixel format 'p010le' for codec 'libvpx-vp9', auto-selecting format 'yuv420p'
[auto_scaler_0 @ 0x7248c0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x7260c0] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 0x7248c0] w:495 h:168 fmt:p010le sar:0/1 -> w:495 h:168 fmt:yuv420p sar:0/1 flags:0x4
[libvpx-vp9 @ 0x6a0f40] v1.8.0-649-ge46820c
[libvpx-vp9 @ 0x6a0f40] --prefix=/opt/X11R7/libvpx --enable-shared --enable-debug --disable-examples
Output #0, ivf, to 'out.ivf':
Metadata:
encoder : Lavf58.30.100
Stream #0:0: Video: vp9 (libvpx-vp9), 1 reference frame (VP90 / 0x30395056), yuv420p, 495x168, q=-1--1, 200 kb/s, 1k fps, 1k tbn, 1k tbc
Metadata:
encoder : Lavc58.55.100 libvpx-vp9
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[New Thread 0x7fffbfb5d700 (LWP 26728)]
Automatically inserted bitstream filter 'vp9_superframe'; args=''
[Thread 0x7fffc07f8700 (LWP 26727) exited]
[Thread 0x7fffc0ff9700 (LWP 26726) exited]
[Thread 0x7fffc17fa700 (LWP 26725) exited]
[Thread 0x7fffc1ffb700 (LWP 26724) exited]
[Thread 0x7fffc27fc700 (LWP 26723) exited]
[Thread 0x7fffc2ffd700 (LWP 26722) exited]
[Thread 0x7fffc37fe700 (LWP 26721) exited]
[Thread 0x7fffc3fff700 (LWP 26720) exited]
[New Thread 0x7fffc07f8700 (LWP 26729)]
[New Thread 0x7fffc0ff9700 (LWP 26730)]
[New Thread 0x7fffc17fa700 (LWP 26731)]
[New Thread 0x7fffc1ffb700 (LWP 26732)]
[New Thread 0x7fffc3fff700 (LWP 26733)]
[New Thread 0x7fffc37fe700 (LWP 26734)]
[New Thread 0x7fffc2ffd700 (LWP 26735)]
[New Thread 0x7fffc27fc700 (LWP 26736)]
[graph 0 input from stream 0:0 @ 0x7374c0] w:328 h:307 pixfmt:p010le tb:1/1000 fr:1000/1 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x738580] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x735e80] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 0x738580] w:328 h:307 fmt:p010le sar:0/1 -> w:328 h:307 fmt:yuv420p sar:0/1 flags:0x4
Thread 1 "ffmpeg_g" received signal SIGSEGV, Segmentation fault.

#0 __memset_avx2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:186
#1 0x00007ffff2d55bd6 in init_encode_frame_mb_context (cpi=0x7fffe83ee020) at ../vp9/encoder/vp9_encodeframe.c:4520
#2 encode_frame_internal (cpi=cpi@entry=0x7fffe83ee020) at ../vp9/encoder/vp9_encodeframe.c:5993
#3 0x00007ffff2d56659 in vp9_encode_frame (cpi=cpi@entry=0x7fffe83ee020) at ../vp9/encoder/vp9_encodeframe.c:6228
#4 0x00007ffff2d8c06e in encode_without_recode_loop (dest=0x14ab810 "", size=0x7fffffffc8e8, cpi=0x7fffe83ee020) at ../vp9/encoder/vp9_encoder.c:4047
#5 encode_frame_to_data_rate (cpi=cpi@entry=0x7fffe83ee020, size=size@entry=0x7fffffffc8e8, dest=dest@entry=0x14ab810 "", frame_flags=frame_flags@entry=0x7fffffffc8c4)
at ../vp9/encoder/vp9_encoder.c:5094
#6 0x00007ffff2d9078b in Pass0Encode (frame_flags=<optimized out>, dest=<optimized out>, size=<optimized out>, cpi=<optimized out>) at ../vp9/encoder/vp9_encoder.c:5296
#7 vp9_get_compressed_data (cpi=cpi@entry=0x7fffe83ee020, frame_flags=frame_flags@entry=0x7fffffffc8c4, size=size@entry=0x7fffffffc8e8, dest=dest@entry=0x14ab810 "",
time_stamp=time_stamp@entry=0x7fffffffc8d8, time_end=time_end@entry=0x7fffffffc8e0, flush=0) at ../vp9/encoder/vp9_encoder.c:7459
#8 0x00007ffff2d13505 in encoder_encode (ctx=0x76bfb0, img=0x6a1440, pts_val=<optimized out>, duration=1, enc_flags=<optimized out>, deadline=<optimized out>) at ../vp9/vp9_cx_iface.c:1227
#9 0x00007ffff2c05d27 in vpx_codec_encode (ctx=0x6a1408, img=0x6a1440, pts=4, duration=1, flags=0, deadline=<optimized out>) at ../vpx/src/vpx_encoder.c:215


What version are you using? On what operating system?

- mainline version of libvpx, commit id:e46820c693d0dc01685841cfc704c16dbac48e80
- ubuntu

Can you reproduce using the vpxdec or vpxenc tools? What command line are
you using?

It's a transcode pipeline, is it possible to make use of either of these two tools to realize?

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

jz… via monorail

unread,
Aug 12, 2019, 5:25:36 PM8/12/19
to webm-d...@webmproject.org
Updates:
Cc: mar...@google.com
Owner: ji...@google.com
Status: Assigned

Comment #1 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c1

(No comment was entered for this change.)

linjie.j… via monorail

unread,
Aug 13, 2019, 5:16:24 AM8/13/19
to webm-d...@webmproject.org

Comment #2 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c2

2. Since alloc_compressor_data() will be called in vp9_change_config() if the resolution is enlarged, those already allocated memory would lead to some unexpected memory issue.

For example,
in alloc_compressor_data(),
alloc_context_buffers_ext(cpi) will calloc memory for cpi->mbmi_ext_base even if it hasn't be freed.

Or did I use vpx_codec_enc_config_set in a wrong way?

3. And return value is not checked for some function, such as alloc_context_buffers_ext();

ji… via monorail

unread,
Aug 13, 2019, 2:22:43 PM8/13/19
to webm-d...@webmproject.org
Updates:
Status: Started

Comment #3 on issue 1642 by ji...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c3


(No comment was entered for this change.)

linjie… via monorail

unread,
Aug 19, 2019, 8:47:25 AM8/19/19
to webm-d...@webmproject.org

Comment #4 on issue 1642 by linjie...@intel.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c4

Ping?
Patch in ffmpeg to enable variable resolution encoding for libvpx are blocked by this.

guest271… via monorail

unread,
Aug 25, 2019, 3:24:23 PM8/25/19
to webm-d...@webmproject.org

Comment #5 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c5

If gather the issue correctly it relates to VP8 and VP9 not encoding and rendering correct input width and height https://bugs.chromium.org/p/chromium/issues/detail?id=972470, https://bugs.chromium.org/p/chromium/issues/detail?id=983777?

For example, this code https://plnkr.co/edit/sMA653?p=preview does not render the correct width and height of input video occasionally crashes the tab.

The result of VP8 and VP9 not encoding variable input width and height is that neither codec can be reliably used to translate input width and height to output width and height; h264 or avc1 need to be used if the expected result is the output frames to be identical to input frames.

Attachments:
mediaStreamHTMLVideoSrcObjectArtifactsIncorrectPixelColors.html 1.1 KB

guest271… via monorail

unread,
Aug 25, 2019, 3:27:01 PM8/25/19
to webm-d...@webmproject.org

Comment #6 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c6

When the codec is changes to either VP8 or VP9 at line #184 at https://plnkr.co/edit/Axkb8s?p=preview the incorrect width and height are encoded into the resulting WebM file. See also https://github.com/w3c/mediacapture-record/pull/172.

guest271… via monorail

unread,
Aug 25, 2019, 3:40:13 PM8/25/19
to webm-d...@webmproject.org

Comment #7 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c7

Note ffmpeg -i replacetrack.webm -b:v 2000k -c:v libvpx-vp9 -c:a libopus output.webm (h264 => vp9) outputs the same incorrect result. See also https://gitlab.com/mbunkus/mkvtoolnix/issues/2582.

Attachments:
replacetrack.webm 3.8 MB

guest271… via monorail

unread,
Aug 25, 2019, 3:47:09 PM8/25/19
to webm-d...@webmproject.org

Comment #8 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c8

Interestingly Mozilla Firefox and Nightly do not have this issue when using VP8 or VP9 codecs.

linjie.j… via monorail

unread,
Aug 26, 2019, 6:41:57 AM8/26/19
to webm-d...@webmproject.org

Comment #9 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c9

It's possible to verify in ffmpeg after applying patch 1~3,
and use following cmdline:

ffmpeg -noautoscale -y -i ./replacetrack.webm -pix_fmt yuv420p -c:v libvpx-vp9 output.webm

1.[FFmpeg-devel,v4,1/3] fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale
https://patchwork.ffmpeg.org/patch/14160/

2.[FFmpeg-devel,v3,2/3] fftools/ffmpeg: support variable resolution encode
https://patchwork.ffmpeg.org/patch/14161/

3.[FFmpeg-devel,v2,3/3] lavc/libvpxenc: add dynamic resolution encode support for libvpx
https://patchwork.ffmpeg.org/patch/14162/

With these patches applied, variable resolution encoding is possible(reinit when resolution changes).

And if you replace the 3rd patch with https://patchwork.ffmpeg.org/patch/14481/ (no reinit solution), memory issue could be observed.
(changes for encoder capability should also be applied for both vp8 and vp9:
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_PARAM_CHANGE,)

guest271… via monorail

unread,
Aug 26, 2019, 10:21:00 AM8/26/19
to webm-d...@webmproject.org

Comment #10 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c10

#9 How to apply or include the patches in a FFmpeg build?

linjie.j… via monorail

unread,
Aug 27, 2019, 6:00:25 AM8/27/19
to webm-d...@webmproject.org

Comment #11 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c11

It's convenient for you to clone/build from following repo:
https://github.com/fulinjie/ffmpeg/commit/d0df032c062e5a6315eb5504c9baff5eef02d4e0

guest271… via monorail

unread,
Aug 28, 2019, 12:09:51 AM8/28/19
to webm-d...@webmproject.org

Comment #12 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c12

#11 Used git to fetch the branch pr-libvpx_encode, after getting error message

$ ~/ffmpeg/configure --enable-decoder='vp8,vp9' --enable-libvpx
libvpx enabled but no supported decoders found

Used this https://linuxconfig.org/install-ffmpeg-on-ubuntu-18-04-bionic-beaver-linux code to compile and install then ran the ffmpeg code at #9.

which appeared to end abruptly

frame= 689 fps= 17 q=0.0 size= 1157kB time=00:00:41.59 bitrate= 227.9kbits/s
[matroska,webm @ 0x2aa0bc0] File ended prematurely at pos. 3952014 (0x3c4d8e)
frame= 691 fps= 16 q=0.0 Lsize= 1300kB time=00:00:41.59 bitrate= 256.1kbits/s dup=0 drop=511 speed=0.967x
video:986kB audio:295kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.531218%

The resulting output is the same as VP9 output by MediaRecorder, that is, the output recorded using h264 does not have the same pixel dimensions (width and height of the merged tracks) as the input.

Can you post the resulting WebM video using the code at #9 which outputs the correct resulting width and height at this issue?

How to compile the linked branch correctly?

Attachments:
output2.webm 1.3 MB

bugdroid via monorail

unread,
Aug 28, 2019, 7:41:58 PM8/28/19
to webm-d...@webmproject.org

Comment #13 on issue 1642 by bugdroid: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c13

The following revision refers to this bug:
https://chromium.googlesource.com/webm/libvpx/+/1b6f2e3f99913a2486d1e9d66cf24137e6ee3be2

commit 1b6f2e3f99913a2486d1e9d66cf24137e6ee3be2
Author: Jerome Jiang <ji...@google.com>
Date: Wed Aug 28 18:30:20 2019

Add resize test for smaller width bigger size.

Stack trace is the same as that in the bug.

BUG=webm:1642

Change-Id: I9d88c18a40af8df4a679727620070b13f1606f14

[modify] https://crrev.com/1b6f2e3f99913a2486d1e9d66cf24137e6ee3be2/test/resize_test.cc

linjie.j… via monorail

unread,
Aug 29, 2019, 12:31:55 AM8/29/19
to webm-d...@webmproject.org

Comment #14 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c14


>>The resulting output is the same as VP9 output by MediaRecorder, that is, the output recorded using h264 does not have the same pixel dimensions (width and he
ight of the merged tracks) as the input.

Yes, that's becaues the mainline version ffmpeg would insert an autoscale filter and resize the image to the same size with the first frame.
And that's the main reason for this patch set.


>>Can you post the resulting WebM video using the code at #9 which outputs the correct resulting width and height at this issue?

Sure.
ffmpeg -noautoscale -y -i ./replacetrack.webm -pix_fmt yuv420p -c:v libvpx-vp9 variable_resolution.ivf

variable_resolution.ivf is attached.


>>How to compile the linked branch correctly?

Guides for build ffmpeg on Ubuntu:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

If there is no dependency issue, configure and build will be quite straight forward.

Attachments:
variable_resolution.ivf 1023 KB

linjie.j… via monorail

unread,
Aug 29, 2019, 12:36:09 AM8/29/19
to webm-d...@webmproject.org

Comment #15 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c15

Also a webm file for a easy display.

Attachments:
variable_resolution.webm 1.0 MB

linjie.j… via monorail

unread,
Aug 29, 2019, 12:39:59 AM8/29/19
to webm-d...@webmproject.org

Comment #16 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c16

VLC displays variable_resolution.webm with the original width/height.

guest271… via monorail

unread,
Aug 29, 2019, 3:13:06 AM8/29/19
to webm-d...@webmproject.org

Comment #17 on issue 1642 by guest271...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c17

#16

> Yes, that's becaues the mainline version ffmpeg would insert an autoscale filter and resize the image to the same size with the first frame.
And that's the main reason for this patch set.

Was describing the output of FFmpeg build using pr-libvpx_encode branch at https://github.com/intel-media-ci/ffmpeg/commit/cb3df5270535833ecc45409a815c39b3c08f836d.


VLC and Firefox displays variable_resolution.webm with the original width/height.

Firefox plays 4 seconds of output2.webm then displays the error message "Video can't be played because the file is corrupt." with warning at console

"Media resource file:///<path_to>/output2.webm could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)
Details: RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > mozilla::OpusDataDecoder::ProcessDecode(mozilla::MediaRawData*): Discard padding on interstitial packet"

Am asking how to correctly build latest ffmpeg and vpx with the patch set which allows encoding variable resolution which display correct resolution at both Chromium and Firefox?

The Chromium and Chrome issue of displaying variable resolution appears to be with implementation of HTML <video> element https://bugs.chromium.org/p/chromium/issues/detail?id=983777, not necssarily VP8 or VP8 encoding?


Is the patch being incorporated into Chromium and Chrome source code?

linjie.j… via monorail

unread,
Aug 29, 2019, 5:30:27 AM8/29/19
to webm-d...@webmproject.org

Comment #19 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c19

This issue is about libvpx encoding and seems not related to display of Firefox or Chrome.


And if you replace the 3rd patch with https://patchwork.ffmpeg.org/patch/14481/ (no reinit solution), memory issue could be observed.
(changes for encoder capability should also be applied for both vp8 and vp9:
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_PARAM_CHANGE,)

For compile, following configuration works for me.

./configure --disable-optimizations --enable-debug=3 --disable-stripping --enable-gpl --enable-libopenh264 --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared

linjie.j… via monorail

unread,
Sep 3, 2019, 3:39:25 AM9/3/19
to webm-d...@webmproject.org

Comment #20 on issue 1642 by linjie.j...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c20

ping?
Any updates or anything i can help?

guest271… via monorail

unread,
Sep 3, 2019, 9:36:55 AM9/3/19
to webm-d...@webmproject.org

Comment #21 on issue 1642 by guest...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c21

#20

> ping?
> Any updates or anything i can help?

Is the ping to directed to at large? Or to a particular individual?


> This issue is about libvpx encoding and seems not related to display of Firefox or Chrome.

limits the scope of what am looking in to.

Chromium appears to have the ability to encode variable width and height frames now, however does not now display the frames the same browser encoded at <video> element. For example, this WebM file was created at Chromium using MediaRecorder, does not resize at Chromium, though does resize at Firefox. Locating the source of and fixing that bug would be helpful. See https://github.com/web-platform-tests/wpt/issues/17821.

guest271… via monorail

unread,
Sep 3, 2019, 9:37:27 AM9/3/19
to webm-d...@webmproject.org

Comment #22 on issue 1642 by guest...@gmail.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c22


(No comment was entered for this change.)

Attachments:
chromium_mediarecorder_1s_red_1s_green_variable_pixel_dimensions.webm 11.7 KB

jz… via monorail

unread,
Feb 23, 2021, 5:46:54 PM2/23/21
to webm-d...@webmproject.org

Comment #23 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c23

I think this bug has gotten stale. Is there still an issue with libvpx after the change in comment #13 or is this now down to differences between applications in displaying the video?

jz… via monorail

unread,
Oct 5, 2021, 5:42:26 PM10/5/21
to webm-d...@webmproject.org
Updates:
Status: Fixed

Comment #24 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c24

Closing this bug. If there's still an issue in libvpx please feel free to reopen.

jz… via monorail

unread,
May 31, 2022, 4:52:29 PM5/31/22
to webm-d...@webmproject.org
Updates:
Status: Assigned

Comment #25 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c25

Looking at this more closely, the change in comment #13 only brought in a repro case. It didn't actually fix the bug.

Git Watcher via monorail

unread,
May 31, 2022, 9:30:06 PM5/31/22
to webm-d...@webmproject.org

Comment #26 on issue 1642 by Git Watcher: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c26


The following revision refers to this bug:
https://chromium.googlesource.com/webm/libvpx/+/8f56e1c074712ffa937dc48a14d4b01e378a170f

commit 8f56e1c074712ffa937dc48a14d4b01e378a170f
Author: James Zern <jz...@google.com>
Date: Sat May 28 22:26:29 2022

resize_test: add TODO for test failure

DISABLED_TestExternalResizeSmallerWidthBiggerSize was added for
webm:1642, but never fixed

Bug: webm:1642
Change-Id: I0fa368a44dda550241ea997068c58eaff551233c

[modify] https://crrev.com/8f56e1c074712ffa937dc48a14d4b01e378a170f/test/resize_test.cc

ji… via monorail

unread,
Jun 30, 2022, 2:14:33 PM6/30/22
to webm-d...@webmproject.org
Updates:
Status: Started

Comment #27 on issue 1642 by ji...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c27


(No comment was entered for this change.)

Git Watcher via monorail

unread,
Jul 1, 2022, 10:38:07 AM7/1/22
to webm-d...@webmproject.org

Comment #28 on issue 1642 by Git Watcher: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c28


The following revision refers to this bug:

Git Watcher via monorail

unread,
Jul 6, 2022, 7:53:07 PM7/6/22
to webm-d...@webmproject.org

Comment #29 on issue 1642 by Git Watcher: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c29


The following revision refers to this bug:
https://chromium.googlesource.com/webm/libvpx/+/933b6b90a583b593efd8acb644603ab189226309

commit 933b6b90a583b593efd8acb644603ab189226309
Author: James Zern <jz...@google.com>
Date: Wed Jul 06 22:06:51 2022

Revert "Fix bug with smaller width bigger size"

This reverts commit 5b530fc962bcb8a51bbf03f5fbc2912f21b86e70.

This fixes memory related fuzzer failures in the decoder.

Bug: webm:1642
Bug: oss-fuzz:48609
Bug: oss-fuzz:48629
Bug: oss-fuzz:48632
Bug: oss-fuzz:48638
Bug: oss-fuzz:48639
Bug: oss-fuzz:48651
Bug: oss-fuzz:48657
Bug: oss-fuzz:48659
Bug: oss-fuzz:48660
Bug: oss-fuzz:48661
Bug: oss-fuzz:48680
Bug: oss-fuzz:48686
Bug: oss-fuzz:48697
Bug: oss-fuzz:48706
Bug: oss-fuzz:48712
Bug: oss-fuzz:48717
Bug: oss-fuzz:48728
Bug: oss-fuzz:48732
Bug: oss-fuzz:48780
Bug: oss-fuzz:48781
Bug: oss-fuzz:48782
Bug: oss-fuzz:48785
Change-Id: I67a8539a3083f00eec1164fef5c6a8bc209f91fc

[modify] https://crrev.com/933b6b90a583b593efd8acb644603ab189226309/test/resize_test.cc
[modify] https://crrev.com/933b6b90a583b593efd8acb644603ab189226309/vp9/encoder/vp9_encoder.c
[modify] https://crrev.com/933b6b90a583b593efd8acb644603ab189226309/vp9/common/vp9_alloccommon.c

ji… via monorail

unread,
Jul 7, 2022, 10:17:14 AM7/7/22
to webm-d...@webmproject.org

Comment #30 on issue 1642 by ji...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c30

The previous change was reverted due to some fuzzing issues.

jz… via monorail

unread,
Sep 7, 2022, 8:01:32 PM9/7/22
to webm-d...@webmproject.org

Comment #31 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c31

One additional thing to note is that the test appears to have an issue with ScaleForFrameNumber() for frame >= 100:

if (smaller_width_larger_size_) {
if (frame < 30) {
*w = initial_w;
*h = initial_h;
return;
}
if (frame < 100) {
*w = initial_w * 7 / 10;
*h = initial_h * 16 / 10;
return;
}
return;
}

In that case *w/*h won't be initialized.

ji… via monorail

unread,
Sep 27, 2023, 9:52:49 AM9/27/23
to webm-d...@webmproject.org
Updates:
Labels: -Pri-2 Pri-0

Comment #33 on issue 1642 by ji...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c33


(No comment was entered for this change.)

Git Watcher via monorail

unread,
Sep 28, 2023, 1:40:37 PM9/28/23
to webm-d...@webmproject.org

Comment #34 on issue 1642 by Git Watcher: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c34


The following revision refers to this bug:

Author: Jerome Jiang <ji...@google.com>
Date: Thu Jun 30 17:48:56 2022

Fix bug with smaller width bigger size

jz… via monorail

unread,
Dec 15, 2023, 10:46:39 PM12/15/23
to webm-d...@webmproject.org
Updates:
Labels: -Restrict-View-Security CVE-2023-6349

Comment #45 on issue 1642 by jz...@google.com: libvpxenc: dynamic resolution encode support when total size is enlarged but width is smaller
https://bugs.chromium.org/p/webm/issues/detail?id=1642#c45

This was released in version 1.13.1:

https://chromium.googlesource.com/webm/libvpx/+/refs/tags/v1.13.1
Reply all
Reply to author
Forward
0 new messages