Coverage Report

Created: 2025-12-03 07:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libheif/libheif/codecs/uncompressed/decoder_pixel_interleave.h
Line
Count
Source
1
/*
2
 * HEIF codec.
3
 * Copyright (c) 2023 Dirk Farin <dirk.farin@gmail.com>
4
 *
5
 * This file is part of libheif.
6
 *
7
 * libheif is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Lesser General Public License as
9
 * published by the Free Software Foundation, either version 3 of
10
 * the License, or (at your option) any later version.
11
 *
12
 * libheif is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public License
18
 * along with libheif.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef UNCI_DECODER_PIXEL_INTERLEAVE_H
22
#define UNCI_DECODER_PIXEL_INTERLEAVE_H
23
24
#include <cstdint>
25
#include <cstring>
26
#include <algorithm>
27
#include <map>
28
#include <iostream>
29
#include <cassert>
30
#include <utility>
31
32
#include "common_utils.h"
33
#include "context.h"
34
#include "compression.h"
35
#include "error.h"
36
#include "libheif/heif.h"
37
#include "unc_types.h"
38
#include "unc_boxes.h"
39
#include "unc_codec.h"
40
#include "unc_dec.h"
41
42
#include "decoder_abstract.h"
43
#include "decoder_component_interleave.h"
44
#include <memory>
45
#include <utility>
46
47
48
class PixelInterleaveDecoder : public AbstractDecoder
49
{
50
public:
51
  PixelInterleaveDecoder(uint32_t width, uint32_t height, std::shared_ptr<const Box_cmpd> cmpd, std::shared_ptr<const Box_uncC> uncC) :
52
0
      AbstractDecoder(width, height, std::move(cmpd), std::move(uncC)) {}
53
54
  Error decode_tile(const DataExtent& dataExtent,
55
                    const UncompressedImageCodec::unci_properties& properties,
56
                    std::shared_ptr<HeifPixelImage>& img,
57
                    uint32_t out_x0, uint32_t out_y0,
58
                    uint32_t image_width, uint32_t image_height,
59
                    uint32_t tile_x, uint32_t tile_y) override;
60
61
  void processTile(UncompressedBitReader& srcBits, uint32_t tile_row, uint32_t tile_column,
62
                   uint32_t out_x0, uint32_t out_y0);
63
};
64
65
#endif // UNCI_DECODER_PIXEL_INTERLEAVE_H