1---2name: cv181x-media3description: Expert guide for CV181X/CV182X/CV180X (SG200X) multimedia development using CVI MPI API. Use this skill when working with: VI (video input/camera/ISP), VPSS (video processing/scaling/crop), VENC (H.264/H.265/JPEG encoding), VDEC (decoding), VB (video buffer pools), SYS binding, or any CVI_* API calls. Covers camera pipeline setup, offline VPSS processing, VB pool planning, and error diagnosis (ERR_VPSS_NOBUF, ERR_VB_NOBUF). API details in references/.4---56# CV181X/CV182X/CV180X Multimedia Skill78## Complete Reference Index910All 18 reference files with searchable keywords:1112| File | Keywords | Key APIs |13|------|----------|----------|14| `references/vi.md` | camera, sensor, ISP, MIPI, DEV, PIPE, CHN, video input | `CVI_VI_*`, `CVI_ISP_*`, `CVI_MIPI_*` |15| `references/vpss.md` | scaling, crop, resize, rotate, cvtColor, format conversion, group, channel | `CVI_VPSS_*`, `SendFrame`, `GetChnFrame` |16| `references/venc.md` | encode, H.264, H.265, HEVC, JPEG, MJPEG, bitrate, GOP | `CVI_VENC_*`, `SendFrame`, `GetStream` |17| `references/vdec.md` | decode, JPEG decode, H.264 decode, bitstream | `CVI_VDEC_*`, `SendStream`, `GetFrame` |18| `references/vb.md` | buffer pool, VB, memory, block, pool sizing, CommonPool | `CVI_VB_*`, `GetBlock`, `ReleaseBlock` |19| `references/sys.md` | bind, unbind, init, exit, VI_VPSS_MODE, VPSS_MODE | `CVI_SYS_*`, `Bind`, `SetVIVPSSMode` |20| `references/vo.md` | display, output, LCD, HDMI, layer, framebuffer | `CVI_VO_*`, `SendFrame`, `ChnShow` |21| `references/rgn.md` | OSD, overlay, region, text, graphics, privacy mask | `CVI_RGN_*`, `AttachToChn`, `SetBitMap` |22| `references/gdc.md` | distortion, fisheye, LDC, rotation, mesh, warp | `CVI_GDC_*`, `AddCorrectionTask` |23| `references/audio.md` | audio, microphone, speaker, AI, AO, AENC, ADEC, VQE | `CVI_AI_*`, `CVI_AO_*`, `CVI_AENC_*` |24| `references/ion.md` | ION, DMA, cache, flush, invalidate, physical address | `CVI_SYS_IonAlloc`, `IonFlushCache` |25| `references/debug.md` | /proc, log, debug, status, diagnostics | `/proc/cvitek/*`, log level |26| `references/troubleshooting.md` | error, ERR_VPSS_NOBUF, ERR_VB_NOBUF, failure, fix | error codes, solutions |27| `references/binding-cookbook.md` | concurrent, dual pipeline, online, offline, scenario | multi-scenario design |28| `references/integration-guide.md` | integration, cross-module, ownership, lifecycle | system design rules |29| `references/platform.md` | SDK, path, pixel format, CV181X, CV182X, CV180X | platform differences |30| `references/overview.md` | architecture, workflow, pipeline, introduction | system overview |31| `references/scenarios.md` | example, surveillance, doorbell, NVR, application | complete examples |3233---3435## Quick Lookup3637### By Task3839| Task | Reference |40|------|-----------|41| Camera capture | `references/vi.md` |42| Video scaling/crop/rotate | `references/vpss.md` |43| H.264/H.265/JPEG encode | `references/venc.md` |44| JPEG/H.264 decode | `references/vdec.md` |45| Buffer pool planning | `references/vb.md` |46| Module binding | `references/sys.md` |47| Video display | `references/vo.md` |48| OSD/overlay | `references/rgn.md` |49| Fisheye correction | `references/gdc.md` |50| Audio capture/playback | `references/audio.md` |51| DMA memory | `references/ion.md` |52| Debugging | `references/debug.md` |53| Error diagnosis | `references/troubleshooting.md` |5455### By Error Code5657| Error | Reference |58|-------|-----------|59| `ERR_VPSS_NOBUF (0xc006800e)` | `references/troubleshooting.md` |60| `ERR_VB_NOBUF` | `references/vb.md` |61| `ERR_VENC_NOBUF` | `references/venc.md` |62| `ERR_VI_NOTREADY` | `references/vi.md` |63| Bind failure | `references/sys.md` |6465### By Pipeline6667| Pipeline | References |68|----------|------------|69| Camera -> VPSS (online) | `vi.md`, `vpss.md`, `sys.md` |70| File -> VPSS (offline) | `vpss.md`, `vb.md` |71| JPEG decode -> VPSS | `vdec.md`, `vpss.md` |72| VPSS -> VENC | `venc.md`, `sys.md` |73| Dual pipeline | `references/binding-cookbook.md` |7475---7677## Private Operating Procedures7879### 1. Authoritative Source Order801. SDK headers in `cvi_mpi/include/`812. SDK samples in `cvi_mpi/sample/`823. Never: external repos without header verification8384### 2. VPSS Input Ownership85- VPSS group for ONE input type: ISP or MEM86- Never switch between Bind and SendFrame at runtime87- Concurrent ISP + MEM: separate groups and VB pools8889### 3. VI-VPSS Mode Selection9091| Mode | Use Case |92|------|----------|93| `VI_OFFLINE_VPSS_ONLINE` | Camera pipeline (recommended) |94| `VI_OFFLINE_VPSS_OFFLINE` | Maximum flexibility |95| `VI_ONLINE_VPSS_ONLINE` | Lowest latency |9697### 4. Binding Requirements98- Control plane: `CVI_SYS_Bind` establishes relationship99- Data plane: Mode setting determines data flow100- Binding required even in ISP direct mode101- Unbind before stop; bind after start102103### 5. Camera Readiness104- Warm up pipeline after start105- Discard first few frames before capture106107### 6. VENC SendFrame Memory108- Must use VB pool, not raw ION109- Use `CVI_VB_GetBlock()`, set `frame.u32PoolId`110111### 7. Diagnostics112On failure: `/proc/cvitek/{sys,vb,vi,vpss,vdec,venc}`113114---115116## Module Init Order117118```text1191. CVI_VB_SetConfig + CVI_VB_Init1202. CVI_SYS_Init1213. CVI_SYS_SetVIVPSSMode1224. CVI_SYS_SetVPSSModeEx1235. VI: sensor -> mipi -> dev -> pipe -> isp -> chn1246. VPSS: CreateGrp -> SetChnAttr -> EnableChn -> StartGrp1257. CVI_SYS_Bind1268. Warmup127```128129---130131## VPSS Mode Reference132133### VPSS_MODE_DUAL134```text135DEV0 = VPSS_INPUT_MEM -> Offline (SendFrame)136DEV1 = VPSS_INPUT_ISP -> Camera (Bind)137```138139### VpssDev Selection140| Input | VpssDev |141|-------|---------|142| Camera (ISP) | 1 |143| File/Memory | 0 |144145---146147## VB Pool Sizing148149```text150Size = COMMON_GetPicBufferSize(w, h, fmt, DATA_BITWIDTH_8, COMPRESS_MODE_NONE, 0)151152Counts: Camera=4-6, VPSS=3-4, Encode=2-3, Decode=4-6153```154155---156157## Debug Commands158159```bash160cat /proc/cvitek/sys | grep -A 10 "BIND RELATION"161cat /proc/cvitek/vb | grep -A 20 "PoolId"162cat /proc/cvitek/vi | grep -A 5 "VI CHN STATUS"163cat /proc/cvitek/vpss | grep -A 20 "WORK STATUS"164echo "VI=7" > /proc/cvitek/log165```166167---168169**Version**: 2.4.0 | **Updated**: 2026-01-20 | **Platform**: SG200X