forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libtheora] update to master, refactor
- Loading branch information
Showing
5 changed files
with
209 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 47eb8d07a8caaa6cc1e6e906a7cd5b44ee0fb624 Mon Sep 17 00:00:00 2001 | ||
From: Mikhail Paulyshka <[email protected]> | ||
Date: Thu, 27 Jul 2017 04:24:36 +0300 | ||
Subject: [PATCH] remove redundant assignments | ||
|
||
--- | ||
lib/tokenize.c | 16 ++++++++-------- | ||
1 file changed, 8 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/lib/tokenize.c b/lib/tokenize.c | ||
index 57b7aa8..3f53fb5 100644 | ||
--- a/lib/tokenize.c | ||
+++ b/lib/tokenize.c | ||
@@ -487,11 +487,11 @@ int oc_enc_tokenize_ac(oc_enc_ctx *_enc,int _pli,ptrdiff_t _fragi, | ||
zzj=64; | ||
for(zzi=OC_MINI(_zzi,63);zzi>0;zzi--){ | ||
ogg_uint32_t best_cost; | ||
- int best_bits=best_bits; | ||
- int best_next=best_next; | ||
- int best_token=best_token; | ||
- int best_eb=best_eb; | ||
- int best_qc=best_qc; | ||
+ int best_bits; | ||
+ int best_next; | ||
+ int best_token; | ||
+ int best_eb; | ||
+ int best_qc; | ||
ogg_uint32_t d2; | ||
int dq; | ||
int qc_m; | ||
@@ -1091,8 +1091,8 @@ void oc_enc_tokenize_dc_frag_list(oc_enc_ctx *_enc,int _pli, | ||
int neobs1; | ||
int token; | ||
int eb; | ||
- int token1=token1; | ||
- int eb1=eb1; | ||
+ int token1; | ||
+ int eb1; | ||
/*Return immediately if there are no coded fragments; otherwise we'd flush | ||
any trailing EOB run into the AC 1 list and never read it back out.*/ | ||
if(_ncoded_fragis<=0)return; | ||
@@ -1328,7 +1328,7 @@ void oc_enc_tokenize_finish(oc_enc_ctx *_enc){ | ||
int new_eb; | ||
int zzj; | ||
int plj; | ||
- ptrdiff_t ti=ti; | ||
+ ptrdiff_t ti; | ||
int run_count; | ||
/*Make sure this coefficient has tokens at all.*/ | ||
if(_enc->ndct_tokens[pli][zzi]<=0)continue; | ||
-- | ||
2.12.2.windows.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Source: libtheora | ||
Version: 1.1.1 | ||
Version: 1.2.0alpha1-20170719~vcpkg1 | ||
Description: Theora is a free and open video compression format from the Xiph.org Foundation. | ||
Build-Depends: libogg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
EXPORTS | ||
; Old alpha API | ||
theora_version_string | ||
theora_version_number | ||
theora_decode_header | ||
theora_decode_init | ||
theora_decode_packetin | ||
theora_decode_YUVout | ||
theora_control | ||
theora_packet_isheader | ||
theora_packet_iskeyframe | ||
theora_granule_shift | ||
theora_granule_frame | ||
theora_granule_time | ||
theora_info_init | ||
theora_info_clear | ||
theora_clear | ||
theora_comment_init | ||
theora_comment_add | ||
theora_comment_add_tag | ||
theora_comment_query | ||
theora_comment_query_count | ||
theora_comment_clear | ||
; New theora-exp API | ||
th_version_string | ||
th_version_number | ||
th_decode_headerin | ||
th_decode_alloc | ||
th_setup_free | ||
th_decode_ctl | ||
th_decode_packetin | ||
th_decode_ycbcr_out | ||
th_decode_free | ||
th_packet_isheader | ||
th_packet_iskeyframe | ||
th_granule_frame | ||
th_granule_time | ||
th_info_init | ||
th_info_clear | ||
th_comment_init | ||
th_comment_add | ||
th_comment_add_tag | ||
th_comment_query | ||
th_comment_query_count | ||
th_comment_clear | ||
; Old alpha API | ||
theora_encode_init | ||
theora_encode_YUVin | ||
theora_encode_packetout | ||
theora_encode_header | ||
theora_encode_comment | ||
theora_encode_tables | ||
; New theora-exp API | ||
th_encode_alloc | ||
th_encode_ctl | ||
th_encode_flushheader | ||
th_encode_ycbcr_in | ||
th_encode_packetout | ||
th_encode_free | ||
TH_VP31_QUANT_INFO | ||
TH_VP31_HUFF_CODES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,41 @@ | ||
# Common Ambient Variables: | ||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> | ||
# TARGET_TRIPLET is the current triplet (x86-windows, etc) | ||
# PORT is the current port name (zlib, etc) | ||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} | ||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} | ||
# | ||
|
||
include(vcpkg_common_functions) | ||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtheora-1.1.1) | ||
vcpkg_download_distfile(ARCHIVE | ||
URLS "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2" | ||
FILENAME "libtheora-1.1.1.tar.bz2" | ||
SHA512 9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO xiph/theora | ||
REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb | ||
SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_apply_patches( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PATCHES | ||
${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp.patch | ||
) | ||
vcpkg_extract_source_archive(${ARCHIVE}) | ||
|
||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/libtheora.def DESTINATION ${SOURCE_PATH}) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOGG.cmake DESTINATION ${SOURCE_PATH}) | ||
|
||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") | ||
set(THEORA_X86_OPT ON) | ||
else() | ||
set(THEORA_X86_OPT OFF) | ||
endif() | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DUSE_X86=${THEORA_X86_OPT} | ||
) | ||
|
||
vcpkg_build_cmake() | ||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
|
||
# Handle copyright | ||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtheora) | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtheora/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtheora/copyright) |