Repository navigation
Conversation
| } | ||
| } | ||
| // Copy color_map of palette mode for final winner mode | ||
| // Copy color_map of palette mode for final winner mode. In inter frames |
There was a problem hiding this comment.
This solution seems a bit fragile. Shouldn't the winner mode store the color_index_map instead, so no such logic is needed here?
There was a problem hiding this comment.
This is happening because the palette search in inter frames is currently done separately to the regular candidate processing so it doesn't get stored in the normal candidate list, hence the need to look in a different place here. An alternative approach would be to have the palette mode search store its result in the candidate list so it can be used from there like it is in intra frames. This would actually change the bitstream, though, as it might push out another candidate and refinement could then get a different answer, unlike the above which is a pure fix. Would you prefer that?
There was a problem hiding this comment.
IIRC, in AV1, av2_rd_pick_intra_sby_mode() is only called in intra frame encoding, so this bug doesn't exist. In AV2, this function is also called in inter frame coding, and that causes this bug. Is my understanding correct? If this is the case, maybe your alternative approach is better and more fundamental? It is ok if the bitstream result changes slightly. What do you think?
|
@yunqingwang1 : maybe good if you / someone who's familiar with winner mode processing can review. |
This seems to be inherited from the AV1. I checked av2-enc branch, this part was refactored a little, but no fix was done. Here is the code: @mrt-amd: |
No. The first restore is loading the map from a specific list entry The second restore has two effects. If a palette mode was in the list then the map might have been overwritten by a different entry, so the restore from entry |
Thanks for the explanation. |
Fixes #5569.
Tested with reproducer in the ticket, and also verified against larger text content streams where this bug was previously being hit with some regularity.