Unified · Split
| @@ -27,13 +27,15 @@ · 26 unmodified lines | |||
| 27 | * </pre> | 27 | * </pre> |
| 28 | * | 28 | * |
| 29 | * An application instantiates a specific decoder instance by using | 29 | * An application instantiates a specific decoder instance by using |
| 30 | * vpx_codec_init() and a pointer to the algorithm's interface structure: | 30 | * vpx_codec_dec_init() and a pointer to the algorithm's interface structure: |
| 31 | * <pre> | 31 | * <pre> |
| 32 | * my_app.c: | 32 | * my_app.c: |
| 33 | * extern vpx_codec_iface_t my_codec; | 33 | * extern vpx_codec_iface_t my_codec; |
| 34 | * { | 34 | * { |
| 35 | * vpx_codec_ctx_t algo; | 35 | * vpx_codec_ctx_t algo; |
| 36 | * res = vpx_codec_init(&algo, &my_codec); | 36 | * int threads = 4; |
| 37 | * vpx_codec_dec_cfg_t cfg = { threads, 0, 0 }; | ||
| 38 | * res = vpx_codec_dec_init(&algo, &my_codec, &cfg, 0); | ||
| 37 | * } | 39 | * } |
| 38 | * </pre> | 40 | * </pre> |
| 39 | * | 41 | * |
| @@ -22,13 +22,16 @@ · 21 unmodified lines | |||
| 22 | * video codec algorithm. | 22 | * video codec algorithm. |
| 23 | * | 23 | * |
| 24 | * An application instantiates a specific codec instance by using | 24 | * An application instantiates a specific codec instance by using |
| 25 | * vpx_codec_init() and a pointer to the algorithm's interface structure: | 25 | * vpx_codec_dec_init() or vpx_codec_enc_init() and a pointer to the |
| 26 | * algorithm's interface structure: | ||
| 26 | * <pre> | 27 | * <pre> |
| 27 | * my_app.c: | 28 | * my_app.c: |
| 28 | * extern vpx_codec_iface_t my_codec; | 29 | * extern vpx_codec_iface_t my_codec; |
| 29 | * { | 30 | * { |
| 30 | * vpx_codec_ctx_t algo; | 31 | * vpx_codec_ctx_t algo; |
| 31 | * res = vpx_codec_init(&algo, &my_codec); | 32 | * int threads = 4; |
| 33 | * vpx_codec_dec_cfg_t cfg = { threads, 0, 0 }; | ||
| 34 | * res = vpx_codec_dec_init(&algo, &my_codec, &cfg, 0); | ||
| 32 | * } | 35 | * } |
| 33 | * </pre> | 36 | * </pre> |
| 34 | * | 37 | * |