Skip to content

0911/s6 orient unblunted on pr5275 - #5402

Open
chengchen-google wants to merge 2 commits into
AOMediaCodec:av2-encfrom
chengchen-google:0911/s6_orient_unblunted_on_pr5275
Open

0911/s6 orient unblunted on pr5275#5402
chengchen-google wants to merge 2 commits into
AOMediaCodec:av2-encfrom
chengchen-google:0911/s6_orient_unblunted_on_pr5275

Conversation

@chengchen-google

Copy link
Copy Markdown
Contributor

Support Level 2 orientation partition pruning for 4K at Speed >= 6

The performance on RA, speed 6, A1:

BD-Rate (YUV)  Speedup      Ratio
+1.09%         +14.32%       13.1

STATS_CHANGED

The speed feature shows a good tradeoff for speed 5.

RA performance:

Speed   	A1 BD-Rate (YUV)  A1 Speedup	A1 Ratio
Speed_4		+0.16%	           +1.61%	10.1
Speed_5		+0.14%	           +3.09%	22.1

Speed   	A2 BD-Rate (YUV)  A2 Speedup	A2 Ratio
Speed_4		+0.19%		   +2.96%	15.6
Speed_5		+0.21%		   +2.89%	13.8

STATS_CHANGED

Change-Id: Iea96600b64fdd27c83efc1250d46b4a90ccb5878
…ed >= 6

Change-Id: I5e74f4ffd130e16864e834a94627a8bf2d285bb7
@chengchen-google

Copy link
Copy Markdown
Contributor Author

Note that this PR is a follow-up of #5275

The diff is much smaller than the patch shows.
Diff:

-  const uint64_t frame_scaled = orientation_anisotropy_for_frame(cpi, 1);
-  if (frame_scaled == 0) return;
-  const uint64_t anisotropy =
-      orientation_anisotropy_for_bsize(bsize, base_anisotropy) * frame_scaled;
+  uint64_t anisotropy;
+  if (cpi->sf.part_sf.prune_by_struct_orient >= 2) {
+    // Level 2 (unblunted mode for 4K at speed >= 6): prune across all frames
+    // regardless of temporal layer depth (patch 0006d).
+    anisotropy = base_anisotropy;
+  } else {
+    const uint64_t frame_scaled = orientation_anisotropy_for_frame(cpi, 1);
+    if (frame_scaled == 0) return;
+    anisotropy =
+        orientation_anisotropy_for_bsize(bsize, base_anisotropy) * frame_scaled;
+  }

+    if (is_4k_or_larger) {
+      sf->part_sf.prune_by_struct_orient = 2;
+    }

-  bool prune_by_struct_orient;
+  // Prune rectangular and extended partitions based on structure orientation
+  // of the source signal.
+  // 0: disabled
+  // 1: standard (size-graded anisotropy with GOP temporal layer protection)
+  // 2: unblunted (prunes across all GOP temporal layers for 4K at speed >= 6)
+  int prune_by_struct_orient;

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