You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

553 lines
19KB

  1. /*
  2. * Copyright (c) 2007 Nicolas George <nicolas.george@normalesup.org>
  3. * Copyright (c) 2011 Stefano Sabatini
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * Misc test sources.
  24. *
  25. * testsrc is based on the test pattern generator demuxer by Nicolas George:
  26. * http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2007-October/037845.html
  27. *
  28. * rgbtestsrc is ported from MPlayer libmpcodecs/vf_rgbtest.c by
  29. * Michael Niedermayer.
  30. */
  31. #include <float.h>
  32. #include "libavutil/opt.h"
  33. #include "libavutil/intreadwrite.h"
  34. #include "libavutil/parseutils.h"
  35. #include "avfilter.h"
  36. #include "drawutils.h"
  37. #include "formats.h"
  38. #include "internal.h"
  39. #include "video.h"
  40. typedef struct {
  41. const AVClass *class;
  42. int w, h;
  43. unsigned int nb_frame;
  44. AVRational time_base;
  45. int64_t pts, max_pts;
  46. char *rate; ///< video frame rate
  47. char *duration; ///< total duration of the generated video
  48. AVRational sar; ///< sample aspect ratio
  49. int nb_decimals;
  50. int draw_once; ///< draw only the first frame, always put out the same picture
  51. AVFilterBufferRef *picref; ///< cached reference containing the painted picture
  52. void (* fill_picture_fn)(AVFilterContext *ctx, AVFilterBufferRef *picref);
  53. /* only used by rgbtest */
  54. uint8_t rgba_map[4];
  55. } TestSourceContext;
  56. #define OFFSET(x) offsetof(TestSourceContext, x)
  57. static const AVOption options[] = {
  58. { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0 },
  59. { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0 },
  60. { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0 },
  61. { "r", "set video rate", OFFSET(rate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0 },
  62. { "duration", "set video duration", OFFSET(duration), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 },
  63. { "d", "set video duration", OFFSET(duration), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 },
  64. { "sar", "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1}, 0, INT_MAX },
  65. /* only used by testsrc */
  66. { "decimals", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX },
  67. { "n", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX },
  68. { NULL },
  69. };
  70. static av_cold int init(AVFilterContext *ctx, const char *args)
  71. {
  72. TestSourceContext *test = ctx->priv;
  73. AVRational frame_rate_q;
  74. int64_t duration = -1;
  75. int ret = 0;
  76. av_opt_set_defaults(test);
  77. if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0) {
  78. av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args);
  79. return ret;
  80. }
  81. if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0) {
  82. av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", test->rate);
  83. return ret;
  84. }
  85. if (test->duration && (ret = av_parse_time(&duration, test->duration, 1)) < 0) {
  86. av_log(ctx, AV_LOG_ERROR, "Invalid duration: '%s'\n", test->duration);
  87. return ret;
  88. }
  89. if (test->nb_decimals && strcmp(ctx->filter->name, "testsrc")) {
  90. av_log(ctx, AV_LOG_WARNING,
  91. "Option 'decimals' is ignored with source '%s'\n",
  92. ctx->filter->name);
  93. }
  94. test->time_base.num = frame_rate_q.den;
  95. test->time_base.den = frame_rate_q.num;
  96. test->max_pts = duration >= 0 ?
  97. av_rescale_q(duration, AV_TIME_BASE_Q, test->time_base) : -1;
  98. test->nb_frame = 0;
  99. test->pts = 0;
  100. av_log(ctx, AV_LOG_VERBOSE, "size:%dx%d rate:%d/%d duration:%f sar:%d/%d\n",
  101. test->w, test->h, frame_rate_q.num, frame_rate_q.den,
  102. duration < 0 ? -1 : test->max_pts * av_q2d(test->time_base),
  103. test->sar.num, test->sar.den);
  104. return 0;
  105. }
  106. static av_cold void uninit(AVFilterContext *ctx)
  107. {
  108. TestSourceContext *test = ctx->priv;
  109. av_opt_free(test);
  110. avfilter_unref_bufferp(&test->picref);
  111. }
  112. static int config_props(AVFilterLink *outlink)
  113. {
  114. TestSourceContext *test = outlink->src->priv;
  115. outlink->w = test->w;
  116. outlink->h = test->h;
  117. outlink->sample_aspect_ratio = test->sar;
  118. outlink->time_base = test->time_base;
  119. return 0;
  120. }
  121. static int request_frame(AVFilterLink *outlink)
  122. {
  123. TestSourceContext *test = outlink->src->priv;
  124. AVFilterBufferRef *outpicref;
  125. int ret = 0;
  126. if (test->max_pts >= 0 && test->pts >= test->max_pts)
  127. return AVERROR_EOF;
  128. if (test->draw_once) {
  129. if (!test->picref) {
  130. test->picref =
  131. ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_PRESERVE|AV_PERM_REUSE,
  132. test->w, test->h);
  133. if (!test->picref)
  134. return AVERROR(ENOMEM);
  135. test->fill_picture_fn(outlink->src, test->picref);
  136. }
  137. outpicref = avfilter_ref_buffer(test->picref, ~AV_PERM_WRITE);
  138. } else
  139. outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE, test->w, test->h);
  140. if (!outpicref)
  141. return AVERROR(ENOMEM);
  142. outpicref->pts = test->pts;
  143. outpicref->pos = -1;
  144. outpicref->video->key_frame = 1;
  145. outpicref->video->interlaced = 0;
  146. outpicref->video->pict_type = AV_PICTURE_TYPE_I;
  147. outpicref->video->sample_aspect_ratio = test->sar;
  148. if (!test->draw_once)
  149. test->fill_picture_fn(outlink->src, outpicref);
  150. test->pts++;
  151. test->nb_frame++;
  152. if ((ret = ff_start_frame(outlink, outpicref)) < 0 ||
  153. (ret = ff_draw_slice(outlink, 0, test->h, 1)) < 0 ||
  154. (ret = ff_end_frame(outlink)) < 0)
  155. return ret;
  156. return 0;
  157. }
  158. #if CONFIG_NULLSRC_FILTER
  159. #define nullsrc_options options
  160. AVFILTER_DEFINE_CLASS(nullsrc);
  161. static void nullsrc_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref) { }
  162. static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args)
  163. {
  164. TestSourceContext *test = ctx->priv;
  165. test->class = &nullsrc_class;
  166. test->fill_picture_fn = nullsrc_fill_picture;
  167. return init(ctx, args);
  168. }
  169. AVFilter avfilter_vsrc_nullsrc = {
  170. .name = "nullsrc",
  171. .description = NULL_IF_CONFIG_SMALL("Null video source, return unprocessed video frames."),
  172. .init = nullsrc_init,
  173. .uninit = uninit,
  174. .priv_size = sizeof(TestSourceContext),
  175. .inputs = (const AVFilterPad[]) {{ .name = NULL}},
  176. .outputs = (const AVFilterPad[]) {{ .name = "default",
  177. .type = AVMEDIA_TYPE_VIDEO,
  178. .request_frame = request_frame,
  179. .config_props = config_props, },
  180. { .name = NULL}},
  181. };
  182. #endif /* CONFIG_NULLSRC_FILTER */
  183. #if CONFIG_TESTSRC_FILTER
  184. #define testsrc_options options
  185. AVFILTER_DEFINE_CLASS(testsrc);
  186. /**
  187. * Fill a rectangle with value val.
  188. *
  189. * @param val the RGB value to set
  190. * @param dst pointer to the destination buffer to fill
  191. * @param dst_linesize linesize of destination
  192. * @param segment_width width of the segment
  193. * @param x horizontal coordinate where to draw the rectangle in the destination buffer
  194. * @param y horizontal coordinate where to draw the rectangle in the destination buffer
  195. * @param w width of the rectangle to draw, expressed as a number of segment_width units
  196. * @param h height of the rectangle to draw, expressed as a number of segment_width units
  197. */
  198. static void draw_rectangle(unsigned val, uint8_t *dst, int dst_linesize, unsigned segment_width,
  199. unsigned x, unsigned y, unsigned w, unsigned h)
  200. {
  201. int i;
  202. int step = 3;
  203. dst += segment_width * (step * x + y * dst_linesize);
  204. w *= segment_width * step;
  205. h *= segment_width;
  206. for (i = 0; i < h; i++) {
  207. memset(dst, val, w);
  208. dst += dst_linesize;
  209. }
  210. }
  211. static void draw_digit(int digit, uint8_t *dst, unsigned dst_linesize,
  212. unsigned segment_width)
  213. {
  214. #define TOP_HBAR 1
  215. #define MID_HBAR 2
  216. #define BOT_HBAR 4
  217. #define LEFT_TOP_VBAR 8
  218. #define LEFT_BOT_VBAR 16
  219. #define RIGHT_TOP_VBAR 32
  220. #define RIGHT_BOT_VBAR 64
  221. struct {
  222. int x, y, w, h;
  223. } segments[] = {
  224. { 1, 0, 5, 1 }, /* TOP_HBAR */
  225. { 1, 6, 5, 1 }, /* MID_HBAR */
  226. { 1, 12, 5, 1 }, /* BOT_HBAR */
  227. { 0, 1, 1, 5 }, /* LEFT_TOP_VBAR */
  228. { 0, 7, 1, 5 }, /* LEFT_BOT_VBAR */
  229. { 6, 1, 1, 5 }, /* RIGHT_TOP_VBAR */
  230. { 6, 7, 1, 5 } /* RIGHT_BOT_VBAR */
  231. };
  232. static const unsigned char masks[10] = {
  233. /* 0 */ TOP_HBAR |BOT_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  234. /* 1 */ RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  235. /* 2 */ TOP_HBAR|MID_HBAR|BOT_HBAR|LEFT_BOT_VBAR |RIGHT_TOP_VBAR,
  236. /* 3 */ TOP_HBAR|MID_HBAR|BOT_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  237. /* 4 */ MID_HBAR |LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  238. /* 5 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_BOT_VBAR,
  239. /* 6 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR |RIGHT_BOT_VBAR,
  240. /* 7 */ TOP_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  241. /* 8 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  242. /* 9 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
  243. };
  244. unsigned mask = masks[digit];
  245. int i;
  246. draw_rectangle(0, dst, dst_linesize, segment_width, 0, 0, 8, 13);
  247. for (i = 0; i < FF_ARRAY_ELEMS(segments); i++)
  248. if (mask & (1<<i))
  249. draw_rectangle(255, dst, dst_linesize, segment_width,
  250. segments[i].x, segments[i].y, segments[i].w, segments[i].h);
  251. }
  252. #define GRADIENT_SIZE (6 * 256)
  253. static void test_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref)
  254. {
  255. TestSourceContext *test = ctx->priv;
  256. uint8_t *p, *p0;
  257. int x, y;
  258. int color, color_rest;
  259. int icolor;
  260. int radius;
  261. int quad0, quad;
  262. int dquad_x, dquad_y;
  263. int grad, dgrad, rgrad, drgrad;
  264. int seg_size;
  265. int second;
  266. int i;
  267. uint8_t *data = picref->data[0];
  268. int width = picref->video->w;
  269. int height = picref->video->h;
  270. /* draw colored bars and circle */
  271. radius = (width + height) / 4;
  272. quad0 = width * width / 4 + height * height / 4 - radius * radius;
  273. dquad_y = 1 - height;
  274. p0 = data;
  275. for (y = 0; y < height; y++) {
  276. p = p0;
  277. color = 0;
  278. color_rest = 0;
  279. quad = quad0;
  280. dquad_x = 1 - width;
  281. for (x = 0; x < width; x++) {
  282. icolor = color;
  283. if (quad < 0)
  284. icolor ^= 7;
  285. quad += dquad_x;
  286. dquad_x += 2;
  287. *(p++) = icolor & 1 ? 255 : 0;
  288. *(p++) = icolor & 2 ? 255 : 0;
  289. *(p++) = icolor & 4 ? 255 : 0;
  290. color_rest += 8;
  291. if (color_rest >= width) {
  292. color_rest -= width;
  293. color++;
  294. }
  295. }
  296. quad0 += dquad_y;
  297. dquad_y += 2;
  298. p0 += picref->linesize[0];
  299. }
  300. /* draw sliding color line */
  301. p0 = p = data + picref->linesize[0] * height * 3/4;
  302. grad = (256 * test->nb_frame * test->time_base.num / test->time_base.den) %
  303. GRADIENT_SIZE;
  304. rgrad = 0;
  305. dgrad = GRADIENT_SIZE / width;
  306. drgrad = GRADIENT_SIZE % width;
  307. for (x = 0; x < width; x++) {
  308. *(p++) =
  309. grad < 256 || grad >= 5 * 256 ? 255 :
  310. grad >= 2 * 256 && grad < 4 * 256 ? 0 :
  311. grad < 2 * 256 ? 2 * 256 - 1 - grad : grad - 4 * 256;
  312. *(p++) =
  313. grad >= 4 * 256 ? 0 :
  314. grad >= 1 * 256 && grad < 3 * 256 ? 255 :
  315. grad < 1 * 256 ? grad : 4 * 256 - 1 - grad;
  316. *(p++) =
  317. grad < 2 * 256 ? 0 :
  318. grad >= 3 * 256 && grad < 5 * 256 ? 255 :
  319. grad < 3 * 256 ? grad - 2 * 256 : 6 * 256 - 1 - grad;
  320. grad += dgrad;
  321. rgrad += drgrad;
  322. if (rgrad >= GRADIENT_SIZE) {
  323. grad++;
  324. rgrad -= GRADIENT_SIZE;
  325. }
  326. if (grad >= GRADIENT_SIZE)
  327. grad -= GRADIENT_SIZE;
  328. }
  329. p = p0;
  330. for (y = height / 8; y > 0; y--) {
  331. memcpy(p+picref->linesize[0], p, 3 * width);
  332. p += picref->linesize[0];
  333. }
  334. /* draw digits */
  335. seg_size = width / 80;
  336. if (seg_size >= 1 && height >= 13 * seg_size) {
  337. double time = av_q2d(test->time_base) * test->nb_frame *
  338. pow(10, test->nb_decimals);
  339. if (time > INT_MAX)
  340. return;
  341. second = (int)time;
  342. x = width - (width - seg_size * 64) / 2;
  343. y = (height - seg_size * 13) / 2;
  344. p = data + (x*3 + y * picref->linesize[0]);
  345. for (i = 0; i < 8; i++) {
  346. p -= 3 * 8 * seg_size;
  347. draw_digit(second % 10, p, picref->linesize[0], seg_size);
  348. second /= 10;
  349. if (second == 0)
  350. break;
  351. }
  352. }
  353. }
  354. static av_cold int test_init(AVFilterContext *ctx, const char *args)
  355. {
  356. TestSourceContext *test = ctx->priv;
  357. test->class = &testsrc_class;
  358. test->fill_picture_fn = test_fill_picture;
  359. return init(ctx, args);
  360. }
  361. static int test_query_formats(AVFilterContext *ctx)
  362. {
  363. static const enum PixelFormat pix_fmts[] = {
  364. PIX_FMT_RGB24, PIX_FMT_NONE
  365. };
  366. ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
  367. return 0;
  368. }
  369. AVFilter avfilter_vsrc_testsrc = {
  370. .name = "testsrc",
  371. .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
  372. .priv_size = sizeof(TestSourceContext),
  373. .init = test_init,
  374. .uninit = uninit,
  375. .query_formats = test_query_formats,
  376. .inputs = (const AVFilterPad[]) {{ .name = NULL}},
  377. .outputs = (const AVFilterPad[]) {{ .name = "default",
  378. .type = AVMEDIA_TYPE_VIDEO,
  379. .request_frame = request_frame,
  380. .config_props = config_props, },
  381. { .name = NULL }},
  382. };
  383. #endif /* CONFIG_TESTSRC_FILTER */
  384. #if CONFIG_RGBTESTSRC_FILTER
  385. #define rgbtestsrc_options options
  386. AVFILTER_DEFINE_CLASS(rgbtestsrc);
  387. #define R 0
  388. #define G 1
  389. #define B 2
  390. #define A 3
  391. static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize,
  392. int x, int y, int r, int g, int b, enum PixelFormat fmt,
  393. uint8_t rgba_map[4])
  394. {
  395. int32_t v;
  396. uint8_t *p;
  397. switch (fmt) {
  398. case PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break;
  399. case PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break;
  400. case PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break;
  401. case PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break;
  402. case PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break;
  403. case PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break;
  404. case PIX_FMT_RGB24:
  405. case PIX_FMT_BGR24:
  406. v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8));
  407. p = dst + 3*x + y*dst_linesize;
  408. AV_WL24(p, v);
  409. break;
  410. case PIX_FMT_RGBA:
  411. case PIX_FMT_BGRA:
  412. case PIX_FMT_ARGB:
  413. case PIX_FMT_ABGR:
  414. v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)) + (255 << (rgba_map[A]*8));
  415. p = dst + 4*x + y*dst_linesize;
  416. AV_WL32(p, v);
  417. break;
  418. }
  419. }
  420. static void rgbtest_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref)
  421. {
  422. TestSourceContext *test = ctx->priv;
  423. int x, y, w = picref->video->w, h = picref->video->h;
  424. for (y = 0; y < h; y++) {
  425. for (x = 0; x < picref->video->w; x++) {
  426. int c = 256*x/w;
  427. int r = 0, g = 0, b = 0;
  428. if (3*y < h ) r = c;
  429. else if (3*y < 2*h) g = c;
  430. else b = c;
  431. rgbtest_put_pixel(picref->data[0], picref->linesize[0], x, y, r, g, b,
  432. ctx->outputs[0]->format, test->rgba_map);
  433. }
  434. }
  435. }
  436. static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args)
  437. {
  438. TestSourceContext *test = ctx->priv;
  439. test->draw_once = 1;
  440. test->class = &rgbtestsrc_class;
  441. test->fill_picture_fn = rgbtest_fill_picture;
  442. return init(ctx, args);
  443. }
  444. static int rgbtest_query_formats(AVFilterContext *ctx)
  445. {
  446. static const enum PixelFormat pix_fmts[] = {
  447. PIX_FMT_RGBA, PIX_FMT_ARGB, PIX_FMT_BGRA, PIX_FMT_ABGR,
  448. PIX_FMT_BGR24, PIX_FMT_RGB24,
  449. PIX_FMT_RGB444, PIX_FMT_BGR444,
  450. PIX_FMT_RGB565, PIX_FMT_BGR565,
  451. PIX_FMT_RGB555, PIX_FMT_BGR555,
  452. PIX_FMT_NONE
  453. };
  454. ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
  455. return 0;
  456. }
  457. static int rgbtest_config_props(AVFilterLink *outlink)
  458. {
  459. TestSourceContext *test = outlink->src->priv;
  460. ff_fill_rgba_map(test->rgba_map, outlink->format);
  461. return config_props(outlink);
  462. }
  463. AVFilter avfilter_vsrc_rgbtestsrc = {
  464. .name = "rgbtestsrc",
  465. .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
  466. .priv_size = sizeof(TestSourceContext),
  467. .init = rgbtest_init,
  468. .uninit = uninit,
  469. .query_formats = rgbtest_query_formats,
  470. .inputs = (const AVFilterPad[]) {{ .name = NULL}},
  471. .outputs = (const AVFilterPad[]) {{ .name = "default",
  472. .type = AVMEDIA_TYPE_VIDEO,
  473. .request_frame = request_frame,
  474. .config_props = rgbtest_config_props, },
  475. { .name = NULL }},
  476. };
  477. #endif /* CONFIG_RGBTESTSRC_FILTER */