The 16x16-level frame-edge partition bit was discarded too
Browse files at this commitb5166a175cc8f387f061bba525e33e904264d26dParent: 135feff- fix
- the 16x16-level frame-edge partition bit was discarded too
1 changed file +38 -3
- crates/ec-av1/src/decode.rs +38 -3
crates/ec-av1/src/decode.rsmodified+38 -3
| @@ -11902,16 +11902,51 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( | |||
| 11902 | does not code yet", | 11902 | does not code yet", |
| 11903 | )); | 11903 | )); |
| 11904 | } | 11904 | } |
| 11905 | - if has_cols16 { | 11905 | + // lane-hgkf r1, same class as the 64/32-level |
| 11906 | + // fix above: this gathered bit IS the partition | ||
| 11907 | + // (libaom `ec_read_partition_impl`), 0 = | ||
| 11908 | + // HORZ/VERT and only 1 = SPLIT. Forcing SPLIT | ||
| 11909 | + // desynced the bottom band of a 3840x1608 frame | ||
| 11910 | + // at mi_row=400 mi_col=32. Only the in-frame | ||
| 11911 | + // half of the strip is coded. | ||
| 11912 | + let edge_bit = if has_cols16 { | ||
| 11906 | dec.symbol_fixed(&gather( | 11913 | dec.symbol_fixed(&gather( |
| 11907 | &cdfs.partition_w16[ctx16], | 11914 | &cdfs.partition_w16[ctx16], |
| 11908 | VERT_ALIKE, | 11915 | VERT_ALIKE, |
| 11909 | - )); | 11916 | + )) |
| 11910 | } else { | 11917 | } else { |
| 11911 | dec.symbol_fixed(&gather( | 11918 | dec.symbol_fixed(&gather( |
| 11912 | &cdfs.partition_w16[ctx16], | 11919 | &cdfs.partition_w16[ctx16], |
| 11913 | HORZ_ALIKE, | 11920 | HORZ_ALIKE, |
| 11914 | - )); | 11921 | + )) |
| 11922 | + }; | ||
| 11923 | + bump_edge_part(if edge_bit == 1 { 3 } else { 2 }); | ||
| 11924 | + if edge_bit != 1 { | ||
| 11925 | + let strip_mi = ( | ||
| 11926 | + sr * SUB_MI as usize, | ||
| 11927 | + sc * SUB_MI as usize, | ||
| 11928 | + ); | ||
| 11929 | + let (sw, sh) = if has_cols16 { (16, 8) } else { (8, 16) }; | ||
| 11930 | + let mode = decode_leaf_rect( | ||
| 11931 | + &mut dec, | ||
| 11932 | + &mut cdfs, | ||
| 11933 | + &mut neighbours, | ||
| 11934 | + at16, | ||
| 11935 | + strip_mi, | ||
| 11936 | + sw, | ||
| 11937 | + sh, | ||
| 11938 | + None, | ||
| 11939 | + &mut y, | ||
| 11940 | + &mut u, | ||
| 11941 | + &mut v, | ||
| 11942 | + enable_filter_intra, | ||
| 11943 | + allow_screen_content_tools, | ||
| 11944 | + base_q_idx, | ||
| 11945 | + tx_select, | ||
| 11946 | + reduced_tx_set, | ||
| 11947 | + )?; | ||
| 11948 | + let _ = mode; | ||
| 11949 | + continue; | ||
| 11915 | } | 11950 | } |
| 11916 | let (mi_row0, mi_col0) = | 11951 | let (mi_row0, mi_col0) = |
| 11917 | (sr as u32 * SUB_MI, sc as u32 * SUB_MI); | 11952 | (sr as u32 * SUB_MI, sc as u32 * SUB_MI); |