Skip to content

Add encoder side validation of the cropping window setting - #5346

Open
xinzhao-apple wants to merge 1 commit into
AOMediaCodec:mainfrom
xinzhao-apple:mr/avm-bugfix4
Open

Add encoder side validation of the cropping window setting#5346
xinzhao-apple wants to merge 1 commit into
AOMediaCodec:mainfrom
xinzhao-apple:mr/avm-bugfix4

Conversation

@xinzhao-apple

Copy link
Copy Markdown
Contributor

With --enable-cropping-window=1, avmenc accepted conformance window offsets that its own decoder rejects with AVM_CODEC_UNSUP_BITSTREAM, producing undecodable streams: offsets off the chroma grid, offsets leaving the window empty, and non-zero offsets combined with --resize-mode (the decoder rescales the offsets by frame_size/max_frame_size, so an even offset can scale to an odd position).

This PR applies the decoder's constraints in the encoder, so encoder will avoid generating illegal bitstreams.

With --enable-cropping-window=1, avmenc accepted conformance window
offsets that its own decoder rejects with AVM_CODEC_UNSUP_BITSTREAM,
producing undecodable streams: offsets off the chroma grid, offsets
leaving the window empty, and non-zero offsets combined with --resize-mode
(the decoder rescales the offsets by frame_size/max_frame_size, so an even
offset can scale to an odd position). Apply the decoder's constraints in
the encoder, so encoder will avoid generating illegal bitstreams.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants