UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
rs.cpp File Reference
#include <bitset>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "config.h"
#include "debug.h"
#include "rtp/rs.h"
#include "rtp/rtp_types.h"
#include "transmit.h"
#include "ug_runtime_error.hpp"
#include "utils/color_out.h"
#include "utils/text.h"
#include "video.h"
Include dependency graph for rs.cpp:

Go to the source code of this file.

Macros

#define MAX_K   255
 
#define MAX_N   255
 
#define MOD_NAME   "[fec/rs] "
 

Enumerations

enum  { DEFAULT_K_AUDIO = 160 , DEFAULT_K_VIDEO = 200 , DEFAULT_N = 240 }
 

Functions

static void usage ()
 

Detailed Description

Author
Martin Pulec pulec.nosp@m.@ces.nosp@m.net.c.nosp@m.z

Definition in file rs.cpp.

Macro Definition Documentation

◆ MAX_K

#define MAX_K   255

Definition at line 60 of file rs.cpp.

Referenced by usage().

◆ MAX_N

#define MAX_N   255

Definition at line 61 of file rs.cpp.

Referenced by rs::rs(), rs::rs(), rs::decode(), rs::encode(), rs::encode(), and usage().

◆ MOD_NAME

#define MOD_NAME   "[fec/rs] "

Definition at line 63 of file rs.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_K_AUDIO 
DEFAULT_K_VIDEO 
DEFAULT_N 

Definition at line 54 of file rs.cpp.

54 {
55 DEFAULT_K_AUDIO = 160,
56 DEFAULT_K_VIDEO = 200,
57 DEFAULT_N = 240,
58};
@ DEFAULT_K_VIDEO
Definition rs.cpp:56
@ DEFAULT_N
Definition rs.cpp:57
@ DEFAULT_K_AUDIO
Definition rs.cpp:55

Function Documentation

◆ usage()

static void usage ( void )
static

Definition at line 421 of file rs.cpp.

421 {
422 color_printf(TBOLD("Reed-Solomon") " usage:\n");
423 color_printf("\t" TBOLD(TRED("-f rs") "[:<k>:<n>]") "\n");
424 color_printf("\nwhere:\n");
425 color_printf("\t" TBOLD("<k>") " - block length (default "
426 TBOLD("%d") ", max %d)\n"
427 "\t" TBOLD("<n>") " - length of block + parity "
428 "(default " TBOLD("%d") ", max %d),\n"
429 "\t\t\tmust be > <k>\n\n",
431
432 char desc[] =
433 "The n/k ratio determines the redundancy that the FEC provides. "
434 "But please note that the " TUNDERLINE("strength")
435 " of the FEC applies " TBOLD ("per frame") " basis, so 20%"
436 " redundancy will cover 20% loss in a signle frame only.\n";
438}
struct video_desc desc
int color_printf(const char *format,...)
#define TUNDERLINE(x)
Definition color_out.h:71
#define TRED(x)
Definition color_out.h:75
#define TBOLD(x)
Definition color_out.h:70
#define MAX_N
Definition rs.cpp:61
#define MAX_K
Definition rs.cpp:60
char * wrap_paragraph(char *text)
Definition text.c:204

References color_printf(), DEFAULT_K_VIDEO, DEFAULT_N, desc, MAX_K, MAX_N, TBOLD, TRED, TUNDERLINE, and wrap_paragraph().

Here is the call graph for this function: