Support 8-bit YUV400 monochrome AVIF decoding

Add support for 8-bit YUV400 monochrome AVIF/HEIC image decoding to Gray8
color type.

Previously, YUV400 (monochrome) formats were not recognized by Skia's
AVIF decoders. This adds detection of AVIF_PIXEL_FORMAT_YUV400 in both
SkCrabbyAvifCodec and SkAvifCodec.

- For SkCrabbyAvifCodec (Android platform), it maps to the
  AVIF_RGB_FORMAT_GRAY output format of the crabbyavif library.
- For SkAvifCodec (upstream standalone builds), since older libavif
  versions lack the grayscale output format, it implements a direct
  optimized Y-channel memory copy from the YUV planes to the Gray8
  destination buffer. Standard 8-bit depth is supported, while any other
  bit depths are rejected with kInvalidConversion.

Also adds unit tests for 8-bit monochrome AVIF decoding correctness.

Bug: 382315082
Test: ./out/Static/dm --match AvifDecodeMonochrome

Change-Id: Icad3e4fdcde6dd26c550de2a73e4ebf8feeaf5ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1271776
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Arun Johnson <arunjohnson@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
4 files changed