Giter Club home page Giter Club logo

Comments (5)

yohhoy avatar yohhoy commented on July 1, 2024
  • 2135033992 (0x7f420888) == MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible
  • 2141391878 (0x7FA30C06) == HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC
  • 2141391876 (0x7FA30C04) == OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m
  • 2141391877 (0x7FA30C05) ?
  • 842094169 (0x32315659) == ImageFormat.YV12
  • 4 (0x00000004) == ImageFormat.RGB_565

from heifreader.

msureshmewara avatar msureshmewara commented on July 1, 2024

[ImageReader-1440x960f4m1-31732-3] Failed to release buffer: Unknown error -1 (1)
10-26 07:41:38.943 31732-2027/jp.yohhoy.heifreader E/ImageReader_JNI: Producer output buffer format: 0x7fa30c06, ImageReader configured format: 0x4
10-26 07:41:38.958 31732-2027/jp.yohhoy.heifreader E/HeifReader: rendering RGB565 format failure
jp.yohhoy.heifreader.HeifReader$FormatFallbackException: java.lang.UnsupportedOperationException: The producer output buffer format 0x7fa30c06 doesn't match the ImageReader's configured buffer format 0x4.
at jp.yohhoy.heifreader.HeifReader.renderHevcImageWithFormat(HeifReader.java:394)
at jp.yohhoy.heifreader.HeifReader.decodeByteArray(HeifReader.java:149)
at jp.yohhoy.heifreader.HeifReader.decodeFile(HeifReader.java:180)
at jp.yohhoy.heifreader.HeifReader.decodeStream(HeifReader.java:243)
at jp.yohhoy.heifreader.MainActivity$1$1.doInBackground(MainActivity.java:76)
at jp.yohhoy.heifreader.MainActivity$1$1.doInBackground(MainActivity.java:72)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.UnsupportedOperationException: The producer output buffer format 0x7fa30c06 doesn't match the ImageReader's configured buffer format 0x4.
at android.media.ImageReader.nativeImageSetup(Native Method)
at android.media.ImageReader.acquireNextSurfaceImage(ImageReader.java:439)
at android.media.ImageReader.acquireNextImage(ImageReader.java:493)
at jp.yohhoy.heifreader.HeifReader.renderHevcImageWithFormat(HeifReader.java:392)
at jp.yohhoy.heifreader.HeifReader.decodeByteArray(HeifReader.java:149) 
at jp.yohhoy.heifreader.HeifReader.decodeFile(HeifReader.java:180) 
at jp.yohhoy.heifreader.HeifReader.decodeStream(HeifReader.java:243) 
at jp.yohhoy.heifreader.MainActivity$1$1.doInBackground(MainActivity.java:76) 
at jp.yohhoy.heifreader.MainActivity$1$1.doInBackground(MainActivity.java:72) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 

from heifreader.

kendgin avatar kendgin commented on July 1, 2024

i have same error on it !
what we can do ?

from heifreader.

yohhoy avatar yohhoy commented on July 1, 2024

candidate patch?

diff --git a/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java b/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
index 364b12a..aca364e 100644
--- a/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
+++ b/app/src/main/java/jp/yohhoy/heifreader/HeifReader.java
@@ -368,6 +368,7 @@ public class HeifReader {
             MediaCodec decoder = MediaCodec.createByCodecName(mDecoderName);
             MediaFormat inputFormat = MediaFormat.createVideoFormat(
                     MediaFormat.MIMETYPE_VIDEO_HEVC, info.size.getWidth(), info.size.getHeight());
+            inputFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible);
             inputFormat.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, maxInputSize);
             inputFormat.setByteBuffer("csd-0", info.paramset);
             Log.d(TAG, "HEVC input-format=" + inputFormat);

from heifreader.

yohhoy avatar yohhoy commented on July 1, 2024

Above patch doesn't work on Xperia X Performance. 😢

from heifreader.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.