CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
H.264 area upper limit checker
This section describes the video utility tool included in the SDK: H.264 Area Limit Checker (H264AreaLimitChecker.apk).
  • CRIWARE/SDK/tools/VideoUtility/AreaLimitChecker/android/H264AreaLimitChecker.apk

Summary

H.264 area upper limit checker is a tool that outputs the H.264 area upper limit value (*1) that differs depending on the Android device and information regarding device-specific H.264 movie playback to the screen, logs, and storage in the device as a yaml file. .
By using this tool, you can check the resolution and number of H.264 movie that can be played simultaneously on a specific Android device. (*2)
Remarks
(*1): For details, please refer to (D): Resolution area upper limit in About cases where H.264 movie playback fails.
(*2): Please note that this tool only checks whether playback itself is possible, and cannot confirm whether stable playback without stuttering is possible.

Operating environment

This tool works on devices running Android 7.0 or later. The operating Android ABI is arm7/arm8/x86/x86_64.

Operation specifications

When you start the H.264 area upper limit checker, a screen like the one below will be output, and the buttons at the bottom of the screen have the following meanings.
android_h264_area_limit_checker_cap_screen_button.png
Screen configuration
Description of each button
button Explanation
TEX/BUFF H.264 decoder operation mode: Switch between texture output and buffer output. (*Four)
START Starts H.264 area upper limit check.
STOP Stops H.264 area upper limit check processing.
QUIT Quit the app.
DETAIL Turns on/off the screen display of the details of the H.264 area upper limit check result.
STATUS Turns on/off the screen display of the Player status under the H.264 area limit.


When you press the START button, H.264 movie with the following five resolutions will be played one by one in descending order of resolution until the maximum number of simultaneous playbacks (*3) is reached.
When the maximum number of simultaneous playbacks (*3) is reached or an error (*1) due to the H.264 area limit occurs, the estimated value of the H.264 movie area limit on that device and related information are displayed on the screen, logs, and local storage. Output to yaml file.
Remarks
(*3): Refers to the maximum number of simultaneous instances of H.264 decoders supported by the device, or the upper limit of 16 simultaneous H.264 decoders set by the Android version of Sofdec.
(*4): Currently, the native Android version of Sofdec SDK does not release buffer output mode to the public, and it is a function used only in CRIWARE Unity Plug-in for Smartphone.
H.264 movie to play when checking
Playback priority Resolution Total number of frames fps
1 3840x2160 1 29.97
2 1920x1080
3 1280x720
4 640x480
5 320x240
Attention
  • Depending on the device, the app may crash due to lack of memory before outputting the results. For example, on the following terminal, the tool crashes due to insufficient memory before outputting the results.
    • Google Pixel 3 (Android 12)
  • If the tool crashes before outputting the result, check how many resolution x number of H.264 movie you played before it crashes, and use that amount as a guideline for the area limit.

How to check

Installation on actual device/File access permission settings at first startup

First, install H264AreaLimitChecker.apk on your terminal using the adb install command and start it.
When you start it for the first time, you will be asked for permission to access local storage as shown below, so please set it to allow it.
android_h264_area_limit_checker_file_access_over11.png
File access permission setting screen (Android 11 or later)
android_h264_area_limit_checker_file_access_under11.png
File access permission setting screen (for Android below 11)

Start check

After selecting the H.264 decoder operation mode for which you want to check the operation using the TEX/BUFF button, press the "START" button to start the H.264 area upper limit check.
After starting, the check is complete when the text that says "Checking..." changes to "Done." in the upper left corner.

Checking the check results

The check results can be viewed on-screen or in the log/yaml file.

Check from the screen

After the check is completed, the following output screen will be displayed by default.
In the output screen example below, this terminal has an H.264 area limit and can play up to 2 H.264 movie at the same time at 3840x2160, 8 at 1920x1080, and 16 at 1280x720/640x480/320x240. is shown.
android_h264_area_limit_checker_cap_limit_result_simple.jpg
Check result display screen (simple)
If you press the DETAIL button or the "STATUS" button, the following information will be added to the screen.
The added information shows:
  • H.264 area limit exists between 17280000 and 17356800
  • Although I was able to play two H.264 movie with a resolution of 3840x2160/one H.264 movie with a resolution of 1280x720/one H.264 movie with a resolution of 320x240 at the same time, I was able to play one H.264 movie with a resolution of 320x240 at the same time. When trying to play, the area limit is reached.
android_h264_area_limit_checker_cap_limit_result_detail.jpg
Check result display screen (details)

Check from log/yaml file

The following output results are output on the log.
========== H.264 AREA LIMIT CHECKER RESULT ==========
H.264 AREA LIMIT is between 17280000 and 17356800.
- [device-specific information] -
- checker version: 1.0
device name: SC-02J
model number: SC-02J
OS: 28
decoder info: OMX.qcom.video.decoder.avc
output mode: texture
output format: 2141391878
is area limit reached: yes
estimated lower area limit:
- value: 17280000
number of 3840x2160: 2
number of 1920x1080: 0
number of 1280x720: 0
number of 640x480: 2
number of 320x240: 1
estimated upper area limit:
- value: 17356800
number of 3840x2160: 2
number of 1920x1080: 0
number of 1280x720: 0
number of 640x480: 2
number of 320x240: 2
max decoder handle: 16
max width : 4096
max height: 4096
min width : 64
min height: 64
max framerate: 240
min framerate: 1
=====================================================
output result to /sdcard/cri/crimana/output/h264_area_limit_checker_result_SC-02J_os28_texture_v1_0.yaml


Also, among the log output contents
- [device-specific information] -
From
=====================================================
During this time, it is also output as a yaml file to the following directory in the terminal. (*5)
Obtain and check the yaml file using Android Studio's Device Explorer or the "adb pull /sdcard/cri/crimana/output" command.
  • /sdcard/cri/crimana/output/
    • h264_area_limit_checker_result_(model)_(OS version)_( Output format)_(Tool version).yaml
    • (Example) Pixel 5 (Android 14), for texture output
      • h264_area_limit_checker_result_Pixel_5_os34_texture_v1_0.yaml
Remarks
(*5): File output may fail depending on the terminal. If it fails, the text "(Failed to output result to local file)" will be output to the screen and the following text will be output to the log.
Failed to output H.264 area limit checker result to local file.

About each information output on the check result display screen (details)/log/yaml

Each item output to the check result display screen (details), part of the log, and the yaml file has the following meaning.
H.264 area upper limit check result log/yaml content description
ItemDescription
checker versionH.264 area limit checker version
device nameDevice product name
model numberDevice model number
OSDevice OS version (API level)
decoder infoH.264 decoder name
output modeH.264 decoder output format (texture/buffer)
output formatH.264 decoder output color format
is area limit reachedWhether the area limit has been reached (yes/no)
estimated lower area limitvalueLower estimated area limit
number of 3840x2160Number of 3840x2160 H.264 movie played during downward estimation
number of 1920x1080Number of 1920x1080 H.264 movie played during downward estimation
number of 1280x720Number of 1280x720 H.264 movie played during downward estimation
number of 640x480Number of 640x480 H.264 movie played during downward estimation
number of 320x240Number of 320x240 H.264 movie played during downward estimation
estimated upper area limitvalueEstimated upper area limit
number of 3840x2160Number of 3840x2160 H.264 movie played during upward estimation
number of 1920x1080Number of 1920x1080 H.264 movie played during upward estimation
number of 1280x720Number of 1280x720 H.264 movie played during upward estimation
number of 640x480Number of 640x480 H.264 movie played during upward estimation
number of 320x240Number of 320x240 H.264 movie played during upward estimation
max decoder handleMaximum number of simultaneous instances of H.264 decoder supported by the device
max widthMaximum resolution width supported by the device
max heightMaximum resolution height supported by the device
min widthMinimum resolution width supported by the device
min heightMinimum resolution height supported by the device
max framerateMaximum fps for resolution supported by device
min framerateMinimum fps for device supported resolution