<div dir="ltr"><snipped><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/x265.h<br>
--- a/source/x265.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/x265.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -130,7 +130,7 @@<br>
typedef struct<br>
{<br>
void* planes[3];<br>
- int stride[3];<br>
+ intptr_t stride[3];<br>
int bitDepth;<br>
int sliceType;<br>
int poc;<br>
@@ -245,18 +245,18 @@<br>
typedef struct<br>
{<br>
int logLevel;<br>
- int bEnableWavefront; ///< enable wavefront parallel processing<br>
- int poolNumThreads; ///< number of threads to allocate for thread pool<br>
- int frameNumThreads; ///< number of concurrently encoded frames<br>
+ uint32_t bEnableWavefront; ///< enable wavefront parallel processing<br>
+ uint32_t poolNumThreads; ///< number of threads to allocate for thread pool<br>
+ uint32_t frameNumThreads; ///< number of concurrently encoded frames<br>
<br>
- int internalBitDepth; ///< bit-depth at which the encoder operates<br>
+ uint32_t internalBitDepth; ///< bit-depth at which the encoder operates<br>
<br>
const char *csvfn; ///< csv log filename. logLevel >= 3 is frame logging, else one line per run<br>
<br> // source specification<br>- int frameRate; ///< source frame-rate in Hz<br>- int sourceWidth; ///< source width in pixels<br>- int sourceHeight; ///< source height in pixels<br>
+ uint32_t frameRate; ///< source frame-rate in Hz<br>+ uint32_t sourceWidth; ///< source width in pixels<br>+ uint32_t sourceHeight; ///< source height in pixels<br>
<br> // coding unit (CU) definition<br> uint32_t maxCUSize; ///< max. CU width and height in pixels<br>
@@ -265,60 +265,60 @@<br>
uint32_t tuQTMaxIntraDepth; ///< amount the TU is allow to recurse beyond the intra PU depth<br>
<br>
// coding structure<br>
- int decodingRefreshType; ///< Intra refresh type (0:none, 1:CDR, 2:IDR) default: 1<br>
+ uint32_t decodingRefreshType; ///< Intra refresh type (0:none, 1:CDR, 2:IDR) default: 1<br>
int keyframeMin; ///< Minimum intra period in frames<br>
int keyframeMax; ///< Maximum intra period in frames<br>
int bOpenGOP; ///< Enable Open GOP referencing<br>
int bframes; ///< Max number of consecutive B-frames<br>
int lookaheadDepth; ///< Number of frames to use for lookahead, determines encoder latency<br>
- int bFrameAdaptive; ///< 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling<br>
+ uint32_t bFrameAdaptive; ///< 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling<br>
int bFrameBias;<br>
int scenecutThreshold; ///< how aggressively to insert extra I frames<br>
<br>
// Intra coding tools<br>
- int bEnableConstrainedIntra; ///< enable constrained intra prediction (ignore inter predicted reference samples)<br>
- int bEnableStrongIntraSmoothing; ///< enable strong intra smoothing for 32x32 blocks where the reference samples are flat<br>
+ uint32_t bEnableConstrainedIntra; ///< enable constrained intra prediction (ignore inter predicted reference samples)<br>
+ uint32_t bEnableStrongIntraSmoothing; ///< enable strong intra smoothing for 32x32 blocks where the reference samples are flat<br>
<br>
// Inter coding tools<br>
- int searchMethod; ///< ME search method (DIA, HEX, UMH, STAR, FULL)<br>
- int subpelRefine; ///< amount of subpel work to perform (0 .. X265_MAX_SUBPEL_LEVEL)<br>
- int searchRange; ///< ME search range<br>
+ uint32_t searchMethod; ///< ME search method (DIA, HEX, UMH, STAR, FULL)<br>
+ uint32_t subpelRefine; ///< amount of subpel work to perform (0 .. X265_MAX_SUBPEL_LEVEL)<br>
+ uint32_t searchRange; ///< ME search range<br>
uint32_t maxNumMergeCand; ///< Max number of merge candidates<br>
- int bEnableWeightedPred; ///< enable weighted prediction in P slices<br>
+ uint32_t bEnableWeightedPred; ///< enable weighted prediction in P slices<br>
int bEnableWeightedBiPred; ///< enable bi-directional weighted prediction in B slices<br>
<br>
int bEnableAMP; ///< enable asymmetrical motion predictions<br>
- int bEnableRectInter; ///< enable rectangular inter modes 2NxN, Nx2N<br>
- int bEnableCbfFastMode; ///< enable use of Cbf flags for fast mode decision<br>
+ uint32_t bEnableRectInter; ///< enable rectangular inter modes 2NxN, Nx2N<br>
+ uint32_t bEnableCbfFastMode; ///< enable use of Cbf flags for fast mode decision<br>
int bEnableEarlySkip; ///< enable early skip (merge) detection<br>
int rdLevel; ///< Configure RDO work level<br>
- int bEnableRDO;<br>
- int bEnableRDOQ;<br>
- int bEnableSignHiding; ///< enable hiding one sign bit per TU via implicit signaling<br>
- int bEnableTransformSkip; ///< enable intra transform skipping<br>
- int bEnableTSkipFast; ///< enable fast intra transform skipping<br>
+ uint32_t bEnableRDO;<br>
+ uint32_t bEnableRDOQ;<br>
+ uint32_t bEnableSignHiding; ///< enable hiding one sign bit per TU via implicit signaling<br>
+ uint32_t bEnableTransformSkip; ///< enable intra transform skipping<br>
+ uint32_t bEnableTSkipFast; ///< enable fast intra transform skipping<br>
int bEnableRDOQTS; ///< enable RD optimized quantization when transform skip is selected<br>
int maxNumReferences; ///< maximum number of references a frame can have in L0<br>
<br>
// loop filter<br>
- int bEnableLoopFilter; ///< enable Loop Filter<br>
+ uint32_t bEnableLoopFilter; ///< enable Loop Filter<br>
<br>
// SAO loop filter<br>
- int bEnableSAO; ///< enable SAO filter<br>
- int saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas<br>
- int saoLcuBasedOptimization; ///< SAO LCU-based optimization<br>
+ uint32_t bEnableSAO; ///< enable SAO filter<br>
+ uint32_t saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas<br>
+ uint32_t saoLcuBasedOptimization; ///< SAO LCU-based optimization<br>
<br>
// coding quality<br>
int cbQpOffset; ///< Chroma Cb QP Offset (0:default)<br>
int crQpOffset; ///< Chroma Cr QP Offset (0:default)<br>
- int rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)<br>
+ uint32_t rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)<br>
<br>
// debugging<br>
- int decodedPictureHashSEI; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message<br>
+ uint32_t decodedPictureHashSEI; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message<br>
<br>
// quality metrics<br>
- int bEnablePsnr;<br>
- int bEnableSsim;<br>
+ uint32_t bEnablePsnr;<br>
+ uint32_t bEnableSsim;<br></blockquote><div><br></div><div>The boolean flags don't need to be uint32_t, nor do the small enum fields like decodedPictureHashSEI and saoLcuBasedOptimization. And I really don't feel like taking a large copy/replace refactor that doesn't even try to fixup white-space alignment.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
struct<br>
{<br>
int bitrate;<br>
@@ -376,7 +376,7 @@<br>
* x265_max_bit_depth is 12, the internal and input bit depths can be<br>
* either 8, 10, or 12. Note that the internal bit depth must be the same<br>
* for all encoders allocated in the same process. */<br>
-extern const int x265_max_bit_depth;<br>
+extern const uint32_t x265_max_bit_depth;<br>
<br>
/* x265_version_str:<br>
* A static string containing the version of this compiled x265 library */<br></blockquote></div><div><br></div>-- <br>Steve Borho
</div></div></div>