VCodecImsdk C++ library v4.0.0

Low-latency video encoding and decoding library for H264, HEVC(H265) and JPEG codecs based on Intel Media SDK.

Overview

VCodecImsdk C++ library based on Intel Media SDK and provides hardware video encoding/decoding for H264, HEVC and JPEG codecs on Intel HD Graphics . VCodecImsdk class inherits interface and data structures from open source VCodec library. VCodecImsdk uses Intel Media SDK. The library provides simple programming interface to be implemented in different C++ projects. The library was written with C++11 standard. The libraries are supplied as source code only. The library is a CMake project.

class VCodecImsdk : public VCodec {
public:
    /// Encode video frame.
    bool transcode(Frame& src, Frame& dst);
    /// Set parameter value.
    bool setParam(VCodecParam id, float value);
    /// Get parameter value.
    float getParam(VCodecParam id);
    /// Execute command.
    bool executeCommand(VCodecCommand id);
};

How to use

Source code bellow is simple application which encodes video frames (NV12 pixel format, pseudo code used) by H264 codec and writes results to file:

#include "VCodecImsdk.h"
using namespace cr::video;

int main(void) {
    // Create codec object and set parameters.
    VCodecImsdk codec;
    codec.setParam(VCodecParam::BITRATE_KBPS, 2500);
    codec.setParam(VCodecParam::GOP, 30);
    codec.setParam(VCodecParam::FPS, 30);
    // Create input NV12 and output H264 frames.
    Frame dstH264; dstH264.fourcc = Fourcc::H264;
    Frame srcNv12;
    // Create output file.
    FILE *out = fopen("out.h264", "w+b");
    // Encode and record 200 frames.
    for (int n = 0; n < 200; ++n) {
        // Get NV12 frame pseudo code.
        srcNv12 = getNextFrame();
        // Encode.
        if (!codec.transcode(srcNv12, dstH264))
            continue;
        // Write to file.
        fwrite(dstH264.data, dstH264.size, 1, out);
    }
    // Close file.
    fclose(outputFile);
    return 1;
}

Price and Terms

The VCodecImsdk C++ library is supplied under a license in source code. Library pricing is available upon request info@constantrobotics.com

Downloads

VSourceImsdk C++ library programmer’s manual: DOWNLOAD