mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
[mpp_dec]: Add compat check when inc fbc buf size
Change-Id: I8f6314683a99343556af3f7dfb35377a01480737 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
parent
f1324e29a2
commit
6f9eda5bcf
3 changed files with 11 additions and 3 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "mpp_mem.h"
|
||||
#include "mpp_log.h"
|
||||
#include "mpp_common.h"
|
||||
#include "mpp_compat_impl.h"
|
||||
|
||||
#include "mpp_bitread.h"
|
||||
#include "mpp_packet_impl.h"
|
||||
|
|
@ -612,7 +613,8 @@ static MPP_RET get_current_frame(Av1CodecContext *ctx)
|
|||
mpp_frame_set_fmt(frame->f, ctx->pix_fmt | ((s->cfg->base.out_fmt & (MPP_FRAME_FBC_MASK))));
|
||||
mpp_frame_set_offset_x(frame->f, 0);
|
||||
mpp_frame_set_offset_y(frame->f, 8);
|
||||
mpp_frame_set_ver_stride(frame->f, MPP_ALIGN(ctx->height, 8) + 16);
|
||||
if (*compat_ext_fbc_buf_size)
|
||||
mpp_frame_set_ver_stride(frame->f, MPP_ALIGN(ctx->height, 8) + 16);
|
||||
} else
|
||||
mpp_frame_set_fmt(frame->f, ctx->pix_fmt);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "mpp_mem.h"
|
||||
#include "mpp_compat_impl.h"
|
||||
#include "mpp_frame_impl.h"
|
||||
|
||||
#include "h264d_global.h"
|
||||
|
|
@ -453,7 +454,9 @@ static MPP_RET dpb_mark_malloc(H264dVideoCtx_t *p_Vid, H264_StorePic_t *dec_pic)
|
|||
if (MPP_FRAME_FMT_IS_FBC(out_fmt)) {
|
||||
impl->offset_x = 0;
|
||||
impl->offset_y = 4;
|
||||
impl->ver_stride += 16;
|
||||
|
||||
if (*compat_ext_fbc_buf_size)
|
||||
impl->ver_stride += 16;
|
||||
}
|
||||
|
||||
/* After cropped */
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#define MODULE_TAG "H265_PARSER_REF"
|
||||
|
||||
#include "mpp_compat_impl.h"
|
||||
|
||||
#include "h265d_parser.h"
|
||||
|
||||
#define HEVC_ALIGN(value, x) ((value + (x-1)) & (~(x-1)))
|
||||
|
|
@ -98,7 +100,8 @@ static HEVCFrame *alloc_frame(HEVCContext *s)
|
|||
mpp_slots_set_prop(s->slots, SLOTS_HOR_ALIGN, hor_align_64);
|
||||
mpp_frame_set_offset_x(frame->frame, 0);
|
||||
mpp_frame_set_offset_y(frame->frame, 4);
|
||||
mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height + 16);
|
||||
if (*compat_ext_fbc_buf_size)
|
||||
mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height + 16);
|
||||
}
|
||||
|
||||
mpp_frame_set_errinfo(frame->frame, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue