{"id":32652543,"url":"https://github.com/opensensor/openimp","last_synced_at":"2025-10-31T08:07:17.655Z","repository":{"id":318923402,"uuid":"1074022333","full_name":"opensensor/openimp","owner":"opensensor","description":"An open implementation replacement of libimp","archived":false,"fork":false,"pushed_at":"2025-10-15T18:16:36.000Z","size":477,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-16T13:36:13.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-11T02:26:56.000Z","updated_at":"2025-10-15T18:16:40.000Z","dependencies_parsed_at":"2025-10-17T07:42:19.049Z","dependency_job_id":null,"html_url":"https://github.com/opensensor/openimp","commit_stats":null,"previous_names":["opensensor/openimp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/opensensor/openimp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fopenimp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fopenimp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fopenimp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fopenimp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensensor","download_url":"https://codeload.github.com/opensensor/openimp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2Fopenimp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281953450,"owners_count":26589146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-31T08:04:01.352Z","updated_at":"2025-10-31T08:07:17.645Z","avatar_url":"https://github.com/opensensor.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenIMP - Open Implementation of Ingenic Media Platform\n\nThis project provides an open-source stub implementation of the Ingenic Media Platform (IMP) libraries, reverse-engineered from the T31 kernel module and designed to be compatible with the [prudynt-t](https://github.com/gtxaspec/prudynt-t) project.\n\n## Project Goals\n\n1. **Scope-Limited Implementation**: Only implement the IMP API functions actually used by prudynt-t\n2. **Binary Analysis**: Use Binary Ninja to reverse engineer data structures from the actual kernel module\n3. **API Compatibility**: Provide header-compatible interfaces for compilation\n4. **Stub Implementation**: Initial implementation will be stubs that can be filled in with actual functionality\n\n## Project Structure\n\n```\nopenimp/\n├── include/\n│   ├── imp/\n│   │   ├── imp_common.h       # Common definitions\n│   │   ├── imp_system.h       # System module\n│   │   ├── imp_isp.h          # ISP module\n│   │   ├── imp_framesource.h  # Frame source module\n│   │   ├── imp_encoder.h      # Encoder module\n│   │   ├── imp_audio.h        # Audio module\n│   │   ├── imp_osd.h          # OSD module\n│   │   ├── imp_ivs.h          # IVS module\n│   │   └── imp_ivs_move.h     # IVS motion detection\n│   └── sysutils/\n│       └── su_base.h          # Sysutils base\n├── src/\n│   ├── imp_system.c           # System implementation\n│   ├── imp_isp.c              # ISP implementation\n│   ├── imp_framesource.c      # Frame source implementation\n│   ├── imp_encoder.c          # Encoder implementation\n│   ├── imp_audio.c            # Audio implementation\n│   ├── imp_osd.c              # OSD implementation\n│   ├── imp_ivs.c              # IVS implementation\n│   └── su_base.c              # Sysutils implementation\n├── tests/\n│   └── api_test.c             # API surface test\n├── Makefile                   # Build system\n├── IMP_API_ANALYSIS.md        # API analysis document\n└── README.md                  # This file\n```\n\n## API Modules\n\n### Implemented Modules\n\n- **IMP_System**: System initialization, cell binding, versioning\n- **IMP_ISP**: Image Signal Processor control and tuning\n- **IMP_FrameSource**: Video frame source management\n- **IMP_Encoder**: Video encoding (H264/H265/JPEG)\n- **IMP_AI**: Audio input\n- **IMP_AENC**: Audio encoding\n- **IMP_ADEC**: Audio decoding\n- **IMP_OSD**: On-Screen Display\n- **IMP_IVS**: Intelligent Video System (motion detection)\n- **SU_Base**: Sysutils base functions\n\n## Platform Support\n\nThe implementation targets compatibility with multiple Ingenic SoC platforms:\n- T21\n- T23\n- T31 (primary target)\n- C100\n- T40\n- T41\n\nPlatform-specific differences are handled through conditional compilation.\n\n## Building\n\n### Prerequisites\n\n- GCC or compatible C compiler\n- Make\n- pthread library\n- For cross-compilation: appropriate toolchain (e.g., mipsel-linux-gnu-gcc)\n\n### Build Commands\n\n```bash\n# Build for T31 (default)\nmake\n\n# Build for other platforms\nmake PLATFORM=T23\nmake PLATFORM=T40\n\n# Cross-compile for MIPS\nmake CC=mipsel-linux-gnu-gcc\n\n# Install to system\nsudo make install\n\n# Install to custom location\nmake install PREFIX=$HOME/.local\n\n# Clean build artifacts\nmake clean\n```\n\n### Build Output\n\nThis will build the following libraries in the `lib/` directory:\n- `libimp.so` - IMP shared library\n- `libimp.a` - IMP static library\n- `libsysutils.so` - Sysutils shared library\n- `libsysutils.a` - Sysutils static library\n\n## Testing\n\n```bash\nmake test\n```\n\nRuns the API surface test to verify all expected functions are present and callable.\n\n## Usage with prudynt-t\n\nTo use this library with prudynt-t:\n\n1. Build the libraries:\n   ```bash\n   make\n   ```\n\n2. Install headers and libraries to your toolchain:\n   ```bash\n   make install PREFIX=/path/to/toolchain\n   ```\n\n3. Build prudynt-t against these libraries\n\n## Development Status\n\n- [x] API analysis complete (130+ functions documented)\n- [x] Project structure created\n- [x] Header files defined (all modules)\n- [x] Stub implementations created (all modules)\n- [x] Data structures reverse engineered from binary\n- [x] Build system working (Makefile with platform support)\n- [x] API surface test passing\n- [ ] Hardware integration (ISP, encoder, audio)\n- [ ] Functional video pipeline\n- [ ] Functional audio pipeline\n- [ ] Memory management (VBM, physical memory)\n\n**Current Status**: Fully functional stub implementation. All API functions are present and callable, but hardware interaction is not implemented. Suitable for development and testing of applications that use the IMP API.\n\n\n## 24-hour milestone: End-to-end RTSP streaming on T31\n\nIn under 24 hours we achieved a full bring-up of prudynt-t streaming on Ingenic T31 using this OpenIMP shim:\n- Cross-compiled prudynt-t against the Buildroot toolchain and staging IMP/Live555 libs\n- Fixed a startup crash by default-initializing config when no prudynt.json is present\n- Brought up RTSP server (Live555) and confirmed video streaming from ch0/ch1\n- Resolved a Live555 fast-profile/truncation issue that caused the stream to freeze after a few seconds\n  - Defensive measure: advertise a larger `maxFrameSize` from the source to prevent NAL truncation\n\nHow to reproduce the milestone quickly:\n1. Build OpenIMP (this repo): `make`\n2. Build prudynt-t (see prudynt-t/README.md for exact env/toolchain notes); produce `prudynt-t/bin/prudynt`\n3. Deploy `prudynt` to the device (e.g., `/opt`) and run it; connect to `rtsp://\u003cdevice-ip\u003e/ch0`\n\nNotes:\n- If you see any freeze on large IDR frames, ensure your Live555 is patched (fast profile) and/or increase the source max frame size.\n- Optional: set a shared RTP timestamp base to keep sinks aligned.\n\n## Contributing\n\nThis is a reverse engineering project. Contributions should:\n1. Reference the Binary Ninja analysis where applicable\n2. Maintain API compatibility with prudynt-t usage\n3. Document any assumptions or unknowns\n\n## License\n\nThis is a clean-room reverse engineering effort. The API signatures are derived from public headers and usage in open-source projects like prudynt-t.\n\n## Documentation\n\n- **IMP_API_ANALYSIS.md** - Comprehensive analysis of all IMP functions used by prudynt-t\n- **BINARY_ANALYSIS.md** - Reverse engineering findings from libimp.so binary analysis\n- **STATUS.md** - Current project status and implementation details\n\n## References\n\n- [prudynt-t](https://github.com/gtxaspec/prudynt-t) - The primary consumer of this API\n- Ingenic IMP SDK Documentation\n- Binary analysis via Binary Ninja MCP (libimp.so T31 v1.1.6)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Fopenimp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensensor%2Fopenimp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Fopenimp/lists"}