diff mbox series

[FFmpeg-devel,10/11] avcodec/s210dec: support 4:2:2 10bit only and remove the EXPERIMENTAL capability

Message ID 1636712536-13114-10-git-send-email-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/11] avformat/rtpdec_rfc4175: use rawvideo for uyvy422
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Limin Wang Nov. 12, 2021, 10:22 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Don't need set the pix_fmt to YUV422P10 anymore.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/s210dec.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/s210dec.c b/libavcodec/s210dec.c
index 7bc5dbc..a89546f 100644
--- a/libavcodec/s210dec.c
+++ b/libavcodec/s210dec.c
@@ -83,11 +83,9 @@  static av_cold int s210_init_decoder(AVCodecContext *avctx)
     if (!avctx->width || !avctx->height)
         return AVERROR_INVALIDDATA;
 
-    if (avctx->bits_per_coded_sample == 20 &&
-        avctx->pix_fmt == AV_PIX_FMT_YUV422P10)
-        bc->decode = s210_decode_yuv422p10;
-    else
-        return AVERROR_INVALIDDATA;
+    avctx->pix_fmt             = AV_PIX_FMT_YUV422P10;
+    avctx->bits_per_raw_sample = 20;
+    bc->decode                 = s210_decode_yuv422p10;
 
     return 0;
 }
@@ -120,6 +118,5 @@  const AVCodec ff_s210_decoder = {
     .priv_data_size        = sizeof(struct S210Context),
     .init = s210_init_decoder,
     .decode = s210_decode,
-    .capabilities = AV_CODEC_CAP_EXPERIMENTAL,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };