Hi all,
Our model is Blaze_tablet, Android Version is 4.0.4.
When we try to decoding one bit stream with different resolution such 1280*720(350 frames)->1024*576(300 frames)-> 1280*720(350 frames), when we try to dequeue first buffer for red parts, dequeue buffer is failed.
As we know, when reslution is changed in input bit stream, port setting changed event will be callback. Then we need to do flush output buffer, disable, deallocate, enable, reallocate operations. Before to dequeue buffer, we use cancelBuffer to cancel buffers for former resolutions.
Error information from GraphicBufferAllocator is as following, following blue parts is allocated for former 1024*576(300 frames).
08-16 05:19:38.377: W/GraphicBufferAllocator(107): alloc(1408, 832, 256, 00000b00, ...) failed -12 (Out of memory)
08-16 05:19:38.377: D/GraphicBufferAllocator(107): Allocated buffers:
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x6036a8: 2208.00 KiB | 1024 (1024) x 552 | 1 | 0x00000933
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x60da98: 2400.00 KiB | 1024 (1024) x 600 | 1 | 0x00000933
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x60f590: 192.00 KiB | 1024 (1024) x 48 | 5 | 0x00000b00
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x6101b0: 6400.00 KiB | 1569 (1600) x 1024 | 5 | 0x00000b00
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x610d98: 2208.00 KiB | 1024 (1024) x 552 | 1 | 0x00000933
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x611d38: 192.00 KiB | 1024 (1024) x 48 | 5 | 0x00000b00
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x614260: unknown | 1152 (4096) x 672 | 100 | 0x00000b00
08-16 05:19:38.377: D/GraphicBufferAllocator(107): 0x614430: 0.12 KiB | 1 ( 32) x 1 | 1 | 0x00000933
08-16 05:19:38.377: D/GraphicBufferAllocator(107): Total allocated (estimate): 13600.12 KB
08-16 05:19:38.377: D/GraphicBufferAllocator(107): IMG Graphics HAL state:
08-16 05:19:38.377: D/GraphicBufferAllocator(107): Dumping all active sync objects..
08-16 05:19:38.377: D/GraphicBufferAllocator(107): ID=1635, 0xP...FHWR=0x00000b00, WOP/WOC=0x0/0x0, ROP/ROC=0x0/0x0, ROP2/ROC2=0xe/0xd, WOC DevVA=0x0d8006a4, ROC DevVA=0x0d8006ac, ROC2 DevVA=0x0d8006b4
08-16 05:19:38.377: D/GraphicBufferAllocator(107): ID=1603, 0xP...FHWR=0x00000933, WOP/WOC=0x0/0x0, ROP/ROC=0x13/0x13, ROP2/ROC2=0x0/0x0, WOC DevVA=0x0d804804, ROC DevVA=0x0d80480c, ROC2 DevVA=0x0d804814
08-16 05:19:38.377: D/GraphicBufferAllocator(107): ID=1602, 0xP...FHWR=0x00000933, WOP/
08-16 05:19:38.377: E/SurfaceFlinger(107): GraphicBufferAlloc::createGraphicBuffer(w=1408, h=832) failed (Out of memory), handle=0x0
08-16 05:19:38.377: E/SurfaceTexture(107): [SurfaceView] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
Can anyone tell us why malloc is out of memory? Thx.
regards,
guangx