21 #define VPX_CODEC_DISABLE_COMPAT 1
22 #include "vpx_config.h"
24 #include "vpx_ports/vpx_timer.h"
25 #if CONFIG_VP8_DECODER
29 #include "md5_utils.h"
31 #include "tools_common.h"
32 #include "nestegg/include/nestegg/nestegg.h"
37 #define snprintf _snprintf
38 #define isatty _isatty
39 #define fileno _fileno
49 static const char *exec_name;
51 #define VP8_FOURCC (0x00385056)
57 unsigned int fourcc_mask;
60 #if CONFIG_VP8_DECODER
61 {
"vp8", &vpx_codec_vp8_dx_algo, VP8_FOURCC, 0x00FFFFFF},
66 static const arg_def_t codecarg = ARG_DEF(NULL,
"codec", 1,
68 static const arg_def_t use_yv12 = ARG_DEF(NULL,
"yv12", 0,
69 "Output raw YV12 frames");
70 static const arg_def_t use_i420 = ARG_DEF(NULL,
"i420", 0,
71 "Output raw I420 frames");
72 static const arg_def_t flipuvarg = ARG_DEF(NULL,
"flipuv", 0,
73 "Flip the chroma planes in the output");
74 static const arg_def_t noblitarg = ARG_DEF(NULL,
"noblit", 0,
75 "Don't process the decoded frames");
76 static const arg_def_t progressarg = ARG_DEF(NULL,
"progress", 0,
77 "Show progress after each frame decodes");
78 static const arg_def_t limitarg = ARG_DEF(NULL,
"limit", 1,
79 "Stop decoding after n frames");
80 static const arg_def_t postprocarg = ARG_DEF(NULL,
"postproc", 0,
81 "Postprocess decoded frames");
82 static const arg_def_t summaryarg = ARG_DEF(NULL,
"summary", 0,
83 "Show timing summary");
84 static const arg_def_t outputfile = ARG_DEF(
"o",
"output", 1,
85 "Output file name pattern (see below)");
86 static const arg_def_t threadsarg = ARG_DEF(
"t",
"threads", 1,
87 "Max threads to use");
88 static const arg_def_t verbosearg = ARG_DEF(
"v",
"verbose", 0,
89 "Show version string");
90 static const arg_def_t error_concealment = ARG_DEF(NULL,
"error-concealment", 0,
91 "Enable decoder error-concealment");
95 static const arg_def_t md5arg = ARG_DEF(NULL,
"md5", 0,
96 "Compute the MD5 sum of the decoded frame");
98 static const arg_def_t *all_args[] =
100 &codecarg, &use_yv12, &use_i420, &flipuvarg, &noblitarg,
101 &progressarg, &limitarg, &postprocarg, &summaryarg, &outputfile,
102 &threadsarg, &verbosearg,
110 #if CONFIG_VP8_DECODER
111 static const arg_def_t addnoise_level = ARG_DEF(NULL,
"noise-level", 1,
112 "Enable VP8 postproc add noise");
113 static const arg_def_t deblock = ARG_DEF(NULL,
"deblock", 0,
114 "Enable VP8 deblocking");
115 static const arg_def_t demacroblock_level = ARG_DEF(NULL,
"demacroblock-level", 1,
116 "Enable VP8 demacroblocking, w/ level");
117 static const arg_def_t pp_debug_info = ARG_DEF(NULL,
"pp-debug-info", 1,
118 "Enable VP8 visible debug info");
119 static const arg_def_t pp_disp_ref_frame = ARG_DEF(NULL,
"pp-dbg-ref-frame", 1,
120 "Display only selected reference frame per macro block");
121 static const arg_def_t pp_disp_mb_modes = ARG_DEF(NULL,
"pp-dbg-mb-modes", 1,
122 "Display only selected macro block modes");
123 static const arg_def_t pp_disp_b_modes = ARG_DEF(NULL,
"pp-dbg-b-modes", 1,
124 "Display only selected block modes");
125 static const arg_def_t pp_disp_mvs = ARG_DEF(NULL,
"pp-dbg-mvs", 1,
126 "Draw only selected motion vectors");
127 static const arg_def_t mfqe = ARG_DEF(NULL,
"mfqe", 0,
128 "Enable multiframe quality enhancement");
130 static const arg_def_t *vp8_pp_args[] =
132 &addnoise_level, &deblock, &demacroblock_level, &pp_debug_info,
133 &pp_disp_ref_frame, &pp_disp_mb_modes, &pp_disp_b_modes, &pp_disp_mvs, &mfqe,
138 static void usage_exit()
142 fprintf(stderr,
"Usage: %s <options> filename\n\n"
143 "Options:\n", exec_name);
144 arg_show_usage(stderr, all_args);
145 #if CONFIG_VP8_DECODER
146 fprintf(stderr,
"\nVP8 Postprocessing Options:\n");
147 arg_show_usage(stderr, vp8_pp_args);
150 "\nOutput File Patterns:\n\n"
151 " The -o argument specifies the name of the file(s) to "
152 "write to. If the\n argument does not include any escape "
153 "characters, the output will be\n written to a single file. "
154 "Otherwise, the filename will be calculated by\n expanding "
155 "the following escape characters:\n"
156 "\n\t%%w - Frame width"
157 "\n\t%%h - Frame height"
158 "\n\t%%<n> - Frame number, zero padded to <n> places (1..9)"
159 "\n\n Pattern arguments are only supported in conjunction "
160 "with the --yv12 and\n --i420 options. If the -o option is "
161 "not specified, the output will be\n directed to stdout.\n"
163 fprintf(stderr,
"\nIncluded decoders:\n\n");
165 for (i = 0; i <
sizeof(ifaces) /
sizeof(ifaces[0]); i++)
166 fprintf(stderr,
" %-6s - %s\n",
173 void die(
const char *fmt, ...)
177 vfprintf(stderr, fmt, ap);
178 fprintf(stderr,
"\n");
182 static unsigned int mem_get_le16(
const void *vmem)
185 const unsigned char *mem = (
const unsigned char *)vmem;
192 static unsigned int mem_get_le32(
const void *vmem)
195 const unsigned char *mem = (
const unsigned char *)vmem;
215 nestegg *nestegg_ctx;
219 unsigned int video_track;
222 #define IVF_FRAME_HDR_SZ (sizeof(uint32_t) + sizeof(uint64_t))
223 #define RAW_FRAME_HDR_SZ (sizeof(uint32_t))
224 static int read_frame(
struct input_ctx *input,
227 size_t *buf_alloc_sz)
229 char raw_hdr[IVF_FRAME_HDR_SZ];
231 FILE *infile = input->infile;
232 enum file_kind kind = input->kind;
233 if(kind == WEBM_FILE)
235 if(input->chunk >= input->chunks)
243 nestegg_free_packet(input->pkt);
245 if(nestegg_read_packet(input->nestegg_ctx, &input->pkt) <= 0
246 || nestegg_packet_track(input->pkt, &track))
249 }
while(track != input->video_track);
251 if(nestegg_packet_count(input->pkt, &input->chunks))
256 if(nestegg_packet_data(input->pkt, input->chunk, buf, buf_sz))
266 else if (fread(raw_hdr, kind==IVF_FILE
267 ? IVF_FRAME_HDR_SZ : RAW_FRAME_HDR_SZ, 1, infile) != 1)
270 fprintf(stderr,
"Failed to read frame size\n");
276 new_buf_sz = mem_get_le32(raw_hdr);
278 if (new_buf_sz > 256 * 1024 * 1024)
280 fprintf(stderr,
"Error: Read invalid frame size (%u)\n",
281 (
unsigned int)new_buf_sz);
285 if (kind == RAW_FILE && new_buf_sz > 256 * 1024)
286 fprintf(stderr,
"Warning: Read invalid frame size (%u)"
287 " - not a raw file?\n", (
unsigned int)new_buf_sz);
289 if (new_buf_sz > *buf_alloc_sz)
291 uint8_t *new_buf = realloc(*buf, 2 * new_buf_sz);
296 *buf_alloc_sz = 2 * new_buf_sz;
300 fprintf(stderr,
"Failed to allocate compressed data buffer\n");
306 *buf_sz = new_buf_sz;
310 if (fread(*buf, 1, *buf_sz, infile) != *buf_sz)
312 fprintf(stderr,
"Failed to read full frame\n");
322 void *out_open(
const char *out_fn,
int do_md5)
329 MD5Context *md5_ctx = out = malloc(
sizeof(MD5Context));
336 FILE *outfile = out = strcmp(
"-", out_fn) ? fopen(out_fn,
"wb")
337 : set_binary_mode(stdout);
341 fprintf(stderr,
"Failed to output file");
349 void out_put(
void *out,
const uint8_t *buf,
unsigned int len,
int do_md5)
354 MD5Update(out, buf, len);
359 if(fwrite(buf, 1, len, out));
363 void out_close(
void *out,
const char *out_fn,
int do_md5)
374 for (i = 0; i < 16; i++)
375 printf(
"%02x", md5[i]);
377 printf(
" %s\n", out_fn);
386 unsigned int file_is_ivf(FILE *infile,
387 unsigned int *fourcc,
389 unsigned int *height,
390 unsigned int *fps_den,
391 unsigned int *fps_num)
396 if (fread(raw_hdr, 1, 32, infile) == 32)
398 if (raw_hdr[0] ==
'D' && raw_hdr[1] ==
'K'
399 && raw_hdr[2] ==
'I' && raw_hdr[3] ==
'F')
403 if (mem_get_le16(raw_hdr + 4) != 0)
404 fprintf(stderr,
"Error: Unrecognized IVF version! This file may not"
405 " decode properly.");
407 *fourcc = mem_get_le32(raw_hdr + 8);
408 *width = mem_get_le16(raw_hdr + 12);
409 *height = mem_get_le16(raw_hdr + 14);
410 *fps_num = mem_get_le32(raw_hdr + 16);
411 *fps_den = mem_get_le32(raw_hdr + 20);
423 if(*fps_num&1)*fps_den<<=1;
444 unsigned int file_is_raw(FILE *infile,
445 unsigned int *fourcc,
447 unsigned int *height,
448 unsigned int *fps_den,
449 unsigned int *fps_num)
451 unsigned char buf[32];
457 if (fread(buf, 1, 32, infile) == 32)
461 if(mem_get_le32(buf) < 256 * 1024 * 1024)
462 for (i = 0; i <
sizeof(ifaces) /
sizeof(ifaces[0]); i++)
464 buf + 4, 32 - 4, &si))
467 *fourcc = ifaces[i].fourcc;
482 nestegg_read_cb(
void *buffer,
size_t length,
void *userdata)
486 if(fread(buffer, 1, length, f) < length)
498 nestegg_seek_cb(int64_t offset,
int whence,
void * userdata)
501 case NESTEGG_SEEK_SET: whence = SEEK_SET;
break;
502 case NESTEGG_SEEK_CUR: whence = SEEK_CUR;
break;
503 case NESTEGG_SEEK_END: whence = SEEK_END;
break;
505 return fseek(userdata, offset, whence)? -1 : 0;
510 nestegg_tell_cb(
void * userdata)
512 return ftell(userdata);
517 nestegg_log_cb(nestegg * context,
unsigned int severity,
char const * format,
522 va_start(ap, format);
523 vfprintf(stderr, format, ap);
524 fprintf(stderr,
"\n");
530 webm_guess_framerate(
struct input_ctx *input,
531 unsigned int *fps_den,
532 unsigned int *fps_num)
540 for(i=0; tstamp < 1000000000 && i < 50;)
542 nestegg_packet * pkt;
545 if(nestegg_read_packet(input->nestegg_ctx, &pkt) <= 0)
548 nestegg_packet_track(pkt, &track);
549 if(track == input->video_track)
551 nestegg_packet_tstamp(pkt, &tstamp);
555 nestegg_free_packet(pkt);
558 if(nestegg_track_seek(input->nestegg_ctx, input->video_track, 0))
561 *fps_num = (i - 1) * 1000000;
562 *fps_den = tstamp / 1000;
565 nestegg_destroy(input->nestegg_ctx);
566 input->nestegg_ctx = NULL;
567 rewind(input->infile);
573 file_is_webm(
struct input_ctx *input,
574 unsigned int *fourcc,
576 unsigned int *height,
577 unsigned int *fps_den,
578 unsigned int *fps_num)
583 nestegg_io io = {nestegg_read_cb, nestegg_seek_cb, nestegg_tell_cb,
585 nestegg_video_params params;
587 if(nestegg_init(&input->nestegg_ctx, io, NULL))
590 if(nestegg_track_count(input->nestegg_ctx, &n))
595 track_type = nestegg_track_type(input->nestegg_ctx, i);
597 if(track_type == NESTEGG_TRACK_VIDEO)
599 else if(track_type < 0)
603 if(nestegg_track_codec_id(input->nestegg_ctx, i) != NESTEGG_CODEC_VP8)
605 fprintf(stderr,
"Not VP8 video, quitting.\n");
609 input->video_track = i;
611 if(nestegg_track_video_params(input->nestegg_ctx, i, ¶ms))
616 *fourcc = VP8_FOURCC;
617 *width = params.width;
618 *height = params.height;
621 input->nestegg_ctx = NULL;
622 rewind(input->infile);
627 void show_progress(
int frame_in,
int frame_out,
unsigned long dx_time)
629 fprintf(stderr,
"%d decoded frames/%d showed frames in %lu us (%.2f fps)\r",
630 frame_in, frame_out, dx_time,
631 (
float)frame_out * 1000000.0 / (
float)dx_time);
635 void generate_filename(
const char *pattern,
char *out,
size_t q_len,
636 unsigned int d_w,
unsigned int d_h,
637 unsigned int frame_in)
639 const char *p = pattern;
644 char *next_pat = strchr(p,
'%');
654 case 'w': snprintf(q, q_len - 1,
"%d", d_w);
break;
655 case 'h': snprintf(q, q_len - 1,
"%d", d_h);
break;
656 case '1': snprintf(q, q_len - 1,
"%d", frame_in);
break;
657 case '2': snprintf(q, q_len - 1,
"%02d", frame_in);
break;
658 case '3': snprintf(q, q_len - 1,
"%03d", frame_in);
break;
659 case '4': snprintf(q, q_len - 1,
"%04d", frame_in);
break;
660 case '5': snprintf(q, q_len - 1,
"%05d", frame_in);
break;
661 case '6': snprintf(q, q_len - 1,
"%06d", frame_in);
break;
662 case '7': snprintf(q, q_len - 1,
"%07d", frame_in);
break;
663 case '8': snprintf(q, q_len - 1,
"%08d", frame_in);
break;
664 case '9': snprintf(q, q_len - 1,
"%09d", frame_in);
break;
666 die(
"Unrecognized pattern %%%c\n", p[1]);
670 if(pat_len >= q_len - 1)
671 die(
"Output filename too long.\n");
682 copy_len = strlen(p);
684 copy_len = next_pat - p;
686 if(copy_len >= q_len - 1)
687 die(
"Output filename too long.\n");
689 memcpy(q, p, copy_len);
699 int main(
int argc,
const char **argv_)
705 size_t buf_sz = 0, buf_alloc_sz = 0;
707 int frame_in = 0, frame_out = 0, flipuv = 0, noblit = 0, do_md5 = 0, progress = 0;
708 int stop_after = 0, postproc = 0, summary = 0, quiet = 1;
712 unsigned long dx_time = 0;
714 char **argv, **argi, **argj;
715 const char *outfile_pattern = 0;
716 char outfile[PATH_MAX];
721 unsigned int fps_den;
722 unsigned int fps_num;
725 #if CONFIG_VP8_DECODER
727 int vp8_dbg_color_ref_frame = 0;
728 int vp8_dbg_color_mb_modes = 0;
729 int vp8_dbg_color_b_modes = 0;
730 int vp8_dbg_display_mv = 0;
732 struct input_ctx input = {0};
733 int frames_corrupted = 0;
737 exec_name = argv_[0];
738 argv = argv_dup(argc - 1, argv_ + 1);
740 for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step)
742 memset(&arg, 0,
sizeof(arg));
745 if (arg_match(&arg, &codecarg, argi))
749 for (j = 0; j <
sizeof(ifaces) /
sizeof(ifaces[0]); j++)
750 if (!strcmp(ifaces[j].name, arg.val))
754 iface = ifaces[k].iface;
756 die(
"Error: Unrecognized argument (%s) to --codec\n",
759 else if (arg_match(&arg, &outputfile, argi))
760 outfile_pattern = arg.val;
761 else if (arg_match(&arg, &use_yv12, argi))
766 else if (arg_match(&arg, &use_i420, argi))
771 else if (arg_match(&arg, &flipuvarg, argi))
773 else if (arg_match(&arg, &noblitarg, argi))
775 else if (arg_match(&arg, &progressarg, argi))
777 else if (arg_match(&arg, &limitarg, argi))
778 stop_after = arg_parse_uint(&arg);
779 else if (arg_match(&arg, &postprocarg, argi))
781 else if (arg_match(&arg, &md5arg, argi))
783 else if (arg_match(&arg, &summaryarg, argi))
785 else if (arg_match(&arg, &threadsarg, argi))
786 cfg.
threads = arg_parse_uint(&arg);
787 else if (arg_match(&arg, &verbosearg, argi))
790 #if CONFIG_VP8_DECODER
791 else if (arg_match(&arg, &addnoise_level, argi))
797 else if (arg_match(&arg, &demacroblock_level, argi))
803 else if (arg_match(&arg, &deblock, argi))
808 else if (arg_match(&arg, &mfqe, argi))
813 else if (arg_match(&arg, &pp_debug_info, argi))
815 unsigned int level = arg_parse_uint(&arg);
823 else if (arg_match(&arg, &pp_disp_ref_frame, argi))
825 unsigned int flags = arg_parse_int(&arg);
829 vp8_dbg_color_ref_frame = flags;
832 else if (arg_match(&arg, &pp_disp_mb_modes, argi))
834 unsigned int flags = arg_parse_int(&arg);
838 vp8_dbg_color_mb_modes = flags;
841 else if (arg_match(&arg, &pp_disp_b_modes, argi))
843 unsigned int flags = arg_parse_int(&arg);
847 vp8_dbg_color_b_modes = flags;
850 else if (arg_match(&arg, &pp_disp_mvs, argi))
852 unsigned int flags = arg_parse_int(&arg);
856 vp8_dbg_display_mv = flags;
859 else if (arg_match(&arg, &error_concealment, argi))
870 for (argi = argv; *argi; argi++)
871 if (argi[0][0] ==
'-' && strlen(argi[0]) > 1)
872 die(
"Error: Unrecognized option %s\n", *argi);
881 infile = strcmp(fn,
"-") ? fopen(fn,
"rb") : set_binary_mode(stdin);
885 fprintf(stderr,
"Failed to open file '%s'",
886 strcmp(fn,
"-") ? fn :
"stdin");
889 #if CONFIG_OS_SUPPORT
891 if(!outfile_pattern && isatty(fileno(stdout)) && !do_md5 && !noblit)
894 "Not dumping raw video to your terminal. Use '-o -' to "
899 input.infile = infile;
900 if(file_is_ivf(infile, &fourcc, &width, &height, &fps_den,
902 input.kind = IVF_FILE;
903 else if(file_is_webm(&input, &fourcc, &width, &height, &fps_den, &fps_num))
904 input.kind = WEBM_FILE;
905 else if(file_is_raw(infile, &fourcc, &width, &height, &fps_den, &fps_num))
906 input.kind = RAW_FILE;
909 fprintf(stderr,
"Unrecognized input file type.\n");
916 outfile_pattern = outfile_pattern ? outfile_pattern :
"-";
919 const char *p = outfile_pattern;
923 if(p && p[1] >=
'1' && p[1] <=
'9')
934 if(single_file && !noblit)
936 generate_filename(outfile_pattern, outfile,
sizeof(outfile)-1,
938 out = out_open(outfile, do_md5);
941 if (use_y4m && !noblit)
946 fprintf(stderr,
"YUV4MPEG2 not supported with output patterns,"
947 " try --i420 or --yv12.\n");
951 if(input.kind == WEBM_FILE)
952 if(webm_guess_framerate(&input, &fps_den, &fps_num))
954 fprintf(stderr,
"Failed to guess framerate -- error parsing "
963 sprintf(buffer,
"YUV4MPEG2 C%s W%u H%u F%u:%u I%c\n",
964 "420jpeg", width, height, fps_num, fps_den,
'p');
965 out_put(out, (
unsigned char *)buffer, strlen(buffer), do_md5);
969 for (i = 0; i <
sizeof(ifaces) /
sizeof(ifaces[0]); i++)
970 if ((fourcc & ifaces[i].fourcc_mask) == ifaces[i].fourcc)
974 if (iface && iface != ivf_iface)
975 fprintf(stderr,
"Notice -- IVF header indicates codec: %s\n",
984 (ec_enabled ? VPX_CODEC_USE_ERROR_CONCEALMENT : 0);
988 fprintf(stderr,
"Failed to initialize decoder: %s\n",
vpx_codec_error(&decoder));
993 fprintf(stderr,
"%s\n", decoder.
name);
995 #if CONFIG_VP8_DECODER
1000 fprintf(stderr,
"Failed to configure postproc: %s\n",
vpx_codec_error(&decoder));
1001 return EXIT_FAILURE;
1004 if (vp8_dbg_color_ref_frame
1007 fprintf(stderr,
"Failed to configure reference block visualizer: %s\n",
vpx_codec_error(&decoder));
1008 return EXIT_FAILURE;
1011 if (vp8_dbg_color_mb_modes
1014 fprintf(stderr,
"Failed to configure macro block visualizer: %s\n",
vpx_codec_error(&decoder));
1015 return EXIT_FAILURE;
1018 if (vp8_dbg_color_b_modes
1021 fprintf(stderr,
"Failed to configure block visualizer: %s\n",
vpx_codec_error(&decoder));
1022 return EXIT_FAILURE;
1025 if (vp8_dbg_display_mv
1028 fprintf(stderr,
"Failed to configure motion vector visualizer: %s\n",
vpx_codec_error(&decoder));
1029 return EXIT_FAILURE;
1034 while (!read_frame(&input, &buf, &buf_sz, &buf_alloc_sz))
1038 struct vpx_usec_timer timer;
1041 vpx_usec_timer_start(&timer);
1046 fprintf(stderr,
"Failed to decode frame: %s\n",
vpx_codec_error(&decoder));
1049 fprintf(stderr,
" Additional information: %s\n", detail);
1054 vpx_usec_timer_mark(&timer);
1055 dx_time += vpx_usec_timer_elapsed(&timer);
1061 fprintf(stderr,
"Failed VP8_GET_FRAME_CORRUPTED: %s\n",
1065 frames_corrupted += corrupted;
1071 show_progress(frame_in, frame_out, dx_time);
1078 char out_fn[PATH_MAX];
1083 size_t len =
sizeof(out_fn)-1;
1086 generate_filename(outfile_pattern, out_fn, len-1,
1087 img->
d_w, img->
d_h, frame_in);
1088 out = out_open(out_fn, do_md5);
1091 out_put(out, (
unsigned char *)
"FRAME\n", 6, do_md5);
1095 for (y = 0; y < img->
d_h; y++)
1097 out_put(out, buf, img->
d_w, do_md5);
1103 for (y = 0; y < (1 + img->
d_h) / 2; y++)
1105 out_put(out, buf, (1 + img->
d_w) / 2, do_md5);
1111 for (y = 0; y < (1 + img->
d_h) / 2; y++)
1113 out_put(out, buf, (1 + img->
d_w) / 2, do_md5);
1118 out_close(out, out_fn, do_md5);
1122 if (stop_after && frame_in >= stop_after)
1126 if (summary || progress)
1128 show_progress(frame_in, frame_out, dx_time);
1129 fprintf(stderr,
"\n");
1132 if (frames_corrupted)
1133 fprintf(stderr,
"WARNING: %d frames corrupted.\n",frames_corrupted);
1139 fprintf(stderr,
"Failed to destroy decoder: %s\n",
vpx_codec_error(&decoder));
1140 return EXIT_FAILURE;
1143 if (single_file && !noblit)
1144 out_close(out, outfile, do_md5);
1146 if(input.nestegg_ctx)
1147 nestegg_destroy(input.nestegg_ctx);
1148 if(input.kind != WEBM_FILE)
1153 return frames_corrupted ? EXIT_FAILURE : EXIT_SUCCESS;
struct vpx_codec_iface vpx_codec_iface_t
Codec interface structure.
Definition: vpx_codec.h:167
Image Descriptor.
Definition: vpx_image.h:97
Describes the decoder algorithm interface to applications.
const char * vpx_codec_iface_name(vpx_codec_iface_t *iface)
Return the name for a given interface.
unsigned int threads
Definition: vpx_decoder.h:108
unsigned int sz
Definition: vpx_decoder.h:88
Stream properties.
Definition: vpx_decoder.h:86
int noise_level
Definition: vp8.h:80
Provides definitions for using the VP8 algorithm within the vpx Decoder interface.
vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si)
Parse stream info from a buffer.
#define VPX_PLANE_Y
Definition: vpx_image.h:115
const char * name
Definition: vpx_codec.h:195
#define VPX_PLANE_V
Definition: vpx_image.h:117
unsigned int d_w
Definition: vpx_image.h:106
#define vpx_codec_dec_init(ctx, iface, cfg, flags)
Convenience macro for vpx_codec_dec_init_ver()
Definition: vpx_decoder.h:146
vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, long deadline)
Decode data.
int stride[4]
Definition: vpx_image.h:127
unsigned char * planes[4]
Definition: vpx_image.h:126
#define VPX_CODEC_USE_POSTPROC
Initialization-time Feature Enabling.
Definition: vpx_decoder.h:70
const char * vpx_codec_error_detail(vpx_codec_ctx_t *ctx)
Retrieve detailed error information for codec context.
#define VPX_PLANE_U
Definition: vpx_image.h:116
int deblocking_level
Definition: vp8.h:79
unsigned int w
Definition: vpx_decoder.h:89
#define vpx_codec_control(ctx, id, data)
vpx_codec_control wrapper macro
Definition: vpx_codec.h:392
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx)
Destroy a codec instance.
unsigned int d_h
Definition: vpx_image.h:107
post process flags
Definition: vp8.h:76
unsigned int h
Definition: vpx_decoder.h:90
const char * vpx_codec_error(vpx_codec_ctx_t *ctx)
Retrieve error synopsis for codec context.
Initialization Configurations.
Definition: vpx_decoder.h:106
const void * vpx_codec_iter_t
Iterator.
Definition: vpx_codec.h:182
vpx_image_t * vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter)
Decoded frames iterator.
int post_proc_flag
Definition: vp8.h:78
Codec context structure.
Definition: vpx_codec.h:193