Projects
Multimedia
avidemux
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 16
View file
avidemux.spec
Changed
@@ -31,6 +31,8 @@ Source5: libavcodec_libavcodec.v.patch Patch0: avidemux-cpu_armel.patch Patch1: fix-internal-plugins-load.patch +Patch2: avidemux-cpp.patch +Patch3: avidemux-stdlib.patch License: GPL-2.0 Group: Productivity/Multimedia/Video/Editors and Convertors @@ -143,6 +145,8 @@ popd %patch0 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %if 0%{?sles_version}
View file
avidemux-cpp.patch
Added
@@ -0,0 +1,40 @@ +--- a/avidemux/ADM_core/include/ADM_mangle.h ++++ b/avidemux/ADM_core/include/ADM_mangle.h +@@ -72,16 +72,16 @@ + #define REG_BP "ebp" + #endif + +-#define REG_ax "%%"REG_a +-#define REG_bx "%%"REG_b +-#define REG_cx "%%"REG_c +-#define REG_dx "%%"REG_d ++#define REG_ax "%%" REG_a ++#define REG_bx "%%" REG_b ++#define REG_cx "%%" REG_c ++#define REG_dx "%%" REG_d + +-#define REG_si "%%"REG_S +-#define REG_di "%%"REG_D ++#define REG_si "%%" REG_S ++#define REG_di "%%" REG_D + +-#define REG_sp "%%"REG_SP +-#define REG_bp "%%"REG_BP ++#define REG_sp "%%" REG_SP ++#define REG_bp "%%" REG_BP + + #ifndef attribute_used + #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) +--- a/avidemux/ADM_inputs/ADM_h263/ADM_mp4.cpp ++++ b/avidemux/ADM_inputs/ADM_h263/ADM_mp4.cpp +@@ -70,8 +70,8 @@ cb cb_decode[]={ + + }; + +-#define ONEOPT(x) {if(parser->read1bit()) printf("\t"x"\n"); } +-#define NOT_ONEOPT(x) {if(!parser->read1bit()) printf("\t"x"\n"); } ++#define ONEOPT(x) {if(parser->read1bit()) printf("\t" x "\n"); } ++#define NOT_ONEOPT(x) {if(!parser->read1bit()) printf("\t" x "\n"); } + #define TWOPT(x,y) {if(parser->read1bit()) printf(x); else printf(y); } + + //_________________________________
View file
avidemux-stdlib.patch
Added
@@ -0,0 +1,109 @@ +--- a/avidemux/ADM_inputs/ADM_ogm/ADM_ogmAudio.cpp ++++ b/avidemux/ADM_inputs/ADM_ogm/ADM_ogmAudio.cpp +@@ -19,8 +19,9 @@ + // + #include "config.h" + #include <stdio.h> +-#include <stdlib.h> + #include <string.h> ++#include <cstdlib> ++#include <cmath> + #include "ADM_assert.h" + + #define MINUS_ONE 0xffffffff +@@ -402,7 +403,7 @@ static WAVHeader hdr; + // Now we forward till the next header is > value + while(_demuxer->readHeaderOfType(_currentTrack->audioTrack,&cursize,&flags,&f)) + { +- if(f>val || abs(f-val)<CLOSE_ENOUGH) ++ if(f>val || std::abs(f-val)<CLOSE_ENOUGH) + { + aprintf("Wanted %llu",val); + aprintf(" got %llu\n",f); +--- a/plugins/ADM_videoEncoder/ADM_vidEnc_mpeg2enc/mpeg2enc/find_best_one_pel.cc ++++ b/plugins/ADM_videoEncoder/ADM_vidEnc_mpeg2enc/mpeg2enc/find_best_one_pel.cc +@@ -1,7 +1,7 @@ + #include "config.h" +-#include <stdlib.h> +-#include <limits.h> +-#include <math.h> ++#include <cstdlib> ++#include <cmath> ++#include <climits> + #include "mmxsse_motion.h" + #include "fastintfns.h" + +@@ -30,7 +30,7 @@ void find_best_one_pel_mmxe( me_result_s + int x; + matchrec = sub22set->mests[k]; + orgblk = org + (i0+matchrec.x)+rowstride*(j0+matchrec.y); +- penalty = (abs(matchrec.x) + abs(matchrec.y))<<3; ++ penalty = (std::abs((int)matchrec.x) + std::abs((int)matchrec.y))<<3; + + /* Get SAD for macroblocks: orgblk,orgblk(+1,0), + orgblk(0,+1), and orgblk(+1,+1) +--- a/plugins/ADM_videoFilters/Telecide/ADM_vidDecTelecide.cpp ++++ b/plugins/ADM_videoFilters/Telecide/ADM_vidDecTelecide.cpp +@@ -690,7 +690,7 @@ uint8_t *finalpU,*finalpV; + { + // The chosen frame doesn't match the prediction. + if (predicted_metric == 0) mismatch = 0.0; +- else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric; ++ else mismatch = (100.0*std::abs((int)(predicted_metric - lowest)))/predicted_metric; + if (mismatch < gthresh) + { + // It's close enough, so use the predicted one. +@@ -732,7 +732,7 @@ uint8_t *finalpU,*finalpV; + { + // The chosen frame doesn't match the prediction. + if (predicted_metric == 0) mismatch = 0.0; +- else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric; ++ else mismatch = (100.0*std::abs((int)(predicted_metric - lowest)))/predicted_metric; + if ((int) mismatch <= gthresh) + { + // It's close enough, so use the predicted one. +@@ -1222,7 +1222,7 @@ void Telecide::CalculateMetrics(int fram + // Test combination with current frame. + tmp1 = ((long)currbot0[x] + (long)currbot2[x]); + // diff = abs((long)currtop0[x] - (tmp1 >> 1)); +- diff = abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1); ++ diff = std::abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1); + if (diff > nt) + { + c += diff; +@@ -1242,7 +1242,7 @@ void Telecide::CalculateMetrics(int fram + + // Test combination with previous frame. + tmp1 = ((long)a0[x] + (long)a2[x]); +- diff = abs((((long)b0[x] + (long)b2[x] + (long)b4[x])) - (tmp1 >> 1) - tmp1); ++ diff = std::abs((((long)b0[x] + (long)b2[x] + (long)b4[x])) - (tmp1 >> 1) - tmp1); + if (diff > nt) + { + p += diff; +@@ -1341,7 +1341,7 @@ void Telecide::CalculateMetrics(int fram + + // Test combination with current frame. + tmp1 = ((long)currbot0[x] + (long)currbot2[x]); +- diff = abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1); ++ diff = std::abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1); + if (diff > nt) + { + c += diff; +@@ -1361,7 +1361,7 @@ void Telecide::CalculateMetrics(int fram + + // Test combination with previous frame. + tmp1 = ((long)a0[x] + (long)a2[x]); +- diff = abs((((long)b0[x] + (long)b2[x] + (long)b4[x])) - (tmp1 >> 1) - tmp1); ++ diff = std::abs((((long)b0[x] + (long)b2[x] + (long)b4[x])) - (tmp1 >> 1) - tmp1); + if (diff > nt) + { + p += diff; +@@ -1586,7 +1586,7 @@ struct PREDICTION *Telecide::PredictSoft + c = cache[y%CACHE_SIZE].metrics[C]; + n = cache[y%CACHE_SIZE].metrics[N]; + if (c == 0) c = 1; +- metric = (100 * abs (c - n)) / c; ++ metric = (100 * std::abs (c - n)) / c; + phase = y % cycle; + if (metric < 5) + {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.