Re: Handle 1280x720 remote video very slow in iOS App

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Austin:

Thanks for your reply.
I will try it. If necessary, please still support me in this issue.
Thanks.

Kent

Austin Kottke <Austin.Kottke@xxxxxxxxxxxxxxxxxxxxxx> 於 2019年2月15日 週五 上午2:29寫道:

Kent,

If you are working on IOS. You might be able to do the conversion from 420toARGB in a VideoToolbox decompression session. Its very fast. Libyuv is CPU based. 

This example uses the input in 420 and converts it to 32_ARGB.

CFMutableDictionaryRef destinationPixelBufferAttributes = CFDictionaryCreateMutable(
                                                                                        NULL, // CFAllocatorRef allocator
                                                                                        0,    // CFIndex capacity
                                                                                        &kCFTypeDictionaryKeyCallBacks,
                                                                                        &kCFTypeDictionaryValueCallBacks);


    SInt32 destinationPixelType = kCVPixelFormatType_32ARGB;
    
   CFDictionarySetValue(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &destinationPixelType));
   CFDictionarySetValue(destinationPixelBufferAttributes, kCVPixelBufferWidthKey,  (__bridge CFNumberRef)@(1280));
   CFDictionarySetValue(destinationPixelBufferAttributes, kCVPixelBufferHeightKey, (__bridge CFNumberRef)@(720));
   

    OSStatus status =  VTDecompressionSessionCreate(NULL, _videoFormatDescr, NULL,
                                                    destinationPixelBufferAttributes,
                                                    &callBackRecord, &_decompressionSession);

You might need to open up darwindev.m and make the necessary changes. I believe pjsip does have a decompression session already created using video toolbox. 

Austin 


From: pjsip <pjsip-bounces@xxxxxxxxxxxxxxx> on behalf of Kent Liu <chir0615@xxxxxxxxx>
Reply-To: pjsip list <pjsip@xxxxxxxxxxxxxxx>
Date: Thursday, February 14, 2019 at 7:39 AM
To: "pjsip@xxxxxxxxxxxxxxx" <pjsip@xxxxxxxxxxxxxxx>
Subject: Handle 1280x720 remote video very slow in iOS App

Hi,

We are working on a iOS app which will connect to a remote device with 720P(1280x720) video streaming.
We follow the guide to make PJSIP accept 720P remote streaming.
But the video have serious latency even on iPhoneX, and the bottleneck seems to be the I420ToARGB convert via libyuv.
I420ToARGB is too slow to make 720P remote video workable.
Is there any way to improve the performance?

Any suggestion for this situation would be welcome.
Thanks.

BR,

Kent
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux