libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
cst.c File Reference
`#include <stdint.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "aaruformat.h"`

Go to the source code of this file.

## Functions
int32_t | aaruf_cst_transform (const uint8_t *interleaved, uint8_t *sequential, const size_t length)
| Transforms interleaved subchannel data to sequential format.
int32_t | aaruf_cst_untransform (const uint8_t *sequential, uint8_t *interleaved, const size_t length)
| Reverses the CST (Claunia's Subchannel Transform) transformation from sequential to interleaved data.

## Function Documentation

## ◆ aaruf_cst_transform()

int32_t aaruf_cst_transform | ( | const uint8_t * | interleaved,
|  | uint8_t * | sequential,
|  | const size_t | length )

Transforms interleaved subchannel data to sequential format.

Converts interleaved subchannel data into a sequential format for further processing.

Parameters

  interleaved | Pointer to the interleaved data buffer.
  sequential | Pointer to the output sequential data buffer.
  length | Length of the data buffer.

Returns
  AARUF_STATUS_OK on success, or an error code on failure.

Definition at line 35 of file cst.c.

References AARU_CALL, AARU_EXPORT, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_ENOUGH_MEMORY, and AARUF_STATUS_OK.

Referenced by write_sector_subchannel().

## ◆ aaruf_cst_untransform()

int32_t aaruf_cst_untransform | ( | const uint8_t * | sequential,
|  | uint8_t * | interleaved,
|  | const size_t | length )

Reverses the CST (Claunia's Subchannel Transform) transformation from sequential to interleaved data.

Parameters

  sequential | Pointer to the sequential data buffer.
  interleaved | Pointer to the output buffer for interleaved data.
  length | Length of the data in bytes.

Returns
  AARUF_STATUS_OK on success, or an error code on failure.

Definition at line 193 of file cst.c.

References AARU_CALL, AARU_EXPORT, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_ENOUGH_MEMORY, and AARUF_STATUS_OK.

Referenced by process_data_block().