/* args */
int rate_control_mode;
int fps;
+ int mode; /* 0:I, 1:I/P, 2:I/P/B */
int width;
int height;
int frame_size;
fprintf(stderr, "where options include:\n");
fprintf(stderr, "\t--cqp <QP> const qp mode with specified <QP>\n");
fprintf(stderr, "\t--fps <FPS> specify the frame rate\n");
+ fprintf(stderr, "\t--mode <MODE> specify the mode 0 (I), 1 (I/P) and 2 (I/P/B)\n");
}
static void
{"help", no_argument, 0, 'h'},
{"cqp", required_argument, 0, 'c'},
{"fps", required_argument, 0, 'f'},
+ {"mode", required_argument, 0, 'm'},
{ NULL, 0, NULL, 0 }
};
ctx->fps = 30;
ctx->qp = 28;
ctx->rate_control_mode = VA_RC_CQP;
+ ctx->mode = 1;
optind = 5;
break;
+ case 'm':
+ tmp = atoi(optarg);
+
+ if (tmp < 0 || tmp > 2)
+ fprintf(stderr, "Waning: MODE must be 0, 1, or 2\n");
+ else
+ ctx->mode = tmp;
+
+ break;
+
case '?':
fprintf(stderr, "Error: unkown command options\n");