x265-1.8版本-common/piclist.h注释

本文介绍x265项目中的帧列表管理类PicList,包括其主要成员变量和函数,如添加、删除帧的方法等。该类用于管理解码后的帧数据,支持高效检索特定帧。

注:问号以及未注释部分 会在x265-1.9版本内更新

/*****************************************************************************
 * Copyright (C) 2013 x265 project
 *
 * Authors: Gopu Govindaswamy <gopu@multicorewareinc.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at license @ x265.com.
 *****************************************************************************/

#ifndef X265_PICLIST_H
#define X265_PICLIST_H

#include "common.h"

namespace X265_NS {
class Frame;
//DPB 中有两个列表 m_picList; m_freeList; 用于存储解码帧和????
//Lookahead 中两个列表  m_inputQueue; m_outputQueue; 用于帧类型决策的输入输出
class PicList
{
protected:

    Frame*   m_start;//队列的第一帧
    Frame*   m_end;//队列最后一帧
    int      m_count;//队列中总共有多少帧

public:

    PicList()//初始化
    {
        m_start = NULL;
        m_end   = NULL;
        m_count = 0;
    }

    /** Push picture to end of the list */
    /** 函数功能       : 将帧加入到队列尾位置
    * \参数 curFrame   : 视频帧
    *   返回值         : null
    **/
    void pushBack(Frame& pic);

    /** Push picture to beginning of the list */
    /** 函数功能       : 将帧加入到队列首位置
    * \参数 curFrame   : 视频帧
    *   返回值         : null
    **/
    void pushFront(Frame& pic);

    /** Pop picture from end of the list */
    /** 函数功能       : 返回队列中的最后一帧并在列表中删除
    *   返回值         : 返回队列中的最后一帧
    **/
    Frame* popBack();

    /** Pop picture from beginning of the list */
    /** 函数功能       : 返回队列中的第一帧并在列表中删除
    *   返回值         : 返回队列中的第一帧
    **/
    Frame* popFront();

    /** Find frame with specified POC */
    /** 函数功能       : 返回队列中对应poc的帧 不在列表中删除
    * \参数 poc        : 视频帧poc
    *   返回值         : 返回队列中对应poc的帧
    **/
    Frame* getPOC(int poc);

    /** Remove picture from list */
    /** 函数功能       : 从列表中删除对应视频帧
    * \参数 curFrame   : 视频帧
    *   返回值         : null
    **/
    void remove(Frame& pic);

    Frame* first()        { return m_start;   }//获取列表中的第一帧

    Frame* last()         { return m_end;     }//获取列表中的最后一帧

    int size()            { return m_count;   }//获取列表长度

    bool empty() const    { return !m_count;  }//判断是否为空,空返回true

    operator bool() const { return !!m_count; }//重载运算符 bool强制类型转换  
};
}

#endif // ifndef X265_PICLIST_H


 

D/app.main [2025-09-03 10:34:00.505 pid:0970 tid:0970] (main.cpp:47 buzzer_handler)------- Buzzer Clicked -------- D/logic.comm [2025-09-03 10:34:00.505 pid:0970 tid:0970] (logic_interactive_com.c:216 st_ctrl_msg_dist_control_deal)cmd :2005 W/NO_TAG [2025-09-03 10:34:00.505 tid:0970] (ui_page_lyly_piclist.cpp:31 EventHandler)PageLylyPicList::EventHandler() E/NO_TAG [2025-09-03 10:34:00.505 tid:0970] (ui_page_lyly_piclist.cpp:351 DetachBtn)btnType:2 D/NO_TAG [2025-09-03 10:34:00.505 pid:0970 tid:0970] (ui_page_lyly_piclist.cpp:248[ 3134.889982] main: page allocation failure: order:9, mode:0xcc4(GFP_KERNEL|GFP_DMA32), nodemask=(null) NextImg)NextImg: obj_mainbg deleted D/logic.comm [[ 3134.903748] CPU: 1 PID: 970 Comm: main Tainted: G O 5.10.186 #56 2025-09-03 10:34:00.505 pid:0970 tid:0970] (logic_interactive_co[ 3134.916670] Stack : 809c0000 00000000 00000000 00000000 808f033c 00000000 77584000 80098560 m.c:308 st_ctrl_msg_dist_call_deal)cmd: 0x3023 D/l[ 3134.930830] 8130d000 00000000 00000000 d59f6538 826d9c24 00000001 826d9bb8 d59f6538 ogic.ctrl [2025-09-03 10:34:00.505 pid:0970 tid:0970] (logic_ctr[ 3134.944998] 00000000 00000000 808d6990 826d9a78 00000b28 826d9a8c 00000000 00002328 l_deal.c:2294 logic_call_deal_get_picrecord)index: 1 3134.959164] 35de1ac3 826d9a8b ffffffff 00000030 809b0000 80000000 00000000 808d0000 ;22mD/NO_TAG [2025-09-03 10:34:00.505 pid:0970 tid:0970] (stor[ 3134.973328] 809ac1f4 00000000 809b0000 00000000 00000000 00000000 2000e098 80a40004 age_photo.c:309 storage_get_appoint_photo)Index:1 3134.987497] ... mD/NO_TAG [2025-09-03 10:34:00.505 pid:0970 tid:0970] (storage[ 3134.995561] Call Trace: _comm.c:252 get_size)file: /data/nand-2/SNAP//MANAGE.BIN [ 3135.003638] [<8001f598>] show_stack+0x94/0x12c D/NO_TAG [2025-09-03 10:34:00.506 pid:0970 tid:0970] ([ 3135.013769] [<807cccb8>] dump_stack+0xac/0xe8 storage_comm.c:254 get_size)fie ret: 0 D/NO_TAG [ 3135.023806] [<8012f894>] warn_alloc+0xdc/0x148 [2025-09-03 10:34:00.506 pid:0970 tid:0970] (storage_comm.c:259[ 3135.033929] [<80130098>] __alloc_pages_nodemask+0x798/0xc34 get_size)buf.st_size: 324 D/NO_TAG [2025-09-0[ 3135.045227] [<800b6380>] __dma_direct_alloc_pages+0x120/0x2c0 3 10:34:00.506 pid:0970 tid:0970] (storage_comm.c:670 Fread_comm[ 3135.056700] [<800b67ec>] dma_direct_alloc+0x118/0x214 on)Fread_common Num: 9 read size: 324 DataSize: 36 DataMaxNum: [ 3135.067457] [<800b5ad0>] dma_alloc_attrs+0xb8/0xf8 10 D/NO_TAG [2025-09-03 10:34:00.506 pid:0970 t[ 3135.077962] [<c013da58>] rmem_alloc_aligned+0x194/0x2a4 [rmem_manager] id:0970] (storage_photo.c:316 storage_get_appoint_photo)photolis[ 3135.090229] [<c013e00c>] rmem_ioctl+0x204/0x3d0 [rmem_manager] t->Count:9 D/NO_TAG [2025-09-03 10:34:00.506 pi[ 3135.101799] [<80156898>] sys_ioctl+0x130/0x898 d:0970 tid:0970] (storage_photo.c:198 get_photo_file)get_photo_f[ 3135.111930] [<8002ac98>] syscall_common+0x34/0x58 ile /data/nand-2/SNAP//20250903085250.jpg D/NO_TA[ 3135.122317] G [2025-09-03 10:34:00.506 pid:0970 tid:0970] (ui_page_lyly_pi[ 3135.130337] Mem-Info: clist.cpp:259 NextImg)NextImg: ui_logic_control_deal returned 1 active_anon:288 inactive_anon:4014 isolated_anon:0 [ 3135.137425] active_file:3988 inactive_file:2059 isolated_file:32 [ 3135.137425] unevictable:0 dirty:0 writeback:0 [ 3135.137425] slab_reclaimable:568 slab_unreclaimable:1862 [ 3135.137425] mapped:4773 shmem:292 pagetables:139 bounce:0 [ 3135.137425] free:9923 free_pcp:32 free_cma:0 [0m D/mod.time [2025-09-03 10:34:00.839 pid:0970 tid:1028] ([ 3135.175914] Node 0 active_anon:1152kB inactive_anon:16056kB active_file:15952kB inactive_file:8236kB unevictable:0kB isolated(anon):0kB isolated(file):128kB mapped:19092kB dirty:0kB writeback:0kB shmem:1168kB writeback_tmp:0kB kernel_stack:936kB all_unreclaimable? no time_logic.c:285 get_rtc_time)get_rtc_time y:2025,m:9,d:3 ,h:10,[ 3135.206041] Normal free:39692kB min:1268kB low:1584kB high:1900kB reserved_highatomic:0KB active_anon:1152kB inactive_anon:16056kB active_file:16044kB inactive_file:8244kB unevictable:0kB writepending:0kB present:116736kB managed:101084kB mlocked:0kB pagetables:556kB bounce:0kB free_pcp:128kB local_pcp:0kB free_cma:0kB min:34,s:0 [ 3135.240799] lowmem_reserve[]: 0 0 [ 3135.245634] Normal: 303*4kB (UM) 91*8kB (UM) 61*16kB (M) 69*32kB (M) 47*64kB (M) 44*128kB (M) 26*256kB (M) 22*512kB (UM) 8*1024kB (M) 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB 0*65536kB = 39876kB [ 3135.264422] 6371 total pagecache pages [ 3135.268333] 29184 pages RAM [ 3135.271328] 0 pages HighMem/MovableOnly [ 3135.275360] 3913 pages reserved [ 3135.278786] rmem: can't get enough mem, alloc 1228800 bytes from kernel [ 3135.285853] RMEM: alloc memery 1228800 err RMEM: failed to alloc rmem, Operation not permitted [ 3135.290772] JPEGD : dst addr error JPEG decompression failed: Bad address 帮我看一下这份报错
09-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值