summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec/fx_codec.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec.cpp66
1 files changed, 1 insertions, 65 deletions
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index 2681f72199..6bcea4b48e 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -12,10 +12,10 @@
#include <tuple>
#include <utility>
+#include "core/fxcodec/codec/ccodec_scanlinedecoder.h"
#include "core/fxcodec/codec/codec_int.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_safe_types.h"
-#include "core/fxcrt/ifx_pauseindicator.h"
#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
@@ -1350,70 +1350,6 @@ CCodec_ModuleMgr::CCodec_ModuleMgr()
CCodec_ModuleMgr::~CCodec_ModuleMgr() {}
-CCodec_ScanlineDecoder::CCodec_ScanlineDecoder()
- : CCodec_ScanlineDecoder(0, 0, 0, 0, 0, 0, 0) {}
-
-CCodec_ScanlineDecoder::CCodec_ScanlineDecoder(int nOrigWidth,
- int nOrigHeight,
- int nOutputWidth,
- int nOutputHeight,
- int nComps,
- int nBpc,
- uint32_t nPitch)
- : m_OrigWidth(nOrigWidth),
- m_OrigHeight(nOrigHeight),
- m_OutputWidth(nOutputWidth),
- m_OutputHeight(nOutputHeight),
- m_nComps(nComps),
- m_bpc(nBpc),
- m_Pitch(nPitch),
- m_NextLine(-1),
- m_pLastScanline(nullptr) {}
-
-CCodec_ScanlineDecoder::~CCodec_ScanlineDecoder() {}
-
-const uint8_t* CCodec_ScanlineDecoder::GetScanline(int line) {
- if (m_NextLine == line + 1)
- return m_pLastScanline;
-
- if (m_NextLine < 0 || m_NextLine > line) {
- if (!v_Rewind())
- return nullptr;
- m_NextLine = 0;
- }
- while (m_NextLine < line) {
- ReadNextLine();
- m_NextLine++;
- }
- m_pLastScanline = ReadNextLine();
- m_NextLine++;
- return m_pLastScanline;
-}
-
-bool CCodec_ScanlineDecoder::SkipToScanline(int line,
- IFX_PauseIndicator* pPause) {
- if (m_NextLine == line || m_NextLine == line + 1)
- return false;
-
- if (m_NextLine < 0 || m_NextLine > line) {
- v_Rewind();
- m_NextLine = 0;
- }
- m_pLastScanline = nullptr;
- while (m_NextLine < line) {
- m_pLastScanline = ReadNextLine();
- m_NextLine++;
- if (pPause && pPause->NeedToPauseNow()) {
- return true;
- }
- }
- return false;
-}
-
-uint8_t* CCodec_ScanlineDecoder::ReadNextLine() {
- return v_GetNextLine();
-}
-
bool CCodec_BasicModule::RunLengthEncode(const uint8_t* src_buf,
uint32_t src_size,
uint8_t** dest_buf,