-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal interp_filter in the bitstream. #1518
base: master
Are you sure you want to change the base?
Conversation
going to actually stack all of the interpfilter commits here before landing |
Can we land this? |
A first step toward this was landed in #1866. |
I might have seen this PR, but was not able to recall this much progress is already there. I hope we want not to waste this PR and land of most of it please. |
if fi.is_filter_switchable | ||
&& ContextWriter::needs_interp_filter(bsize, luma_mode) | ||
{ | ||
cw.write_interp_filter(w, tile_bo, bsize, 0, FilterMode::REGULAR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason why there was desync in your test is that the decoder does not think it needs to decode the filter for each inter mode block if a frame header does not have is_filter_switchable = true, i.e. instead decoder already has decoded default filter. In spec, https://aomediacodec.github.io/av1-spec/#inter-block-mode-info-syntax, there is if block by " if ( interpolation_filter == SWITCHABLE ) {", if true it decodes the filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the fi.is_filter_switchable flag here I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I mean it should sync with 'is_filter_switchable' written in frame header. Otherwise, I think the decoder does not decode the info by cw.write_interp_filter(w, tile_bo, bsize, 0, FilterMode::REGULAR); ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I think it is synced, unless I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I landed 485d179#diff-e59bfbbede3bbaad0b099696e5ec5716L635 , and if fi.is_filter_switchable is true, encoder does not write defalut filter. Then, decoder knows it needs to decode filter from each inter mode block.
No, there is no desync. |
Great! |
A small loss due to additional symbols coded. master-ec0c7787dd1598f4cecaedda2a120ff4ab0eb6d0 -> interpfilter-2019-08-09_175924-f3c43a4 PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000 0.0426 | 0.1195 | 0.2747 | 0.0629 | 0.0270 | 0.0501 | 0.1175 https://beta.arewecompressedyet.com/?job=interpfilter-2019-08-09_175924-f3c43a4&job=master-ec0c7787dd1598f4cecaedda2a120ff4ab0eb6d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please land, once it passes all travis tests.
@tdaede Would you have plan to follow up the build errors (mismatch) soon, or might be later after your current other work? |
@ycho I will look at it a bit today, but if I don't find a fix I'd appreciate it if you could also look. |
With local testing, this causes corruption from 2nd frame, either speed 0, 6, or 10. I expect speed 10 does not encode filter type per blocks, since its block size is 64x64 >= 32x32 checked by needs_interp_filter(), other than right or bottom frame borders. Testing with: |
Which input and speed have you tested with? |
No description provided.