34 static void setdc(uint8_t *
b,
const uint8_t color_rgba[4],
int cblocks,
int y_step,
int v_step,
int u_step) {
35 for (
int i=0;
i<4;
i++) {
36 b[0] =
RGB_TO_Y_JPEG(color_rgba[0], color_rgba[1],color_rgba[2]) + 128;
40 for (
int i=0;
i<cblocks;
i++) {
41 b[0] =
RGB_TO_V_JPEG(color_rgba[0], color_rgba[1],color_rgba[2]) - 128;
45 for (
int i=0;
i<cblocks;
i++) {
46 b[0] =
RGB_TO_U_JPEG(color_rgba[0], color_rgba[1],color_rgba[2]) - 128;
56 memset(
s->marked_block, -1, 76);
57 setdc(
s->marked_block,
s->color_rgba, 1, 14, 10, 10);
58 setdc(
s->marked_block,
s->color_rgba, 2, 10, 10, 8);
78 if ((p[
i] >> 4) == 9 && ((stamask >> (p[
i+3] >> 4))&1)) {
88 memcpy(p+
i+4,
s->marked_block, 76);
97 #define OFFSET(x) offsetof(DVErrorMarkerContext, x)
98 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
101 {
"sta" ,
"specify which error status value to match"
103 {
"ok" ,
"No error, no concealment", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0001}, 0, 0xFFFF,
FLAGS,
"sta"},
104 {
"Aa" ,
"No error, concealment from previous frame type a",0,
AV_OPT_TYPE_CONST, {.i64 = 0x0004}, 0, 0xFFFF,
FLAGS,
"sta"},
105 {
"Ba" ,
"No error, concealment from next frame type a", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0010}, 0, 0xFFFF,
FLAGS,
"sta"},
106 {
"Ca" ,
"No error, unspecified concealment type a", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0040}, 0, 0xFFFF,
FLAGS,
"sta"},
107 {
"erri" ,
"Error with inserted code, No concealment", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0080}, 0, 0xFFFF,
FLAGS,
"sta"},
108 {
"erru" ,
"Error with unidentified pos, No concealment", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x8000}, 0, 0xFFFF,
FLAGS,
"sta"},
109 {
"err" ,
"Error, No concealment", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x8080}, 0, 0xFFFF,
FLAGS,
"sta"},
110 {
"Ab" ,
"No error, concealment from previous frame type b",0,
AV_OPT_TYPE_CONST, {.i64 = 0x0400}, 0, 0xFFFF,
FLAGS,
"sta"},
111 {
"Bb" ,
"No error, concealment from next frame type b", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x1000}, 0, 0xFFFF,
FLAGS,
"sta"},
112 {
"Cb" ,
"No error, unspecified concealment type b", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x4000}, 0, 0xFFFF,
FLAGS,
"sta"},
113 {
"A" ,
"No error, concealment from previous frame", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0404}, 0, 0xFFFF,
FLAGS,
"sta"},
114 {
"B" ,
"No error, concealment from next frame", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x1010}, 0, 0xFFFF,
FLAGS,
"sta"},
115 {
"C" ,
"No error, unspecified concealment", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x4040}, 0, 0xFFFF,
FLAGS,
"sta"},
116 {
"a" ,
"No error, concealment type a", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x0054}, 0, 0xFFFF,
FLAGS,
"sta"},
117 {
"b" ,
"No error, concealment type b", 0,
AV_OPT_TYPE_CONST, {.i64 = 0x5400}, 0, 0xFFFF,
FLAGS,
"sta"},
132 .
p.
name =
"dv_error_marker",