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

Side by Side Diff: source/libvpx/examples/postproc.txt

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 @TEMPLATE decoder_tmpl.c 1 @TEMPLATE decoder_tmpl.c
2 Postprocessing Decoder 2 Postprocessing Decoder
3 ====================== 3 ======================
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION
5 This example adds postprocessing to the simple decoder loop. 5 This example adds postprocessing to the simple decoder loop.
6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION 6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION
7 7
8 8
9 Initializing Postprocessing 9 Initializing Postprocessing
10 --------------------------- 10 ---------------------------
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 die_codec(&codec, "Failed to decode frame"); 44 die_codec(&codec, "Failed to decode frame");
45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DECODE 45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DECODE
46 46
47 47
48 Codec Specific Postprocessing Controls 48 Codec Specific Postprocessing Controls
49 -------------------------------------- 49 --------------------------------------
50 Some codecs provide fine grained controls over their built-in 50 Some codecs provide fine grained controls over their built-in
51 postprocessors. VP8 is one example. The following sample code toggles 51 postprocessors. VP8 is one example. The following sample code toggles
52 postprocessing on and off every 15 frames. 52 postprocessing on and off every 15 frames.
53 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE 53 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE
54 #if CONFIG_VP8_DECODER 54 #if CONFIG_VP9_DECODER
55 if(frame_cnt%30 == 1) { 55 if(frame_cnt%30 == 1) {
56 vp8_postproc_cfg_t pp = {0, 0, 0}; 56 vp8_postproc_cfg_t pp = {0, 0, 0};
57 57
58 if(vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp)) 58 if(vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp))
59 die_codec(&codec, "Failed to turn off postproc"); 59 die_codec(&codec, "Failed to turn off postproc");
60 } else if(frame_cnt%30 == 16) { 60 } else if(frame_cnt%30 == 16) {
61 vp8_postproc_cfg_t pp = {VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE, 4, 0}; 61 vp8_postproc_cfg_t pp = {VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE, 4, 0};
62 62
63 if(vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp)) 63 if(vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp))
64 die_codec(&codec, "Failed to turn on postproc"); 64 die_codec(&codec, "Failed to turn on postproc");
65 }; 65 };
66 #endif 66 #endif
67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE 67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698