2
0

ffmpeg software decoder implementation (#461)

* WIP: ffmpeg based software decoder

* minor update

* WIP: FFMpeg SW decoder support

* FFMpeg decoder working version

* working version without threading

* multithreading working with FFMpeg decoder

* moved ffmpeg decoder to separate folder

* updated changelog

* minor change

* resolved review comments

* resolved review comments

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Este cometimento está contido em:
Rajy Rawther
2024-12-04 11:11:02 -08:00
cometido por GitHub
ascendente 924d19eb65
cometimento 52eb62fabf
9 ficheiros modificados com 1213 adições e 81 eliminações
+9 -32
Ver ficheiro
@@ -196,38 +196,6 @@ static const char * GetVideoChromaFormatName(rocDecVideoChromaFormat e_chroma_fo
return "Unknown";
}
static float GetChromaHeightFactor(rocDecVideoSurfaceFormat surface_format) {
float factor = 0.5;
switch (surface_format) {
case rocDecVideoSurfaceFormat_NV12:
case rocDecVideoSurfaceFormat_P016:
factor = 0.5;
break;
case rocDecVideoSurfaceFormat_YUV444:
case rocDecVideoSurfaceFormat_YUV444_16Bit:
factor = 1.0;
break;
}
return factor;
}
static int GetChromaPlaneCount(rocDecVideoSurfaceFormat surface_format) {
int num_planes = 1;
switch (surface_format) {
case rocDecVideoSurfaceFormat_NV12:
case rocDecVideoSurfaceFormat_P016:
num_planes = 1;
break;
case rocDecVideoSurfaceFormat_YUV444:
case rocDecVideoSurfaceFormat_YUV444_16Bit:
num_planes = 2;
break;
}
return num_planes;
}
static void GetSurfaceStrideInternal(rocDecVideoSurfaceFormat surface_format, uint32_t width, uint32_t height, uint32_t *pitch, uint32_t *vstride) {
switch (surface_format) {
@@ -247,6 +215,15 @@ static void GetSurfaceStrideInternal(rocDecVideoSurfaceFormat surface_format, ui
*pitch = align(width, 128) * 2;
*vstride = align(height, 16);
break;
case rocDecVideoSurfaceFormat_YUV420:
*pitch = align(width, 256);
*vstride = align(height, 16);
break;
case rocDecVideoSurfaceFormat_YUV420_16Bit:
*pitch = align(width, 128) * 2;
*vstride = align(height, 16);
break;
}
return;
}