Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: source/libvpx/examples/decode_with_drops.txt

Issue 148913004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/examples/decode_with_drops.c ('k') | source/libvpx/examples/decode_with_partial_drops.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/examples/decode_with_drops.txt
===================================================================
--- source/libvpx/examples/decode_with_drops.txt (revision 247498)
+++ source/libvpx/examples/decode_with_drops.txt (working copy)
@@ -1,73 +0,0 @@
-@TEMPLATE decoder_tmpl.c
-Decode With Drops Example
-=========================
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION
-This is an example utility which drops a series of frames, as specified
-on the command line. This is useful for observing the error recovery
-features of the codec.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION
-
-Usage
------
-This example adds a single argument to the `simple_decoder` example,
-which specifies the range or pattern of frames to drop. The parameter is
-parsed as follows:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE
-if(argc!=4)
- die("Usage: %s <infile> <outfile> <N-M|N/M>\n", argv[0]);
-{
- char *nptr;
- n = strtol(argv[3], &nptr, 0);
- m = strtol(nptr+1, NULL, 0);
- is_range = *nptr == '-';
- if(!n || !m || (*nptr != '-' && *nptr != '/'))
- die("Couldn't parse pattern %s\n", argv[3]);
-}
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE
-
-
-Dropping A Range Of Frames
---------------------------
-To drop a range of frames, specify the starting frame and the ending
-frame to drop, separated by a dash. The following command will drop
-frames 5 through 10 (base 1).
-
- $ ./decode_with_drops in.ivf out.i420 5-10
-
-
-Dropping A Pattern Of Frames
-----------------------------
-To drop a pattern of frames, specify the number of frames to drop and
-the number of frames after which to repeat the pattern, separated by
-a forward-slash. The following command will drop 3 of 7 frames.
-Specifically, it will decode 4 frames, then drop 3 frames, and then
-repeat.
-
- $ ./decode_with_drops in.ivf out.i420 3/7
-
-
-Extra Variables
----------------
-This example maintains the pattern passed on the command line in the
-`n`, `m`, and `is_range` variables:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_VARS
-int n, m, is_range;
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_VARS
-
-
-Making The Drop Decision
-------------------------
-The example decides whether to drop the frame based on the current
-frame number, immediately before decoding the frame.
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE
-if((is_range && frame_cnt >= n && frame_cnt <= m)
- ||(!is_range && m - (frame_cnt-1)%m <= n)) {
- putc('X', stdout);
- continue;
-}
-putc('.', stdout);
-fflush(stdout);
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE
« no previous file with comments | « source/libvpx/examples/decode_with_drops.c ('k') | source/libvpx/examples/decode_with_partial_drops.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698