u_int32 luma_size;
u_int32 chroma_size;
u_int32 chroma_height;
- u_int32 uVertAlign = 512-1;
bool b10BitFormat = is_10bit_format(ctx);
-
struct queue_data *q_data;
q_data = &ctx->q_data[V4L2_DST];
width = b10BitFormat?(width + ((width + 3) >> 2)):width;
- width = ((width + uVertAlign) & ~uVertAlign);
+ width = ALIGN(width, V4L2_NXP_FRAME_HORIZONTAL_ALIGN);
q_data->stride = width;
- height = ((height + uVertAlign) & ~uVertAlign);
- if (ctx->seqinfo.uProgressive)
- chroma_height = height >> 1;
- else
- chroma_height = height;
+ height = ALIGN(height, V4L2_NXP_FRAME_VERTICAL_ALIGN);
+ chroma_height = height >> 1;
+
luma_size = width * height;
chroma_size = width * chroma_height;
ctx->q_data[V4L2_DST].sizeimage[0] = luma_size;
last = 0x0a010000;
break;
case VPU_VIDEO_MPEG2:
+ case VPU_VIDEO_AVS:
last = EOS_GENERIC_MPEG;
break;
case VPU_VIDEO_ASP:
- case VPU_VIDEO_AVS:
last = 0xb1010000;
break;
case VPU_VIDEO_SPK:
#define VPU_DECODED_EVENT_PERF_MASK (1 << 0)
#define VPU_READY_EVENT_PERF_MASK (1 << 1)
+#define V4L2_NXP_FRAME_VERTICAL_ALIGN 512
+#define V4L2_NXP_FRAME_HORIZONTAL_ALIGN 512
+
pSTREAM_BUFFER_DESCRIPTOR_TYPE get_str_buffer_desc(struct vpu_ctx *ctx);
u_int32 got_free_space(u_int32 wptr, u_int32 rptr, u_int32 start, u_int32 end);
int copy_buffer_to_stream(struct vpu_ctx *ctx, void *buffer, uint32_t length);