From f2b1c649ebba8337ffb158b82324d2e595b6afb8 Mon Sep 17 00:00:00 2001 From: shizhenghui Date: Tue, 9 Jul 2024 18:25:41 +0800 Subject: [PATCH] nxcodec: add .rst documentation Signed-off-by: shizhenghui --- .../applications/system/nxcodec/index.rst | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/applications/system/nxcodec/index.rst diff --git a/Documentation/applications/system/nxcodec/index.rst b/Documentation/applications/system/nxcodec/index.rst new file mode 100644 index 0000000000..ad2cc05481 --- /dev/null +++ b/Documentation/applications/system/nxcodec/index.rst @@ -0,0 +1,45 @@ +================================================ +``nxcodec`` NxCodec video codec test application +================================================ + +This application is a command-line tool that verifies the functionality of +NuttX codecs. Specifically, it serves as a verification tool for v4l2m2m. + +Usage +----- + +This page shows nxcodec options, For a complete list of nxcodec options +just run ``nxcodec -h``:: + + ap> nxcodec -h + NxCodec Version: 1.00 + Usage: nxcodec -d devname -s [wxh] -f [informt] -i infile -f [outformat] -o outfile + Default settings for decoder parameters + + [-d | --device] Video device name + [-s | --size] Size of stream + [-h | --help] Print this message + [-f | --format] Format of stream + [-i | --infile] Input filename for M2M devices + [-o | --outfile] Outputs stream to filename + +By default, it is the decodeing mode, with a default parameter size of +640x480, input format of H264, and output format of YUV420. The ``-i`` +parameter corresponds to the input parameter before it, and the ``-i`` +parameter corresponds to the output parameter after it. + +Examples +-------- + +Decode an H264 stream file into a yuv420 file:: + + mount -t hostfs -o fs=/path/from/ /stream + nxcodec -d /dev/video1 -s 256x144 -i /stream/256x144.h264 -o /stream/256x144-yuv420p.yuv + +Encode a yuv420 file as an h264 stream file:: + + mount -t hostfs -o fs=/path/from/ /stream + nxcodec -d /dev/video2 -s 256x144 -f YU12 -i /stream/256x144-yuv420p.yuv -f H264 -o /stream/256x144.h264 + +Author: ZhengHui SHI +Date: 9 July 2024