| 1 |
// Copyright (c) the JPEG XL Project Authors. All rights reserved. |
| 2 |
// |
| 3 |
// Use of this source code is governed by a BSD-style |
| 4 |
// license that can be found in the LICENSE file. |
| 5 |
|
| 6 |
#ifndef LIB_JXL_RENDER_PIPELINE_STAGE_WRITE_H_ |
| 7 |
#define LIB_JXL_RENDER_PIPELINE_STAGE_WRITE_H_ |
| 8 |
|
| 9 |
#include <jxl/memory_manager.h> |
| 10 |
|
| 11 |
#include <cstddef> |
| 12 |
#include <memory> |
| 13 |
#include <vector> |
| 14 |
|
| 15 |
#include "lib/jxl/dec_cache.h" |
| 16 |
#include "lib/jxl/dec_xyb.h" |
| 17 |
#include "lib/jxl/image.h" |
| 18 |
#include "lib/jxl/image_bundle.h" |
| 19 |
#include "lib/jxl/image_metadata.h" |
| 20 |
#include "lib/jxl/render_pipeline/render_pipeline_stage.h" |
| 21 |
|
| 22 |
namespace jxl { |
| 23 |
|
| 24 |
std::unique_ptr<RenderPipelineStage> GetWriteToImageBundleStage( |
| 25 |
ImageBundle* image_bundle, const OutputEncodingInfo& output_encoding_info); |
| 26 |
|
| 27 |
// Gets a stage to write color channels to an Image3F. |
| 28 |
std::unique_ptr<RenderPipelineStage> GetWriteToImage3FStage( |
| 29 |
JxlMemoryManager* memory_manager, Image3F* image); |
| 30 |
|
| 31 |
// Gets a stage to write to a pixel callback or image buffer. |
| 32 |
std::unique_ptr<RenderPipelineStage> GetWriteToOutputStage( |
| 33 |
const ImageOutput& main_output, size_t width, size_t height, bool has_alpha, |
| 34 |
bool unpremul_alpha, size_t alpha_c, Orientation undo_orientation, |
| 35 |
std::vector<ImageOutput>& extra_output, JxlMemoryManager* memory_manager); |
| 36 |
|
| 37 |
} // namespace jxl |
| 38 |
|
| 39 |
#endif // LIB_JXL_RENDER_PIPELINE_STAGE_WRITE_H_ |