Message ID | 20230704111327.7140-1-yunfei.dong@mediatek.com |
---|---|
Headers | show |
Series | media: mediatek: vcodec: separate encoder and decoder | expand |
Il 04/07/23 13:13, Yunfei Dong ha scritto: > Move all decoder files to folder video-decoder. > Move all encoder files to folder video-encoder. > Move common files which shared for encoder and decoder to folder video-common. > > Change include header files and Makefile to fix build error. > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Few typos to fix: s/separete/separate/g; s/video-common/common/g after which Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Il 04/07/23 13:13, Yunfei Dong ha scritto: > The shared struct 'mtk_vcodec_ctx/dev' will be changed to 'mtk_vcodec_enc_ctx/dev' > and 'mtk_vcodec_dec_ctx/dev' in order to separate encoder and decoder. Removing > common struct 'mtk_vcodec_ctx/dev' for shared interface which encoder and decoder > used at the same time. Then encoder and decoder can call the same interface > independently. > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> > --- > .../mediatek/vcodec/mtk_vcodec_intr.c | 30 ++++++++++++------- > .../mediatek/vcodec/mtk_vcodec_intr.h | 3 +- > .../mediatek/vcodec/mtk_vcodec_util.c | 19 +++++------- > .../mediatek/vcodec/mtk_vcodec_util.h | 9 ++---- > .../mediatek/vcodec/vdec/vdec_vp8_if.c | 16 +++++----- > .../mediatek/vcodec/venc/venc_h264_if.c | 2 +- > .../mediatek/vcodec/venc/venc_vp8_if.c | 2 +- > 7 files changed, 41 insertions(+), 40 deletions(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c > index 552b4c93d972..daa44f635727 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c > @@ -11,32 +11,40 @@ > #include "mtk_vcodec_intr.h" > #include "mtk_vcodec_util.h" > > -int mtk_vcodec_wait_for_done_ctx(struct mtk_vcodec_ctx *ctx, > - int command, unsigned int timeout_ms, > +int mtk_vcodec_wait_for_done_ctx(void *priv, int command, unsigned int timeout_ms, > unsigned int hw_id) > { > + struct mtk_vcodec_ctx *ctx = priv; > long timeout_jiff, ret; > - int status = 0; > + int status = 0, ctx_id, ctx_type; Only one nitpick here, but nothing critical: please order variables by name. int ctx_id, ctx_type, status = 0; after which Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>