|
fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
|
FSEQ compression block loading implementation. More...
#include "comblock.h"#include <assert.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <zstd.h>#include "tinyfseq.h"#include "fseq/fd.h"#include "std2/errcode.h"#include "std2/fc.h"
Macros | |
| #define | COMBLOCK_SIZE 8 |
| Size of a FSEQ file format compression block entry in bytes. | |
Functions | |
| static int | ComBlock_findAbsoluteAddr (struct FC *fc, const struct tf_header_t *seq, const int index, uint32_t *const cbAddr, uint32_t *const cbSize) |
| Calculates the absolute address of the given compression block index and its encoded size. | |
| static int | ComBlock_readZstd (struct FC *fc, const struct tf_header_t *seq, const int index, struct fd_list_s *list) |
| Reads the given compression block (by index) from the given file controller and decompresses it using zstd. | |
| int | ComBlock_read (struct FC *fc, const struct tf_header_t *seq, const int index, struct fd_list_s *list) |
| Reads the given compression block (by index) from the given file controller and decompresses it (if supported). | |
| int | ComBlock_count (struct FC *fc, const struct tf_header_t *seq) |
Determines the number of compression blocks available within the given sequence file. The FSEQ file header already contains a field, compressionBlockCount, that specifies the number of compression blocks, but other encoding programs are known to write additional zero-sized compression blocks to align write operations. This results in a discrepancy between the header field and the actual number of playable blocks in the sequence file. | |
FSEQ compression block loading implementation.
| #define COMBLOCK_SIZE 8 |
Size of a FSEQ file format compression block entry in bytes.
| int ComBlock_count | ( | struct FC * | fc, |
| const struct tf_header_t * | seq ) |
Determines the number of compression blocks available within the given sequence file. The FSEQ file header already contains a field, compressionBlockCount, that specifies the number of compression blocks, but other encoding programs are known to write additional zero-sized compression blocks to align write operations. This results in a discrepancy between the header field and the actual number of playable blocks in the sequence file.
| fc | target file controller instance |
| seq | sequence file for file layout information |


|
static |
Calculates the absolute address of the given compression block index and its encoded size.
| fc | target file controller instance |
| seq | sequence file for file layout information |
| index | index of the compression block to look up |
| cbAddr | out pointer to the absolute address of the compression block |
| cbSize | out pointer to the size of the compression block |


| int ComBlock_read | ( | struct FC * | fc, |
| const struct tf_header_t * | seq, | ||
| int | index, | ||
| struct fd_list_s * | list ) |
Reads the given compression block (by index) from the given file controller and decompresses it (if supported).
| fc | target file controller instance |
| seq | sequence file for file layout information |
| index | index of the compression block to read |
| list | pointer to the list for storing the decompressed frame data |


|
static |
Reads the given compression block (by index) from the given file controller and decompresses it using zstd.
| fc | target file controller instance |
| seq | sequence file for file layout information |
| index | index of the compression block to read |
| list | out pointer to the decompressed block data (array of frames) or NULL on failure |

