Skip to content

Commit

Permalink
Fix AV1 build issues
Browse files Browse the repository at this point in the history
* Change path to AV1 include

* Correct typo in API
  • Loading branch information
errollgarner committed Apr 21, 2023
1 parent d4eaae9 commit cdb110b
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlAV1Decoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "igtlAV1Decoder.h"

// AV1 includes
#include "aomdx.h"
#include "aom/aomdx.h"
namespace igtl {

static const AomInterfaceDecoder AV1StaticDecoder[] = { { &aom_codec_av1_dx } };
Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlAV1Decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "igtlCodecCommonClasses.h"

// AV1 includes
#include "aom_decoder.h"
#include "aom/aom_decoder.h"

namespace igtl {

Expand Down
6 changes: 3 additions & 3 deletions Source/VideoStreaming/igtlAV1Encoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "igtlAV1Encoder.h"

// AV1 includes
#include "aomcx.h"
#include "aom/aomcx.h"

namespace igtl {

Expand Down Expand Up @@ -142,7 +142,7 @@ int igtlAV1Encoder::SetQP(int maxQP, int minQP)
int igtlAV1Encoder::SetLosslessLink(bool linkMethod)
{
this->isLossLessLink = linkMethod;
if (aom_codec_control_(codec, AV1E_SET_LOSSLESS, linkMethod))
if (aom_codec_control(codec, AV1E_SET_LOSSLESS, linkMethod))
{
error_output(codec, "Failed to set lossless mode");
return -1;
Expand Down Expand Up @@ -178,7 +178,7 @@ int igtlAV1Encoder::InitializeEncoder()
return -1;
}

if (aom_codec_control_(codec, AV1E_SET_LOSSLESS, this->GetLosslessLink()))
if (aom_codec_control(codec, AV1E_SET_LOSSLESS, this->GetLosslessLink()))
{
error_output(codec, "Failed to set lossless mode");
return -1;
Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlAV1Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "igtlCodecCommonClasses.h"

// AV1 includes
#include "aom_encoder.h"
#include "aom/aom_encoder.h"

namespace igtl {

Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlCodecCommonClasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class IGTLCommon_EXPORT GenericEncoder : public Object

virtual int SetQP(int maxQP, int minQP){return -1;};

virtual int SetRCTaregetBitRate(unsigned int bitRate){return -1;};
virtual int SetRCTargetBitRate(unsigned int bitRate){return -1;};

virtual int SetPicWidthAndHeight(unsigned int Width, unsigned int Height){return -1;};

Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlH264Encoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ int H264Encoder::FillSpecificParameters() {
return 0;
}

int H264Encoder::SetRCTaregetBitRate(unsigned int bitRate)
int H264Encoder::SetRCTargetBitRate(unsigned int bitRate)
{
this->sSvcParam.iTargetBitrate = bitRate;
for (int i = 0; i < this->sSvcParam.iSpatialLayerNum; i++)
Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlH264Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class IGTLCommon_EXPORT H264Encoder: public GenericEncoder
*/
int SetSpeed(int speed) override;

int SetRCTaregetBitRate(unsigned int bitRate) override;
int SetRCTargetBitRate(unsigned int bitRate) override;

bool GetLosslessLink() override {return this->sSvcParam.bIsLosslessLink;};

Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlH265Encoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int H265Encoder::FillSpecificParameters() {
return 0;
}

int H265Encoder::SetRCTaregetBitRate(unsigned int bitRate)
int H265Encoder::SetRCTargetBitRate(unsigned int bitRate)
{
this->sSvcParam->rc.aqMode = X265_AQ_VARIANCE;
this->sSvcParam->rc.rateControlMode = X265_RC_ABR;
Expand Down
4 changes: 2 additions & 2 deletions Source/VideoStreaming/igtlH265Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class IGTLCommon_EXPORT H265Encoder: public GenericEncoder

int SetSpeed(int speed) override;

int SetRCTaregetBitRate(unsigned int bitRate) override;
int SetRCTargetBitRate(unsigned int bitRate) override;

bool GetLosslessLink() override {return this->sSvcParam->bLossless;};

Expand All @@ -137,4 +137,4 @@ class IGTLCommon_EXPORT H265Encoder: public GenericEncoder
};

} //namespace igtl
#endif
#endif
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlVP9Encoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ int VP9Encoder::SetKeyFrameDistance(int frameNum)
}


int VP9Encoder::SetRCTaregetBitRate(unsigned int bitRate)
int VP9Encoder::SetRCTargetBitRate(unsigned int bitRate)
{
// The bit rate in VPX is in Kilo
int bitRateInKilo = bitRate/1000;
Expand Down
2 changes: 1 addition & 1 deletion Source/VideoStreaming/igtlVP9Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class IGTLCommon_EXPORT VP9Encoder: public GenericEncoder

int SetQP(int maxQP, int minQP) override;

int SetRCTaregetBitRate(unsigned int bitRate) override;
int SetRCTargetBitRate(unsigned int bitRate) override;

int SetLosslessLink(bool linkMethod) override;

Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/External_AV1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ELSE()
ENDIF()
ENDIF()
ENDIF()
SET (AV1_INCLUDE_DIR "${CMAKE_BINARY_DIR}/Deps/AV1/aom" CACHE PATH "AV1 source directory" FORCE)
SET (AV1_INCLUDE_DIR "${CMAKE_BINARY_DIR}/Deps/AV1" CACHE PATH "AV1 source directory" FORCE)
SET (AV1_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Deps/AV1-bin" CACHE PATH "AV1 library directory" FORCE)
ExternalProject_Add(AV1
PREFIX "${CMAKE_BINARY_DIR}/Deps/AV1-prefix"
Expand Down

0 comments on commit cdb110b

Please sign in to comment.