
We use SSIM to measure the transcoding quality between. SSIM is a widely used tool that compares the luma channel between two images, and generates a score from 0 to 1 that indicates "how similar" the two images are. In `SsimHelper`, we decode the two videos, extract matching frames and calculates the mean SSIM (SSIM averaged all matching frames) for both videos. Matching frames are referred to as "comparisonFrame" in the CL, which is selected based on the frame number and a user-set comparison interval. For instance, if the interval is 7, then every seventh frames are compared. We use MediaCodec/MediaExtractor to decode the video, and use ImageReader to extract the decoded frame. The SSIM calculation logic is a inspired by and modified from the CTS [MSSIMMatcher](https://cs.android.com/android/platform/superproject/+/master:cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/MSSIMComparer.java;l=1?q=mssimcom) that has some errors and extra features we don't need (like handling RGB images). Adds TranscodeQualityTest to ensure high quality transcoding. PiperOrigin-RevId: 430951206
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.