This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 395dc6fa2737c2d8bc248e0dd1d6aec86ac8e51e Author: James Almer <[email protected]> AuthorDate: Mon Mar 9 20:20:53 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Wed Mar 18 13:35:56 2026 -0300 avcodec/lcevc_parser: move the resolution type table to a header Will be useful in the following commit. Signed-off-by: James Almer <[email protected]> (cherry picked from commit c5aa31d2521bb2f3808eb2c2afe018e12359e45c) --- libavcodec/Makefile | 2 +- libavcodec/lcevc_parser.c | 24 ++----------- .../vulkan/vulkan.c => libavcodec/lcevctab.c | 2 +- libavcodec/lcevctab.h | 41 ++++++++++++++++++++++ 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 12a8265025..1410bd8142 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1277,7 +1277,7 @@ OBJS-$(CONFIG_IPU_PARSER) += ipu_parser.o OBJS-$(CONFIG_JPEG2000_PARSER) += jpeg2000_parser.o OBJS-$(CONFIG_JPEGXL_PARSER) += jpegxl_parser.o jpegxl_parse.o OBJS-$(CONFIG_JPEGXS_PARSER) += jpegxs_parser.o -OBJS-$(CONFIG_LCEVC_PARSER) += lcevc_parser.o +OBJS-$(CONFIG_LCEVC_PARSER) += lcevc_parser.o lcevctab.o OBJS-$(CONFIG_MISC4_PARSER) += misc4_parser.o OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o OBJS-$(CONFIG_MLP_PARSER) += mlp_parse.o mlp_parser.o mlp.o diff --git a/libavcodec/lcevc_parser.c b/libavcodec/lcevc_parser.c index 1de44a8bda..8564fbb528 100644 --- a/libavcodec/lcevc_parser.c +++ b/libavcodec/lcevc_parser.c @@ -26,6 +26,7 @@ #include "h2645_parse.h" #include "lcevc.h" #include "lcevc_parse.h" +#include "lcevctab.h" #include "parser.h" #include "parser_internal.h" @@ -82,25 +83,6 @@ static const enum AVPixelFormat pix_fmts[4][4] = { AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14, }, }; -static const struct { - int width; - int height; -} resolution_type_lut[63] = { - { 0, 0}, - { 360, 200 }, { 400, 240 }, { 480, 320 }, { 640, 360 }, - { 640, 480 }, { 768, 480 }, { 800, 600 }, { 852, 480 }, - { 854, 480 }, { 856, 480 }, { 960, 540 }, { 960, 640 }, - { 1024, 576 }, { 1024, 600 }, { 1024, 768 }, { 1152, 864 }, - { 1280, 720 }, { 1280, 800 }, { 1280, 1024 }, { 1360, 768 }, - { 1366, 768 }, { 1920, 1200 }, { 2048, 1080 }, { 2048, 1152 }, - { 2048, 1536 }, { 2160, 1440 }, { 2560, 1440 }, { 2560, 1600 }, - { 2560, 2048 }, { 3200, 1800 }, { 3200, 2048 }, { 3200, 2400 }, - { 3440, 1440 }, { 3840, 1600 }, { 3840, 2160 }, { 3840, 2400 }, - { 4096, 2160 }, { 4096, 3072 }, { 5120, 2880 }, { 5120, 3200 }, - { 5120, 4096 }, { 6400, 4096 }, { 6400, 4800 }, { 7680, 4320 }, - { 7680, 4800 }, -}; - static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx, const H2645NAL *nal) { @@ -152,8 +134,8 @@ static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx, s->format = pix_fmts[bit_depth][chroma_format_idc]; if (resolution_type < 63) { - s->width = resolution_type_lut[resolution_type].width; - s->height = resolution_type_lut[resolution_type].height; + s->width = ff_lcevc_resolution_type[resolution_type].width; + s->height = ff_lcevc_resolution_type[resolution_type].height; } else { int upsample_type, tile_dimensions_type; int temporal_step_width_modifier_signalled_flag, level1_filtering_signalled_flag; diff --git a/libswscale/vulkan/vulkan.c b/libavcodec/lcevctab.c similarity index 96% copy from libswscale/vulkan/vulkan.c copy to libavcodec/lcevctab.c index fc8a1fa47b..76853b80e5 100644 --- a/libswscale/vulkan/vulkan.c +++ b/libavcodec/lcevctab.c @@ -16,4 +16,4 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/vulkan.c" +#include "lcevctab.h" diff --git a/libavcodec/lcevctab.h b/libavcodec/lcevctab.h new file mode 100644 index 0000000000..6803589531 --- /dev/null +++ b/libavcodec/lcevctab.h @@ -0,0 +1,41 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LCEVCTAB_H +#define AVCODEC_LCEVCTAB_H + +static const struct { + int width; + int height; +} ff_lcevc_resolution_type[63] = { + { 0, 0}, + { 360, 200 }, { 400, 240 }, { 480, 320 }, { 640, 360 }, + { 640, 480 }, { 768, 480 }, { 800, 600 }, { 852, 480 }, + { 854, 480 }, { 856, 480 }, { 960, 540 }, { 960, 640 }, + { 1024, 576 }, { 1024, 600 }, { 1024, 768 }, { 1152, 864 }, + { 1280, 720 }, { 1280, 800 }, { 1280, 1024 }, { 1360, 768 }, + { 1366, 768 }, { 1920, 1200 }, { 2048, 1080 }, { 2048, 1152 }, + { 2048, 1536 }, { 2160, 1440 }, { 2560, 1440 }, { 2560, 1600 }, + { 2560, 2048 }, { 3200, 1800 }, { 3200, 2048 }, { 3200, 2400 }, + { 3440, 1440 }, { 3840, 1600 }, { 3840, 2160 }, { 3840, 2400 }, + { 4096, 2160 }, { 4096, 3072 }, { 5120, 2880 }, { 5120, 3200 }, + { 5120, 4096 }, { 6400, 4096 }, { 6400, 4800 }, { 7680, 4320 }, + { 7680, 4800 }, +}; + +#endif /* AVCODEC_LCEVCTAB_H */ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
