Video Decode Acceleration Framework Reference

视觉特征-自监督-掩码特征预测【2024-10】:D-JEPA【生成模型:下一Token组自回归预测(组内并行去噪),自回归合成图像】【JEPA、Diffusion损失均针对Mask处Token计算】 Dengsheng Chen1 Jie Hu2 Xiaoming Wei1 Enhua Wu2∗1Meituan 2Key Laboratory of System Software (Chinese Academy of Sciences) and State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences {chendengsheng, weixiaoming}@meituan. 阅读详情

https://developer.apple.com/library/mac/#technotes/tn2010/tn2267.html


Technical Note TN2267

Video Decode Acceleration Framework Reference

This reference describes the Video Decode Acceleration framework available on Mac OS X v10.6.3 and later with Mac models equipped with the NVIDIA GeForce 9400M, GeForce 320M, GeForce GT 330M, ATI HD Radeon GFX, Intel HD Graphics and others.

Overview

Framework VideoDecodeAcceleration

Header VDADecoder.h

The Video Decode Acceleration framework is a C programming interface providing low-level access to the H.264 decoding capabilities of compatible GPUs such as the NVIDIA GeForce 9400M, GeForce 320M, GeForce GT 330M, ATI HD Radeon GFX, Intel HD Graphics and others. It is intended for use by advanced developers who specifically need hardware accelerated decode of video frames.

The framework allows you to:

  • Create a VDADecoder object which functions as the interface to hardware decode resources.

  • Provide an output callback to receive a decompressed image buffer once decoding is complete.

  • Pass in H.264 compressed video frames, one at a time to a VDADecoder object for decode.

  • Cancel decompression of all non-decoded frames currently in flight.

  • Destroy a VDADecoder object releasing hardware resources.

The Video Decode Acceleration framework is available on Mac OS X 10.6.3 and later. See Download.

Important: The Video Decode Acceleration framework only decodes video frame data and does not provide video playback or stream parsing capabilities. Using the QTKit QTMovie object with QTMovieOpenForPlaybackAttribute enabled is the recommended way for applications to automatically access GPU accelerated playback of H.264 encoded media.

Important: The availability of H.264 accelerated decode varies according to Mac model and Mac OS X version. Developers should always test for the availability of accelerated decode and have an alternative software decode path when hardware resources are not available.

Functions

VDADecoderCreate

Creates a new VDADecoder object.

OSStatus VDADecoderCreate(CFDictionaryRef           decoderConfiguration,
                          CFDictionaryRef           destinationImageBufferAttributes,
                          VDADecoderOutputCallback  *outputCallback, 
                          void                      *decoderOutputCallbackRefcon,
                          VDADecoder                *decoderOut)
Parameters
  • decoderConfiguration - A CFDictionaryRef containing kVDADecoderConfiguratioXXX keys describing the source data and configuration for the decoder. See Decoder Configuration Keys.

  • destinationImageBufferAttributes- A CFDictionaryRef describing the clients requirements for output image buffers. This parameter may be NULL if the client has no specific preference for the format of the output image buffers. If NULL is used, the client should make no assumptions regarding the returned image buffers. See Destination Image Buffer Attribute Keys.

  • outputCallback- A VDADecoderOutputCallback function called by the decoder when returning decompressed image buffers to the client.

  • decoderOutputCallbackRefcon - A pointer to user data passed to the output callback for all frames from this decoder object.

  • decoderOut - On output, the newly created decoder object.

Discussion

Creates an interface for utilizing hardware resources to decode video by returning a VDADecoder object. If hardware doesn't exist to decode the provided format or if there are insufficient hardware resources to perform hardware decoding, the appropriate result code will be returned.

Decoded frames are emitted via the VDADecoderOutputCallback function passed in by the caller.

Note: Clients performing format-specific processing or rendering may have specific image buffer format preferences. In this case, the client should specify these preferences by using the destinationImageBufferAttributes dictionary.

CVPixelBufferGetPixelFormatType may be used to verify the pixel format of the returned image buffers to ensure the image buffer contains the format you are prepared to handle. It is good practice to verify the image buffer format before doing any format-specific processing.

Important: The decoder object is using shared hardware resources across the system. When decompression services are no longer required, the client should dispose of the object thereby freeing up resources for other system services or applications.

Since there is no automatic software fallback when using the Video Decode Acceleration framework or an implicit guarantee that you will be able to access hardware accelerated decode (even on supported configurations), the client will need to respond accordingly if the attempt to create a decoder object fails and provide its own fallback strategy.

Return Value

A result code. See Result Codes.

VDADecoderDestroy

Releases the decoder object.

OSStatus VDADecoderDestroy(VDADecoder decoder)
Parameters
  • decoder - The hardware decoder object being destroyed.

Discussion

This call frees the decoder object and releases all resources currently in use by the decoder. All queued frames will be flushed without invoking the output callback. The decoder instance should no longer be referenced after calling VDADecoderDestroy.

Important: Image buffers are NOT owned by the decoder instance. Image buffers previously retained by the client will remain valid after the life of the decoder instance and should be released when no longer needed.

Return Value

A result code. See Result Codes.

VDADecoderDecode

Send the included compressed data to the hardware decoder object for decoding.

OSStatus VDADecoderDecode(VDADecoder      decoder,
                          uint32_t        decodeFlags,
                          CFTypeRef       compressedBuffer,
                          CFDictionaryRef frameInfo)
Parameters
  • decoder - The hardware decoder object performing the decode operation.

  • decodeFlags- Flags containing any special requests for this decode operation. See Decode Flags.

  • compressedBuffer- A CFDataRef containing a single H.264 compressed frame to be decoded.

  • frameInfo - A CFDictionaryRef containing information to be returned in the output callback for this frame. This dictionary can contain client provided information associated with the frame being decoded, for example presentation time. The CFDictionaryRef will be retained by the framework.

Discussion

This call will send a single H.264 compressed frame packaged as a CFDataRef to the hardware decoder object for decoding. The decoded frame is output via the output callback.

Return Value

A result code. See Result Codes.

VDADecoderFlush

Flush all frames currently being decoded by the hardware decoder.

OSStatus VDADecoderFlush(VDADecoder decoder, uint32_t flushFlags)
Parameters
  • decoder - The hardware decoder object performing the decode operation.

  • flushFlags- Flags controlling flush behavior, for example, whether or not currently in flight decode operations will emit frames. See Flush Flags.

Discussion

Flushing will cancel all currently queued frames which have not been completed. As the hardware decoder is generally running asynchronously, there is the possibility of a frame completing while the call to flush is in progress. No completed frames should be returned after control returns from this call.

The output callback is still called for all flushed frames, but no image buffers will be returned.

If the kVDADecoderFlush_emitFrames flag is specified, the flush operation will return image buffers in the output callback.

Return Value

A result code. Result Codes.

Output Callback

Prototype for a callback function invoked when a frame is decoded by calling VDADecoderDecode.

typedef void (*VDADecoderOutputCallback)(void             *decompressionOutputRefCon,
                                         CFDictionaryRef  frameInfo,
                                         OSStatus         status,
                                         uint32_t         infoFlags,
                                         CVImageBufferRef imageBuffer)

Parameters

  • decompressionOutputRefCon - The user data pointer as passed into VDADecoderCreate for decoderOutputCallbackRefcon.

  • frameInfo- The frameInfo dictionary passed to VDADecoderDecode for this frame. The CFDictionaryRef will be released after returning from the callback. The client must retain it if it is needed beyond the scope of the output callback.

  • status - An error code is returned if decompression was not successful. See Result Codes.

  • infoFlags - Contains information about a decode operation. For example, the kVDADecodeInfo_FrameDropped flag may be set if the frame was dropped. See Decode Info Flags.

  • imageBuffer - A Core Video image buffer containing a decompressed video frame. The client should retain returned image buffers and release them when they are no longer needed. Image buffers are NOT owned by the decoder instance.

Discussion

When creating a VDADecoder object, pass in a VDADecoderOutputCallback function to be used to return decompressed frames. The output callback may be called in decode order rather than presentation order.

Data Types

VDADecoder

OpaqueVDADecoder*  VDADecoder

A reference to a video decoder object.

Constants

Decoder Configuration Keys

  • kVDADecoderConfiguration_Height - A CFNumberRef specifying source height.

  • kVDADecoderConfiguration_Width - A CFNumberRef specifying source width.

  • kVDADecoderConfiguration_SourceFormat - A CFNumberRef (kCFNumberSInt32Type Four Character Code) specifying source format. For example, 'avc1'.

  • kVDADecoderConfiguration_avcCData - A CFDataRef containing avcC data from the H.264 bitstream. In a QuickTime movie file, this is the same data which is stored in the image description as the avcC atom.

Destination Image Buffer Attribute Keys

Listed are the commonly used keys, for a full list of available Core Video Pixel Buffer keys see CoreVideo/CVPixelBuffer.h

  • kCVPixelBufferPixelFormatTypeKey - A single CFNumberRef (OSType) or an array of CFNumberRef (OSTypes) specifying output pixel format. For example, kCVPixelFormatType_422YpCbCr8.

  • kCVPixelBufferWidthKey -A CFNumberRef specifying the width of the pixel buffer.

  • kCVPixelBufferHeightKey - A CFNumberRef specifying the height of the pixel buffer.

  • kCVPixelBufferIOSurfacePropertiesKey - A CFDictionaryRef of IOSurface properties. The presence of this key requests buffer allocation via IOSurface. If a destinationImageBufferAttributes dictionary is specified in VDADecoderCreate, that dictionary MUST contain this key. The value for the this key is most often just an empty dictionary. If NULL is specified in VDADecoderCreate for the destinationImageBufferAttributes dictionary, this key is assumed to be set. The hardware decoder requires IOSurface backed image buffers for rendering. SeeIOSurface/IOSurfaceAPI.h for the complete list of available IOSurface properties.

Note: Specifying destination image buffer attributes may lead to additional buffer copies per frame since the framework may need to do some scaling and/or format conversion from the hardware preferred output format.

Decode Flags

Flags used with the VDADecoderDecode.

kVDADecoderDecodeFlags_DontEmitFrame = 1 << 0

Specifies that the decoder should not return an image buffer in the output callback. Note that the output callback is still invoked.

Flush Flags

Flags used with the VDADecoderFlush.

kVDADecoderFlush_EmitFrames = 1 << 0

During a flush operation this flag specifies that the decoder should decode and return image buffers for all currently queued frames.

Decode Info Flags

During decode, flags may be set in the infoFlags field of the output callback conveying extra information about a decode operation.

kVDADecodeInfo_Asynchronous = 1UL << 0 kVDADecodeInfo_FrameDropped = 1UL << 1
  • kVDADecodeInfo_Asynchronous - Indicates asynchronous decoding. As asynchronous decode is the normal operating mode of the decoder object, this flag will always be set during normal operation.

  • kVDADecodeInfo_FrameDropped - Indicates the frame was dropped.

Result Codes

Errors returned from the VDADecoder APIs.

kVDADecoderNoErr                    = 0
kVDADecoderHardwareNotSupportedErr  = -12470 
kVDADecoderFormatNotSupportedErr    = -12471
kVDADecoderConfigurationError       = -12472
kVDADecoderDecoderFailedErr         = -12473
  • kVDADecoderNoErr - Life is good.

  • kVDADecoderHardwareNotSupportedErr - The hardware does not support accelerated video services required for hardware decode.

  • kVDADecoderFormatNotSupportedErr - The hardware may support accelerated decode, but does not support the requested output format.

  • kVDADecoderConfigurationError - Invalid or unsupported configuration parameters were specified in VDADecoderCreate.

  • kVDADecoderDecoderFailedErr - An error was returned by the decoder layer. This may happen for example because of bitstream/data errors during a decode operation. This error may also be returned from VDADecoderCreate when hardware decoder resources are available on the system but currently in use by another process.

Sample Code

The following data types and helper functions are referenced in the code listings below and presented for illustrative purposes only. They are not part of the framework.

// tracks a frame in and output queue in display order
typedef struct myDisplayFrame {
    int64_t                 frameDisplayTime;
    CVPixelBufferRef        frame;
    struct myDisplayFrame   *nextFrame;
} myDisplayFrame, *myDisplayFramePtr;

// some user data
typedef struct MyUserData 
{
    ...

    myDisplayFramePtr displayQueue; // display-order queue - next display frame is always at the queue head
    int32_t           queueDepth; // we will try to keep the queue depth around 10 frames
    pthread_mutex_t   queueMutex; // mutex protecting queue manipulation

     ...
} MyUserData, *MyUserDataPtr;

// example helper function that wraps a time into a dictionary
static CFDictionaryRef MakeDictionaryWithDisplayTime(int64_t inFrameDisplayTime)
{
    CFStringRef key = CFSTR("MyFrameDisplayTimeKey");
    CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &inFrameDisplayTime);

    return CFDictionaryCreate(kCFAllocatorDefault,
                              (const void **)&key,
                              (const void **)&value,
                              1,
                              &kCFTypeDictionaryKeyCallBacks,
                              &kCFTypeDictionaryValueCallBacks);
}

// example helper function to extract a time from our dictionary
static int64_t GetFrameDisplayTimeFromDictionary(CFDictionaryRef inFrameInfoDictionary)
{
    CFNumberRef timeNumber = NULL;
    int64_t outValue = 0;

    if (NULL == inFrameInfoDictionary) return 0;

    timeNumber = CFDictionaryGetValue(inFrameInfoDictionary, CFSTR("MyFrameDisplayTimeKey"));
    if (timeNumber) CFNumberGetValue(timeNumber, kCFNumberSInt64Type, &outValue);

    return outValue;
}

Creating a Decoder

Listing 1 illustrates the basic steps required to create a decoder.

The function requires parameters describing the compressed source media bitstream (dimensions, format type and decoder configuration) to be passed in by the caller. These parameters are used to create the decoder configuration dictionary. An optional pixel format attribute dictionary is also created requesting '2vuy' as the format of the returned image buffers. This dictionary can be NULL if the caller has no preference regarding the pixel format of the returned image buffers.

If decoder creation was successful, a VDADecoder object is returned to the caller via decoderOut.

Warning: As mentioned in the Constants section above, if a destination image buffer attributes dictionary is used to specify a preferred output image buffer pixel format as shown in listing 1, the dictionary MUST contain an IOSurface properties dictionary (kCVPixelBufferIOSurfacePropertiesKey) or VDADecoderCreate will fail.

Listing 1  

OSStatus CreateDecoder(SInt32 inHeight, SInt32 inWidth,
                       OSType inSourceFormat, CFDataRef inAVCCData,
                       VDADecoder *decoderOut)
{
    OSStatus status;

    CFMutableDictionaryRef decoderConfiguration = NULL;
    CFMutableDictionaryRef destinationImageBufferAttributes = NULL;
    CFDictionaryRef emptyDictionary; 

    CFNumberRef height = NULL;
    CFNumberRef width= NULL;
    CFNumberRef sourceFormat = NULL;
    CFNumberRef pixelFormat = NULL; 

    // source must be H.264
    if (inSourceFormat != 'avc1') {
        fprintf(stderr, "Source format is not H.264!\n");
        return paramErr;
    }

    // the avcC data chunk from the bitstream must be present
    if (inAVCCData == NULL) {
        fprintf(stderr, "avc1 decoder configuration data cannot be NULL!\n");
        return paramErr;
    }

    // create a CFDictionary describing the source material for decoder configuration
    decoderConfiguration = CFDictionaryCreateMutable(kCFAllocatorDefault,
                                                     4,
                                                     &kCFTypeDictionaryKeyCallBacks,
                                                     &kCFTypeDictionaryValueCallBacks);

    height = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &inHeight);
    width = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &inWidth);
    sourceFormat = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &inSourceFormat);

    CFDictionarySetValue(decoderConfiguration, kVDADecoderConfiguration_Height, height);
    CFDictionarySetValue(decoderConfiguration, kVDADecoderConfiguration_Width, width);
    CFDictionarySetValue(decoderConfiguration, kVDADecoderConfiguration_SourceFormat, sourceFormat);
    CFDictionarySetValue(decoderConfiguration, kVDADecoderConfiguration_avcCData, inAVCCData);

    // create a CFDictionary describing the wanted destination image buffer
    destinationImageBufferAttributes = CFDictionaryCreateMutable(kCFAllocatorDefault,
                                                                 2,
                                                                 &kCFTypeDictionaryKeyCallBacks,
                                                                 &kCFTypeDictionaryValueCallBacks);

    OSType cvPixelFormatType = kCVPixelFormatType_422YpCbCr8;
    pixelFormat = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &cvPixelFormatType);
    emptyDictionary = CFDictionaryCreate(kCFAllocatorDefault, // our empty IOSurface properties dictionary
                                         NULL,
                                         NULL,
                                         0,
                                         &kCFTypeDictionaryKeyCallBacks,
                                         &kCFTypeDictionaryValueCallBacks);

    CFDictionarySetValue(destinationImageBufferAttributes, kCVPixelBufferPixelFormatTypeKey, pixelFormat);
    CFDictionarySetValue(destinationImageBufferAttributes,
                         kCVPixelBufferIOSurfacePropertiesKey,
                         emptyDictionary);

    // create the hardware decoder object
    status = VDADecoderCreate(decoderConfiguration,
                              destinationImageBufferAttributes, 
                              (VDADecoderOutputCallback*)myDecoderOutputCallback,
                              (void *)myUserData,
                              decoderOut);

    if (kVDADecoderNoErr != status) {
        fprintf(stderr, "VDADecoderCreate failed. err: %d\n", status);
    }

    if (decoderConfiguration) CFRelease(decoderConfiguration);
    if (destinationImageBufferAttributes) CFRelease(destinationImageBufferAttributes);
    if (emptyDictionary) CFRelease(emptyDictionary);

    return status;
}

Output Callback

Listing 2 demonstrates a hypothetical output callback.

Clients should not perform any heavyweight tasks directly in the callback or call into any frameworks which may block for an extended period of time. If the intention is to display the frames, note that the image buffers may not be in display order. Ideally, frames returned in the output callback would be enqueued for processing or display on another thread.

Listing 2  

void myDecoderOutputCallback(void               *decompressionOutputRefCon,
                             CFDictionaryRef    frameInfo,
                             OSStatus           status, 
                             uint32_t           infoFlags,
                             CVImageBufferRef   imageBuffer)
{
    MyUserDataPtr myUserData = (MyUserDataPtr)decompressionOutputRefCon;

    myDisplayFramePtr newFrame = NULL;
    myDisplayFramePtr queueWalker = myUserData->displayQueue;

    if (NULL == imageBuffer) {
        printf("myDecoderOutputCallback - NULL image buffer!\n");
        if (kVDADecodeInfo_FrameDropped & infoFlags) {
            printf("myDecoderOutputCallback - frame dropped!\n");
        }
        return;
    }

    if ('2vuy' != CVPixelBufferGetPixelFormatType(imageBuffer)) {
        printf("myDecoderOutputCallback - image buffer format not '2vuy'!\n");
        return;
    }

    // allocate a new frame and populate it with some information
    // this pointer to a myDisplayFrame type keeps track of the newest decompressed frame
    // and is then inserted into a linked list of  frame pointers depending on the display time
    // parsed out of the bitstream and stored in the frameInfo dictionary by the client
    newFrame = calloc(sizeof(myDisplayFrame), 1);
    newFrame->frame = CVBufferRetain(imageBuffer);
    newFrame->frameDisplayTime = GetFrameDisplayTimeFromDictionary(frameInfo);

    // since the frames we get may be in decode order rather than presentation order
    // our hypothetical callback places them in a queue of frames which will
    // hold them in display order for display on another thread
    pthread_mutex_lock(&myUserData->queueMutex);

    if (!queueWalker || (newFrame->frameDisplayTime < queueWalker->frameDisplayTime)) {
        // we have an empty queue, or this frame earlier than the current queue head
        newFrame->nextFrame = queueWalker;
        myUserData->displayQueue = newFrame;
    } else {
        // walk the queue and insert this frame where it belongs in display order
        Boolean         frameInserted = false;
        myDisplayFramePtr nextFrame = NULL;

        while (!frameInserted) {
            nextFrame = queueWalker->nextFrame;
            if (!nextFrame || (newFrame->frameDisplayTime < nextFrame->frameDisplayTime)) {
                // if the next frame is the tail of the queue, or our new frame is ealier
                newFrame->nextFrame = nextFrame;
                queueWalker->nextFrame = newFrame;
                frameInserted = true;
            }
            queueWalker = nextFrame;
        }
    }

    myUserData->queueDepth++;

    pthread_mutex_unlock(&myUserData->queueMutex);
}

Decoding A Frame

Listing 3 demonstrates the use of VDADecoderDecode to decompress a single frame of H.264 video.

The function takes a CFDataRef containing the compressed video frame and a frame time (provided by the client from the bitstream) which is packaged in a frame info dictionary. The frame info dictionary is passed along to the output callback for this frame when decompressed and may contain any number of custom defined properties supplied by the client as key/value pairs.

Listing 3  

OSStatus DecodeAFrame(VDADecoder inDecoder, CFDataRef inCompressedFrame, int64_t inFrameDisplayTime)
{
    CFDictionaryRef frameInfo = NULL;
    OSStatus status = kVDADecoderNoErr;

    // create a dictionary containg some information about the frame being decoded
    // in this case, we pass in the display time aquired from the stream
    frameInfo = MakeDictionaryWithDisplayTime(inFrameDisplayTime);

    // ask the hardware to decode our frame, frameInfo will be retained and pased back to us
    // in the output callback for this frame
    status = VDADecoderDecode(inDecoder, 0, inCompressedFrame, frameInfo);
    if (kVDADecoderNoErr != status) {
        fprintf(stderr, "VDADecoderDecode failed. err: %d\n", status);
    }

    // the dictionary passed into decode is retained by the framework so
    // make sure to release it here
    CFRelease(frameInfo);

    return status;
}

Download

This download includes the Video Decode Acceleration framework and instructions for installing it into the Mac OS X 10.6 SDK folder.

Xcode additions for the Video Decode Acceleration Framework

Reference

For Mac model information see: About integrated video on Intel-based Macs



Document Revision History

Date Notes
2011-05-24

Editorial

2011-04-27

Editorial

2010-04-19

Added a note describing where to get the framework to link against.

2010-03-29

New document that describes the Video Decode Acceleration Framework APIs available on Mac OS v10.6.3 and later with certain Mac models.



H.265流媒体播放器EasyPlayer.js H5流媒体播放器如何验证视频播放是否走硬解 打开 chrome://gpu, 搜索 Video Acceleration Information, 如果能看到 Decode hevc main 和 Decode hevc main 10 ( macOS 还会显示 Decode hevc main still-picture 和 Decode hevc range extensions) 说明支持硬解(这里 macOS 是个例外,显示仅代表支持 VideoToolbox 解码,至于是否硬解取决于 GPU 支持情况)。 阅读详情

相关推荐

别再让CPU风扇狂转了!手把手教你为Edge/Chrome解锁B站HEVC/AV1硬解,省电又流畅

本文详细指导如何在Edge/Chrome浏览器中解锁B站HEVC/AV1硬解,有效降低CPU占用率,减少设备发热和风扇噪音。通过硬件检测、浏览器设置优化及注册表调整,实现视频流畅播放的同时显著提升电池续航,适合追求高效观影体验的用户。

weixin_27442001的博客 1014

h.264 视频解码的一点小经验

http://blog.youkuaiyun.com/qiqi5521/archive/2007/04/25/1584520.aspx 最近做视频文件264解码,由于对这个领域不是很熟悉,感觉困难重重。不过经过不懈的努力,已经取得一些进展,心里感觉特别庆幸。 刚开始做这个的时候,由于不熟悉,就在网上搜寻资料,网络上的资料虽然多,但是却很杂乱,因此一开始走了不少弯路,现在把我的一点小小心得写出来,后来的

fg313071405的专栏 1100

WebRTC VideoEngine综合应用示例(二)——集成OPENH264编解码器

本系列目前共三篇文章,后续还会更新 WebRTC VideoEngine综合应用示例(一)——视频通话的基本流程 WebRTC VideoEngine综合应用示例(二)——集成OPENH264编解码器 WebRTC VideoEngine综合应用示例(三)——集成X264编码和ffmpeg解码 关注下方公众号,回复“webrtc视频通话”,查看源码地址,是一个可以脱离webrtc那个大项目...

张晖的专栏 1万+

decode_video解码视频帧

decode_video() 不仅仅会对传递进来的 AVPacket 进行解码,如果解码出来数据,就会调 send_frame_to_filters() 发送给滤镜进行处理。

u012117034的博客 2375

Unity 升级引擎版本后构建报错:script class layout is incompatible between the editor and the player

Unity升级引擎版本后,项目报错:script class layout is incompatible between the editor and the player。

学习与分享 592

ANSYS CFX 自定义函数数据导入实战指南

本文详细介绍了在ANSYS CFX中实现自定义函数数据导入的完整流程与实战技巧。通过具体案例,指导用户如何将外部实验或计算数据(如材料属性随温度变化)导入CFX,创建可调用的函数,并正确关联到仿真模型中,从而显著提升仿真的真实性与准确性。

v6b7n8m9q0的博客 702

ffmpeg 源代码简单分析 avcodec decode video2

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ===========

hffgjh的博客 285

Obsidian的Git插件设置配置全流程 -- 简单的电脑端多平台同步方案及常见问题

Git同步obsidian的保姆级教程和常见问题

weixin_44370439的博客 1万+

WebRTC VideoEngine超详细教程(三)——集成X264编码和ffmpeg解码

http://blog.youkuaiyun.com/nonmarking/article/details/47958395 本系列目前共三篇文章,后续还会更新 WebRTC VideoEngine超详细教程(一)——视频通话的基本流程 WebRTC VideoEngine超详细教程(二)——集成OPENH264编解码器 WebRTC VideoEngine超详细教程(三)

liuhongxian的专栏 5147

相机标定原理与张氏标定法

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

heeweii的博客 2280

C++ 核电站

问题描述 一个核电站有n个放核物质的坑,排列在一条直线上。如果连续m个坑中放入核物质就会发生爆炸,所以某些坑中不能放核物质。 本题的任务:对于给定的n和m,求不发生爆炸的放置核物质的方案总数。 输入格式 第一行两个正整数n和m,之间用一个空格隔开。2≤n≤50,2≤m≤5。 输出格式 一行一个正整数,表示方案总数。 输入样例 4 3 输出样例 13 数据规模与约定 2≤n≤50,2≤m≤5 CODE #include<bits/stdc++.h> using namespace

HybridCOW_HORSE的博客 1802

浏览器中支持硬件加速

1 什么是硬件加速 硬件加速是指,应用程序使用计算机硬件的能力,比软件实现的功能能够更有效地执行某些操作。在 Chrome/Chromium 浏览器中,硬件加速能够利用计算机的图形处理单元(GPU)来处理图形密集型任务,例如:播放视频、浏览地图、网页渲染、游戏或需要更快数学运算的任何内容。通过分离特定任务,您的 CPU 就有机会专注于处理其它事务,而 GPU 则专门负责处理图形密集型任务的进程。 2 硬件加速包括哪些内容 硬件加速通常包括3D图形加速和视频硬件解码加速两部分。 3 支持硬件加速需要满

浏览器手艺人的博客 5285

【PLL】分频器设计权衡:从CMOS到CML的电路实现与优化

本文深入探讨了PLL中分频器的设计权衡,比较了CMOS和CML两种电路实现的优缺点。通过实际案例分析,展示了如何在速度、功耗和噪声之间取得平衡,特别是在5G射频芯片和Wi-Fi 6E等高频应用中的优化实践。文章还提供了混合架构设计和电源噪声协同优化的实用技巧,适合电路设计工程师参考。

weixin_42521843的博客 441

Video Acceleration Magnification

CVPR2017 Video Acceleration Magnification

qq_25379821的博客 1083

PCL RANSAC拟合分割多条直线【2026最新版】

使用RANSAC算法拟合分割多条直线,输出每一条直线的拟合参数到控制台,并保存直线点云到本地文件夹。博客长期更新,本文最新更新时间为:2026年5月24日。

点云侠的博客 7974

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

chrome107是否支持hevc解码

hevc chrome gpu

勇气凛凛 1715

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

IOS 硬件GPU解码

导入框架和头文件#import <VideoToolbox/VideoToolbox.h>{ //声明的全局变量 NSData *spsData ; NSData *ppsData; uint8_t pFrameData[BUFFER_SIZE]; CMVideoFormatDescriptionRef videoFormatDescription ; VTDec

书弋江山的博客 1038

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

《Video Acceleration in Chrom{e,ium}{,OS}》硬件视频加速 学习笔记

学习资料:Video Acceleration in Chrom{e,ium}{,OS} 学习时长:2021.06.12-2021.06.13 学习进度 12号晚上,吭哧吭哧把Life of a pixel笔记做完,找了几篇学习笔记整合资料,突然发现过了饭点时间了。 这种沉浸学习的感觉,很棒! ...

Haipai1998的博客 259

chrome是否开启硬件加速

【代码】chrome是否开启硬件加速。

akspusd的专栏 1801

JSMpeg视频直播demo实践

背景: 在升级公司内部头部依赖包的时候遇到的问题: 在升级头部的时候,头部依赖的包,没有锁包,安装依赖库的时候包依赖的包会自动升级 ├─┬ @cnstrong/xxx │ ├─┬ eslint@6.8.0 │ │ ├─┬ inquirer@7.3.3 │ │ │ ├─┬ chalk@4.1.0 chalk@4.1.0需要node10以上版本; 服务器上的node版本是8,所以老项目大部分应该用到的都是node8的版本,项目中的npm库依赖于node8 大部分包对node版本兼容比较好,但是有少数的包比较强依

coco723的博客 3988

ffmpeg支持的硬解码接口

GPU可以支持视频解码,而且在ffmpeg中也提供了解码的接口,一个是NVIDIA的VDPAU,一个是intel的VAAPI。 1、首先安装最新的Nvidia显卡驱动 安装后一般会在/usr/lib下面找到libvdpau库,查看/usr/include下面有无vdpau文件夹及相关头文件,如果没有,在这里下载:ftp://download.nvidia.com/XFree86/vdp

ljh081231的专栏 4万+

jsmpeg 全屏_jsmpeg: MPEG1 Video Decoder in JavaScript

JSMpeg – MPEG1 Video & MP2 Audio Decoder in JavaScriptJSMpeg is a Video Player written in JavaScript. It consists of an MPEG-TS demuxer, MPEG1 video & MP2 audio decoders, WebGL & Canvas2D ...

weixin_39585691的博客 824

FFMPEG学习【libavcodec】:编解码器:硬件加速器桥:VDA

一、文件 vda.h 公共libavcodec VDA头文件。 二、数据结构 struct   vda_context{ VDADecoder decoder; VDA解码器对象。 编码:未使用。 解码:通过libavcodec设置/取消。 CVPixelBufferRef cv_buffer; 包含当前图像数据的Core Video像素缓冲

一世豁然的专栏 3019

HW Video Acceleration in Chrome/Chromium HTML5 video 视频播放硬件加速

Introduction Video decode (e.g. YouTube playback) and encode (e.g. video chat applications) are some of the most complex compute operations on the modern web.  Moving these operations from software

小向的专栏 5064

<2>springboot自定义配置(@Value与@@ConfiguratioinProperties)

文章目录1. @Value的使用 1. @Value的使用

做一个有信仰de人的博客 650
上一篇: 阻止iOS设备锁屏
下一篇: iOS 使用socket 实现rtsp +rtp 协议
leonpengweicn
博客等级 码龄18年 149粉丝 172原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值