Skip to content

Commit

Permalink
Updated readme, fixed CL FS bug (still disabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Jun 28, 2024
1 parent 705915e commit dfa2b89
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ComputerCraft.
-ifile, --input=file Input image or video
-Sfile, --subtitle=file ASS-formatted subtitle file to add to the video
-fformat, --format=format Force a format to use for the input file
-opath, --output=path Output file path
-l, --lua Output a Lua script file (default for images; only does one frame)
-n, --nfp Output an NFP format image for use in paint (changes proportions!)
Expand All @@ -92,14 +93,16 @@ ComputerCraft.
-Wsize, --width=size Resize the image to the specified width
-Hsize, --height=size Resize the image to the specified height
-M[WxH[@S]], --monitor-size[=WxH[@S]] Split the image into multiple parts for large monitors (images only)
--trim-borders For multi-monitor images, skip pixels that would be hidden underneath monitor borders, keeping the image size consistent
--disable-opencl Disable OpenCL computation; force CPU-only
-h, --help Show this help
```

Custom palettes are specified as a list of 16 comma-separated 6-digit hex codes, optionally preceeded by `#`. Blank entries can be left empty or filled with an `X`. Example: `#FFFFFF,X,X,X,X,X,X,#999999,777777,,,,,,,#000000`

### Playback programs
* `32vid-player.lua` plays back 32vid video/audio files from the disk. Simply give it the file name and it will decode and play the file.
* `32vid-player-mini.lua` plays back a limited set of 32vid video/audio files from the disk or web in real-time. Simply give it the file name or URL and it will decode and play the file in real-time.
* `32vid-player.lua` plays back separate-stream 32vid video/audio files from the disk. Simply give it the file name and it will decode and play the file. (Deprecated)
* `32vid-player-mini.lua` plays back combined-stream 32vid video/audio files from the disk or web in real-time. Simply give it the file name or URL and it will decode and play the file in real-time.
* `bimg-player.lua` displays BIMG images or animations. Simply give it the file name and it will decode and play the file.
* `raw-player.lua` plays back raw video files from the disk. Simply give it the file name and it will decode and play the file.
* `websocket-player.lua` plays a stream from a sanjuuni WebSocket server. Simply give it the WebSocket URL and it will play the stream, with audio if a speaker is attached.
Expand Down
2 changes: 2 additions & 0 deletions sanjuuni.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="32vid-player-mini.lua" />
<None Include="32vid-player.lua" />
<None Include="bimg-player.lua" />
<None Include="configure.ac" />
<None Include="Makefile.in" />
<None Include="raw-player.lua" />
Expand Down
6 changes: 6 additions & 0 deletions sanjuuni.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<None Include="configure.ac">
<Filter>Resource Files</Filter>
</None>
<None Include="32vid-player-mini.lua">
<Filter>Resource Files</Filter>
</None>
<None Include="bimg-player.lua">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\cc-pixel.cpp">
Expand Down
2 changes: 1 addition & 1 deletion src/quantize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ Mat ditherImage(Mat& image, const std::vector<Vec3b>& palette, OpenCL::Device *
OpenCL::Memory<float> error(*device, image.width * (image.height + 1) * 3, 1, false, true);
OpenCL::Memory<uint> workgroup_rider(*device, 1, 1, false, true);
OpenCL::Memory<uint> workgroup_progress(*device, progress_size, 1, false, true);
OpenCL::Memory<uint> progress(*device, WORKGROUP_SIZE, 1, false, true);
OpenCL::LocalMemory<uint> progress(WORKGROUP_SIZE);
device->get_cl_queue().enqueueFillBuffer<float>(error.get_cl_buffer(), 0.0f, 0, image.width * (image.height + 1) * 3 * sizeof(float));
palette_mem.enqueue_write_to_device();
image.upload();
Expand Down

0 comments on commit dfa2b89

Please sign in to comment.