FreeRDP
h264.c File Reference
#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/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)
 
static BOOL check_rect (const H264_CONTEXT *h264, const RECTANGLE_16 *rect, UINT32 nDstWidth, UINT32 nDstHeight)
 
static BOOL avc_yuv_to_rgb (H264_CONTEXT *h264, const RECTANGLE_16 *regionRects, UINT32 numRegionRects, UINT32 nDstWidth, UINT32 nDstHeight, UINT32 nDstStep, BYTE *pDstData, DWORD DstFormat, BOOL use444)
 
INT32 avc420_decompress (H264_CONTEXT *h264, const BYTE *pSrcData, UINT32 SrcSize, BYTE *pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, RECTANGLE_16 *regionRects, UINT32 numRegionRects)
 
INT32 avc420_compress (H264_CONTEXT *h264, const BYTE *pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE **ppDstData, UINT32 *pDstSize)
 
INT32 avc444_compress (H264_CONTEXT *h264, const BYTE *pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE version, BYTE *op, BYTE **ppDstData, UINT32 *pDstSize, BYTE **ppAuxDstData, UINT32 *pAuxDstSize)
 
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, RECTANGLE_16 *regionRects, UINT32 numRegionRects, const BYTE *pSrcData, UINT32 SrcSize, 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)
 
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)
 

Variables

static INIT_ONCE subsystems_once = INIT_ONCE_STATIC_INIT
 
static H264_CONTEXT_SUBSYSTEM * subSystems [MAX_SUBSYSTEMS]
 

Macro Definition Documentation

#define MAX_SUBSYSTEMS   10
#define TAG   FREERDP_TAG("codec")

FreeRDP: A Remote Desktop Protocol Implementation H.264 Bitmap Compression

Copyright 2014 Mike McDonald Mike..nosp@m.McDo.nosp@m.nald@.nosp@m.soft.nosp@m.ware..nosp@m.dell.nosp@m..com Copyright 2017 David Fort conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.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.

Function Documentation

INT32 avc420_compress ( H264_CONTEXT *  h264,
const BYTE pSrcData,
DWORD  SrcFormat,
UINT32  nSrcStep,
UINT32  nSrcWidth,
UINT32  nSrcHeight,
BYTE **  ppDstData,
UINT32 pDstSize 
)

Here is the call graph for this function:

Here is the caller graph for this function:

INT32 avc420_decompress ( H264_CONTEXT *  h264,
const BYTE pSrcData,
UINT32  SrcSize,
BYTE pDstData,
DWORD  DstFormat,
UINT32  nDstStep,
UINT32  nDstWidth,
UINT32  nDstHeight,
RECTANGLE_16 *  regionRects,
UINT32  numRegionRects 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL avc420_ensure_buffer ( H264_CONTEXT *  h264,
UINT32  stride,
UINT32  width,
UINT32  height 
)

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library - Decode

Copyright 2018 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2018 Thincast Technologies GmbH

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.

Here is the call graph for this function:

Here is the caller graph for this function:

INT32 avc444_compress ( H264_CONTEXT *  h264,
const BYTE pSrcData,
DWORD  SrcFormat,
UINT32  nSrcStep,
UINT32  nSrcWidth,
UINT32  nSrcHeight,
BYTE  version,
BYTE op,
BYTE **  ppDstData,
UINT32 pDstSize,
BYTE **  ppAuxDstData,
UINT32 pAuxDstSize 
)

Here is the call graph for this function:

Here is the caller graph for this function:

INT32 avc444_decompress ( H264_CONTEXT *  h264,
BYTE  op,
RECTANGLE_16 *  regionRects,
UINT32  numRegionRects,
const BYTE pSrcData,
UINT32  SrcSize,
RECTANGLE_16 *  auxRegionRects,
UINT32  numAuxRegionRect,
const BYTE pAuxSrcData,
UINT32  AuxSrcSize,
BYTE pDstData,
DWORD  DstFormat,
UINT32  nDstStep,
UINT32  nDstWidth,
UINT32  nDstHeight,
UINT32  codecId 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL avc444_ensure_buffer ( H264_CONTEXT *  h264,
DWORD  nDstHeight 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL avc_yuv_to_rgb ( H264_CONTEXT *  h264,
const RECTANGLE_16 *  regionRects,
UINT32  numRegionRects,
UINT32  nDstWidth,
UINT32  nDstHeight,
UINT32  nDstStep,
BYTE pDstData,
DWORD  DstFormat,
BOOL  use444 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL check_rect ( const H264_CONTEXT *  h264,
const RECTANGLE_16 *  rect,
UINT32  nDstWidth,
UINT32  nDstHeight 
)
static

Here is the caller graph for this function:

void h264_context_free ( H264_CONTEXT *  h264)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL h264_context_init ( H264_CONTEXT *  h264)

Here is the call graph for this function:

Here is the caller graph for this function:

H264_CONTEXT* h264_context_new ( BOOL  Compressor)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL h264_context_reset ( H264_CONTEXT *  h264,
UINT32  width,
UINT32  height 
)

Here is the caller graph for this function:

static BOOL CALLBACK h264_register_subsystems ( PINIT_ONCE  once,
PVOID  param,
PVOID *  context 
)
static

Here is the caller graph for this function:

Variable Documentation

H264_CONTEXT_SUBSYSTEM* subSystems[MAX_SUBSYSTEMS]
static
INIT_ONCE subsystems_once = INIT_ONCE_STATIC_INIT
static