daala/daaladec.h(3)

πŸ“¦
version 0^20250205git24f889a Β· 3 versions
, in epel 10, fedora 43

NAME πŸ’–

daala/daaladec.h β€” the libdaala C decoding API, bestie. That's it, that's the whole vibe. ✨

(Also: this page lives in the Library Functions Manual, section 3. Okay so now you know where you are. 🫢)


SYNOPSIS ✨

#include 'codec.h'

Data Structures 🧚

struct od_acct_symbol
struct od_accounting_dict
struct od_accounting
  • od_accounting_dict β€” no cap, it's the dictionary for translating strings into id. πŸ“–

Macros πŸŽ€

#define _daala_daaladec_H   (1)
#define OD_DECCTL_SET_BSIZE_BUFFER   (7001)
#define OD_DECCTL_SET_FLAGS_BUFFER   (7003)
#define OD_DECCTL_SET_MV_BUFFER   (7005)
#define OD_DECCTL_SET_MC_IMG   (7007)
#define OD_DECCTL_GET_ACCOUNTING   (7009)
#define OD_DECCTL_SET_ACCOUNTING_ENABLED   (7011)
#define OD_DECCTL_SET_DERING_BUFFER   (7013)
#define OD_ACCT_FRAME   (10)
#define OD_ACCT_MV   (11)
#define MAX_SYMBOL_TYPES   (256)
  • OD_DECCTL_SET_MC_IMG β€” copies the motion compensated reference into a user supplied daala_image. Literally what it says on the tin. πŸ’…

Typedefs πŸ¦‹

Decoder state

The following data structures are opaque, and their contents are not publicly defined by this API.

Referring to their internals directly is unsupported, and may break without warning. Do not do it. I am not kidding. πŸ’€
typedef struct daala_dec_ctx daala_dec_ctx
typedef struct daala_setup_info daala_setup_info
  • daala_dec_ctx β€” the decoder context. Your main character. πŸ‘‘
  • daala_setup_info β€” setup information.

Functions πŸ’œ

Functions for decoding

You must link to libdaalaadec if you use any of the functions in this section. Fr fr, no link no decode. πŸ”—

int daala_decode_header_in (daala_info *info, daala_comment *dc,
    daala_setup_info **ds, const daala_packet *dp)

Parses the header packets from an Ogg Daala stream. πŸ“

daala_dec_ctx * daala_decode_create (const daala_info *info, const
    daala_setup_info *setup)

Allocates a decoder instance. Baby's first decoder. 🌱

void daala_setup_free (daala_setup_info *setup)

Releases all storage used for the decoder setup information. Bye bye, storage. πŸ‘‹

int daala_decode_ctl (daala_dec_ctx *dec, int req, void *buf, size_t
    buf_sz)

Decoder control function. πŸŽ›οΈ

void daala_decode_free (daala_dec_ctx *dec)

Frees an allocated decoder instance.

int daala_decode_packet_in (daala_dec_ctx *dec, const daala_packet
    *dp)

Retrieves decoded video data frames.

int daala_decode_img_out (daala_dec_ctx *dec, daala_image *img)

Outputs the next available decoded image frame. ✨


Detailed Description 🌈

The libdaala C decoding API. Periodt. πŸ’…


Macro Definition Documentation πŸŽ€

#define OD_DECCTL_SET_MC_IMG (7007)

Copy the motion compensated reference into a user supplied daala_image.

Parameters

  • <tt>daala_image*</tt> β€” Pointer to the user supplied daala_image. Image must be allocated by the caller, and must be the same format as the decoder output images. (Like, don't get cute with the format, it will not match and you will be sad. 😭)

Typedef Documentation πŸ¦‹

typedef struct daala_setup_info daala_setup_info

Setup information. This contains auxiliary information decoded from the setup header by daala_decode_header_in() to be passed to daala_decode_create(). It can be re-used to initialize any number of decoders, and can be freed via daala_setup_free() at any time. Reusable AND freeable whenever β€” that's iconic behavior honestly. 🫢


Function Documentation πŸ’œ

int daala_decode_header_in (daala_info * info, daala_comment * dc, daala_setup_info ** ds, const daala_packet * dp)

Parses the header packets from an Ogg Daala stream. To use this function, bestie, listen up:

  • Initialize a daala_info structure using daala_info_init().
  • Initialize a daala_comment structure using daala_comment_init().
  • Initialize a daala_setup_info pointer to NULL.
  • Call this function three times, passing in pointers to the same daala_info, daala_comment, and daala_setup_info pointer each time, and the three successive header packets. Three. Times. πŸ”₯

Parameters

  • info β€” The daala_info structure to fill in. This must have been previously initialized with daala_info_init(). The application may begin using the contents of this structure after the first header is decoded, though it must continue to be passed in unmodified on all subsequent calls.
  • dc β€” The daala_comment structure to fill in. This must have been previously initialized with daala_comment_init(). The application may immediately begin using the contents of this structure after the second header is decoded, though it must continue to be passed in on all subsequent calls. Users should free the returned data with daala_comment_clear().
  • ds β€” A pointer to a daala_setup_info pointer to fill in. The contents of this pointer must be initialized to NULL on the first call, and the returned value must continue to be passed in on all subsequent calls.
  • dp β€” The current header packet to process.

Returns

A positive value indicates that a Daala header was successfully processed and indicates the remaining number of headers to be read.

Return values

  • 0 β€” The last header was processed and the next packet will contain video. πŸŽ‰
  • OD_EFAULT β€” One of info, dc, or ds was NULL, or there was a memory allocation failure.
  • OD_EBADHEADER β€” op was NULL, the packet was not the next header packet in the expected sequence, or the format fo the header data was invalid.
  • OD_EVERSION β€” The packet data was a Daala header, but for a bitstream version not decodable with this version of libdaaladec.
  • OD_ENOTFORMAT β€” The packet was not a Daala header.

daala_dec_ctx * daala_decode_create (const daala_info * info, const daala_setup_info * setup)

Allocates a decoder instance.

Parameters

  • info β€” A daala_info struct filled via daala_decode_header_in().
  • setup β€” A daala_setup_info handle returned via daala_decode_header_in().

Returns

The initialized daala_dec_ctx handle.

Return values

  • NULL β€” If the decoding parameters were invalid. πŸ™ˆ

void daala_setup_free (daala_setup_info * setup)

Releases all storage used for the decoder setup information. This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with daala_decode_header_in().

Parameters

  • setup β€” The setup information to free. This can safely be NULL.

int daala_decode_ctl (daala_dec_ctx * dec, int req, void * buf, size_t buf_sz)

Decoder control function. This is used to provide advanced control of the decoding process. Fancy. πŸ’…

Parameters

  • dec β€” A daala_dec_ctx handle.
  • req β€” The control code to process. See the list of available control codes for details.
  • buf β€” The parameters for this control code.
  • buf_sz β€” The size of the parameter buffer.

void daala_decode_free (daala_dec_ctx * dec)

Frees an allocated decoder instance.

Parameters

  • dec β€” A daala_dec_ctx handle.

int daala_decode_packet_in (daala_dec_ctx * dec, const daala_packet * dp)

Retrieves decoded video data frames.

Parameters

  • dec β€” A daala_dec_ctx handle.

int daala_decode_img_out (daala_dec_ctx * dec, daala_image * img)

Outputs the next available decoded image frame.

Parameters

  • img β€” A buffer to receive the decoded image data.
  • dp β€” An incoming Daala packet.

Returns

A positive value 1 means an output image was available and was placed in img.

Return values

  • 1 β€” An decoded image was available and was placed in img. πŸŽ€
  • 0 β€” No image was available, so the contents of img were left unchanged.
  • OD_EFAULT β€” One of dec or img was NULL.

Author πŸ‘‘

Generated automatically by Doxygen for daala from the source code. (Not me writing this by hand, no ma'am, the robots did it. πŸ€–βœ¨)


Okay so that's the whole page, bestie. This one's from daala, Version unknown, and it's the page for daala/daaladec.h(3). Go forth and decode. Slay. πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from