Skip to content

H264x Decoder

Name

h26xdec - h26x decoding

Description

KNEO Pi provides an application called h26xdec designed for H26x video decoding demostrations. This application reads a video file and decode it into a series of YUV files.

Before starting the decoding process, ensure that the appropriate driver is loaded.

Here is a sample configuration file (config.ini) used for decoding: * codec: Specify the codec to use, 0 for H.264, 1 for H.265 * inputpath: Path to the input video file * outputpath: Path where the decoded YUV file will be saved * width and height: Define the resolution of the video * writefile: Set to 1 to save the decoded YUV file

codec = 0   # 0:H264 1:H265
inputpath = "vtcs_srb_ch1_1920x1080.h264"
outputpath = "test_1920x1080_264_decoder.yuv"
width = 1920
height = 1080
writefile = 1

Use the following command to start the decoding process:

h26xdec -c config.ini

Synopsis

VMF_VDEC supports three types of video decoders, including H.265/HEVC, H.264/AVC, and JPEG.To initialize the VMF_VDEC module, the user can call the VMF_VDEC_Init function to select the decoder type by specifying the value of VMF_VDEC_CODEC_TYPE. After the initialization is done, user can get decoded state by calling VMF_VDEC_GetState function.The video is decompressed by VMF_VDEC_ProcessOneFrame, and the video decoder has to be released by VMF_VDEC_Release before the end of the program.

The simple decoder app flow is shown below:

Options

-c Specify the decoding configuration file

Example

To decode the specified video file according to the parameters defined in the config.ini file and output a YUV file

h26xdec -c config.ini

# config.ini
[config]
codec = 0   # 0:H264 1:H265
inputpath = "vtcs_srb_ch1_1920x1080.h264"
outputpath = "test_1920x1080_264_decoder.yuv"
width = 1920
height = 1080
writefile = 1