FreeRDP
|
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/library.h>
#include <winpr/bitstream.h>
#include <winpr/synch.h>
#include <freerdp/primitives.h>
#include <freerdp/codec/h264.h>
#include <freerdp/codec/yuv.h>
#include <freerdp/log.h>
#include "h264.h"
Macros | |
#define | TAG FREERDP_TAG("codec") |
#define | MAX_SUBSYSTEMS 10 |
Functions | |
static BOOL | avc444_ensure_buffer (H264_CONTEXT *h264, DWORD nDstHeight) |
BOOL | avc420_ensure_buffer (H264_CONTEXT *h264, UINT32 stride, UINT32 width, UINT32 height) |
INT32 | avc420_decompress (H264_CONTEXT *h264, const BYTE *pSrcData, UINT32 SrcSize, BYTE *pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, const RECTANGLE_16 *regionRects, UINT32 numRegionRects) |
static BOOL | allocate_h264_metablock (UINT32 QP, RECTANGLE_16 *rectangles, RDPGFX_H264_METABLOCK *meta, size_t count) |
static INLINE BOOL | diff_tile (const RECTANGLE_16 *regionRect, BYTE *pYUVData[3], BYTE *pOldYUVData[3], UINT32 const iStride[3]) |
static BOOL | detect_changes (BOOL firstFrameDone, const UINT32 QP, const RECTANGLE_16 *regionRect, BYTE *pYUVData[3], BYTE *pOldYUVData[3], UINT32 const iStride[3], RDPGFX_H264_METABLOCK *meta) |
INT32 | h264_get_yuv_buffer (H264_CONTEXT *h264, UINT32 nSrcStride, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE *YUVData[3], UINT32 stride[3]) |
INT32 | h264_compress (H264_CONTEXT *h264, BYTE **ppDstData, UINT32 *pDstSize) |
INT32 | avc420_compress (H264_CONTEXT *h264, const BYTE *pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, const RECTANGLE_16 *regionRect, BYTE **ppDstData, UINT32 *pDstSize, RDPGFX_H264_METABLOCK *meta) |
INT32 | avc444_compress (H264_CONTEXT *h264, const BYTE *pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE version, const RECTANGLE_16 *region, BYTE *op, BYTE **ppDstData, UINT32 *pDstSize, BYTE **ppAuxDstData, UINT32 *pAuxDstSize, RDPGFX_H264_METABLOCK *meta, RDPGFX_H264_METABLOCK *auxMeta) |
static BOOL | avc444_process_rects (H264_CONTEXT *h264, const BYTE *pSrcData, UINT32 SrcSize, BYTE *pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, const RECTANGLE_16 *rects, UINT32 nrRects, avc444_frame_type type) |
INT32 | avc444_decompress (H264_CONTEXT *h264, BYTE op, const RECTANGLE_16 *regionRects, UINT32 numRegionRects, const BYTE *pSrcData, UINT32 SrcSize, const RECTANGLE_16 *auxRegionRects, UINT32 numAuxRegionRect, const BYTE *pAuxSrcData, UINT32 AuxSrcSize, BYTE *pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, UINT32 codecId) |
static BOOL CALLBACK | h264_register_subsystems (PINIT_ONCE once, PVOID param, PVOID *context) |
static BOOL | h264_context_init (H264_CONTEXT *h264) |
BOOL | h264_context_reset (H264_CONTEXT *h264, UINT32 width, UINT32 height) |
H264_CONTEXT * | h264_context_new (BOOL Compressor) |
void | h264_context_free (H264_CONTEXT *h264) |
void | free_h264_metablock (RDPGFX_H264_METABLOCK *meta) |
BOOL | h264_context_set_option (H264_CONTEXT *h264, H264_CONTEXT_OPTION option, UINT32 value) |
UINT32 | h264_context_get_option (H264_CONTEXT *h264, H264_CONTEXT_OPTION option) |
Variables | |
static INIT_ONCE | subsystems_once = INIT_ONCE_STATIC_INIT |
static const H264_CONTEXT_SUBSYSTEM * | subSystems [MAX_SUBSYSTEMS] = { 0 } |
#define MAX_SUBSYSTEMS 10 |
#define TAG FREERDP_TAG("codec") |
FreeRDP: A Remote Desktop Protocol Implementation H.264 Bitmap Compression
Copyright 2014 Mike McDonald Mike. Copyright 2017 David Fort McDo nald@ soft ware. dell .comconta ct@h arden ing- consu ltin g.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
static |
INT32 avc420_compress | ( | H264_CONTEXT * | h264, |
const BYTE * | pSrcData, | ||
DWORD | SrcFormat, | ||
UINT32 | nSrcStep, | ||
UINT32 | nSrcWidth, | ||
UINT32 | nSrcHeight, | ||
const RECTANGLE_16 * | regionRect, | ||
BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
RDPGFX_H264_METABLOCK * | meta | ||
) |
INT32 avc420_decompress | ( | H264_CONTEXT * | h264, |
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
BYTE * | pDstData, | ||
DWORD | DstFormat, | ||
UINT32 | nDstStep, | ||
UINT32 | nDstWidth, | ||
UINT32 | nDstHeight, | ||
const RECTANGLE_16 * | regionRects, | ||
UINT32 | numRegionRects | ||
) |
BOOL avc420_ensure_buffer | ( | H264_CONTEXT * | h264, |
UINT32 | stride, | ||
UINT32 | width, | ||
UINT32 | height | ||
) |
INT32 avc444_compress | ( | H264_CONTEXT * | h264, |
const BYTE * | pSrcData, | ||
DWORD | SrcFormat, | ||
UINT32 | nSrcStep, | ||
UINT32 | nSrcWidth, | ||
UINT32 | nSrcHeight, | ||
BYTE | version, | ||
const RECTANGLE_16 * | region, | ||
BYTE * | op, | ||
BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
BYTE ** | ppAuxDstData, | ||
UINT32 * | pAuxDstSize, | ||
RDPGFX_H264_METABLOCK * | meta, | ||
RDPGFX_H264_METABLOCK * | auxMeta | ||
) |
INT32 avc444_decompress | ( | H264_CONTEXT * | h264, |
BYTE | op, | ||
const RECTANGLE_16 * | regionRects, | ||
UINT32 | numRegionRects, | ||
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
const RECTANGLE_16 * | auxRegionRects, | ||
UINT32 | numAuxRegionRect, | ||
const BYTE * | pAuxSrcData, | ||
UINT32 | AuxSrcSize, | ||
BYTE * | pDstData, | ||
DWORD | DstFormat, | ||
UINT32 | nDstStep, | ||
UINT32 | nDstWidth, | ||
UINT32 | nDstHeight, | ||
UINT32 | codecId | ||
) |
|
static |
|
static |
|
static |
|
static |
void free_h264_metablock | ( | RDPGFX_H264_METABLOCK * | meta | ) |
INT32 h264_compress | ( | H264_CONTEXT * | h264, |
BYTE ** | ppDstData, | ||
UINT32 * | pDstSize | ||
) |
Function description
void h264_context_free | ( | H264_CONTEXT * | h264 | ) |
UINT32 h264_context_get_option | ( | H264_CONTEXT * | h264, |
H264_CONTEXT_OPTION | option | ||
) |
|
static |
H264_CONTEXT* h264_context_new | ( | BOOL | Compressor | ) |
BOOL h264_context_reset | ( | H264_CONTEXT * | h264, |
UINT32 | width, | ||
UINT32 | height | ||
) |
BOOL h264_context_set_option | ( | H264_CONTEXT * | h264, |
H264_CONTEXT_OPTION | option, | ||
UINT32 | value | ||
) |
INT32 h264_get_yuv_buffer | ( | H264_CONTEXT * | h264, |
UINT32 | nSrcStride, | ||
UINT32 | nSrcWidth, | ||
UINT32 | nSrcHeight, | ||
BYTE * | YUVData[3], | ||
UINT32 | stride[3] | ||
) |
Function description
|
static |
|
static |
|
static |